1
0
forked from aniani/vim

patch 8.1.2344: Cygwin: warning for using strptime()

Problem:    Cygwin: warning for using strptime().
Solution:   Move defining _XOPEN_SOURCE and __USE_XOPEN to vim.h. (Ken Takata,
            closes #5265)  Use 700 for _XOPEN_SOURCE for mkdtemp().
This commit is contained in:
Bram Moolenaar
2019-11-26 13:29:01 +01:00
parent 07e4a19795
commit 6a228c6463
3 changed files with 16 additions and 8 deletions

View File

@@ -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