2012-11-29 Paul Eggert <eggert@cs.ucla.edu>
+ dup, execute, fatal-signal, etc.: no 'static inline'
+ * lib/dup.c (dup_nothrow):
+ * lib/execute.c (nonintr_close, nonintr_open):
+ * lib/fatal-signal.c (uninstall_handlers, install_handlers):
+ * lib/fopen.c (orig_fopen):
+ * lib/freadseek.c (freadptrinc):
+ * lib/freopen.c (orig_freopen):
+ * lib/fstat.c (orig_fstat, fstat_nothrow):
+ * lib/get-rusage-as.c (get_rusage_as_via_setrlimit)
+ (get_rusage_as_via_iterator):
+ * lib/get-rusage-data.c (get_rusage_data_via_setrlimit):
+ * lib/getdtablesize.c (_setmaxstdio_nothrow):
+ * lib/isatty.c (_isatty_nothrow):
+ * lib/open.c (orig_open):
+ * lib/read.c (read_nothrow):
+ * lib/sigprocmask.c (signal_nothrow):
+ * lib/spawn-pipe.c (nonintr_close, nonintr_open):
+ * lib/vasnprintf.c (MAX_ROOM_NEEDED):
+ * lib/wait-process.c (unregister_slave_subprocess):
+ * lib/write.c (write_nothrow):
+ Now static, not static inline.
+ * lib/spawn-pipe.c (nonintr_open): Define only if
+ (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__.
+ * m4/dup.m4 (gl_PREREQ_DUP):
+ * m4/execute.m4 (gl_EXECUTE):
+ * m4/fatal-signal.m4 (gl_FATAL_SIGNAL):
+ * m4/fopen.m4 (gl_PREREQ_FOPEN):
+ * m4/freadseek.m4 (gl_FUNC_FREADSEEK):
+ * m4/freopen.m4 (gl_PREREQ_FREOPEN):
+ * m4/fstat.m4 (gl_PREREQ_FSTAT):
+ * m4/getdtablesize.m4 (gl_PREREQ_GETDTABLESIZE):
+ * m4/isatty.m4 (gl_PREREQ_ISATTY):
+ * m4/open.m4 (gl_PREREQ_OPEN):
+ * m4/read.m4 (gl_PREREQ_READ):
+ * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK):
+ * m4/spawn-pipe.m4 (gl_SPAWN_PIPE):
+ * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF):
+ * m4/wait-process.m4 (gl_WAIT_PROCESS):
+ * m4/write.m4 (gl_PREREQ_WRITE):
+ * modules/get-rusage-as, modules/get-rusage-data (configure.ac):
+ Do not require AC_C_INLINE.
+
c-strtod, memcoll, readutmp: no 'static inline'
* lib/c-strtod.c (c_locale):
* lib/memcoll.c (strcoll_loop):
#undef dup
#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-static inline int
+static int
dup_nothrow (int fd)
{
int result;
These functions can return -1/EINTR even though we don't have any
signal handlers set up, namely when we get interrupted via SIGSTOP. */
-static inline int
+static int
nonintr_close (int fd)
{
int retval;
}
#define close nonintr_close
-static inline int
+static int
nonintr_open (const char *pathname, int oflag, mode_t mode)
{
int retval;
/* Uninstall the handlers. */
-static inline void
+static void
uninstall_handlers (void)
{
size_t i;
/* Install the handlers. */
-static inline void
+static void
install_handlers (void)
{
size_t i;
#include <stdio.h>
#undef __need_FILE
-static inline FILE *
+static FILE *
orig_fopen (const char *filename, const char *mode)
{
return fopen (filename, mode);
/* Increment the in-memory pointer. INCREMENT must be at most the buffer size
returned by freadptr().
This is very cheap (no system calls). */
-static inline void
+static void
freadptrinc (FILE *fp, size_t increment)
{
/* Keep this code in sync with freadptr! */
#include <stdio.h>
#undef __need_FILE
-static inline FILE *
+static FILE *
orig_freopen (const char *filename, const char *mode, FILE *stream)
{
return freopen (filename, mode, stream);
#endif
#undef __need_system_sys_stat_h
-static inline int
+static int
orig_fstat (int fd, struct stat *buf)
{
return fstat (fd, buf);
#endif
#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-static inline int
+static int
fstat_nothrow (int fd, struct stat *buf)
{
int result;
#if HAVE_SETRLIMIT && defined RLIMIT_AS && HAVE_SYS_MMAN_H && HAVE_MPROTECT
-static inline uintptr_t
+static uintptr_t
get_rusage_as_via_setrlimit (void)
{
uintptr_t result;
#else
-static inline uintptr_t
+static uintptr_t
get_rusage_as_via_setrlimit (void)
{
return 0;
return 0;
}
-static inline uintptr_t
+static uintptr_t
get_rusage_as_via_iterator (void)
{
uintptr_t total = 0;
#else
-static inline uintptr_t
+static uintptr_t
get_rusage_as_via_iterator (void)
{
return 0;
# define errno_expected() (errno == EINVAL)
# endif
-static inline uintptr_t
+static uintptr_t
get_rusage_data_via_setrlimit (void)
{
uintptr_t result;
#else
-static inline uintptr_t
+static uintptr_t
get_rusage_data_via_setrlimit (void)
{
return 0;
return 0;
}
-static inline uintptr_t
+static uintptr_t
get_rusage_data_via_iterator (void)
{
# if ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) || defined __BEOS__ || defined __HAIKU__
#else
-static inline uintptr_t
+static uintptr_t
get_rusage_data_via_iterator (void)
{
return 0;
#include "msvc-inval.h"
#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-static inline int
+static int
_setmaxstdio_nothrow (int newmax)
{
int result;
#define IsConsoleHandle(h) (((intptr_t) (h) & 3) == 3)
#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-static inline int
+static int
_isatty_nothrow (int fd)
{
int result;
#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);
# undef read
# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-static inline ssize_t
+static ssize_t
read_nothrow (int fd, void *buf, size_t count)
{
ssize_t result;
typedef void (*handler_t) (int);
#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-static inline handler_t
+static handler_t
signal_nothrow (int sig, handler_t handler)
{
handler_t result;
These functions can return -1/EINTR even though we don't have any
signal handlers set up, namely when we get interrupted via SIGSTOP. */
-static inline int
+static int
nonintr_close (int fd)
{
int retval;
}
#define close nonintr_close
-static inline int
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+static int
nonintr_open (const char *pathname, int oflag, mode_t mode)
{
int retval;
return retval;
}
-#undef open /* avoid warning on VMS */
-#define open nonintr_open
+# undef open /* avoid warning on VMS */
+# define open nonintr_open
+#endif
#endif
/* 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)
}
/* Unregister a child from the list of slave subprocesses. */
-static inline void
+static void
unregister_slave_subprocess (pid_t child)
{
/* The easiest way to remove an entry from a list that can be used by
# undef write
# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
-static inline ssize_t
+static ssize_t
write_nothrow (int fd, const void *buf, size_t count)
{
ssize_t result;
-# dup.m4 serial 2
+# dup.m4 serial 3
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,
])
# Prerequisites of lib/dup.c.
-AC_DEFUN([gl_PREREQ_DUP], [
- AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_PREREQ_DUP], [:])
-# execute.m4 serial 4
+# execute.m4 serial 5
dnl Copyright (C) 2003, 2008-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,
AC_DEFUN([gl_EXECUTE],
[
dnl Prerequisites of lib/execute.c.
- AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([AC_TYPE_MODE_T])
])
-# fatal-signal.m4 serial 8
+# fatal-signal.m4 serial 9
dnl Copyright (C) 2003-2004, 2006, 2008-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,
AC_DEFUN([gl_FATAL_SIGNAL],
[
- AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([gt_TYPE_SIG_ATOMIC_T])
AC_CHECK_HEADERS_ONCE([unistd.h])
gl_PREREQ_SIG_HANDLER_H
-# fopen.m4 serial 8
+# fopen.m4 serial 9
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,
])
# Prerequisites of lib/fopen.c.
-AC_DEFUN([gl_PREREQ_FOPEN],
-[
- AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_PREREQ_FOPEN], [:])
-# freadseek.m4 serial 1
+# freadseek.m4 serial 2
dnl Copyright (C) 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,
AC_DEFUN([gl_FUNC_FREADSEEK],
[
- AC_REQUIRE([AC_C_INLINE])
AC_CHECK_FUNCS_ONCE([__freadptrinc])
])
-# freopen.m4 serial 3
+# freopen.m4 serial 4
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,
])
# Prerequisites of lib/freopen.c.
-AC_DEFUN([gl_PREREQ_FREOPEN],
-[
- AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_PREREQ_FREOPEN], [:])
-# 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,
])
# Prerequisites of lib/fstat.c.
-AC_DEFUN([gl_PREREQ_FSTAT],
-[
- AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_PREREQ_FSTAT], [:])
-# getdtablesize.m4 serial 3
+# getdtablesize.m4 serial 4
dnl Copyright (C) 2008-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,
])
# Prerequisites of lib/getdtablesize.c.
-AC_DEFUN([gl_PREREQ_GETDTABLESIZE], [
- AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_PREREQ_GETDTABLESIZE], [:])
-# isatty.m4 serial 2
+# isatty.m4 serial 3
dnl Copyright (C) 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,
])
# Prerequisites of lib/isatty.c.
-AC_DEFUN([gl_PREREQ_ISATTY], [
- AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_PREREQ_ISATTY], [:])
-# 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,
# Prerequisites of lib/open.c.
AC_DEFUN([gl_PREREQ_OPEN],
[
- AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T])
:
])
-# read.m4 serial 3
+# read.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,
])
# Prerequisites of lib/read.c.
-AC_DEFUN([gl_PREREQ_READ],
-[
- AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_PREREQ_READ], [:])
-# signalblocking.m4 serial 13
+# signalblocking.m4 serial 14
dnl Copyright (C) 2001-2002, 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,
])
# Prerequisites of lib/sigprocmask.c.
-AC_DEFUN([gl_PREREQ_SIGPROCMASK], [
- AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_PREREQ_SIGPROCMASK], [:])
-# spawn-pipe.m4 serial 1
+# spawn-pipe.m4 serial 2
dnl Copyright (C) 2004, 2008-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,
AC_DEFUN([gl_SPAWN_PIPE],
[
dnl Prerequisites of lib/spawn-pipe.c.
- AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([AC_TYPE_MODE_T])
])
-# 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,
# 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])
-# wait-process.m4 serial 5
+# wait-process.m4 serial 6
dnl Copyright (C) 2003, 2008-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,
AC_DEFUN([gl_WAIT_PROCESS],
[
dnl Prerequisites of lib/wait-process.c.
- AC_REQUIRE([AC_C_INLINE])
AC_REQUIRE([gt_TYPE_SIG_ATOMIC_T])
AC_CHECK_FUNCS([waitid])
])
-# write.m4 serial 4
+# write.m4 serial 5
dnl Copyright (C) 2008-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,
])
# Prerequisites of lib/write.c.
-AC_DEFUN([gl_PREREQ_WRITE],
-[
- AC_REQUIRE([AC_C_INLINE])
-])
+AC_DEFUN([gl_PREREQ_WRITE], [:])
vma-iter
configure.ac:
-AC_REQUIRE([AC_C_INLINE])
AC_CHECK_FUNCS_ONCE([setrlimit])
gl_FUNC_MMAP_ANON
AC_CHECK_HEADERS_ONCE([sys/mman.h])
vma-iter
configure.ac:
-AC_REQUIRE([AC_C_INLINE])
AC_CHECK_FUNCS_ONCE([setrlimit])
gl_FUNC_MMAP_ANON