summaryrefslogtreecommitdiff
path: root/lib/stdlib.in.h
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2011-02-14 11:36:25 +0100
committerLudovic Courtès <ludo@gnu.org>2011-02-14 11:36:25 +0100
commit49114fd43de833c0724fbb0b6dc9ca639d1ab74f (patch)
treebd33e1612cbbc37218ff18a229ff603018d2d5d5 /lib/stdlib.in.h
parentd9a00aa53612b97b11847cfc03647a3ab54b2a48 (diff)
downloadguile-49114fd43de833c0724fbb0b6dc9ca639d1ab74f.tar.gz
Update Gnulib; add new modules.
This updates Gnulib to v0.0-4889-ge375fe3. * m4/gnulib-cache.m4: Add `accept', `bind', `close', `connect', `getpeername', `getsockname', `getsockopt', `listen', `malloc', `malloca', `recv', `recvfrom', `send', `sendto', `setsockopt', `shutdown', `socket', and `sockets', requested by Jan Nieuwenhuizen <janneke-list@xs4all.nl> for cross-MinGW32 builds. Add `trunc', requested by Mark H Weaver <mhw@netris.org>.
Diffstat (limited to 'lib/stdlib.in.h')
-rw-r--r--lib/stdlib.in.h37
1 files changed, 20 insertions, 17 deletions
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index 1bae6c7d2..e2d945767 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <stdlib.h>.
- Copyright (C) 1995, 2001-2004, 2006-2010 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001-2004, 2006-2011 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -49,21 +49,23 @@
# include <sys/loadavg.h>
#endif
+#if @GNULIB_RANDOM_R@
+
/* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included
- from <stdlib.h> if _REENTRANT is defined. Include it always. */
-#if @HAVE_RANDOM_H@
-# include <random.h>
-#endif
+ from <stdlib.h> if _REENTRANT is defined. Include it whenever we need
+ 'struct random_data'. */
+# if @HAVE_RANDOM_H@
+# include <random.h>
+# endif
-#if !@HAVE_STRUCT_RANDOM_DATA@ || (@GNULIB_RANDOM_R@ && !@HAVE_RANDOM_R@) \
- || defined GNULIB_POSIXCHECK
-# include <stdint.h>
-#endif
+# if !@HAVE_STRUCT_RANDOM_DATA@ || !@HAVE_RANDOM_R@
+# include <stdint.h>
+# endif
-#if !@HAVE_STRUCT_RANDOM_DATA@
+# if !@HAVE_STRUCT_RANDOM_DATA@
/* Define 'struct random_data'.
But allow multiple gnulib generated <stdlib.h> replacements to coexist. */
-# if !GNULIB_defined_struct_random_data
+# if !GNULIB_defined_struct_random_data
struct random_data
{
int32_t *fptr; /* Front pointer. */
@@ -74,7 +76,8 @@ struct random_data
int rand_sep; /* Distance between front and rear. */
int32_t *end_ptr; /* Pointer behind state table. */
};
-# define GNULIB_defined_struct_random_data 1
+# define GNULIB_defined_struct_random_data 1
+# endif
# endif
#endif
@@ -85,10 +88,10 @@ struct random_data
# include <unistd.h>
#endif
-#ifndef __attribute__
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
-# define __attribute__(Spec) /* empty */
-# endif
+#if 3 <= __GNUC__ || __GNUC__ == 2 && 8 <= __GNUC_MINOR__
+# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
+#else
+# define _GL_ATTRIBUTE_NORETURN
#endif
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
@@ -116,7 +119,7 @@ struct random_data
/* Terminate the current process with the given return code, without running
the 'atexit' handlers. */
# if !@HAVE__EXIT@
-_GL_FUNCDECL_SYS (_Exit, void, (int status) __attribute__ ((__noreturn__)));
+_GL_FUNCDECL_SYS (_Exit, void, (int status) _GL_ATTRIBUTE_NORETURN);
# endif
_GL_CXXALIAS_SYS (_Exit, void, (int status));
_GL_CXXALIASWARN (_Exit);