Changeset 534 for trunk/src/gmake/variable.c
- Timestamp:
- Sep 19, 2006, 1:16:21 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gmake/variable.c
r533 r534 109 109 typedef signed int int32_t; 110 110 typedef signed short int int16_t; 111 # endif 111 # endif 112 112 static inline unsigned long variable_hash_2i(register const unsigned char *var, register int length) 113 113 { … … 318 318 define_variable_in_set (const char *name, unsigned int length, 319 319 char *value, unsigned int value_length, int duplicate_value, 320 enum variable_origin origin, int recursive, 320 enum variable_origin origin, int recursive, 321 321 struct variable_set *set, const struct floc *flocp) 322 322 #else 323 323 struct variable * 324 324 define_variable_in_set (const char *name, unsigned int length, 325 char *value, enum variable_origin origin, 326 int recursive, struct variable_set *set, 325 char *value, enum variable_origin origin, 326 int recursive, struct variable_set *set, 327 327 const struct floc *flocp) 328 #endif 328 #endif 329 329 { 330 330 struct variable *v; … … 386 386 free (v->value); 387 387 v->value = xstrdup (value); 388 #endif 388 #endif 389 389 if (flocp != 0) 390 390 v->fileinfo = *flocp; … … 426 426 #else 427 427 v->value = xstrdup (value); 428 #endif 428 #endif 429 429 if (flocp != 0) 430 430 v->fileinfo = *flocp; … … 1086 1086 v->value_length = strlen (v->value); 1087 1087 v->value_alloc_len = v->value_length + 1; 1088 #endif 1088 #endif 1089 1089 } 1090 1090 #endif … … 1274 1274 #ifdef CONFIG_WITH_VALUE_LENGTH 1275 1275 static struct variable * 1276 do_variable_definition_append (const struct floc *flocp, struct variable *v, char *value, 1277 enum Variable_origin origin)1276 do_variable_definition_append (const struct floc *flocp, struct variable *v, char *value, 1277 enum variable_origin origin) 1278 1278 { 1279 1279 if (env_overrides && origin == o_env) … … 1296 1296 v->fileinfo = *flocp; 1297 1297 1298 /* The juicy bits, append the specified value to the variable 1298 /* The juicy bits, append the specified value to the variable 1299 1299 This is a heavily exercied code path in kBuild. */ 1300 1300 if (v->recursive) … … 1322 1322 v->value_length = new_value_len; 1323 1323 } 1324 else 1324 else 1325 1325 { 1326 1326 /* The previous definition of the variable was simple. … … 1351 1351 # ifdef CONFIG_WITH_VALUE_LENGTH 1352 1352 unsigned int value_len = ~0U; 1353 # endif 1353 # endif 1354 1354 1355 1355 /* Calculate the variable's new value in VALUE. */ … … 1543 1543 # ifdef CONFIG_WITH_VALUE_LENGTH 1544 1544 ~0U, 1 /* duplicate_value */, 1545 # endif 1545 # endif 1546 1546 origin, flavor == f_recursive, 1547 1547 (target_var … … 1556 1556 if (alloc_value) 1557 1557 free (alloc_value); 1558 # endif 1558 # endif 1559 1559 } 1560 1560 else … … 1581 1581 if (alloc_value) 1582 1582 free (alloc_value); 1583 #endif 1583 #endif 1584 1584 1585 1585 return v; … … 1681 1681 #ifdef CONFIG_WITH_VALUE_LENGTH 1682 1682 v->value_length = v->value_alloc_len = -1; 1683 #endif 1683 #endif 1684 1684 1685 1685 /* Expand the name, so "$(foo)bar = baz" works. */
Note:
See TracChangeset
for help on using the changeset viewer.