Author: titmuss
Date: Wed Feb 13 09:29:31 2008
New Revision: 1941

URL: http://svn.slimdevices.com?rev=1941&root=Jive&view=rev
Log:
 [EMAIL PROTECTED] (orig r1927):  titmuss | 2008-02-13 17:04:59 +0000
 Bug: 7086
 Description:
 Fixes for windows. Still does not compile due to lack of socketpair.
 

Modified:
    trunk/   (props changed)
    trunk/jive/src/pkg/jive/VisualC/jive.vcproj
    trunk/jive/src/pkg/jive/src/net/jive_dns.c

Propchange: trunk/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Wed Feb 13 09:29:31 2008
@@ -1,3 +1,3 @@
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:1926
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:1927
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/SN:1083
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/scrolling:1378

Modified: trunk/jive/src/pkg/jive/VisualC/jive.vcproj
URL: 
http://svn.slimdevices.com/trunk/jive/src/pkg/jive/VisualC/jive.vcproj?rev=1941&root=Jive&r1=1940&r2=1941&view=diff
==============================================================================
--- trunk/jive/src/pkg/jive/VisualC/jive.vcproj (original)
+++ trunk/jive/src/pkg/jive/VisualC/jive.vcproj Wed Feb 13 09:29:31 2008
@@ -136,6 +136,7 @@
                        />
                        <Tool
                                Name="VCLinkerTool"
+                               AdditionalDependencies="ws2_32.lib"
                                LinkIncremental="2"
                                GenerateDebugInformation="true"
                                SubSystem="1"
@@ -209,6 +210,10 @@
                                >
                        </File>
                        <File
+                               RelativePath="..\src\net\jive_dns.c"
+                               >
+                       </File>
+                       <File
                                RelativePath="..\src\ui\jive_event.c"
                                >
                        </File>

Modified: trunk/jive/src/pkg/jive/src/net/jive_dns.c
URL: 
http://svn.slimdevices.com/trunk/jive/src/pkg/jive/src/net/jive_dns.c?rev=1941&root=Jive&r1=1940&r2=1941&view=diff
==============================================================================
--- trunk/jive/src/pkg/jive/src/net/jive_dns.c (original)
+++ trunk/jive/src/pkg/jive/src/net/jive_dns.c Wed Feb 13 09:29:31 2008
@@ -6,7 +6,40 @@
 
 #include "common.h"
 
+#ifdef _WIN32
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
+
 #define RESOLV_TIMEOUT (2 * 60 * 1000) /* 2 minutes */
+
+
+/*
+ * Some systems do not provide this so that we provide our own. It's not
+ * marvelously fast, but it works just fine.
+ * (from luasocket)
+ */
+#ifndef HAVE_INET_ATON
+int inet_aton(const char *cp, struct in_addr *inp)
+{
+    unsigned int a = 0, b = 0, c = 0, d = 0;
+    int n = 0, r;
+    unsigned long int addr = 0;
+    r = sscanf(cp, "%u.%u.%u.%u%n", &a, &b, &c, &d, &n);
+    if (r == 0 || n == 0) return 0;
+    cp += n;
+    if (*cp) return 0;
+    if (a > 255 || b > 255 || c > 255 || d > 255) return 0;
+    if (inp) {
+        addr += a; addr <<= 8;
+        addr += b; addr <<= 8;
+        addr += c; addr <<= 8;
+        addr += d;
+        inp->s_addr = htonl(addr);
+    }
+    return 1;
+}
+#endif
 
 
 /* write a string to the pipe fd */

_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins

Reply via email to