Conditionally include various headers. Use "epaths.h",
authorDave Love <fx@gnu.org>
Tue, 18 Dec 2001 15:57:02 +0000 (15:57 +0000)
committerDave Love <fx@gnu.org>
Tue, 18 Dec 2001 15:57:02 +0000 (15:57 +0000)
not <../src/epaths.h>.
(malloc, realloc) [!HAVE_STDLIB_H]: Prototype.

lib-src/yow.c

index 4efe815..e141b91 100644 (file)
  * With dynamic memory allocation.
  */
 
+#include "config.h"
 #include <stdio.h>
 #include <ctype.h>
-#include <../src/epaths.h>      /* For PATH_DATA.  */
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef TIME_WITH_SYS_TIME
+#include <sys/time.h>
+#include <time.h>
+#else
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#else
+#include <time.h>
+#endif
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include "epaths.h"            /* For PATH_DATA.  */
 
 #define BUFSIZE  80
 #define SEP      '\0'
@@ -33,7 +50,9 @@
     &res;})
 #endif
 
-char *malloc(), *realloc();
+#ifndef HAVE_STDLIB_H
+char *malloc __P ((size_t size))), *realloc __P ((POINTER_TYPE *ptr, size_t size));
+#endif
 
 void yow();
 void setup_yow();