Tcl Source Code

Artifact [c6498c00a4]
Login

Artifact c6498c00a4d0f56ae5b21c16e10a0b6beff2eb58:

Attachment "tclUnixChan.c.diff" to ticket [651811ffff] added by jdmartin 2002-12-11 10:28:51.
--- tclUnixChan.c.old	Mon Sep  2 20:01:25 2002
+++ tclUnixChan.c	Tue Dec 10 19:59:46 2002
@@ -16,6 +16,27 @@
 #include "tclInt.h"	/* Internal definitions for Tcl. */
 #include "tclPort.h"	/* Portability features for Tcl. */
 
+/*!!!!!!!!!!!*/
+
+#ifdef inet_ntoa
+#undef inet_ntoa
+#endif
+
+#define inet_ntoa fixinet_ntoa
+
+char *fixinet_ntoa(struct in_addr addr)
+{
+    char *result = (char *)malloc(12 * sizeof(char));
+    unsigned char *addr_n;
+
+    addr_n = (unsigned char *)&addr.s_addr;
+    sprintf(result, "%d.%d.%d.%d", addr_n[0], addr_n[1], addr_n[2], addr_n[3]);
+
+    return result;
+}
+
+/*!!!!!!!!!!!*/
+
 /*
  * sys/ioctl.h has already been included by tclPort.h.	Including termios.h
  * or termio.h causes a bunch of warning messages because some duplicate