Declare localtime_r if necessary.
authorJim Meyering <jim@meyering.net>
Sun, 18 Oct 1998 01:11:35 +0000 (01:11 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 18 Oct 1998 01:11:35 +0000 (01:11 +0000)
lib/strftime.c

index 33dec13..7a41a4f 100644 (file)
 #include <ctype.h>
 #include <sys/types.h>         /* Some systems define `time_t' here.  */
 
-/* Some systems require <unistd.h> to be included before <time.h>
-   for localtime_r to be declared properly.  */
-#if HAVE_UNISTD_H
-# include <unistd.h>
+/* Provide a declaration of localtime_r on systems that lack it.  */
+#if ! defined HAVE_DECL_LOCALTIME_R
+extern struct tm* localtime_r ();
 #endif
 
 #ifdef TIME_WITH_SYS_TIME