diff options
Diffstat (limited to 'miscutils/make.c')
-rw-r--r-- | miscutils/make.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/miscutils/make.c b/miscutils/make.c index 7e156e302..a2cd03707 100644 --- a/miscutils/make.c +++ b/miscutils/make.c | |||
@@ -336,6 +336,21 @@ auto_concat(const char *s1, const char *s2) | |||
336 | return auto_string(xasprintf("%s%s", s1, s2)); | 336 | return auto_string(xasprintf("%s%s", s1, s2)); |
337 | } | 337 | } |
338 | 338 | ||
339 | #if !ENABLE_PLATFORM_MINGW32 | ||
340 | /* | ||
341 | * Append a word to a space-separated string of words. The first | ||
342 | * call should use a NULL pointer for str, subsequent calls should | ||
343 | * pass an allocated string which will be freed. | ||
344 | */ | ||
345 | static char * | ||
346 | xappendword(const char *str, const char *word) | ||
347 | { | ||
348 | char *newstr = str ? xasprintf("%s %s", str, word) : xstrdup(word); | ||
349 | free((void *)str); | ||
350 | return newstr; | ||
351 | } | ||
352 | #endif | ||
353 | |||
339 | static unsigned int | 354 | static unsigned int |
340 | getbucket(const char *name) | 355 | getbucket(const char *name) |
341 | { | 356 | { |