Skip to content

Commit 89a9ace

Browse files
committed
Merge branch 'PHP-5.6'
* PHP-5.6: fixed glob compilation with vc12
2 parents d501707 + 8dd44fe commit 89a9ace

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

win32/glob.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,16 @@
6161
* Number of matches in the current invocation of glob.
6262
*/
6363
#ifdef PHP_WIN32
64-
#define _POSIX_
65-
#include <limits.h>
66-
#undef _POSIX_
64+
#if _MSC_VER < 1800
65+
# define _POSIX_
66+
# include <limits.h>
67+
# undef _POSIX_
68+
#else
69+
/* Visual Studio 2013 removed all the _POSIX_ defines, but we depend on some */
70+
# ifndef ARG_MAX
71+
# define ARG_MAX 14500
72+
# endif
73+
#endif
6774
#ifndef S_ISDIR
6875
#define S_ISDIR(m) (((m) & _S_IFDIR) == _S_IFDIR)
6976
#endif

0 commit comments

Comments
 (0)