diff options
-rw-r--r-- | src/os_unix.h | 7 | ||||
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/vim.h | 15 |
3 files changed, 16 insertions, 8 deletions
diff --git a/src/os_unix.h b/src/os_unix.h index a7a0c841f..e1c7deee1 100644 --- a/src/os_unix.h +++ b/src/os_unix.h @@ -129,13 +129,6 @@ // on some systems time.h should not be included together with sys/time.h #if !defined(HAVE_SYS_TIME_H) || defined(TIME_WITH_SYS_TIME) -// Needed for strptime() -# ifndef _XOPEN_SOURCE -# define _XOPEN_SOURCE -# endif -# ifndef __USE_XOPEN -# define __USE_XOPEN -# endif # include <time.h> #endif #ifdef HAVE_SYS_TIME_H diff --git a/src/version.c b/src/version.c index 9b8a02fac..9df71b8ad 100644 --- a/src/version.c +++ b/src/version.c @@ -738,6 +738,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2344, +/**/ 2343, /**/ 2342, @@ -36,8 +36,21 @@ Error: configure did not run properly. Check auto/config.log. # endif +# ifdef UNIX +// Needed for strptime(). Needs to be done early, since header files can +// include other header files and end up including time.h, where these symbols +// matter for Vim. +// 700 is needed for mkdtemp(). +# ifndef _XOPEN_SOURCE +# define _XOPEN_SOURCE 700 +# endif +# ifndef __USE_XOPEN +# define __USE_XOPEN +# endif +# endif + // for INT_MAX, LONG_MAX et al. -#include <limits.h> +# include <limits.h> /* * Cygwin may have fchdir() in a newer release, but in most versions it |