diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-08-01 21:46:10 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-08-01 21:46:10 -0700 |
commit | a0d4efe9c3c01fde58b401ee5ab88f052128fa85 (patch) | |
tree | 70862330c792d4ba0d16d9b389e742d65ddf2004 /m4 | |
parent | 13294f95172c68a5e77143f917231e0f17f37537 (diff) | |
download | emacs-a0d4efe9c3c01fde58b401ee5ab88f052128fa85.tar.gz |
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 @@ +dnl 'extern inline' a la ISO C99. + +dnl Copyright 2012 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_EXTERN_INLINE], +[ + AC_REQUIRE([AC_C_INLINE]) + AH_VERBATIM([extern_inline], +[/* _GL_INLINE is a portable alternative to ISO C99 plain 'inline'. + _GL_EXTERN_INLINE is a portable alternative to 'extern inline'. + _GL_INLINE_HEADER_BEGIN contains useful stuff to put + in an include file, before uses of _GL_INLINE. + It suppresses GCC's bogus "no previous prototype for 'FOO'" diagnostic, + when FOO is an inline function in the header; see + <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>. + _GL_INLINE_HEADER_END contains useful stuff to put + in the same include file, after uses of _GL_INLINE. */ +#if __GNUC__ ? __GNUC_STDC_INLINE__ : 199901L <= __STDC_VERSION__ +# define _GL_INLINE inline +# define _GL_EXTERN_INLINE extern inline +# if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ +# define _GL_INLINE_HEADER_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") +# define _GL_INLINE_HEADER_END \ + _Pragma ("GCC diagnostic pop") +# endif +#else +# define _GL_INLINE static inline +# define _GL_EXTERN_INLINE static inline +#endif + +#ifndef _GL_INLINE_HEADER_BEGIN +# define _GL_INLINE_HEADER_BEGIN +# define _GL_INLINE_HEADER_END +#endif]) +]) 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], # Code from module environ: # Code from module extensions: AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + # Code from module extern-inline: # Code from module filemode: # Code from module getloadavg: # Code from module getopt-gnu: @@ -151,6 +152,7 @@ fi gl_UNISTD_MODULE_INDICATOR([dup2]) gl_ENVIRON gl_UNISTD_MODULE_INDICATOR([environ]) +AC_REQUIRE([gl_EXTERN_INLINE]) gl_FILEMODE gl_GETLOADAVG if test $HAVE_GETLOADAVG = 0; then @@ -261,7 +263,6 @@ if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then fi gl_TIME_MODULE_INDICATOR([time_r]) gl_TIMESPEC -AC_REQUIRE([AC_C_INLINE]) gl_UNISTD_H gl_UTIMENS gl_gnulib_enabled_dosname=false @@ -565,6 +566,7 @@ AC_DEFUN([gl_FILE_LIST], [ lib/sha512.c lib/sha512.h lib/signal.in.h + lib/stat-time.c lib/stat-time.h lib/stat.c lib/stdalign.in.h @@ -590,7 +592,9 @@ AC_DEFUN([gl_FILE_LIST], [ lib/time_r.c lib/timespec-add.c lib/timespec-sub.c + lib/timespec.c lib/timespec.h + lib/u64.c lib/u64.h lib/unistd.in.h lib/utimens.c @@ -603,6 +607,7 @@ AC_DEFUN([gl_FILE_LIST], [ m4/dup2.m4 m4/environ.m4 m4/extensions.m4 + m4/extern-inline.m4 m4/filemode.m4 m4/getloadavg.m4 m4/getopt.m4 |