time_r: Add missing declarations on HP-UX 11.
[pspp] / lib / regex_internal.h
index 704d1cc9d6d174b7e2ecaf187bd55c28ce6ea189..dc94e2cbcbc333bda41ba36ec6484fe4148b2db1 100644 (file)
@@ -467,6 +467,8 @@ static unsigned int re_string_context_at (const re_string_t *input, Idx idx,
 # else
 /* alloca is implemented with malloc, so just use malloc.  */
 #  define __libc_use_alloca(n) 0
+#  undef alloca
+#  define alloca(n) malloc (n)
 # endif
 #endif
 
@@ -851,6 +853,15 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx)
 }
 #endif /* RE_ENABLE_I18N */
 
+#ifndef __GNUC_PREREQ
+# if defined __GNUC__ && defined __GNUC_MINOR__
+#  define __GNUC_PREREQ(maj, min) \
+         ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
+# else
+#  define __GNUC_PREREQ(maj, min) 0
+# endif
+#endif
+
 #if __GNUC_PREREQ (3,4)
 # undef __attribute_warn_unused_result__
 # define __attribute_warn_unused_result__ \