diff options
Diffstat (limited to 'coreutils/test.c')
-rw-r--r-- | coreutils/test.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/coreutils/test.c b/coreutils/test.c index bf8dc47e8..b8a5d798c 100644 --- a/coreutils/test.c +++ b/coreutils/test.c | |||
@@ -638,6 +638,21 @@ static int filstat(char *nm, enum token mode) | |||
638 | return 0; | 638 | return 0; |
639 | } | 639 | } |
640 | 640 | ||
641 | #if ENABLE_PLATFORM_MINGW32 | ||
642 | if (mode == FILEX) { | ||
643 | char *p; | ||
644 | |||
645 | if (file_is_executable(nm)) { | ||
646 | return 1; | ||
647 | } | ||
648 | else if ((p=file_is_win32_executable(nm))) { | ||
649 | free(p); | ||
650 | return 1; | ||
651 | } | ||
652 | return 0; | ||
653 | } | ||
654 | #endif | ||
655 | |||
641 | if (stat(nm, &s) != 0) | 656 | if (stat(nm, &s) != 0) |
642 | return 0; | 657 | return 0; |
643 | if (mode == FILEXIST) | 658 | if (mode == FILEXIST) |