summaryrefslogtreecommitdiff
path: root/lib/unistd.in.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-11-20 22:25:07 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2012-11-29 23:38:52 -0800
commit108828a0e95d3c4e89ff4f38fe4b39ae6218792e (patch)
tree5e3d30a47875e5679777935005b08abe96f9d3fb /lib/unistd.in.h
parentc75f87d6e47194491fbd3f5db974cf94a5c61f20 (diff)
downloadgnulib-108828a0e95d3c4e89ff4f38fe4b39ae6218792e.tar.gz
unistd: better 'inline'
* lib/unistd.c: New file. * lib/unistd.in.h (_GL_UNISTD_INLINE): New macro. Replace all uses of 'static inline' with it. Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END. * m4/unistd_h.m4 (gl_UNISTD_H): Do not require AC_C_INLINE. * modules/unistd (Files, lib_SOURCES): Add lib/unistd.c. (Depends-on): Add extern-inline.
Diffstat (limited to 'lib/unistd.in.h')
-rw-r--r--lib/unistd.in.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/unistd.in.h b/lib/unistd.in.h
index 450d0be9cf..317c9b7db9 100644
--- a/lib/unistd.in.h
+++ b/lib/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 */