summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2009-03-29 17:05:50 +0200
committerAndreas Baumann <abaumann@yahoo.com>2009-03-29 17:05:50 +0200
commit9b5e62657a7070186392521d21cfad95dee36596 (patch)
tree8e5c756b1c5afabb73c876fb64644c3acba86b2a /include
parenta285896c04fb2a205f270a4ae55a62b003adb87e (diff)
downloadwolfbones-9b5e62657a7070186392521d21cfad95dee36596.tar.gz
wolfbones-9b5e62657a7070186392521d21cfad95dee36596.tar.bz2
removed inet_ntop (is obsolete and ugly!), use getnameinfo instead
Diffstat (limited to 'include')
-rw-r--r--include/wolf/port/netdb.h37
1 files changed, 8 insertions, 29 deletions
diff --git a/include/wolf/port/netdb.h b/include/wolf/port/netdb.h
index 87efd3c..859b296 100644
--- a/include/wolf/port/netdb.h
+++ b/include/wolf/port/netdb.h
@@ -31,35 +31,6 @@
#include "port/sys.h"
-/* so far: LINUX, NETBSD, FREEBSD */
-
-/* for inet_ntop */
-
-#ifdef SUNOS
-#if OS_MAJOR_VERSION == 5
-#if OS_MINOR_VERSION >= 8 && OS_MINOR_VERSION <= 10
-#include <sys/socket.h>
-#endif
-#endif
-#endif
-
-#ifdef OPENBSD
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#endif
-
-#ifndef _WIN32
-#include <arpa/inet.h>
-#endif
-
-/* no inet_ntop on Windows */
-#ifdef _WIN32
-#include "port/inet_ntop.h"
-#endif
-
-/* for getaddrinfo, freeaddrinfo, struct getaddrinfo */
-
#ifdef FREEBSD
/* not sure about that */
#define __BSD_VISIBLE 0
@@ -99,6 +70,14 @@
#include <WS2tcpip.h> /* for getaddrinfo */
#endif
+#ifndef NI_MAXHOST
+#define NI_MAXHOST 1025
+#endif
+
+#ifndef NI_MAXSERV
+#define NI_MAXSERV 32
+#endif
+
/** @} */ /* @addtogroup wolf_port */
#endif /* ifndef WOLF_NETDB_H */