r1267 - trunk/code/client
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sun Feb 17 08:46:35 EST 2008
Author: thilo
Date: 2008-02-17 08:46:34 -0500 (Sun, 17 Feb 2008)
New Revision: 1267
Modified:
trunk/code/client/cl_curl.c
trunk/code/client/cl_curl.h
Log:
Angst and zinx cajoled me into removing trying to load libcurl.so again.
Modified: trunk/code/client/cl_curl.c
===================================================================
--- trunk/code/client/cl_curl.c 2008-02-16 22:57:45 UTC (rev 1266)
+++ trunk/code/client/cl_curl.c 2008-02-17 13:46:34 UTC (rev 1267)
@@ -101,27 +101,21 @@
#else
char fn[1024];
- // On some linux distributions there is no libcurl.so symlink, but only libcurl.so.4
+ Q_strncpyz( fn, Sys_Cwd( ), sizeof( fn ) );
+ strncat(fn, "/", sizeof(fn)-strlen(fn)-1);
+ strncat(fn, cl_cURLLib->string, sizeof(fn)-strlen(fn)-1);
- Q_strncpyz(fn, cl_cURLLib->string, sizeof(fn));
- strncat(fn, ".4", sizeof(fn)-strlen(fn)-1);
-
if((cURLLib = Sys_LoadLibrary(fn)) == 0)
{
- Q_strncpyz(fn, cl_cURLLib->string, sizeof(fn));
- strncat(fn, ".3", sizeof(fn)-strlen(fn)-1);
-
- if((cURLLib = Sys_LoadLibrary(fn)) == 0)
+#ifdef ALTERNATE_CURL_LIB
+ // On some linux distributions there is no libcurl.so.3, but only libcurl.so.4. That one works too.
+ if( (cURLLib = Sys_LoadLibrary(ALTERNATE_CURL_LIB)) == 0 )
{
- Q_strncpyz( fn, Sys_Cwd( ), sizeof( fn ) );
- strncat(fn, "/", sizeof(fn)-strlen(fn)-1);
- strncat(fn, cl_cURLLib->string, sizeof(fn)-strlen(fn)-1);
-
- if( (cURLLib = Sys_LoadLibrary(fn)) == 0 )
- {
- return qfalse;
- }
+ return qfalse;
}
+#else
+ return qfalse;
+#endif
}
#endif /* _WIN32 */
}
Modified: trunk/code/client/cl_curl.h
===================================================================
--- trunk/code/client/cl_curl.h 2008-02-16 22:57:45 UTC (rev 1266)
+++ trunk/code/client/cl_curl.h 2008-02-17 13:46:34 UTC (rev 1267)
@@ -34,7 +34,8 @@
#elif defined(MACOS_X)
#define DEFAULT_CURL_LIB "libcurl.dylib"
#else
-#define DEFAULT_CURL_LIB "libcurl.so"
+#define DEFAULT_CURL_LIB "libcurl.so.4"
+#define ALTERNATE_CURL_LIB "libcurl.so.3"
#endif
#ifdef USE_LOCAL_HEADERS
More information about the quake3-commits
mailing list