]> granicus.if.org Git - php/commitdiff
fixed glob compilation with vc12
authorAnatol Belski <ab@php.net>
Mon, 20 Jan 2014 09:11:31 +0000 (10:11 +0100)
committerAnatol Belski <ab@php.net>
Mon, 20 Jan 2014 09:11:31 +0000 (10:11 +0100)
win32/glob.c

index 1aeac78fda076802d5be0145c172d43f8ae738c8..8111daba1c4e5ed2a0b24cd72767df3170e16785 100644 (file)
  *     Number of matches in the current invocation of glob.
  */
 #ifdef PHP_WIN32
-#define _POSIX_
-#include <limits.h>
-#undef _POSIX_
+#if _MSC_VER < 1800
+# define _POSIX_
+# include <limits.h>
+# undef _POSIX_
+#else
+/* Visual Studio 2013 removed all the _POSIX_ defines, but we depend on some */
+# ifndef ARG_MAX
+#  define ARG_MAX 14500
+# endif
+#endif
 #ifndef S_ISDIR
 #define S_ISDIR(m) (((m) & _S_IFDIR) == _S_IFDIR)
 #endif