@@ -24,9 +24,15 @@
#include "strsep.h"
#include "timespec.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
#ifndef HAVE_MEMMEM
void *memmem(const void *l, size_t l_len, const void *s, size_t s_len);
#endif
+}
/* These apparently are unsafe without recasting. */
#define egg_isdigit(x) isdigit((int) (unsigned char) (x))
@@ -7,6 +7,12 @@
#define dirname my_dirname
char *dirname(const char *);
-#endif /* !_DIRNAME_H */
+#endif /* !_DIRNAME_H */
@@ -5,7 +5,13 @@
# include "config.h"
int my_dn_expand(const unsigned char *, const unsigned char *, const unsigned char *, char *, int);
#endif /* !_DN_EXPAND_H */
@@ -16,8 +16,14 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#ifndef HAVE_INET_NTOP
const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
#endif /* !_EGG_COMPAT_INET_NTOP_H */
@@ -13,9 +13,15 @@
#include <string.h>
#ifndef HAVE_MEMCPY
/* Use our own implementation. */
void *memcpy(void *dest, const void *src, size_t n);
#endif /* !__EGG_COMPAT_MEMCPY_H */
@@ -13,10 +13,16 @@
#ifndef HAVE_MEMSET
void *memset(void *dest, int c, size_t n);
/* Use memset instead of bzero.
*/
@@ -1,7 +1,6 @@
#include "memcpy.h"
#include "memutil.h"
-#include "src/main.h"
#include <stdlib.h>
@@ -17,12 +17,18 @@
//#define calloc my_calloc
//#define realloc my_realloc
+
void str_redup(char **, const char *);
char *strdup(const char *);
char *strldup(const char *, size_t);
-
void *my_calloc(size_t, size_t);
void *my_realloc(void *, size_t);
#endif /* !_MEMUTIL_H */
@@ -23,6 +23,9 @@
# endif
/* Use the system libraries version of vsnprintf() if available. Otherwise
* use our own.
@@ -45,4 +48,7 @@ int egg_snprintf();
# define egg_snprintf snprintf
#endif /* !_EGG_COMPAT_SNPRINTF_H_ */
@@ -14,6 +14,9 @@
#include <ctype.h>
#ifndef HAVE_STRCASECMP
int strcasecmp(const char *, const char *);
@@ -24,4 +27,7 @@ int strcasecmp(const char *, const char *);
int strncasecmp(const char *, const char *, size_t);
#endif /* !__EGG_COMPAT_STRCASECMP_H */
@@ -13,6 +13,9 @@
#include <time.h>
/* Use the system libraries version of strftime() if available. Otherwise
@@ -20,4 +23,7 @@
size_t strftime(char *s, size_t maxsize, const char *format, const struct tm *tp);
#endif /* !_EGG_COMPAT_STRFTIME_H_ */
@@ -13,8 +13,13 @@
#define strlcpy my_strlcpy
#define strlcat my_strlcat
size_t strlcpy(char *, const char *, size_t);
size_t strlcat(char *, const char *, size_t);
#endif /* !_STRLCPY_H */
@@ -9,7 +9,12 @@
#define strsep my_strsep
char *strsep(char **, const char *);
#endif /* !_STRSEP_H */