aboutsummaryrefslogtreecommitdiffstats
path: root/inet_ntop.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2000-01-10 17:33:17 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2000-01-10 17:33:17 +0000
commit1990d5fb5ca844ef3c09bb0b177f3bc1ced3d924 (patch)
tree413b147e552443eae7de52faa7c999543babae13 /inet_ntop.c
parent9fe38ca2b5dc37b9f47ea3f047a0b079b47c4459 (diff)
Some initial changes for win32 support, but not all.
Added lots of #ifdef HAVE_*_H wrappers. Added some #defines in config.h.win32 Check for more headers in configure.in Added prototype for inet_aton() in inet_v6defs.h. Changed "BYTE" token (i.e., #define) in ascend-gramamr.y because it conflicts with a windows definition. Use HEXBYTE instead. svn path=/trunk/; revision=1448
Diffstat (limited to 'inet_ntop.c')
-rw-r--r--inet_ntop.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/inet_ntop.c b/inet_ntop.c
index ff80e4e1f8..0fc9883970 100644
--- a/inet_ntop.c
+++ b/inet_ntop.c
@@ -15,19 +15,40 @@
* SOFTWARE.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$Id: inet_ntop.c,v 1.2 1999/10/14 06:55:08 guy Exp $";
+static char rcsid[] = "$Id: inet_ntop.c,v 1.3 2000/01/10 17:32:51 gram Exp $";
#endif /* LIBC_SCCS and not lint */
-#include "config.h"
-
+#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
+#endif
+
#include <sys/types.h>
+
+#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
+#endif
+
+#ifdef HAVE_WINSOCK_H
+#include <winsock.h>
+#define EAFNOSUPPORT WSAEAFNOSUPPORT
+#endif
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
+
+#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
+#endif
+
+#ifdef HAVE_ARPA_NAMESER_H
#include <arpa/nameser.h>
+#endif
#include <errno.h>
#include <stdio.h>