diff options
| author | Ron Yorston <rmy@pobox.com> | 2024-06-05 14:12:25 +0100 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2024-06-05 14:12:25 +0100 |
| commit | be285ff1ddc59ff96d9012cba4590d3cf3f4cbee (patch) | |
| tree | 0c038a07f6da1f48657c53fc3ae62854c1c9cb5d | |
| parent | 0fc9f646c3f5df129adde5c0ebab274a123fba03 (diff) | |
| download | busybox-w32-be285ff1ddc59ff96d9012cba4590d3cf3f4cbee.tar.gz busybox-w32-be285ff1ddc59ff96d9012cba4590d3cf3f4cbee.tar.bz2 busybox-w32-be285ff1ddc59ff96d9012cba4590d3cf3f4cbee.zip | |
make: more changes for c:/path target
The previous commit failed to change an instance of find_char()
to find_colon().
It isn't necessary to use find_char() to replace find_colon()
in the non-Windows case: strchr(3) is sufficient.
Adds 16-48 bytes.
| -rw-r--r-- | miscutils/make.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/miscutils/make.c b/miscutils/make.c index 06917a867..e098b0880 100644 --- a/miscutils/make.c +++ b/miscutils/make.c | |||
| @@ -247,7 +247,7 @@ enum { | |||
| 247 | P_COMMAND_COMMENT = (1 << BIT_COMMAND_COMMENT), | 247 | P_COMMAND_COMMENT = (1 << BIT_COMMAND_COMMENT), |
| 248 | P_EMPTY_SUFFIX = (1 << BIT_EMPTY_SUFFIX), | 248 | P_EMPTY_SUFFIX = (1 << BIT_EMPTY_SUFFIX), |
| 249 | #if ENABLE_PLATFORM_MINGW32 | 249 | #if ENABLE_PLATFORM_MINGW32 |
| 250 | P_WINDOWS = (1 << BIT_WINDOWS) | 250 | P_WINDOWS = (1 << BIT_WINDOWS), |
| 251 | #endif | 251 | #endif |
| 252 | }; | 252 | }; |
| 253 | 253 | ||
| @@ -1229,7 +1229,8 @@ modify_words(const char *val, int modifier, size_t lenf, size_t lenr, | |||
| 1229 | /* | 1229 | /* |
| 1230 | * Return a pointer to the next instance of a given character. Macro | 1230 | * Return a pointer to the next instance of a given character. Macro |
| 1231 | * expansions are skipped so the ':' and '=' in $(VAR:.s1=.s2) aren't | 1231 | * expansions are skipped so the ':' and '=' in $(VAR:.s1=.s2) aren't |
| 1232 | * detected as separators for rules or macro definitions. | 1232 | * detected as separators in macro definitions. Some other situations |
| 1233 | * also require skipping the internals of a macro expansion. | ||
| 1233 | */ | 1234 | */ |
| 1234 | static char * | 1235 | static char * |
| 1235 | find_char(const char *str, int c) | 1236 | find_char(const char *str, int c) |
| @@ -1262,7 +1263,7 @@ find_colon(char *p) | |||
| 1262 | return q; | 1263 | return q; |
| 1263 | } | 1264 | } |
| 1264 | #else | 1265 | #else |
| 1265 | # define find_colon(s) find_char(s, ':') | 1266 | # define find_colon(s) strchr(s, ':') |
| 1266 | #endif | 1267 | #endif |
| 1267 | 1268 | ||
| 1268 | /* | 1269 | /* |
| @@ -2154,7 +2155,7 @@ input(FILE *fd, int ilevel) | |||
| 2154 | if (s) { | 2155 | if (s) { |
| 2155 | // Retrieve command from expanded copy of line | 2156 | // Retrieve command from expanded copy of line |
| 2156 | char *copy3 = expand_macros(copy, FALSE); | 2157 | char *copy3 = expand_macros(copy, FALSE); |
| 2157 | if ((p = find_char(copy3, ':')) && (p = strchr(p, ';'))) | 2158 | if ((p = find_colon(copy3)) && (p = strchr(p, ';'))) |
| 2158 | newcmd(&cp, process_command(p + 1)); | 2159 | newcmd(&cp, process_command(p + 1)); |
| 2159 | free(copy3); | 2160 | free(copy3); |
| 2160 | *s = '\0'; | 2161 | *s = '\0'; |
