[Date Prev][Date Next] [Chronological] [Thread] [Top]

More WIN32 port patches 1 ref:- ITS#72



Full_Name: Ian Brabham
Version: 2.0-Devel
OS: WIN32
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (130.194.41.14)


I have been putting the latest version of the clients and libraries under 
WIN32 through it's paces and it all appears very good so far.

One issue that has come up since the August 1998 build I was using is that 
you have upgraded to Winsock 2 (HAVE_WINSOCK2 & ws2_32.lib).  One of my 
test PC's of course didn't have it. So I built a Winsock 1.1 version 
(linking with wsock32.lib) and open.c wouldn't compile with this option. 

Below is a diff of the patch that is required.  Works a treat on all WIN32 
(95/98/NT) platforms tested so far :-)

Index: open.c
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/libraries/libldap/open.c,v
retrieving revision 1.17
diff -u -r1.17 open.c
--- open.c	1999/01/31 00:09:00	1.17
+++ open.c	1999/02/19 05:03:24
@@ -132,9 +132,11 @@
 }	/* The WinSock DLL is acceptable. Proceed. */
 
 #elif HAVE_WINSOCK
-	if ( WSAStartup( 0x0101, &wsadata ) != 0 ) {
+{	WSADATA wsaData;
+	if ( WSAStartup( 0x0101, &wsaData ) != 0 ) {
 	    return( NULL );
 	}
+}
 #endif
 
 	if ( (ld = (LDAP *) calloc( 1, sizeof(LDAP) )) == NULL ) {

===================================================================