After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 307549 - libgda-1.3.3 build fails: compiler flag, -Ddebug=1, conflicts with mysql.h function prototype
libgda-1.3.3 build fails: compiler flag, -Ddebug=1, conflicts with mysql.h fu...
Status: RESOLVED FIXED
Product: libgda
Classification: Other
Component: MySQL provider
1.3.x
Other Linux
: Normal normal
: ---
Assigned To: Rodrigo Moya
gnome-db Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-06-13 19:27 UTC by Joseph Sacco
Modified: 2005-06-18 13:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Joseph Sacco 2005-06-13 19:27:51 UTC
Version details: 1.3.3
Distribution/Version: Yellow Dog Linux 4.0.1

mysql-4.1.12: <mysql.h> contains the function prototype

     void STDCALL mysql_debug(const char *debug)

The compiler flag, -Ddebug=1, results in a macro substituion:

     void STDCALL mysql_debug(const char *1)

which causes gcc [3.3, 3.4.1, 4.1] to choke.

A quick and dangerous workaround:

     Alter the function signature in <mysql.h>.

For example,

     void STDCALL mysql_debug (const char * mysqldebug) 

A better solution is to modify the name of the compiler substitution MACRO to
something unique to libgda, say, -DGDA_DEBUG=1
Comment 1 Joseph Sacco 2005-06-17 18:28:56 UTC
./libgda/gda-config.c appears to be the only file that contains

            #ifdef debug

so the switch to more uniquely named compiler preprocessor flag is simple to
implement.

-Joseph

Comment 2 Rodrigo Moya 2005-06-18 13:35:31 UTC
Fixed in CVS, now we use GDA_DEBUG