PennMUSH Community

Ticket #7374 (closed windows: fixed)

Opened 1 year ago

Last modified 1 year ago

Compile errors with MSVC++ 6

Reported by: nammyung Assigned to:
Priority: minor Milestone:
Keywords: windows msvc++ Cc:
Visibility: Public

Description

Compiling 1.8.3p3 with MSVC++6 results in a lot of compile errors in externs.h -- Could the current Win32 maintainer / tester doublecheck? Here's a sample of error outputs from access.c:

access.c ./hdrs\externs.h(411) : error C2146: syntax error : missing ')' before identifier 'string' ./hdrs\externs.h(411) : error C2061: syntax error : identifier 'string' ./hdrs\externs.h(411) : error C2059: syntax error : ';' ./hdrs\externs.h(411) : error C2059: syntax error : ',' ./hdrs\externs.h(411) : error C2059: syntax error : ')' ./hdrs\externs.h(421) : error C2146: syntax error : missing ')' before identifier 'target' ./hdrs\externs.h(421) : error C2061: syntax error : identifier 'target' ./hdrs\externs.h(421) : error C2059: syntax error : ';' ./hdrs\externs.h(421) : error C2059: syntax error : ',' ./hdrs\externs.h(422) : error C2059: syntax error : ')' ./hdrs\externs.h(430) : warning C4273: 'strdup' : inconsistent dll linkage. dllexport assumed. ./hdrs\externs.h(436) : warning C4005: 'vsnprintf' : macro redefinition

./hdrs\confmagic.h(49) : see previous definition of 'vsnprintf'

