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:
@@ -129,13 +129,6 @@
|
|||||||
|
|
||||||
// on some systems time.h should not be included together with sys/time.h
|
// 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)
|
#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>
|
# include <time.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_SYS_TIME_H
|
#ifdef HAVE_SYS_TIME_H
|
||||||
|
@@ -737,6 +737,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2344,
|
||||||
/**/
|
/**/
|
||||||
2343,
|
2343,
|
||||||
/**/
|
/**/
|
||||||
|
15
src/vim.h
15
src/vim.h
@@ -36,8 +36,21 @@
|
|||||||
Error: configure did not run properly. Check auto/config.log.
|
Error: configure did not run properly. Check auto/config.log.
|
||||||
# endif
|
# 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.
|
// 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
|
* Cygwin may have fchdir() in a newer release, but in most versions it
|
||||||
|
Reference in New Issue
Block a user