summaryrefslogtreecommitdiff
path: root/source3/lib/replace/replace.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-10-04 17:20:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:31:10 -0500
commit941544a9514aaae89268bc9d689705ad0724119e (patch)
tree1f75125cb1226f2d3fd0031e5dc1e056c6e896e7 /source3/lib/replace/replace.h
parent5a3dcd8dd602dd59f3bfb1c397f80a6be3755df3 (diff)
downloadsamba-941544a9514aaae89268bc9d689705ad0724119e.tar.gz
samba-941544a9514aaae89268bc9d689705ad0724119e.tar.bz2
samba-941544a9514aaae89268bc9d689705ad0724119e.zip
r25505: Add a replacement (IPv4 only) implementation of getaddrinfo/freeaddrinfo
under the 2 clause *BSD license for future use in IPv6 code. Original code was from PostgreSQL and I've maintained their license even though I've rewritten large parts of it (I probably should donate this back to them). Jeremy. (This used to be commit 760d993340a966269d71acfb7a6b5e4d3776ac5d)
Diffstat (limited to 'source3/lib/replace/replace.h')
-rw-r--r--source3/lib/replace/replace.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/lib/replace/replace.h b/source3/lib/replace/replace.h
index 27265e35c4..ca4becaa70 100644
--- a/source3/lib/replace/replace.h
+++ b/source3/lib/replace/replace.h
@@ -139,7 +139,7 @@ int setenv(const char *name, const char *value, int overwrite);
#ifndef HAVE_UNSETENV
#define unsetenv rep_unsetenv
-int rep_unsetenv(const char *name);
+int rep_unsetenv(const char *name);
#endif
#ifndef HAVE_SETEUID
@@ -163,7 +163,7 @@ char *rep_strcasestr(const char *haystack, const char *needle);
#endif
#ifndef HAVE_STRTOK_R
-#define strtok_r rep_strtok_r
+#define strtok_r rep_strtok_r
char *rep_strtok_r(char *s, const char *delim, char **save_ptr);
#endif
@@ -330,9 +330,7 @@ ssize_t rep_pread(int __fd, void *__buf, size_t __nbytes, off_t __offset);
ssize_t rep_pwrite(int __fd, const void *__buf, size_t __nbytes, off_t __offset);
#endif
-#if !defined(HAVE_INET_PTON) || !defined(HAVE_INET_NTOP)
#include "system/network.h"
-#endif
#ifndef HAVE_INET_PTON
int rep_inet_pton(int af, const char *src, void *dst);
@@ -344,6 +342,10 @@ const char *rep_inet_ntop(int af, const void *src, char *dst, socklen_t size);
#define inet_ntop rep_inet_ntop
#endif
+#if !defined(HAVE_GETADDRINFO)
+#include "system/getaddrinfo.h"
+#endif
+
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif