+2003-09-16 Bruno Haible <bruno@clisp.org>
+
+ Portability to SunOS 4.
+ * configure.ac: Also check for atexit.
+
2003-09-14 Bruno Haible <bruno@clisp.org>
* windows/gettextlib.def: Export fwriteerror.
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([chown getcwd posix_spawn raise select strerror strtoul uname \
utime utimes])
-AC_REPLACE_FUNCS([memmove memset stpcpy strcspn \
+AC_REPLACE_FUNCS([atexit memmove memset stpcpy strcspn \
strcasecmp strncasecmp strpbrk strstr vasprintf])
AM_FUNC_GETLINE
if test $am_cv_func_working_getline != yes; then
+2003-09-16 Bruno Haible <bruno@clisp.org>
+
+ Portability to SunOS 4.
+ * atexit.c: New file, from gnulib with modifications.
+ * Makefile.am (LIBADD_SOURCE): Add atexit.c.
+
2003-09-14 Bruno Haible <bruno@clisp.org>
* closeout.c: Include fwriteerror.h.
LIBADD_SOURCE = \
alloca.c \
+ atexit.c \
canonicalize.h canonicalize.c \
fnmatch.c \
getline.h getline.c \
--- /dev/null
+/* Wrapper to implement ANSI C's atexit using SunOS's on_exit. */
+/* This function is in the public domain. --Mike Stump. */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+int
+atexit (void (*f)())
+{
+ /* If the system doesn't provide a definition for atexit, use on_exit
+ if the system provides that. */
+ on_exit (f, 0);
+ return 0;
+}