time_r: Add missing declarations on HP-UX 11.
[pspp] / lib / eealloc.h
index ae7929f21e1f5418029bf9af4be9f4de86c40586..806900e397c11db4cb4270d0f4964839448e8095 100644 (file)
@@ -1,5 +1,5 @@
 /* Memory allocation with expensive empty allocations.
-   Copyright (C) 2003, 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2008, 2010 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003,
    based on prior work by Jim Meyering.
 
 # define eemalloc malloc
 #else
 # if __GNUC__ >= 3
-static inline void *eemalloc (size_t n) __attribute__ ((__malloc__));
+static inline void *eemalloc (size_t n)
+     __attribute__ ((__malloc__))
+#  if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+     __attribute__ ((__alloc_size__ (1)))
+#  endif
+  ;
 # endif
 static inline void *
 eemalloc (size_t n)
@@ -50,6 +55,10 @@ eemalloc (size_t n)
 #if REALLOC_0_IS_NONNULL
 # define eerealloc realloc
 #else
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
+static inline void *eerealloc (void *p, size_t n)
+     __attribute__ ((__alloc_size__ (2)));
+# endif
 static inline void *
 eerealloc (void *p, size_t n)
 {