comparison src/vim.h @ 18705:673f4603d979 v8.1.2344

patch 8.1.2344: Cygwin: warning for using strptime() Commit: https://github.com/vim/vim/commit/6a228c6463935a73c8f21142cb7368545cfee317 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Nov 26 13:29:01 2019 +0100 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().
author Bram Moolenaar <Bram@vim.org>
date Tue, 26 Nov 2019 13:30:04 +0100
parents fa995154904e
children cfe589c1b300
comparison
equal deleted inserted replaced
18704:65e3c91819fe 18705:673f4603d979
34 */ 34 */
35 # if (VIM_SIZEOF_INT == 0) 35 # if (VIM_SIZEOF_INT == 0)
36 Error: configure did not run properly. Check auto/config.log. 36 Error: configure did not run properly. Check auto/config.log.
37 # endif 37 # endif
38 38
39 # ifdef UNIX
40 // Needed for strptime(). Needs to be done early, since header files can
41 // include other header files and end up including time.h, where these symbols
42 // matter for Vim.
43 // 700 is needed for mkdtemp().
44 # ifndef _XOPEN_SOURCE
45 # define _XOPEN_SOURCE 700
46 # endif
47 # ifndef __USE_XOPEN
48 # define __USE_XOPEN
49 # endif
50 # endif
51
39 // for INT_MAX, LONG_MAX et al. 52 // for INT_MAX, LONG_MAX et al.
40 #include <limits.h> 53 # include <limits.h>
41 54
42 /* 55 /*
43 * Cygwin may have fchdir() in a newer release, but in most versions it 56 * Cygwin may have fchdir() in a newer release, but in most versions it
44 * doesn't work well and avoiding it keeps the binary backward compatible. 57 * doesn't work well and avoiding it keeps the binary backward compatible.
45 */ 58 */