|
|
c6d234 |
Fix -Wundef warnings. This was addressed upstream as part of this
|
|
|
c6d234 |
commit:
|
|
|
c6d234 |
|
|
|
c6d234 |
commit c7aec4beb13f125948884d80158f11c34239c61f
|
|
|
c6d234 |
Author: Will Newton <will.newton@linaro.org>
|
|
|
c6d234 |
Date: Tue Jun 24 14:19:36 2014 +0100
|
|
|
c6d234 |
|
|
|
c6d234 |
sysdeps/posix/tempname.c: Merge from gnulib
|
|
|
c6d234 |
|
|
|
c6d234 |
diff --git a/sysdeps/posix/tempname.c b/sysdeps/posix/tempname.c
|
|
|
c6d234 |
index 2f0bfef34fa31c28..05c88bc95e72756e 100644
|
|
|
c6d234 |
--- a/sysdeps/posix/tempname.c
|
|
|
c6d234 |
+++ b/sysdeps/posix/tempname.c
|
|
|
c6d234 |
@@ -40,30 +40,30 @@
|
|
|
c6d234 |
# define __GT_NOCREATE 2
|
|
|
c6d234 |
#endif
|
|
|
c6d234 |
|
|
|
c6d234 |
-#if STDC_HEADERS || _LIBC
|
|
|
c6d234 |
+#if _LIBC || STDC_HEADERS
|
|
|
c6d234 |
# include <stddef.h>
|
|
|
c6d234 |
# include <stdlib.h>
|
|
|
c6d234 |
# include <string.h>
|
|
|
c6d234 |
#endif
|
|
|
c6d234 |
|
|
|
c6d234 |
-#if HAVE_FCNTL_H || _LIBC
|
|
|
c6d234 |
+#if _LIBC || HAVE_FCNTL_H
|
|
|
c6d234 |
# include <fcntl.h>
|
|
|
c6d234 |
#endif
|
|
|
c6d234 |
|
|
|
c6d234 |
-#if HAVE_SYS_TIME_H || _LIBC
|
|
|
c6d234 |
+#if _LIBC || HAVE_SYS_TIME_H
|
|
|
c6d234 |
# include <sys/time.h>
|
|
|
c6d234 |
#endif
|
|
|
c6d234 |
|
|
|
c6d234 |
-#if HAVE_STDINT_H || _LIBC
|
|
|
c6d234 |
+#if _LIBC || HAVE_STDINT_H
|
|
|
c6d234 |
# include <stdint.h>
|
|
|
c6d234 |
#endif
|
|
|
c6d234 |
|
|
|
c6d234 |
-#if HAVE_UNISTD_H || _LIBC
|
|
|
c6d234 |
+#if _LIBC || HAVE_UNISTD_H
|
|
|
c6d234 |
# include <unistd.h>
|
|
|
c6d234 |
#endif
|
|
|
c6d234 |
|
|
|
c6d234 |
#include <sys/stat.h>
|
|
|
c6d234 |
-#if STAT_MACROS_BROKEN
|
|
|
c6d234 |
+#if !_LIBC && STAT_MACROS_BROKEN
|
|
|
c6d234 |
# undef S_ISDIR
|
|
|
c6d234 |
#endif
|
|
|
c6d234 |
#if !defined S_ISDIR && defined S_IFDIR
|
|
|
c6d234 |
@@ -101,7 +101,7 @@
|
|
|
c6d234 |
# define __xstat64(version, path, buf) stat (path, buf)
|
|
|
c6d234 |
#endif
|
|
|
c6d234 |
|
|
|
c6d234 |
-#if ! (HAVE_SECURE_GETENV || _LIBC)
|
|
|
c6d234 |
+#if ! (_LIBC || HAVE_SECURE_GETENV)
|
|
|
c6d234 |
# ifdef HAVE___SECURE_GETENV
|
|
|
c6d234 |
# define __libc_secure_getenv __secure_getenv
|
|
|
c6d234 |
# else
|
|
|
c6d234 |
@@ -267,7 +267,7 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind)
|
|
|
c6d234 |
#ifdef RANDOM_BITS
|
|
|
c6d234 |
RANDOM_BITS (random_time_bits);
|
|
|
c6d234 |
#else
|
|
|
c6d234 |
-# if HAVE_GETTIMEOFDAY || _LIBC
|
|
|
c6d234 |
+# if _LIBC || HAVE_GETTIMEOFDAY
|
|
|
c6d234 |
{
|
|
|
c6d234 |
struct timeval tv;
|
|
|
c6d234 |
__gettimeofday (&tv, NULL);
|