Преглед на файлове

* Cleanup some build dependency issues

Bryan Drewery преди 16 години
родител
ревизия
8a1600f36f

+ 4 - 0
src/compat/compat.h

@@ -7,6 +7,10 @@
 #ifndef _EGG_COMPAT_COMPAT_H
 #define _EGG_COMPAT_COMPAT_H
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #include "dirname.h"
 #include "dn_expand.h"
 #include "inet_ntop.h"

+ 3 - 1
src/compat/dirname.c

@@ -1,7 +1,9 @@
-#include "common.h"
+#include "dirname.h"
+
 #include <errno.h>
 #include <string.h>
 #include <sys/param.h>
+#include "strlcpy.h"
 
 
 char *

+ 4 - 0
src/compat/dirname.h

@@ -1,6 +1,10 @@
 #ifndef _DIRNAME_H
 #define _DIRNAME_H
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #define dirname my_dirname
 
 char *dirname(const char *);

+ 3 - 1
src/compat/dn_expand.c

@@ -3,8 +3,10 @@
  */
 
 
-#include "common.h"
+#include "memcpy.h"
 #include <sys/socket.h>
+#include <errno.h>
+#include <stdlib.h>
 
 /*
  * Define constants based on RFC 883, RFC 1034, RFC 1035

+ 4 - 0
src/compat/dn_expand.h

@@ -1,6 +1,10 @@
 #ifndef _DN_EXPAND_H
 #define _DN_EXPAND_H
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 int my_dn_expand(const unsigned char *, const unsigned char *, const unsigned char *, char *, int);
 
 #endif /* !_DN_EXPAND_H */

+ 1 - 1
src/compat/inet_ntop.c

@@ -5,8 +5,8 @@
  */
 
 
-#include "common.h"
 #include "inet_ntop.h"
+#include "sprintf.h"
 
 #ifndef HAVE_INET_NTOP
 

+ 4 - 1
src/compat/inet_ntop.h

@@ -7,7 +7,10 @@
 #ifndef _EGG_COMPAT_INET_NTOP_H
 #define _EGG_COMPAT_INET_NTOP_H
 
-#include "src/common.h"
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>

+ 0 - 1
src/compat/memcpy.c

@@ -4,7 +4,6 @@
  */
 
 
-#include "common.h"
 #include "memcpy.h"
 
 #ifndef HAVE_MEMCPY

+ 4 - 1
src/compat/memcpy.h

@@ -7,7 +7,10 @@
 #ifndef _EGG_COMPAT_MEMCPY_H
 #define _EGG_COMPAT_MEMCPY_H
 
-#include "src/common.h"
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #include <string.h>
 
 #ifndef HAVE_MEMCPY

+ 1 - 3
src/compat/memset.c

@@ -3,15 +3,13 @@
  *
  */
 
-
-#include "common.h"
 #include "memset.h"
 
 #ifndef HAVE_MEMSET
 void *memset(void *dest, int c, size_t n)
 {
   while (n--)
-    *((u_8bit_t *) dest)++ = c;
+    *((unsigned char *) dest)++ = c;
   return dest;
 }
 #endif /* !HAVE_MEMSET */

+ 4 - 1
src/compat/memset.h

@@ -7,7 +7,10 @@
 #ifndef _EGG_COMPAT_MEMSET_H
 #define _EGG_COMPAT_MEMSET_H
 
-#include "src/common.h"
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #include <string.h>
 
 #ifndef HAVE_MEMSET

+ 1 - 0
src/compat/memutil.c

@@ -1,5 +1,6 @@
 #include <string.h>
 #include "memcpy.h"
+#include "memutil.h"
 #include "src/main.h"
 #include <stdlib.h>
 

+ 4 - 0
src/compat/memutil.h

@@ -1,6 +1,10 @@
 #ifndef _MEMUTIL_H
 #define _MEMUTIL_H
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #include <sys/types.h>
 
 //#undef str_redup

+ 0 - 1
src/compat/snprintf.c

@@ -1,6 +1,5 @@
 
 
-#include "common.h"
 #include "snprintf.h"
 
 /*

+ 4 - 1
src/compat/snprintf.h

@@ -7,7 +7,10 @@
 #ifndef _EGG_COMPAT_SNPRINTF_H_
 #define _EGG_COMPAT_SNPRINTF_H_
 
-#include "src/common.h"
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #include <stdio.h>
 
 /* Check for broken snprintf versions */

+ 0 - 1
src/compat/strcasecmp.c

@@ -4,7 +4,6 @@
  */
 
 
-#include "common.h"
 #include "memcpy.h"
 
 #ifndef HAVE_STRCASECMP

+ 4 - 1
src/compat/strcasecmp.h

@@ -7,7 +7,10 @@
 #ifndef _EGG_COMPAT_STRCASECMP_H
 #define _EGG_COMPAT_STRCASECMP_H
 
-#include "src/common.h"
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #include <ctype.h>
 
 

+ 0 - 1
src/compat/strftime.c

@@ -4,7 +4,6 @@
  *
  */
 
-#include "src/common.h"
 #include "strftime.h"
 
 #ifndef HAVE_STRFTIME

+ 4 - 1
src/compat/strftime.h

@@ -7,7 +7,10 @@
 #ifndef _EGG_COMPAT_STRFTIME_H_
 #define _EGG_COMPAT_STRFTIME_H_
 
-#include "src/common.h"
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #include <time.h>
 
 /* Use the system libraries version of strftime() if available. Otherwise

+ 4 - 0
src/compat/strlcpy.h

@@ -1,6 +1,10 @@
 #ifndef _STRLCPY_H
 #define _STRLCPY_H
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #include <sys/types.h>
 
 //#undef strlcpy

+ 4 - 0
src/compat/strsep.h

@@ -1,6 +1,10 @@
 #ifndef _STRSEP_H
 #define _STRSEP_H
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 //#undef strsep
 
 #define strsep my_strsep

+ 4 - 0
src/compat/timespec.h

@@ -1,6 +1,10 @@
 #ifndef _TIMESPEC_H
 #define _TIMESPEC_H
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif