On Thu, 14 Apr 2005, Patrick Galbraith wrote:

> Tim,
> 
> For the longest time, there's been this annoying warning with the 
> compile for DBD::mysql:
> 
> cc -c  -I/Library/Perl/5.8.1/darwin-thread-multi-2level/auto/DBI/ 
> -I/usr/local/mysql/include -fno-omit-frame-pointer 
> -DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -g -pipe -pipe -fno-common 
> -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include 
> -Os   -DVERSION=\"2.9015_3\" -DXS_VERSION=\"2.9015_3\"  
> "-I/System/Library/Perl/5.8.1/darwin-thread-multi-2level/CORE"   
> dbdimp.c
> /usr/bin/perl -p -e "s/~DRIVER~/mysql/g" 
> /Library/Perl/5.8.1/darwin-thread-multi-2level/auto/DBI//Driver.xst > 
> mysql.xsi
> /usr/bin/perl /System/Library/Perl/5.8.1/ExtUtils/xsubpp  -typemap 
> /System/Library/Perl/5.8.1/ExtUtils/typemap  mysql.xs > mysql.xsc && mv 
> mysql.xsc mysql.c
> Warning: duplicate function definition 'do' detected in mysql.xs, line 
> 224
> Warning: duplicate function definition 'rows' detected in mysql.xs, 
> line 560
> 
> I looked into this, and it seems that mysql.xsi also is generated with 
> definitions for rows() and do(), and mysql.xs has these functions 
> already declared. It seems that maybe I would have to move them to 
> dbdimp.c. I've tried moving what is rows now:

The do warning is  already fixed on the 1.3.2.x branch. I removed
do() from mysql.xs because it is no longer needed. 

The reason why rows throws the duplicate function warning, IIRC, is because
xsubpp does not know about #ifdefs, so if you have

#ifdef false
    void dbd_st_rows() {...} 
#endif

void dbd_st_row {...}

you get a duplicate function warning from xsubpp.  I tracked it back this far, 
and since it is a totally bogus warning, I figured it was not worth much going 
further.


Rudy

Reply via email to