diff options
| author | Paul Eggert | 2012-08-01 21:46:10 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-08-01 21:46:10 -0700 |
| commit | a0d4efe9c3c01fde58b401ee5ab88f052128fa85 (patch) | |
| tree | 70862330c792d4ba0d16d9b389e742d65ddf2004 /m4 | |
| parent | 13294f95172c68a5e77143f917231e0f17f37537 (diff) | |
| download | emacs-a0d4efe9c3c01fde58b401ee5ab88f052128fa85.tar.gz emacs-a0d4efe9c3c01fde58b401ee5ab88f052128fa85.zip | |
Merge from gnulib, for extern-inline.
2012-08-01 extern-inline: new module
2012-08-01 stat-time, timespec, u64, utimens: use extern-inline
* lib/stat-time.c, lib/utimespec.c, lib/u64.c, m4/extern-inline.m4:
New files. The new .c files are for instantiating extern inline
functions.
Fixes: debbugs:12116
Diffstat (limited to 'm4')
| -rw-r--r-- | m4/extern-inline.m4 | 40 | ||||
| -rw-r--r-- | m4/gnulib-comp.m4 | 7 |
2 files changed, 46 insertions, 1 deletions
diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4 new file mode 100644 index 00000000000..cacf8a08b16 --- /dev/null +++ b/m4/extern-inline.m4 | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | dnl 'extern inline' a la ISO C99. | ||
| 2 | |||
| 3 | dnl Copyright 2012 Free Software Foundation, Inc. | ||
| 4 | dnl This file is free software; the Free Software Foundation | ||
| 5 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 6 | dnl with or without modifications, as long as this notice is preserved. | ||
| 7 | |||
| 8 | AC_DEFUN([gl_EXTERN_INLINE], | ||
| 9 | [ | ||
| 10 | AC_REQUIRE([AC_C_INLINE]) | ||
| 11 | AH_VERBATIM([extern_inline], | ||
| 12 | [/* _GL_INLINE is a portable alternative to ISO C99 plain 'inline'. | ||
| 13 | _GL_EXTERN_INLINE is a portable alternative to 'extern inline'. | ||
| 14 | _GL_INLINE_HEADER_BEGIN contains useful stuff to put | ||
| 15 | in an include file, before uses of _GL_INLINE. | ||
| 16 | It suppresses GCC's bogus "no previous prototype for 'FOO'" diagnostic, | ||
| 17 | when FOO is an inline function in the header; see | ||
| 18 | <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>. | ||
| 19 | _GL_INLINE_HEADER_END contains useful stuff to put | ||
| 20 | in the same include file, after uses of _GL_INLINE. */ | ||
| 21 | #if __GNUC__ ? __GNUC_STDC_INLINE__ : 199901L <= __STDC_VERSION__ | ||
| 22 | # define _GL_INLINE inline | ||
| 23 | # define _GL_EXTERN_INLINE extern inline | ||
| 24 | # if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ | ||
| 25 | # define _GL_INLINE_HEADER_BEGIN \ | ||
| 26 | _Pragma ("GCC diagnostic push") \ | ||
| 27 | _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") | ||
| 28 | # define _GL_INLINE_HEADER_END \ | ||
| 29 | _Pragma ("GCC diagnostic pop") | ||
| 30 | # endif | ||
| 31 | #else | ||
| 32 | # define _GL_INLINE static inline | ||
| 33 | # define _GL_EXTERN_INLINE static inline | ||
| 34 | #endif | ||
| 35 | |||
| 36 | #ifndef _GL_INLINE_HEADER_BEGIN | ||
| 37 | # define _GL_INLINE_HEADER_BEGIN | ||
| 38 | # define _GL_INLINE_HEADER_END | ||
| 39 | #endif]) | ||
| 40 | ]) | ||
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index b0cd185a2b5..c4deb8d42fb 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 | |||
| @@ -55,6 +55,7 @@ AC_DEFUN([gl_EARLY], | |||
| 55 | # Code from module environ: | 55 | # Code from module environ: |
| 56 | # Code from module extensions: | 56 | # Code from module extensions: |
| 57 | AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) | 57 | AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) |
| 58 | # Code from module extern-inline: | ||
| 58 | # Code from module filemode: | 59 | # Code from module filemode: |
| 59 | # Code from module getloadavg: | 60 | # Code from module getloadavg: |
| 60 | # Code from module getopt-gnu: | 61 | # Code from module getopt-gnu: |
| @@ -151,6 +152,7 @@ fi | |||
| 151 | gl_UNISTD_MODULE_INDICATOR([dup2]) | 152 | gl_UNISTD_MODULE_INDICATOR([dup2]) |
| 152 | gl_ENVIRON | 153 | gl_ENVIRON |
| 153 | gl_UNISTD_MODULE_INDICATOR([environ]) | 154 | gl_UNISTD_MODULE_INDICATOR([environ]) |
| 155 | AC_REQUIRE([gl_EXTERN_INLINE]) | ||
| 154 | gl_FILEMODE | 156 | gl_FILEMODE |
| 155 | gl_GETLOADAVG | 157 | gl_GETLOADAVG |
| 156 | if test $HAVE_GETLOADAVG = 0; then | 158 | if test $HAVE_GETLOADAVG = 0; then |
| @@ -261,7 +263,6 @@ if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then | |||
| 261 | fi | 263 | fi |
| 262 | gl_TIME_MODULE_INDICATOR([time_r]) | 264 | gl_TIME_MODULE_INDICATOR([time_r]) |
| 263 | gl_TIMESPEC | 265 | gl_TIMESPEC |
| 264 | AC_REQUIRE([AC_C_INLINE]) | ||
| 265 | gl_UNISTD_H | 266 | gl_UNISTD_H |
| 266 | gl_UTIMENS | 267 | gl_UTIMENS |
| 267 | gl_gnulib_enabled_dosname=false | 268 | gl_gnulib_enabled_dosname=false |
| @@ -565,6 +566,7 @@ AC_DEFUN([gl_FILE_LIST], [ | |||
| 565 | lib/sha512.c | 566 | lib/sha512.c |
| 566 | lib/sha512.h | 567 | lib/sha512.h |
| 567 | lib/signal.in.h | 568 | lib/signal.in.h |
| 569 | lib/stat-time.c | ||
| 568 | lib/stat-time.h | 570 | lib/stat-time.h |
| 569 | lib/stat.c | 571 | lib/stat.c |
| 570 | lib/stdalign.in.h | 572 | lib/stdalign.in.h |
| @@ -590,7 +592,9 @@ AC_DEFUN([gl_FILE_LIST], [ | |||
| 590 | lib/time_r.c | 592 | lib/time_r.c |
| 591 | lib/timespec-add.c | 593 | lib/timespec-add.c |
| 592 | lib/timespec-sub.c | 594 | lib/timespec-sub.c |
| 595 | lib/timespec.c | ||
| 593 | lib/timespec.h | 596 | lib/timespec.h |
| 597 | lib/u64.c | ||
| 594 | lib/u64.h | 598 | lib/u64.h |
| 595 | lib/unistd.in.h | 599 | lib/unistd.in.h |
| 596 | lib/utimens.c | 600 | lib/utimens.c |
| @@ -603,6 +607,7 @@ AC_DEFUN([gl_FILE_LIST], [ | |||
| 603 | m4/dup2.m4 | 607 | m4/dup2.m4 |
| 604 | m4/environ.m4 | 608 | m4/environ.m4 |
| 605 | m4/extensions.m4 | 609 | m4/extensions.m4 |
| 610 | m4/extern-inline.m4 | ||
| 606 | m4/filemode.m4 | 611 | m4/filemode.m4 |
| 607 | m4/getloadavg.m4 | 612 | m4/getloadavg.m4 |
| 608 | m4/getopt.m4 | 613 | m4/getopt.m4 |