Skip Menu |

This queue is for tickets about the DBD-SQLite CPAN distribution.

Report information
The Basics
Id: 7232
Status: resolved
Priority: 0/
Queue: DBD-SQLite

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: (no value)
Fixed in: (no value)



Subject: dbdimp.c(20) : error C2010: '.' : unexpected in macro formal parameter list
The problem ... cl -c -IC:/pache/Perl/site/lib/auto/DBI -nologo -Gf -W3 -MD -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_D ES_FCRYPT -DNO_HASH_SEED -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -O2 -DNDEBUG=1 -DS QLITE_PTR_SZ=4 -DVERSION=\"1.02\" -DXS_VERSION=\"1.02\" "-IC:\Perl\lib\CORE" dbdimp.c Command line warning D4025 : overriding '/O1' with '/O2' dbdimp.c dbdimp.c(20) : error C2010: '.' : unexpected in macro formal parameter list dbdimp.c(20) : error C2010: '.' : unexpected in macro formal parameter list dbdimp.c(20) : error C2010: '.' : unexpected in macro formal parameter list dbdimp.c(63) : warning C4013: 'snprintf' undefined; assuming extern returning int The solution, use ANSI (not gcc specific) syntaxt, change #define sqlite_trace(level,fmt...) _sqlite_tracef(__FILE__, __LINE__, level, fmt) to #define sqlite_trace(level,fmt,__VA_ARGS__) _sqlite_tracef(__FILE__, __LINE__, level, fmt)
once you fix that, you get dbdimp.obj : error LNK2001: unresolved external symbol _snprintf that you resolve like described in http://gborg.postgresql.org/project/dbdpg/bugs/bugupdate.php?426 http://rt.cpan.org/NoAuth/Bug.html?id=1974 #define snprintf _snprintf
then after many compiler warnings, all tests pass except t\90cppcomments.........ok 5/38# Test 6 got: "0" (t\90cppcomments.t at line 16) t\90cppcomments.........NOK 6# Expected: "1" (C++ comment in dbdimp.c line 20) # t\90cppcomments.t line 16 is: ok(0, 1, "C++ comment in $file line $line"); now you know, thanks :)
From: jdhedden [...] 1979.usna.com
Show quoted text
> In dbdimp.c change: > > #define sqlite_trace(level,fmt...) _sqlite_tracef(__FILE__, __LINE__, > level, fmt) > > to: > > #define sqlite_trace(level,fmt,__VA_ARGS__) _sqlite_tracef(__FILE__, > __LINE__, level, fmt)
This change allows the module to compile and run under Solaris.