Changeset 1838 in kBuild for trunk/src/kmk
- Timestamp:
- Oct 11, 2008 7:34:24 PM (16 years ago)
- Location:
- trunk/src/kmk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/function.c
r1836 r1838 289 289 } 290 290 } 291 #ifndef CONFIG_WITH_VALUE_LENGTH 291 292 if (doneany) 292 293 /* Kill the last space. */ 293 294 --o; 295 #else 296 /* Kill the last space and make sure there is a terminator there 297 so that strcache_add_len doesn't have to do a lot of exacty work 298 when expand_deps sends the output its way. */ 299 if (doneany) 300 *--o = '\0'; 301 else 302 o = variable_buffer_output (o, "\0", 1) - 1; 303 #endif 294 304 295 305 return o; -
trunk/src/kmk/read.c
r1831 r1838 1426 1426 /* Put all the prerequisites here; they'll be parsed later. */ 1427 1427 deps = alloc_dep (); 1428 #ifndef CONFIG_WITH_VALUE_LENGTH 1428 1429 deps->name = strcache_add_len (beg, end - beg + 1); 1430 #else /* CONFIG_WITH_VALUE_LENGTH */ 1431 { 1432 /* Make sure the strcache_add_len input is terminated so it 1433 doesn't have to make a temporary copy on the stack. */ 1434 char saved = end[1]; 1435 ((char *)end)[1] = '\0'; 1436 deps->name = strcache_add_len (beg, end - beg + 1); 1437 ((char *)end)[1] = saved; 1438 } 1439 #endif /* CONFIG_WITH_VALUE_LENGTH */ 1429 1440 } 1430 1441 else … … 2978 2989 free (qbase); 2979 2990 } 2980 #el se2991 #elif !defined(CONFIG_WITH_VALUE_LENGTH) 2981 2992 name = strcache_add_len (q, p - q); 2982 #endif 2993 #else /* CONFIG_WITH_VALUE_LENGTH */ 2994 { 2995 /* Make sure it's terminated, strcache_add_len has to make a 2996 temp copy on the stack otherwise. */ 2997 char saved = *p; 2998 *p = '\0'; 2999 name = strcache_add_len (q, p - q); 3000 *p = saved; 3001 } 3002 #endif /* CONFIG_WITH_VALUE_LENGTH */ 2983 3003 2984 3004 /* Add it to the front of the chain. */
Note:
See TracChangeset
for help on using the changeset viewer.