]> granicus.if.org Git - vim/commitdiff
patch 8.1.2397: should not define __USE_XOPEN v8.1.2397
authorBram Moolenaar <Bram@vim.org>
Thu, 5 Dec 2019 22:07:06 +0000 (23:07 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 5 Dec 2019 22:07:06 +0000 (23:07 +0100)
Problem:    Should not define __USE_XOPEN. _XOPEN_SOURCE is not needed for
            Android.
Solution:   Remove __USE_XOPEN and adjust #ifdefs. (Ozaki Kiichi,
            closes #5322)

src/version.c
src/vim.h

index f5c7d2e27762114c9d9136031c7f96c219189747..f65803944a7602adf6b05f91f93edfa74cca837f 100644 (file)
@@ -742,6 +742,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2397,
 /**/
     2396,
 /**/
index 19c19de6543baabae75cc15372006ab5163a4576..68e2de1dec9aa0bbb8480386afed54dab39292a6 100644 (file)
--- a/src/vim.h
+++ b/src/vim.h
@@ -36,7 +36,7 @@
     Error: configure did not run properly.  Check auto/config.log.
 # endif
 
-# if defined(__gnu_linux__) || defined(__CYGWIN__)
+# if (defined(__linux__) && !defined(__ANDROID__)) || defined(__CYGWIN__)
 // 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.
@@ -44,9 +44,6 @@
 #  ifndef _XOPEN_SOURCE
 #   define _XOPEN_SOURCE    700
 #  endif
-#  ifndef __USE_XOPEN
-#   define __USE_XOPEN
-#  endif
 # endif
 
 // for INT_MAX, LONG_MAX et al.