diff options
| author | Paul Eggert | 2015-01-06 09:15:11 -0800 |
|---|---|---|
| committer | Paul Eggert | 2015-01-06 09:15:29 -0800 |
| commit | 215942da54990e097f838cd8bdb7d7164a6e3463 (patch) | |
| tree | cca4ea6474a94083a48fa813fa76417e45fa1f93 | |
| parent | f5afaf9ce74dd04e37d72e62ecd85fc19c06bb55 (diff) | |
| download | emacs-215942da54990e097f838cd8bdb7d7164a6e3463.tar.gz emacs-215942da54990e097f838cd8bdb7d7164a6e3463.zip | |
Merge from gnulib
* lib/stdio.in.h, m4/stdio_h.m4: Update from gnulib, incorporating:
2015-01-05 stdio: fix use of PRIdMAX on modern mingw
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | lib/stdio.in.h | 7 | ||||
| -rw-r--r-- | m4/stdio_h.m4 | 20 |
3 files changed, 31 insertions, 2 deletions
| @@ -1,3 +1,9 @@ | |||
| 1 | 2015-01-06 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Merge from gnulib | ||
| 4 | * lib/stdio.in.h, m4/stdio_h.m4: Update from gnulib, incorporating: | ||
| 5 | 2015-01-05 stdio: fix use of PRIdMAX on modern mingw | ||
| 6 | |||
| 1 | 2015-01-04 Paul Eggert <eggert@cs.ucla.edu> | 7 | 2015-01-04 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 8 | ||
| 3 | * INSTALL: Mention 'make WERROR_CFLAGS='. | 9 | * INSTALL: Mention 'make WERROR_CFLAGS='. |
diff --git a/lib/stdio.in.h b/lib/stdio.in.h index 2a639c4478e..759c94d7abf 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h | |||
| @@ -84,8 +84,13 @@ | |||
| 84 | except that it indicates to GCC that the supported format string directives | 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 | 85 | are the ones of the system printf(), rather than the ones standardized by |
| 86 | ISO C99 and POSIX. */ | 86 | ISO C99 and POSIX. */ |
| 87 | #define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ | 87 | #if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU |
| 88 | # define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ | ||
| 89 | _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument) | ||
| 90 | #else | ||
| 91 | # define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ | ||
| 88 | _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) | 92 | _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) |
| 93 | #endif | ||
| 89 | 94 | ||
| 90 | /* _GL_ATTRIBUTE_FORMAT_SCANF | 95 | /* _GL_ATTRIBUTE_FORMAT_SCANF |
| 91 | indicates to GCC that the function takes a format string and arguments, | 96 | indicates to GCC that the function takes a format string and arguments, |
diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4 index 42173387aff..e0c4bde1f8e 100644 --- a/m4/stdio_h.m4 +++ b/m4/stdio_h.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # stdio_h.m4 serial 43 | 1 | # stdio_h.m4 serial 44 |
| 2 | dnl Copyright (C) 2007-2015 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2007-2015 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -12,6 +12,24 @@ AC_DEFUN([gl_STDIO_H], | |||
| 12 | AC_REQUIRE([gl_STDIO_H_DEFAULTS]) | 12 | AC_REQUIRE([gl_STDIO_H_DEFAULTS]) |
| 13 | gl_NEXT_HEADERS([stdio.h]) | 13 | gl_NEXT_HEADERS([stdio.h]) |
| 14 | 14 | ||
| 15 | dnl Determine whether __USE_MINGW_ANSI_STDIO makes printf and | ||
| 16 | dnl inttypes.h behave like gnu instead of system; we must give our | ||
| 17 | dnl printf wrapper the right attribute to match. | ||
| 18 | AC_CACHE_CHECK([whether inttypes macros match system or gnu printf], | ||
| 19 | [gl_cv_func_printf_attribute_flavor], | ||
| 20 | [AC_EGREP_CPP([findme .(ll|j)d. findme], | ||
| 21 | [#define __STDC_FORMAT_MACROS 1 | ||
| 22 | #include <stdio.h> | ||
| 23 | #include <inttypes.h> | ||
| 24 | findme PRIdMAX findme | ||
| 25 | ], [gl_cv_func_printf_attribute_flavor=gnu], | ||
| 26 | [gl_cv_func_printf_attribute_flavor=system])]) | ||
| 27 | if test "$gl_cv_func_printf_attribute_flavor" = gnu; then | ||
| 28 | AC_DEFINE([GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU], [1], | ||
| 29 | [Define to 1 if printf and friends should be labeled with | ||
| 30 | attribute "__gnu_printf__" instead of "__printf__"]) | ||
| 31 | fi | ||
| 32 | |||
| 15 | dnl No need to create extra modules for these functions. Everyone who uses | 33 | dnl No need to create extra modules for these functions. Everyone who uses |
| 16 | dnl <stdio.h> likely needs them. | 34 | dnl <stdio.h> likely needs them. |
| 17 | GNULIB_FSCANF=1 | 35 | GNULIB_FSCANF=1 |