[quake3-commits] r2153 - trunk/code/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Aug 29 09:57:47 EDT 2011


Author: ztm
Date: 2011-08-29 09:57:46 -0400 (Mon, 29 Aug 2011)
New Revision: 2153

Modified:
   trunk/code/client/cl_curl.c
   trunk/code/client/cl_curl.h
   trunk/code/client/cl_main.c
Log:
- Only need cl_cURLLib cvar if USE_CURL_DLOPEN is defined.
- Try to load libcurl-4.dll on win32 (it use to be included in the NSIS installer).

Modified: trunk/code/client/cl_curl.c
===================================================================
--- trunk/code/client/cl_curl.c	2011-08-27 15:45:27 UTC (rev 2152)
+++ trunk/code/client/cl_curl.c	2011-08-29 13:57:46 UTC (rev 2153)
@@ -22,11 +22,12 @@
 
 #ifdef USE_CURL
 #include "client.h"
-cvar_t *cl_cURLLib;
 
 #ifdef USE_CURL_DLOPEN
 #include "../sys/sys_loadlib.h"
 
+cvar_t *cl_cURLLib;
+
 char* (*qcurl_version)(void);
 
 CURL* (*qcurl_easy_init)(void);

Modified: trunk/code/client/cl_curl.h
===================================================================
--- trunk/code/client/cl_curl.h	2011-08-27 15:45:27 UTC (rev 2152)
+++ trunk/code/client/cl_curl.h	2011-08-29 13:57:46 UTC (rev 2153)
@@ -24,28 +24,28 @@
 #ifndef __QCURL_H__
 #define __QCURL_H__
 
-extern cvar_t *cl_cURLLib;
-
 #include "../qcommon/q_shared.h"
 #include "../qcommon/qcommon.h"
 
-#ifdef WIN32
-#define DEFAULT_CURL_LIB "libcurl-3.dll"
-#elif defined(MACOS_X)
-#define DEFAULT_CURL_LIB "libcurl.dylib"
-#else
-#define DEFAULT_CURL_LIB "libcurl.so.4"
-#define ALTERNATE_CURL_LIB "libcurl.so.3"
-#endif
-
 #ifdef USE_LOCAL_HEADERS
   #include "../libcurl/curl/curl.h"
 #else
   #include <curl/curl.h>
 #endif
 
+#ifdef USE_CURL_DLOPEN
+#ifdef WIN32
+  #define DEFAULT_CURL_LIB "libcurl-4.dll"
+  #define ALTERNATE_CURL_LIB "libcurl-3.dll"
+#elif defined(MACOS_X)
+  #define DEFAULT_CURL_LIB "libcurl.dylib"
+#else
+  #define DEFAULT_CURL_LIB "libcurl.so.4"
+  #define ALTERNATE_CURL_LIB "libcurl.so.3"
+#endif
 
-#ifdef USE_CURL_DLOPEN
+extern cvar_t *cl_cURLLib;
+
 extern char* (*qcurl_version)(void);
 
 extern CURL* (*qcurl_easy_init)(void);

Modified: trunk/code/client/cl_main.c
===================================================================
--- trunk/code/client/cl_main.c	2011-08-27 15:45:27 UTC (rev 2152)
+++ trunk/code/client/cl_main.c	2011-08-29 13:57:46 UTC (rev 2153)
@@ -3491,7 +3491,7 @@
 	cl_showMouseRate = Cvar_Get ("cl_showmouserate", "0", 0);
 
 	cl_allowDownload = Cvar_Get ("cl_allowDownload", "0", CVAR_ARCHIVE);
-#ifdef USE_CURL
+#ifdef USE_CURL_DLOPEN
 	cl_cURLLib = Cvar_Get("cl_cURLLib", DEFAULT_CURL_LIB, CVAR_ARCHIVE);
 #endif
 



More information about the quake3-commits mailing list