diff options
| author | Vibhav Pant | 2020-08-21 14:04:35 +0530 |
|---|---|---|
| committer | Vibhav Pant | 2020-08-21 14:04:35 +0530 |
| commit | f0f8d7b82492e741950c363a03b886965c91b1b0 (patch) | |
| tree | 19b716830b1ebabc0d7d75949c4e6800c0f104ad /lib/stdio.in.h | |
| parent | 9e64a087c4d167e7ec1c4e22bea3e6af53b563de (diff) | |
| parent | c818c29771d3cb51875643b2f6c894073e429dd2 (diff) | |
| download | emacs-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.h | 46 |
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@ |
| 828 | struct obstack; | 852 | struct 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 |