./hdrs\externs.h(465) : error C2146: syntax error : missing ')' before identifier 'fmt' ./hdrs\externs.h(465) : error C2061: syntax error : identifier 'fmt' ./hdrs\externs.h(465) : error C2059: syntax error : ';' ./hdrs\externs.h(465) : error C2059: syntax error : ',' ./hdrs\externs.h(465) : error C2059: syntax error : ')' ./hdrs\externs.h(490) : error C2146: syntax error : missing ')' before identifier 'base' ./hdrs\externs.h(490) : error C2061: syntax error : identifier 'base' ./hdrs\externs.h(490) : error C2059: syntax error : ';' ./hdrs\externs.h(490) : error C2059: syntax error : ',' ./hdrs\externs.h(492) : error C2059: syntax error : ')' ./hdrs\externs.h(497) : error C2146: syntax error : missing ')' before identifier 'old' ./hdrs\externs.h(497) : error C2061: syntax error : identifier 'old' ./hdrs\externs.h(497) : error C2059: syntax error : ';' ./hdrs\externs.h(497) : error C2059: syntax error : ',' ./hdrs\externs.h(498) : error C2059: syntax error : ')' ./hdrs\externs.h(500) : error C2146: syntax error : missing ')' before identifier 'string' ./hdrs\externs.h(500) : error C2061: syntax error : identifier 'string' ./hdrs\externs.h(500) : error C2059: syntax error : ';' ./hdrs\externs.h(500) : error C2059: syntax error : ')' ./hdrs\externs.h(563) : error C2146: syntax error : missing ')' before identifier 'ptr' ./hdrs\externs.h(563) : error C2061: syntax error : identifier 'ptr' ./hdrs\externs.h(563) : error C2059: syntax error : ';' ./hdrs\externs.h(563) : error C2059: syntax error : ',' ./hdrs\externs.h(563) : error C2059: syntax error : ')' ./hdrs\externs.h(583) : error C2146: syntax error : missing ')' before identifier 's' ./hdrs\externs.h(583) : error C2061: syntax error : identifier 's' ./hdrs\externs.h(583) : error C2059: syntax error : ';' ./hdrs\externs.h(583) : error C2059: syntax error : ',' ./hdrs\externs.h(584) : error C2059: syntax error : ')' ./hdrs\externs.h(586) : error C2146: syntax error : missing ')' before identifier 'tstr' ./hdrs\externs.h(586) : error C2061: syntax error : identifier 'tstr' ./hdrs\externs.h(586) : error C2059: syntax error : ';' ./hdrs\externs.h(586) : error C2059: syntax error : ',' ./hdrs\externs.h(587) : error C2059: syntax error : ')' ./hdrs\externs.h(588) : error C2146: syntax error : missing ')' before identifier 's' ./hdrs\externs.h(588) : error C2061: syntax error : identifier 's' ./hdrs\externs.h(588) : error C2059: syntax error : ';' ./hdrs\externs.h(588) : error C2059: syntax error : ',' ./hdrs\externs.h(589) : error C2059: syntax error : ')' ./hdrs\externs.h(590) : error C2146: syntax error : missing ')' before identifier 's' ./hdrs\externs.h(590) : error C2061: syntax error : identifier 's' ./hdrs\externs.h(590) : error C2059: syntax error : ';' ./hdrs\externs.h(590) : error C2059: syntax error : ',' ./hdrs\externs.h(591) : error C2059: syntax error : ')' ./hdrs\externs.h(592) : error C2146: syntax error : missing ')' before identifier 's' ./hdrs\externs.h(592) : error C2061: syntax error : identifier 's' ./hdrs\externs.h(592) : error C2059: syntax error : ';' ./hdrs\externs.h(592) : error C2059: syntax error : ',' ./hdrs\externs.h(594) : error C2059: syntax error : ')' ./hdrs\externs.h(595) : error C2146: syntax error : missing ')' before identifier 'tsr' ./hdrs\externs.h(595) : error C2061: syntax error : identifier 'tsr' ./hdrs\externs.h(595) : error C2059: syntax error : ';' ./hdrs\externs.h(595) : error C2059: syntax error : ',' ./hdrs\externs.h(595) : error C2059: syntax error : ')' ./hdrs\externs.h(596) : error C2146: syntax error : missing ')' before identifier 'tstr' ./hdrs\externs.h(596) : error C2061: syntax error : identifier 'tstr' ./hdrs\externs.h(596) : error C2059: syntax error : ';' ./hdrs\externs.h(596) : error C2059: syntax error : ',' ./hdrs\externs.h(596) : error C2059: syntax error : ')' E:\games\pennmush\pennmush-1.8.3p3\pennmush-1.8.3p3\src\access.c(336) : warning C4013: 'quick_regexp_match' undefined; assuming extern returning int E:\games\pennmush\pennmush-1.8.3p3\pennmush-1.8.3p3\src\access.c(343) : warning C4013: 'quick_wild' undefined; assuming extern returning int E:\games\pennmush\pennmush-1.8.3p3\pennmush-1.8.3p3\src\access.c(442) : warning C4013: 'safe_format' undefined; assuming extern returning int E:\games\pennmush\pennmush-1.8.3p3\pennmush-1.8.3p3\src\access.c(567) : warning C4013: 'mush_free' undefined; assuming extern returning int

Attachments

patch (13.3 kB) - added by intrevis on 06/22/07 04:08:14.

Change History

06/14/07 13:08:04 changed by raevnos

  • type changed from incoming to windows.

06/21/07 00:53:28 changed by intrevis

Repros under MSVC.NET too... investigating.

06/21/07 02:13:30 changed by intrevis

The patch doesn't fix everything--there's still a int64 to long conversion issue in strutil.c, in format_long. intmax_t seems to be defined as int64 on Win32--not sure what the proper fix here is.

06/21/07 02:27:30 changed by intrevis

Also, this fixes the build errors that occur if your build path has spaces.

06/22/07 04:08:14 changed by intrevis

  • attachment patch added.

06/22/07 04:12:30 changed by intrevis

Minor update. The Windows SDK's ldiv_t only supports 64-bits on Win64. For now, typedef'ed intmax_t to int32 on Win32 and int64 on Win64. Two more warnings to go...

06/26/07 17:58:13 changed by raevnos

I've checked in this patch, with a few changes -- I added an implementation of imaxdiv() for systems without it. Catch me on M*U*S*H sometime and I'll make a patch with this and other changes for Windows testing if you want.

(Note: Unix patch doesn't understand filenames using Windows-style directory separators. I'm not sure if it's worth putting a conversion script in the SVN source or not...)

07/10/07 11:17:44 changed by raevnos

  • status changed from new to closed.
  • resolution set to fixed.