summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2012-12-16 11:58:24 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2012-12-16 11:58:24 +0100
commit0daee2e0dd9904d9e85044d181553dfab81e426d (patch)
tree325665aecdd94c3cc63e43e24d62e6dde3891978
parentf9f5a817c619af57d19eb49b9c6091118d6165e2 (diff)
downloadgnutls-0daee2e0dd9904d9e85044d181553dfab81e426d.tar.gz
updated gnulib
-rw-r--r--build-aux/snippet/warn-on-use.h2
-rw-r--r--gl/Makefile.am4
-rw-r--r--gl/base64.c6
-rw-r--r--gl/error.c4
-rw-r--r--gl/fstat.c4
-rw-r--r--gl/getaddrinfo.c2
-rw-r--r--gl/m4/base64.m43
-rw-r--r--gl/m4/error.m41
-rw-r--r--gl/m4/extern-inline.m421
-rw-r--r--gl/m4/fstat.m47
-rw-r--r--gl/m4/ftruncate.m43
-rw-r--r--gl/m4/getaddrinfo.m43
-rw-r--r--gl/m4/gnulib-comp.m44
-rw-r--r--gl/m4/lock.m48
-rw-r--r--gl/m4/lstat.m48
-rw-r--r--gl/m4/math_h.m43
-rw-r--r--gl/m4/open.m43
-rw-r--r--gl/m4/stat.m48
-rw-r--r--gl/m4/stdio_h.m43
-rw-r--r--gl/m4/sys_socket_h.m43
-rw-r--r--gl/m4/sys_stat_h.m45
-rw-r--r--gl/m4/unistd_h.m43
-rw-r--r--gl/m4/vasnprintf.m43
-rw-r--r--gl/math.c3
-rw-r--r--gl/math.in.h13
-rw-r--r--gl/stdio.c3
-rw-r--r--gl/stdio.in.h8
-rw-r--r--gl/sys_socket.c3
-rw-r--r--gl/sys_socket.in.h9
-rw-r--r--gl/sys_stat.in.h2
-rw-r--r--gl/tests/ftruncate.c2
-rw-r--r--gl/tests/glthread/lock.c6
-rw-r--r--gl/tests/lstat.c2
-rw-r--r--gl/tests/open.c2
-rw-r--r--gl/tests/stat.c2
-rw-r--r--gl/unistd.c3
-rw-r--r--gl/unistd.in.h10
-rw-r--r--gl/vasnprintf.c2
-rw-r--r--maint.mk4
39 files changed, 104 insertions, 81 deletions
diff --git a/build-aux/snippet/warn-on-use.h b/build-aux/snippet/warn-on-use.h
index d4cb94f352..51e69bbd9b 100644
--- a/build-aux/snippet/warn-on-use.h
+++ b/build-aux/snippet/warn-on-use.h
@@ -55,7 +55,7 @@
rather than issue the nice warning, but the end result of informing
the developer about their portability problem is still achieved):
#if HAVE_RAW_DECL_ENVIRON
- static inline char ***rpl_environ (void) { return &environ; }
+ static char ***rpl_environ (void) { return &environ; }
_GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
# undef environ
# define environ (*rpl_environ ())
diff --git a/gl/Makefile.am b/gl/Makefile.am
index 13660abb14..0f03ec7302 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -793,6 +793,7 @@ EXTRA_libgnu_la_SOURCES += malloc.c
## begin gnulib module math
BUILT_SOURCES += math.h
+libgnu_la_SOURCES += math.c
# We need the following in order to create <math.h> when the system
# doesn't have one that works with the given compiler.
@@ -1691,6 +1692,7 @@ EXTRA_DIST += stdint.in.h
## begin gnulib module stdio
BUILT_SOURCES += stdio.h
+libgnu_la_SOURCES += stdio.c
# We need the following in order to create <stdio.h> when the system
# doesn't have one that works with the given compiler.
@@ -2166,6 +2168,7 @@ EXTRA_DIST += sys_select.in.h
## begin gnulib module sys_socket
BUILT_SOURCES += sys/socket.h
+libgnu_la_SOURCES += sys_socket.c
# We need the following in order to create <sys/socket.h> when the system
# doesn't have one that works with the given compiler.
@@ -2468,6 +2471,7 @@ EXTRA_DIST += u64.h
## begin gnulib module unistd
BUILT_SOURCES += unistd.h
+libgnu_la_SOURCES += unistd.c
# We need the following in order to create an empty placeholder for
# <unistd.h> when the system doesn't have one.
diff --git a/gl/base64.c b/gl/base64.c
index 351c5fd776..b92611f2b0 100644
--- a/gl/base64.c
+++ b/gl/base64.c
@@ -53,7 +53,7 @@
#include <string.h>
/* C89 compliant way to cast 'char' to 'unsigned char'. */
-static inline unsigned char
+static unsigned char
to_uchar (char ch)
{
return ch;
@@ -314,7 +314,7 @@ base64_decode_ctx_init (struct base64_decode_context *ctx)
and return CTX->buf. In either case, advance *IN to point to the byte
after the last one processed, and set *N_NON_NEWLINE to the number of
verified non-newline bytes accessible through the returned pointer. */
-static inline char *
+static char *
get_4 (struct base64_decode_context *ctx,
char const *restrict *in, char const *restrict in_end,
size_t *n_non_newline)
@@ -368,7 +368,7 @@ get_4 (struct base64_decode_context *ctx,
as many bytes as possible are written to *OUT. On return, advance
*OUT to point to the byte after the last one written, and decrement
*OUTLEN to reflect the number of bytes remaining in *OUT. */
-static inline bool
+static bool
decode_4 (char const *restrict in, size_t inlen,
char *restrict *outp, size_t *outleft)
{
diff --git a/gl/error.c b/gl/error.c
index dc8c65fa7f..7d2bc71fcc 100644
--- a/gl/error.c
+++ b/gl/error.c
@@ -121,7 +121,7 @@ extern char *program_name;
#if !_LIBC
/* Return non-zero if FD is open. */
-static inline int
+static int
is_open (int fd)
{
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
@@ -139,7 +139,7 @@ is_open (int fd)
}
#endif
-static inline void
+static void
flush_stdout (void)
{
#if !_LIBC
diff --git a/gl/fstat.c b/gl/fstat.c
index 6d5f5c2b6f..0418cc63b1 100644
--- a/gl/fstat.c
+++ b/gl/fstat.c
@@ -31,7 +31,7 @@
#endif
#undef __need_system_sys_stat_h
-static inline int
+static int
orig_fstat (int fd, struct stat *buf)
{
return fstat (fd, buf);
@@ -51,7 +51,7 @@ orig_fstat (int fd, struct stat *buf)
#endif
#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-static inline int
+static int
fstat_nothrow (int fd, struct stat *buf)
{
int result;
diff --git a/gl/getaddrinfo.c b/gl/getaddrinfo.c
index 069f2a95c5..e5de62c310 100644
--- a/gl/getaddrinfo.c
+++ b/gl/getaddrinfo.c
@@ -109,7 +109,7 @@ use_win32_p (void)
}
#endif
-static inline bool
+static bool
validate_family (int family)
{
/* FIXME: Support more families. */
diff --git a/gl/m4/base64.m4 b/gl/m4/base64.m4
index fa0c1928e8..94ba62de64 100644
--- a/gl/m4/base64.m4
+++ b/gl/m4/base64.m4
@@ -1,4 +1,4 @@
-# base64.m4 serial 3
+# base64.m4 serial 4
dnl Copyright (C) 2004, 2006, 2009-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,
@@ -11,6 +11,5 @@ AC_DEFUN([gl_FUNC_BASE64],
# Prerequisites of lib/base64.c.
AC_DEFUN([gl_PREREQ_BASE64], [
- AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([AC_C_RESTRICT])
])
diff --git a/gl/m4/error.m4 b/gl/m4/error.m4
index 5d9c70a475..1190e32c3d 100644
--- a/gl/m4/error.m4
+++ b/gl/m4/error.m4
@@ -23,6 +23,5 @@ AC_DEFUN([gl_ERROR],
AC_DEFUN([gl_PREREQ_ERROR],
[
AC_REQUIRE([AC_FUNC_STRERROR_R])
- AC_REQUIRE([AC_C_INLINE])
:
])
diff --git a/gl/m4/extern-inline.m4 b/gl/m4/extern-inline.m4
index 600c8d3fa1..0a9fc9a75b 100644
--- a/gl/m4/extern-inline.m4
+++ b/gl/m4/extern-inline.m4
@@ -7,7 +7,6 @@ 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'.
@@ -17,13 +16,19 @@ AC_DEFUN([gl_EXTERN_INLINE],
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__ \
- ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
- : 199901L <= __STDC_VERSION__)
+ in the same include file, after uses of _GL_INLINE.
+
+ Suppress the use of extern inline on Apple's platforms,
+ as Libc-825.25 (2012-09-19) is incompatible with it; see
+ <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
+ Perhaps Apple will fix this some day. */
+#if ((__GNUC__ \
+ ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
+ : 199901L <= __STDC_VERSION__) \
+ && !defined __APPLE__)
# define _GL_INLINE inline
# define _GL_EXTERN_INLINE extern inline
-#elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
+#elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __APPLE__
# if __GNUC_GNU_INLINE__
/* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
@@ -32,8 +37,8 @@ AC_DEFUN([gl_EXTERN_INLINE],
# endif
# define _GL_EXTERN_INLINE extern
#else
-# define _GL_INLINE static inline
-# define _GL_EXTERN_INLINE static inline
+# define _GL_INLINE static _GL_UNUSED
+# define _GL_EXTERN_INLINE static _GL_UNUSED
#endif
#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
diff --git a/gl/m4/fstat.m4 b/gl/m4/fstat.m4
index 3ab3297b2c..a73baa278a 100644
--- a/gl/m4/fstat.m4
+++ b/gl/m4/fstat.m4
@@ -1,4 +1,4 @@
-# fstat.m4 serial 3
+# fstat.m4 serial 4
dnl Copyright (C) 2011-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,
@@ -33,7 +33,4 @@ AC_DEFUN([gl_FUNC_FSTAT],
])
# Prerequisites of lib/fstat.c.
-AC_DEFUN([gl_PREREQ_FSTAT],
-[
- AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_PREREQ_FSTAT], [:])
diff --git a/gl/m4/ftruncate.m4 b/gl/m4/ftruncate.m4
index 969eb0412d..9f6c69063d 100644
--- a/gl/m4/ftruncate.m4
+++ b/gl/m4/ftruncate.m4
@@ -1,4 +1,4 @@
-# serial 19
+# serial 20
# See if we need to emulate a missing ftruncate function using chsize.
@@ -36,6 +36,5 @@ AC_DEFUN([gl_FUNC_FTRUNCATE],
# Prerequisites of lib/ftruncate.c.
AC_DEFUN([gl_PREREQ_FTRUNCATE],
[
- AC_REQUIRE([AC_C_INLINE])
AC_CHECK_FUNCS([chsize])
])
diff --git a/gl/m4/getaddrinfo.m4 b/gl/m4/getaddrinfo.m4
index 9cd3e675ec..8c4e46261c 100644
--- a/gl/m4/getaddrinfo.m4
+++ b/gl/m4/getaddrinfo.m4
@@ -1,4 +1,4 @@
-# getaddrinfo.m4 serial 29
+# getaddrinfo.m4 serial 30
dnl Copyright (C) 2004-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,
@@ -134,7 +134,6 @@ AC_DEFUN([gl_PREREQ_GETADDRINFO], [
AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([gl_SOCKET_FAMILIES])
AC_REQUIRE([gl_HEADER_SYS_SOCKET])
- AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
dnl Including sys/socket.h is wrong for Windows, but Windows does not
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index d3703caa09..1f20600c04 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -1285,6 +1285,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/listen.c
lib/lseek.c
lib/malloc.c
+ lib/math.c
lib/math.in.h
lib/memchr.c
lib/memchr.valgrind
@@ -1338,6 +1339,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/stddef.in.h
lib/stdint.in.h
lib/stdio-impl.h
+ lib/stdio.c
lib/stdio.in.h
lib/stdlib.in.h
lib/str-two-way.h
@@ -1357,6 +1359,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/strtok_r.c
lib/strverscmp.c
lib/sys_select.in.h
+ lib/sys_socket.c
lib/sys_socket.in.h
lib/sys_stat.in.h
lib/sys_time.in.h
@@ -1369,6 +1372,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/timespec.h
lib/u64.c
lib/u64.h
+ lib/unistd.c
lib/unistd.in.h
lib/unistr.in.h
lib/unistr/u8-mbtoucr.c
diff --git a/gl/m4/lock.m4 b/gl/m4/lock.m4
index 19c6d459f1..83da6ccf62 100644
--- a/gl/m4/lock.m4
+++ b/gl/m4/lock.m4
@@ -1,4 +1,4 @@
-# lock.m4 serial 12 (gettext-0.18.2)
+# lock.m4 serial 13 (gettext-0.18.2)
dnl Copyright (C) 2005-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,
@@ -35,7 +35,5 @@ return !x;
gl_PREREQ_LOCK
])
-# Prerequisites of lib/lock.c.
-AC_DEFUN([gl_PREREQ_LOCK], [
- AC_REQUIRE([AC_C_INLINE])
-])
+# Prerequisites of lib/glthread/lock.c.
+AC_DEFUN([gl_PREREQ_LOCK], [:])
diff --git a/gl/m4/lstat.m4 b/gl/m4/lstat.m4
index b7335bda1b..01b4eb953d 100644
--- a/gl/m4/lstat.m4
+++ b/gl/m4/lstat.m4
@@ -1,4 +1,4 @@
-# serial 25
+# serial 26
# Copyright (C) 1997-2001, 2003-2012 Free Software Foundation, Inc.
#
@@ -27,11 +27,7 @@ AC_DEFUN([gl_FUNC_LSTAT],
])
# Prerequisites of lib/lstat.c.
-AC_DEFUN([gl_PREREQ_LSTAT],
-[
- AC_REQUIRE([AC_C_INLINE])
- :
-])
+AC_DEFUN([gl_PREREQ_LSTAT], [:])
AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
[
diff --git a/gl/m4/math_h.m4 b/gl/m4/math_h.m4
index 90d248aecc..338e80dd15 100644
--- a/gl/m4/math_h.m4
+++ b/gl/m4/math_h.m4
@@ -1,4 +1,4 @@
-# math_h.m4 serial 113
+# math_h.m4 serial 114
dnl Copyright (C) 2007-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,
@@ -8,7 +8,6 @@ AC_DEFUN([gl_MATH_H],
[
AC_REQUIRE([gl_MATH_H_DEFAULTS])
gl_CHECK_NEXT_HEADERS([math.h])
- AC_REQUIRE([AC_C_INLINE])
AC_CACHE_CHECK([whether NAN macro works], [gl_cv_header_math_nan_works],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <math.h>]],
diff --git a/gl/m4/open.m4 b/gl/m4/open.m4
index c85971dc1a..2577a22809 100644
--- a/gl/m4/open.m4
+++ b/gl/m4/open.m4
@@ -1,4 +1,4 @@
-# open.m4 serial 13
+# open.m4 serial 14
dnl Copyright (C) 2007-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,
@@ -86,7 +86,6 @@ changequote([,])dnl
# Prerequisites of lib/open.c.
AC_DEFUN([gl_PREREQ_OPEN],
[
- AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T])
:
])
diff --git a/gl/m4/stat.m4 b/gl/m4/stat.m4
index a8b79f5bcb..0fd117e05e 100644
--- a/gl/m4/stat.m4
+++ b/gl/m4/stat.m4
@@ -1,4 +1,4 @@
-# serial 10
+# serial 11
# Copyright (C) 2009-2012 Free Software Foundation, Inc.
#
@@ -68,8 +68,4 @@ AC_DEFUN([gl_FUNC_STAT],
])
# Prerequisites of lib/stat.c.
-AC_DEFUN([gl_PREREQ_STAT],
-[
- AC_REQUIRE([AC_C_INLINE])
- :
-])
+AC_DEFUN([gl_PREREQ_STAT], [:])
diff --git a/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4
index 5298dd6d9d..3bd6580366 100644
--- a/gl/m4/stdio_h.m4
+++ b/gl/m4/stdio_h.m4
@@ -1,4 +1,4 @@
-# stdio_h.m4 serial 42
+# stdio_h.m4 serial 43
dnl Copyright (C) 2007-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,
@@ -7,7 +7,6 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_STDIO_H],
[
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
- AC_REQUIRE([AC_C_INLINE])
gl_NEXT_HEADERS([stdio.h])
dnl No need to create extra modules for these functions. Everyone who uses
diff --git a/gl/m4/sys_socket_h.m4 b/gl/m4/sys_socket_h.m4
index 8d4e7e1ebb..acfae41328 100644
--- a/gl/m4/sys_socket_h.m4
+++ b/gl/m4/sys_socket_h.m4
@@ -1,4 +1,4 @@
-# sys_socket_h.m4 serial 22
+# sys_socket_h.m4 serial 23
dnl Copyright (C) 2005-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,
@@ -10,7 +10,6 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET],
[
AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AC_C_INLINE])
dnl On OSF/1, the functions recv(), send(), recvfrom(), sendto() have
dnl old-style declarations (with return type 'int' instead of 'ssize_t')
diff --git a/gl/m4/sys_stat_h.m4 b/gl/m4/sys_stat_h.m4
index f45dee1dc4..8af3353ea5 100644
--- a/gl/m4/sys_stat_h.m4
+++ b/gl/m4/sys_stat_h.m4
@@ -1,4 +1,4 @@
-# sys_stat_h.m4 serial 27 -*- Autoconf -*-
+# sys_stat_h.m4 serial 28 -*- Autoconf -*-
dnl Copyright (C) 2006-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,
@@ -11,9 +11,6 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H],
[
AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
- dnl For the mkdir substitute.
- AC_REQUIRE([AC_C_INLINE])
-
dnl Check for broken stat macros.
AC_REQUIRE([AC_HEADER_STAT])
diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4
index 7e7651b9d2..f68fbff8ce 100644
--- a/gl/m4/unistd_h.m4
+++ b/gl/m4/unistd_h.m4
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 65
+# unistd_h.m4 serial 66
dnl Copyright (C) 2006-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,
@@ -11,7 +11,6 @@ AC_DEFUN([gl_UNISTD_H],
dnl Use AC_REQUIRE here, so that the default behavior below is expanded
dnl once only, before all statements that occur in other macros.
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- AC_REQUIRE([AC_C_INLINE])
gl_CHECK_NEXT_HEADERS([unistd.h])
if test $ac_cv_header_unistd_h = yes; then
diff --git a/gl/m4/vasnprintf.m4 b/gl/m4/vasnprintf.m4
index 0ce11da13b..00308c4f54 100644
--- a/gl/m4/vasnprintf.m4
+++ b/gl/m4/vasnprintf.m4
@@ -1,4 +1,4 @@
-# vasnprintf.m4 serial 35
+# vasnprintf.m4 serial 36
dnl Copyright (C) 2002-2004, 2006-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,
@@ -55,7 +55,6 @@ AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
# Prerequisites of lib/vasnprintf.c.
AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF],
[
- AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([AC_FUNC_ALLOCA])
AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
AC_REQUIRE([gt_TYPE_WCHAR_T])
diff --git a/gl/math.c b/gl/math.c
new file mode 100644
index 0000000000..ddb2ded530
--- /dev/null
+++ b/gl/math.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_MATH_INLINE _GL_EXTERN_INLINE
+#include "math.h"
diff --git a/gl/math.in.h b/gl/math.in.h
index 0625777acc..252e205340 100644
--- a/gl/math.in.h
+++ b/gl/math.in.h
@@ -28,6 +28,10 @@
#ifndef _@GUARD_PREFIX@_MATH_H
#define _@GUARD_PREFIX@_MATH_H
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_MATH_INLINE
+# define _GL_MATH_INLINE _GL_INLINE
+#endif
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
@@ -78,17 +82,17 @@ func (long double l) \
classification macros with an argument of real-floating (that is,
one of float, double, or long double). */
#define _GL_WARN_REAL_FLOATING_DECL(func) \
-static inline int \
+_GL_MATH_INLINE int \
rpl_ ## func ## f (float f) \
{ \
return func (f); \
} \
-static inline int \
+_GL_MATH_INLINE int \
rpl_ ## func ## d (double d) \
{ \
return func (d); \
} \
-static inline int \
+_GL_MATH_INLINE int \
rpl_ ## func ## l (long double l) \
{ \
return func (l); \
@@ -124,7 +128,7 @@ static void (*_gl_math_fix_itold) (long double *, int) = _Qp_itoq;
/* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler
choke on the expression 0.0 / 0.0. */
# if defined __DECC || defined _MSC_VER
-static float
+_GL_MATH_INLINE float
_NaN ()
{
static float zero = 0.0f;
@@ -2265,6 +2269,7 @@ _GL_WARN_REAL_FLOATING_DECL (signbit);
# endif
#endif
+_GL_INLINE_HEADER_END
#endif /* _@GUARD_PREFIX@_MATH_H */
#endif /* _@GUARD_PREFIX@_MATH_H */
diff --git a/gl/stdio.c b/gl/stdio.c
new file mode 100644
index 0000000000..e6ed82996b
--- /dev/null
+++ b/gl/stdio.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_STDIO_INLINE _GL_EXTERN_INLINE
+#include "stdio.h"
diff --git a/gl/stdio.in.h b/gl/stdio.in.h
index b1b543dee7..f3b52d28f6 100644
--- a/gl/stdio.in.h
+++ b/gl/stdio.in.h
@@ -46,6 +46,11 @@
#ifndef _@GUARD_PREFIX@_STDIO_H
#define _@GUARD_PREFIX@_STDIO_H
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_STDIO_INLINE
+# define _GL_STDIO_INLINE _GL_INLINE
+#endif
+
/* Get va_list. Needed on many systems, including glibc 2.8. */
#include <stdarg.h>
@@ -581,7 +586,7 @@ _GL_CXXALIAS_SYS (fwrite, size_t,
This affects only function declaration attributes, so it's not
needed for C++. */
# if !defined __cplusplus && 0 < __USE_FORTIFY_LEVEL
-static inline size_t _GL_ARG_NONNULL ((1, 4))
+_GL_STDIO_INLINE size_t _GL_ARG_NONNULL ((1, 4))
rpl_fwrite (const void *ptr, size_t s, size_t n, FILE *stream)
{
size_t r = fwrite (ptr, s, n, stream);
@@ -1333,6 +1338,7 @@ _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - "
"POSIX compliance");
#endif
+_GL_INLINE_HEADER_END
#endif /* _@GUARD_PREFIX@_STDIO_H */
#endif /* _@GUARD_PREFIX@_STDIO_H */
diff --git a/gl/sys_socket.c b/gl/sys_socket.c
new file mode 100644
index 0000000000..3f017f8fc6
--- /dev/null
+++ b/gl/sys_socket.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_SYS_SOCKET_INLINE _GL_EXTERN_INLINE
+#include "sys/socket.h"
diff --git a/gl/sys_socket.in.h b/gl/sys_socket.in.h
index f2eda0c3b3..bbf533df15 100644
--- a/gl/sys_socket.in.h
+++ b/gl/sys_socket.in.h
@@ -63,6 +63,11 @@
#ifndef _@GUARD_PREFIX@_SYS_SOCKET_H
#define _@GUARD_PREFIX@_SYS_SOCKET_H
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_SYS_SOCKET_INLINE
+# define _GL_SYS_SOCKET_INLINE _GL_INLINE
+#endif
+
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */
@@ -201,7 +206,7 @@ struct msghdr {
/* Re-define FD_ISSET to avoid a WSA call while we are not using
network sockets. */
-static inline int
+_GL_SYS_SOCKET_INLINE int
rpl_fd_isset (SOCKET fd, fd_set * set)
{
u_int i;
@@ -677,6 +682,8 @@ _GL_WARN_ON_USE (accept4, "accept4 is unportable - "
# endif
#endif
+_GL_INLINE_HEADER_END
+
#endif /* _@GUARD_PREFIX@_SYS_SOCKET_H */
#endif /* _@GUARD_PREFIX@_SYS_SOCKET_H */
#endif
diff --git a/gl/sys_stat.in.h b/gl/sys_stat.in.h
index 2efc1e92e0..ac05ddb5ce 100644
--- a/gl/sys_stat.in.h
+++ b/gl/sys_stat.in.h
@@ -497,7 +497,7 @@ _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
# if !GNULIB_defined_rpl_mkdir
-static inline int
+static int
rpl_mkdir (char const *name, mode_t mode)
{
return _mkdir (name);
diff --git a/gl/tests/ftruncate.c b/gl/tests/ftruncate.c
index e243adda60..b7b525caad 100644
--- a/gl/tests/ftruncate.c
+++ b/gl/tests/ftruncate.c
@@ -157,7 +157,7 @@ ftruncate (int fd, off_t length)
# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
# include "msvc-inval.h"
-static inline int
+static int
chsize_nothrow (int fd, long length)
{
int result;
diff --git a/gl/tests/glthread/lock.c b/gl/tests/glthread/lock.c
index 9a391ea6c9..bc0df297a1 100644
--- a/gl/tests/glthread/lock.c
+++ b/gl/tests/glthread/lock.c
@@ -682,7 +682,7 @@ glthread_lock_destroy_func (gl_lock_t *lock)
/* In this file, the waitqueues are implemented as circular arrays. */
#define gl_waitqueue_t gl_carray_waitqueue_t
-static inline void
+static void
gl_waitqueue_init (gl_waitqueue_t *wq)
{
wq->array = NULL;
@@ -743,7 +743,7 @@ gl_waitqueue_add (gl_waitqueue_t *wq)
}
/* Notifies the first thread from a wait queue and dequeues it. */
-static inline void
+static void
gl_waitqueue_notify_first (gl_waitqueue_t *wq)
{
SetEvent (wq->array[wq->offset + 0]);
@@ -754,7 +754,7 @@ gl_waitqueue_notify_first (gl_waitqueue_t *wq)
}
/* Notifies all threads from a wait queue and dequeues them all. */
-static inline void
+static void
gl_waitqueue_notify_all (gl_waitqueue_t *wq)
{
unsigned int i;
diff --git a/gl/tests/lstat.c b/gl/tests/lstat.c
index db119a10d3..97fe6bb2d5 100644
--- a/gl/tests/lstat.c
+++ b/gl/tests/lstat.c
@@ -35,7 +35,7 @@ typedef int dummy;
# include <sys/stat.h>
# undef __need_system_sys_stat_h
-static inline int
+static int
orig_lstat (const char *filename, struct stat *buf)
{
return lstat (filename, buf);
diff --git a/gl/tests/open.c b/gl/tests/open.c
index 27801b916c..bdfc8db5cf 100644
--- a/gl/tests/open.c
+++ b/gl/tests/open.c
@@ -27,7 +27,7 @@
#include <sys/types.h>
#undef __need_system_fcntl_h
-static inline int
+static int
orig_open (const char *filename, int flags, mode_t mode)
{
return open (filename, flags, mode);
diff --git a/gl/tests/stat.c b/gl/tests/stat.c
index 7599540890..c0bcb88320 100644
--- a/gl/tests/stat.c
+++ b/gl/tests/stat.c
@@ -42,7 +42,7 @@
# endif
#endif
-static inline int
+static int
orig_stat (const char *filename, struct stat *buf)
{
return stat (filename, buf);
diff --git a/gl/unistd.c b/gl/unistd.c
new file mode 100644
index 0000000000..6c6a8e268c
--- /dev/null
+++ b/gl/unistd.c
@@ -0,0 +1,3 @@
+#include <config.h>
+#define _GL_UNISTD_INLINE _GL_EXTERN_INLINE
+#include "unistd.h"
diff --git a/gl/unistd.in.h b/gl/unistd.in.h
index e904e512ee..6171f77ac7 100644
--- a/gl/unistd.in.h
+++ b/gl/unistd.in.h
@@ -127,6 +127,11 @@
# include <getopt.h>
#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_UNISTD_INLINE
+# define _GL_UNISTD_INLINE _GL_INLINE
+#endif
+
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */
@@ -404,7 +409,7 @@ extern char **environ;
# endif
#elif defined GNULIB_POSIXCHECK
# if HAVE_RAW_DECL_ENVIRON
-static inline char ***
+_GL_UNISTD_INLINE char ***
rpl_environ (void)
{
return &environ;
@@ -862,7 +867,7 @@ _GL_CXXALIAS_RPL (getpagesize, int, (void));
# define getpagesize() _gl_getpagesize ()
# else
# if !GNULIB_defined_getpagesize_function
-static inline int
+_GL_UNISTD_INLINE int
getpagesize ()
{
return _gl_getpagesize ();
@@ -1530,6 +1535,7 @@ _GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count));
_GL_CXXALIASWARN (write);
#endif
+_GL_INLINE_HEADER_END
#endif /* _@GUARD_PREFIX@_UNISTD_H */
#endif /* _@GUARD_PREFIX@_UNISTD_H */
diff --git a/gl/vasnprintf.c b/gl/vasnprintf.c
index 0261661d4e..e6fc52338a 100644
--- a/gl/vasnprintf.c
+++ b/gl/vasnprintf.c
@@ -1530,7 +1530,7 @@ is_borderline (const char *digits, size_t precision)
/* Returns the number of TCHAR_T units needed as temporary space for the result
of sprintf or SNPRINTF of a single conversion directive. */
-static inline size_t
+static size_t
MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conversion,
arg_type type, int flags, size_t width, int has_precision,
size_t precision, int pad_ourselves)
diff --git a/maint.mk b/maint.mk
index cd365e774b..93c2508ecc 100644
--- a/maint.mk
+++ b/maint.mk
@@ -155,7 +155,7 @@ export LC_ALL = C
## Sanity checks. ##
## --------------- ##
-_cfg_mk := $(shell test -f $(srcdir)/cfg.mk && echo '$(srcdir)/cfg.mk')
+_cfg_mk := $(wildcard $(srcdir)/cfg.mk)
# Collect the names of rules starting with 'sc_'.
syntax-check-rules := $(sort $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \
@@ -1315,7 +1315,7 @@ announcement_mail_Cc_ ?= $(announcement_mail_Cc_$(release-type))
announcement_mail_headers_ ?= $(announcement_mail_headers_$(release-type))
announcement: NEWS ChangeLog $(rel-files)
# Not $(AM_V_GEN) since the output of this command serves as
-# annoucement message: it would start with " GEN announcement".
+# announcement message: it would start with " GEN announcement".
$(AM_V_at)$(srcdir)/$(_build-aux)/announce-gen \
--mail-headers='$(announcement_mail_headers_)' \
--release-type=$(release-type) \