AC_CHECK_SIZEOF(long, 4)
# Checks for library functions.
-AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_REALLOC
-AC_FUNC_STRFTIME
-AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([alarm gettimeofday localtime_r memmove memset putenv setenv strerror strrchr strstr])
-AC_REPLACE_FUNCS([sleep strdup strsignal])
+AC_REPLACE_FUNCS([fileno localtime_r setenv sleep strdup strsignal unsetenv])
+AC_CHECK_DECLS([fileno, localtime_r, malloc, realloc, setenv, sleep, strdup, strsignal, unsetenv])
# Output files
AC_CONFIG_HEADERS([config.h])
/* defines size_t */
#include <sys/types.h>
+#if !HAVE_FILENO
+int fileno(FILE *stream);
+#endif /* !HAVE_FILENO */
+
+#if !HAVE_LOCALTIME_R
+struct tm *localtime_r(const time_t *clock, struct tm *result);
+#endif /* !HAVE_LOCALTIME_R */
+
#if !HAVE_MALLOC
-void *rpl_malloc (size_t n)
+void *rpl_malloc (size_t n);
#endif /* !HAVE_MALLOC */
#if !HAVE_REALLOC
-void *rpl_realloc (void *p, size_t n)
+void *rpl_realloc (void *p, size_t n);
#endif /* !HAVE_REALLOC */
+#if !HAVE_SETENV
+int setenv(const char *name, const char *value, int overwrite);
+#endif /* !HAVE_SETENV */
+
#if !HAVE_SLEEP
unsigned int sleep (unsigned int seconds);
#endif /* !HAVE_SLEEP */
#if !HAVE_STRDUP
-char *strdup (const char *str)
+char *strdup (const char *str);
#endif /* !HAVE_STRDUP */
#if !HAVE_STRSIGNAL
const char *strsignal(int sig);
#endif /* !HAVE_STRSIGNAL */
+#if !HAVE_UNSETENV
+void unsetenv(const char *name);
+#endif /* !HAVE_UNSETENV */
+
/* silence warnings about an empty library */
void ck_do_nothing (void);