Hi again! I need this to compile beta16 with Visual C++:

diff -u openvpn-2.0_beta16.orig/config-win32.h openvpn-2.0_beta16/config-win32.h
--- openvpn-2.0_beta16.orig/config-win32.h      2004-11-07 10:28:31.000000000 
+0100
+++ openvpn-2.0_beta16/config-win32.h   2004-11-10 12:36:05.478199500 +0100
@@ -271,6 +271,7 @@
 #define vsnprintf _vsnprintf
 #define vsnwprintf _vsnwprintf
 #define snwprintf _snwprintf
+#define snprintf _snprintf
 #define write _write
 #define open _open
 #define read _read
diff -u openvpn-2.0_beta16.orig/makefile.w32-vc 
openvpn-2.0_beta16/makefile.w32-vc
--- openvpn-2.0_beta16.orig/makefile.w32-vc     2004-10-30 15:06:50.000000000 
+0200
+++ openvpn-2.0_beta16/makefile.w32-vc  2004-11-10 12:38:59.658540300 +0100
@@ -24,7 +24,7 @@

 INCLUDE_DIRS = -I$(OPENSSL)/include -I$(LZO)/include

-LIBS = lzo.lib ws2_32.lib iphlpapi.lib winmm.lib gdi32.lib advapi32.lib
+LIBS = lzo.lib ws2_32.lib crypt32.lib iphlpapi.lib winmm.lib gdi32.lib 
advapi32.lib

 LIB_DIRS = -LIBPATH:$(OPENSSL)\out -LIBPATH:$(LZO)

diff -u openvpn-2.0_beta16.orig/thread.h openvpn-2.0_beta16/thread.h
--- openvpn-2.0_beta16.orig/thread.h    2004-11-04 02:21:39.000000000 +0100
+++ openvpn-2.0_beta16/thread.h 2004-11-10 12:29:16.048742200 +0100
@@ -163,8 +163,8 @@

 typedef int openvpn_thread_t;

-#define MUTEX_DEFINE(lock)
-#define MUTEX_PTR_DEFINE(lock)
+#define MUTEX_DEFINE(lock) int eat_semicolon
+#define MUTEX_PTR_DEFINE(lock) int eat_semicolon

 #define mutex_init(m)
 #define mutex_destroy(m)


I.e. "snprintf" must be renamed to "_snprintf", and "crypt32.lib" is missing
from the "makefile.w32-vc" file (but that one is autogenerated, yes?). And
look at that last, ugly hack: If USE_PTHREAD is NOT defined, stuff like this
get a line with a lonely semicolon, that VC++ chokes on:

struct hash_bucket
{
  MUTEX_DEFINE (mutex);
  struct hash_element * volatile list;
};

But there is probably a more elegant solution to that one...

Finally, I always have to do this adjustment, to build with MinGW:

diff -u openvpn-2.0_beta16.orig/makefile.w32 openvpn-2.0_beta16/makefile.w32
--- openvpn-2.0_beta16.orig/makefile.w32        2004-11-07 10:27:36.000000000 
+0100
+++ openvpn-2.0_beta16/makefile.w32     2004-11-10 22:27:42.796479300 +0100
@@ -50,7 +50,7 @@

 LIBS_DMALLOC = ${LIBS} -ldmalloc

-LIB_DIRS = -L${OPENSSL}/out -L${LZO}/src/.libs
+LIB_DIRS = -L${OPENSSL}/out -L${LZO}

 LIB_DIRS_DMALLOC = ${LIB_DIRS} -L${DMALLOC}


I'm using lzo-1.08, and the "liblzo.a" file was created in the
base directory there, and the "src/.libs" subdir doesn't even
exist. Or is it just me?

Cheers,
- Peter
-- 
Peter 'Luna' Runestig (fd. Altberg), Sweden <pe...@runestig.com>
PGP Key ID: 0xD07BBE13
Fingerprint: 7B5C 1F48 2997 C061 DE4B  42EA CB99 A35C D07B BE13
AOL Instant Messenger Screen name: PRunestig
Yahoo! Messenger profile name: altberg

Reply via email to