(atexit): Define using a prototype.
[gnulib.git] / modules / alloca
index 4d32288..5719b4b 100644 (file)
@@ -1,6 +1,8 @@
 Description:
+Memory allocation on the stack.
 
 Files:
+lib/alloca_.h
 lib/alloca.c
 m4/alloca.m4
 
@@ -11,36 +13,19 @@ configure.ac:
 gl_FUNC_ALLOCA
 
 Makefile.am:
+BUILT_SOURCES += $(ALLOCA_H)
+EXTRA_DIST += alloca_.h
+
+# We need the following in order to create an <alloca.h> when the system
+# doesn't have one that works with the given compiler.
+all-local $(lib_OBJECTS): $(ALLOCA_H)
+alloca.h: alloca_.h
+       cp $(srcdir)/alloca_.h $@-t
+       mv $@-t $@
+MOSTLYCLEANFILES += alloca.h alloca.h-t
 
 Include:
-#ifdef __GNUC__
-# ifndef alloca
-#  define alloca __builtin_alloca
-# endif
-#else
-# ifdef _MSC_VER
-#  include <malloc.h>
-#  define alloca _alloca
-# else
-#  if HAVE_ALLOCA_H
-#   include <alloca.h>
-#  else
-#   ifdef _AIX
- #pragma alloca
-#   else
-#    ifdef __hpux /* This section must match that of bison generated files. */
-#     ifdef __cplusplus
-extern "C" void *alloca (unsigned int);
-#     else /* not __cplusplus */
-void *alloca ();
-#     endif /* not __cplusplus */
-#    else /* not __hpux */
-#     ifndef alloca
-char *alloca ();
-#     endif
-#    endif /* __hpux */
-#   endif
-#  endif
-# endif
-#endif
+#include <alloca.h>
 
+Maintainer:
+bug-gnulib@gnu.org