aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdio.in.h
diff options
context:
space:
mode:
authorVibhav Pant2020-08-21 14:04:35 +0530
committerVibhav Pant2020-08-21 14:04:35 +0530
commitf0f8d7b82492e741950c363a03b886965c91b1b0 (patch)
tree19b716830b1ebabc0d7d75949c4e6800c0f104ad /lib/stdio.in.h
parent9e64a087c4d167e7ec1c4e22bea3e6af53b563de (diff)
parentc818c29771d3cb51875643b2f6c894073e429dd2 (diff)
downloademacs-feature/native-comp-macos-fixes.tar.gz
emacs-feature/native-comp-macos-fixes.zip
Merge branch 'feature/native-comp' into feature/native-comp-macos-fixesfeature/native-comp-macos-fixes
Diffstat (limited to 'lib/stdio.in.h')
-rw-r--r--lib/stdio.in.h46
1 files changed, 44 insertions, 2 deletions
diff --git a/lib/stdio.in.h b/lib/stdio.in.h
index cbebc8462fd..6d12cd826de 100644
--- a/lib/stdio.in.h
+++ b/lib/stdio.in.h
@@ -215,6 +215,11 @@ _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - "
215 "use gnulib module fclose for portable POSIX compliance"); 215 "use gnulib module fclose for portable POSIX compliance");
216#endif 216#endif
217 217
218#if defined _WIN32 && !defined __CYGWIN__
219# undef fcloseall
220# define fcloseall _fcloseall
221#endif
222
218#if @GNULIB_FDOPEN@ 223#if @GNULIB_FDOPEN@
219# if @REPLACE_FDOPEN@ 224# if @REPLACE_FDOPEN@
220# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 225# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -224,6 +229,12 @@ _GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - "
224_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) 229_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode)
225 _GL_ARG_NONNULL ((2))); 230 _GL_ARG_NONNULL ((2)));
226_GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); 231_GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode));
232# elif defined _WIN32 && !defined __CYGWIN__
233# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
234# undef fdopen
235# define fdopen _fdopen
236# endif
237_GL_CXXALIAS_MDA (fdopen, FILE *, (int fd, const char *mode));
227# else 238# else
228_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); 239_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode));
229# endif 240# endif
@@ -233,6 +244,9 @@ _GL_CXXALIASWARN (fdopen);
233/* Assume fdopen is always declared. */ 244/* Assume fdopen is always declared. */
234_GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " 245_GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - "
235 "use gnulib module fdopen for portability"); 246 "use gnulib module fdopen for portability");
247#elif defined _WIN32 && !defined __CYGWIN__
248# undef fdopen
249# define fdopen _fdopen
236#endif 250#endif
237 251
238#if @GNULIB_FFLUSH@ 252#if @GNULIB_FFLUSH@
@@ -297,6 +311,11 @@ _GL_CXXALIASWARN (fgets);
297# endif 311# endif
298#endif 312#endif
299 313
314#if defined _WIN32 && !defined __CYGWIN__
315# undef fileno
316# define fileno _fileno
317#endif
318
300#if @GNULIB_FOPEN@ 319#if @GNULIB_FOPEN@
301# if @REPLACE_FOPEN@ 320# if @REPLACE_FOPEN@
302# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 321# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -824,6 +843,11 @@ _GL_WARN_ON_USE (getline, "getline is unportable - "
824_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); 843_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
825#endif 844#endif
826 845
846#if defined _WIN32 && !defined __CYGWIN__
847# undef getw
848# define getw _getw
849#endif
850
827#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ 851#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
828struct obstack; 852struct obstack;
829/* Grow an obstack with formatted output. Return the number of 853/* Grow an obstack with formatted output. Return the number of
@@ -940,7 +964,7 @@ _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - "
940#if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@ 964#if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@
941# if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \ 965# if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \
942 || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) 966 || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@))
943# if defined __GNUC__ 967# if defined __GNUC__ || defined __clang__
944# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 968# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
945/* Don't break __attribute__((format(printf,M,N))). */ 969/* Don't break __attribute__((format(printf,M,N))). */
946# define printf __printf__ 970# define printf __printf__
@@ -1037,6 +1061,11 @@ _GL_CXXALIASWARN (puts);
1037# endif 1061# endif
1038#endif 1062#endif
1039 1063
1064#if defined _WIN32 && !defined __CYGWIN__
1065# undef putw
1066# define putw _putw
1067#endif
1068
1040#if @GNULIB_REMOVE@ 1069#if @GNULIB_REMOVE@
1041# if @REPLACE_REMOVE@ 1070# if @REPLACE_REMOVE@
1042# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1071# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -1114,7 +1143,7 @@ _GL_WARN_ON_USE (renameat, "renameat is not portable - "
1114 1143
1115#if @GNULIB_SCANF@ 1144#if @GNULIB_SCANF@
1116# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ 1145# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
1117# if defined __GNUC__ 1146# if defined __GNUC__ || defined __clang__
1118# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1147# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1119# undef scanf 1148# undef scanf
1120/* Don't break __attribute__((format(scanf,M,N))). */ 1149/* Don't break __attribute__((format(scanf,M,N))). */
@@ -1170,7 +1199,9 @@ _GL_CXXALIAS_SYS (snprintf, int,
1170 (char *restrict str, size_t size, 1199 (char *restrict str, size_t size,
1171 const char *restrict format, ...)); 1200 const char *restrict format, ...));
1172# endif 1201# endif
1202# if __GLIBC__ >= 2
1173_GL_CXXALIASWARN (snprintf); 1203_GL_CXXALIASWARN (snprintf);
1204# endif
1174#elif defined GNULIB_POSIXCHECK 1205#elif defined GNULIB_POSIXCHECK
1175# undef snprintf 1206# undef snprintf
1176# if HAVE_RAW_DECL_SNPRINTF 1207# if HAVE_RAW_DECL_SNPRINTF
@@ -1214,6 +1245,11 @@ _GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - "
1214 "POSIX compliance"); 1245 "POSIX compliance");
1215#endif 1246#endif
1216 1247
1248#if defined _WIN32 && !defined __CYGWIN__
1249# undef tempnam
1250# define tempnam _tempnam
1251#endif
1252
1217#if @GNULIB_TMPFILE@ 1253#if @GNULIB_TMPFILE@
1218# if @REPLACE_TMPFILE@ 1254# if @REPLACE_TMPFILE@
1219# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1255# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -1382,7 +1418,9 @@ _GL_CXXALIAS_SYS (vfscanf, int,
1382 (FILE *restrict stream, 1418 (FILE *restrict stream,
1383 const char *restrict format, va_list args)); 1419 const char *restrict format, va_list args));
1384# endif 1420# endif
1421# if __GLIBC__ >= 2
1385_GL_CXXALIASWARN (vfscanf); 1422_GL_CXXALIASWARN (vfscanf);
1423# endif
1386#endif 1424#endif
1387 1425
1388#if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@ 1426#if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@
@@ -1436,7 +1474,9 @@ _GL_CXXALIAS_RPL (vscanf, int, (const char *restrict format, va_list args));
1436# else 1474# else
1437_GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args)); 1475_GL_CXXALIAS_SYS (vscanf, int, (const char *restrict format, va_list args));
1438# endif 1476# endif
1477# if __GLIBC__ >= 2
1439_GL_CXXALIASWARN (vscanf); 1478_GL_CXXALIASWARN (vscanf);
1479# endif
1440#endif 1480#endif
1441 1481
1442#if @GNULIB_VSNPRINTF@ 1482#if @GNULIB_VSNPRINTF@
@@ -1464,7 +1504,9 @@ _GL_CXXALIAS_SYS (vsnprintf, int,
1464 (char *restrict str, size_t size, 1504 (char *restrict str, size_t size,
1465 const char *restrict format, va_list args)); 1505 const char *restrict format, va_list args));
1466# endif 1506# endif
1507# if __GLIBC__ >= 2
1467_GL_CXXALIASWARN (vsnprintf); 1508_GL_CXXALIASWARN (vsnprintf);
1509# endif
1468#elif defined GNULIB_POSIXCHECK 1510#elif defined GNULIB_POSIXCHECK
1469# undef vsnprintf 1511# undef vsnprintf
1470# if HAVE_RAW_DECL_VSNPRINTF 1512# if HAVE_RAW_DECL_VSNPRINTF