Bug 5140 - Compilation of ioquake3.exe is not possible REv. 2106 with vc 2010 express
Status: RESOLVED FIXED
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Platform
Version: GIT MASTER
Hardware: PC Windows Vista
: P3 normal
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL: http://svn.icculus.org/quake3/trunk/c...
Depends on:
Blocks:
 
Reported: 2011-07-30 17:16 EDT by Yim
Modified: 2011-07-31 15:21:01 EDT
3 users (show)

See Also:


Attachments
The file with the changes. (9.34 KB, application/octet-stream)
2011-07-30 17:16 EDT, Yim

Description Yim 2011-07-30 17:16:36 EDT
Created attachment 2882 [details]
The file with the changes.

VC++ give this:
1>------ Build started: Project: quake3, Configuration: Release Win32 ------
1>  cl_curl.c
1>..\..\code\client\cl_curl.c(102): fatal error C1021: invalid preprocessor command 'elsif'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

And i make two changes

Line 102
#elsif by #if

Line 328
The compiller ask for a final i put
#endif

Now compile fine, but i dont know if this is correct for the code.

1>------ Build started: Project: quake3, Configuration: Release Win32 ------
1>  cl_curl.c
1>d:\ioquake_svn\code\client\cl_curl.c(97): warning C4706: assignment within conditional expression
1>     Creating library ..\..\build\quake3_release\ioquake3.x86.lib and object ..\..\build\quake3_release\ioquake3.x86.exp
1>  quake3.vcxproj -> D:\ioquake_svn\misc\msvc10\..\..\build\quake3_release\ioquake3.x86.exe
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

This is the patch.

Index: cl_curl.c
===================================================================
--- cl_curl.c	(revision 2106)
+++ cl_curl.c	(working copy)
@@ -99,7 +99,7 @@
 #ifdef _WIN32
 		return qfalse;
 
-#elsif ALTERNATE_CURL_LIB
+#if 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_LoadDll(ALTERNATE_CURL_LIB)))
 			return qfalse;
@@ -325,3 +325,4 @@
 	CL_NextDownload();
 }
 #endif /* USE_CURL */
+#endif
\ No newline at end of file



I send a mail to svnmaster@icculus.org before found bugzilla, sorry for that.
Comment 1 cyrri 2011-07-30 20:02:38 EDT
It should be #elif instead of #elsif. Replacing it by #if ... #endif is not semantically equivalent.
Comment 2 Thilo Schulz 2011-07-31 15:21:01 EDT
fixed r2108