diff options
Diffstat (limited to 'scripts/basic/split-include.c')
-rw-r--r-- | scripts/basic/split-include.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/basic/split-include.c b/scripts/basic/split-include.c index 290bea2fb..a85ede8ef 100644 --- a/scripts/basic/split-include.c +++ b/scripts/basic/split-include.c | |||
@@ -197,13 +197,21 @@ int main(int argc, const char * argv []) | |||
197 | * So by having an initial \n, strstr will find exact matches. | 197 | * So by having an initial \n, strstr will find exact matches. |
198 | */ | 198 | */ |
199 | 199 | ||
200 | #ifdef __MINGW32__ | ||
201 | fp_find = popen("find . -type f -name \"*.h\" -print", "r"); | ||
202 | #else | ||
200 | fp_find = popen("find * -type f -name \"*.h\" -print", "r"); | 203 | fp_find = popen("find * -type f -name \"*.h\" -print", "r"); |
204 | #endif | ||
201 | if (fp_find == 0) | 205 | if (fp_find == 0) |
202 | ERROR_EXIT( "find" ); | 206 | ERROR_EXIT( "find" ); |
203 | 207 | ||
204 | line[0] = '\n'; | 208 | line[0] = '\n'; |
205 | while (fgets(line+1, buffer_size, fp_find)) | 209 | while (fgets(line+1, buffer_size, fp_find)) |
206 | { | 210 | { |
211 | #ifdef __MINGW32__ | ||
212 | line[2] = '\n'; | ||
213 | # define line (line + 2) | ||
214 | #endif | ||
207 | if (strstr(list_target, line) == NULL) | 215 | if (strstr(list_target, line) == NULL) |
208 | { | 216 | { |
209 | /* | 217 | /* |
@@ -226,6 +234,9 @@ int main(int argc, const char * argv []) | |||
226 | ERROR_EXIT(line); | 234 | ERROR_EXIT(line); |
227 | } | 235 | } |
228 | } | 236 | } |
237 | #ifdef __MINGW32__ | ||
238 | # undef line | ||
239 | #endif | ||
229 | } | 240 | } |
230 | 241 | ||
231 | if (pclose(fp_find) != 0) | 242 | if (pclose(fp_find) != 0) |