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 edcf2a2d8..d4f93312a 100644 --- a/coreutils/test.c +++ b/coreutils/test.c | |||
@@ -637,6 +637,21 @@ static int filstat(char *nm, enum token mode) | |||
637 | return 0; | 637 | return 0; |
638 | } | 638 | } |
639 | 639 | ||
640 | #if ENABLE_PLATFORM_MINGW32 | ||
641 | if (mode == FILEX) { | ||
642 | char *p; | ||
643 | |||
644 | if (file_is_executable(nm)) { | ||
645 | return 1; | ||
646 | } | ||
647 | else if ((p=file_is_win32_executable(nm))) { | ||
648 | free(p); | ||
649 | return 1; | ||
650 | } | ||
651 | return 0; | ||
652 | } | ||
653 | #endif | ||
654 | |||
640 | if (stat(nm, &s) != 0) | 655 | if (stat(nm, &s) != 0) |
641 | return 0; | 656 | return 0; |
642 | if (mode == FILEXIST) | 657 | if (mode == FILEXIST) |