From 202597ba094e3b52a6928b35d5d618f42c4ed9c0 Mon Sep 17 00:00:00 2001 From: ketmar Date: Mon, 20 Feb 2012 01:58:19 +0200 Subject: [PATCH] windoze build cannot into extended Glob (dirs-only, etc), sorry --- src/builtins.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/builtins.c b/src/builtins.c index 06d7a1e..5345d89 100644 --- a/src/builtins.c +++ b/src/builtins.c @@ -163,6 +163,7 @@ static LIST *builtin_flags (PARSE *parse, LOL *args, int *jmp) { } +#ifndef _WIN32 // <0: error; 0: regular; 1: directory static int getFileType (const char *diskname) { struct stat stbuf; @@ -173,6 +174,9 @@ static int getFileType (const char *diskname) { if (S_ISREG(stbuf.st_mode)) return 0; return -1; } +#else +static int getFileType (const char *diskname) { return -1; } +#endif enum { @@ -275,8 +279,10 @@ static LIST *builtin_glob (PARSE *parse, LOL *args, int *jmp) { else if (!strcmp("glob", lo->string)) globbing.cmptype = -1; else if (!strcmp("regexp", lo->string)) globbing.cmptype = 1; else if (!strcmp("plain", lo->string)) globbing.cmptype = 0; +#ifndef _WIN32 else if (!strcmp("dirs-only", lo->string)) globbing.mode = GLOB_DIRS; else if (!strcmp("files-only", lo->string)) globbing.mode = GLOB_FILES; +#endif else if (!strcmp("any", lo->string)) globbing.mode = GLOB_ANY; else { printf("jam: invalid option for Glob built-in: '%s'\n", lo->string); -- 2.11.4.GIT