diff options
| author | Paul Eggert | 2011-03-31 23:07:33 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-03-31 23:07:33 -0700 |
| commit | 63139bfa89692ec666815f57d0658996577a80d3 (patch) | |
| tree | 75cab4465ad52d8c593722a686ed8c79a2da931a /lib | |
| parent | e2abce014d6f8d0d4a2bda66c1b554e84a0e51e6 (diff) | |
| download | emacs-63139bfa89692ec666815f57d0658996577a80d3.tar.gz emacs-63139bfa89692ec666815f57d0658996577a80d3.zip | |
lib/stdio.in.h, m4/gnulib-common.m4: Regenerate from latest gnulib.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/stdio.in.h | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/lib/stdio.in.h b/lib/stdio.in.h index dd31ce29ed1..57e93badce3 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h | |||
| @@ -67,7 +67,24 @@ | |||
| 67 | #else | 67 | #else |
| 68 | # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ | 68 | # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ |
| 69 | #endif | 69 | #endif |
| 70 | #define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ | 70 | |
| 71 | /* _GL_ATTRIBUTE_FORMAT_PRINTF | ||
| 72 | indicates to GCC that the function takes a format string and arguments, | ||
| 73 | where the format string directives are the ones standardized by ISO C99 | ||
| 74 | and POSIX. */ | ||
| 75 | #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) | ||
| 76 | # define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ | ||
| 77 | _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) | ||
| 78 | #else | ||
| 79 | # define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ | ||
| 80 | _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) | ||
| 81 | #endif | ||
| 82 | |||
| 83 | /* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, | ||
| 84 | except that it indicates to GCC that the supported format string directives | ||
| 85 | are the ones of the system printf(), rather than the ones standardized by | ||
| 86 | ISO C99 and POSIX. */ | ||
| 87 | #define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ | ||
| 71 | _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) | 88 | _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) |
| 72 | 89 | ||
| 73 | /* Solaris 10 declares renameat in <unistd.h>, not in <stdio.h>. */ | 90 | /* Solaris 10 declares renameat in <unistd.h>, not in <stdio.h>. */ |
| @@ -191,9 +208,15 @@ _GL_WARN_ON_USE (fopen, "fopen on Win32 platforms is not POSIX compatible - " | |||
| 191 | # define fprintf rpl_fprintf | 208 | # define fprintf rpl_fprintf |
| 192 | # endif | 209 | # endif |
| 193 | # define GNULIB_overrides_fprintf 1 | 210 | # define GNULIB_overrides_fprintf 1 |
| 211 | # if @GNULIB_FPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@ | ||
| 194 | _GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...) | 212 | _GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...) |
| 195 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) | 213 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) |
| 196 | _GL_ARG_NONNULL ((1, 2))); | 214 | _GL_ARG_NONNULL ((1, 2))); |
| 215 | # else | ||
| 216 | _GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...) | ||
| 217 | _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3) | ||
| 218 | _GL_ARG_NONNULL ((1, 2))); | ||
| 219 | # endif | ||
| 197 | _GL_CXXALIAS_RPL (fprintf, int, (FILE *fp, const char *format, ...)); | 220 | _GL_CXXALIAS_RPL (fprintf, int, (FILE *fp, const char *format, ...)); |
| 198 | # else | 221 | # else |
| 199 | _GL_CXXALIAS_SYS (fprintf, int, (FILE *fp, const char *format, ...)); | 222 | _GL_CXXALIAS_SYS (fprintf, int, (FILE *fp, const char *format, ...)); |
| @@ -694,12 +717,21 @@ _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " | |||
| 694 | /* Don't break __attribute__((format(printf,M,N))). */ | 717 | /* Don't break __attribute__((format(printf,M,N))). */ |
| 695 | # define printf __printf__ | 718 | # define printf __printf__ |
| 696 | # endif | 719 | # endif |
| 720 | # if @GNULIB_PRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@ | ||
| 697 | _GL_FUNCDECL_RPL_1 (__printf__, int, | 721 | _GL_FUNCDECL_RPL_1 (__printf__, int, |
| 698 | (const char *format, ...) | 722 | (const char *format, ...) |
| 699 | __asm__ (@ASM_SYMBOL_PREFIX@ | 723 | __asm__ (@ASM_SYMBOL_PREFIX@ |
| 700 | _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) | 724 | _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) |
| 701 | _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) | 725 | _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) |
| 702 | _GL_ARG_NONNULL ((1))); | 726 | _GL_ARG_NONNULL ((1))); |
| 727 | # else | ||
| 728 | _GL_FUNCDECL_RPL_1 (__printf__, int, | ||
| 729 | (const char *format, ...) | ||
| 730 | __asm__ (@ASM_SYMBOL_PREFIX@ | ||
| 731 | _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) | ||
| 732 | _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2) | ||
| 733 | _GL_ARG_NONNULL ((1))); | ||
| 734 | # endif | ||
| 703 | _GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); | 735 | _GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); |
| 704 | # else | 736 | # else |
| 705 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 737 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| @@ -1004,9 +1036,15 @@ _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " | |||
| 1004 | # define vfprintf rpl_vfprintf | 1036 | # define vfprintf rpl_vfprintf |
| 1005 | # endif | 1037 | # endif |
| 1006 | # define GNULIB_overrides_vfprintf 1 | 1038 | # define GNULIB_overrides_vfprintf 1 |
| 1039 | # if @GNULIB_VFPRINTF_POSIX@ | ||
| 1007 | _GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args) | 1040 | _GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args) |
| 1008 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) | 1041 | _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) |
| 1009 | _GL_ARG_NONNULL ((1, 2))); | 1042 | _GL_ARG_NONNULL ((1, 2))); |
| 1043 | # else | ||
| 1044 | _GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args) | ||
| 1045 | _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0) | ||
| 1046 | _GL_ARG_NONNULL ((1, 2))); | ||
| 1047 | # endif | ||
| 1010 | _GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)); | 1048 | _GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)); |
| 1011 | # else | 1049 | # else |
| 1012 | /* Need to cast, because on Solaris, the third parameter is | 1050 | /* Need to cast, because on Solaris, the third parameter is |
| @@ -1034,9 +1072,15 @@ _GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " | |||
| 1034 | # define vprintf rpl_vprintf | 1072 | # define vprintf rpl_vprintf |
| 1035 | # endif | 1073 | # endif |
| 1036 | # define GNULIB_overrides_vprintf 1 | 1074 | # define GNULIB_overrides_vprintf 1 |
| 1075 | # if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@ | ||
| 1037 | _GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args) | 1076 | _GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args) |
| 1038 | _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) | 1077 | _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) |
| 1039 | _GL_ARG_NONNULL ((1))); | 1078 | _GL_ARG_NONNULL ((1))); |
| 1079 | # else | ||
| 1080 | _GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args) | ||
| 1081 | _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0) | ||
| 1082 | _GL_ARG_NONNULL ((1))); | ||
| 1083 | # endif | ||
| 1040 | _GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args)); | 1084 | _GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args)); |
| 1041 | # else | 1085 | # else |
| 1042 | /* Need to cast, because on Solaris, the second parameter is | 1086 | /* Need to cast, because on Solaris, the second parameter is |