On Thu, 2004-12-02 at 12:11, Billy Patton wrote: > Because of the perl version wars (mine is better) here at work, > and the incompatability of versions between platform, > (incompatability meaning Linux->perl->5.8.1 SunOS->perl->5.00500 > /usr/local/bin/perl) > I'm forced to compile my XS for: > SunOS > 5.005 > 5.6.0-gcc > 5.6.1 > 5.8.0 > 5.8.1 > 5.8.2 > 5.8.3 > Linux > 5.6.0 > 5.6.1 > 5.8.0 > 5.8.2 > 5.8.3 > Nothing to offer, just wanted to say holy crap that is a lot of versions to support. I just upgrade everybody here, I have everyone test and then it becomes production. I do have to compile a 5.6.2 version for some daemon code I have. Since 5.8.x, SA_RESTART was taken out of the signal handlers. Haven't had time to change the code. Anyway way off topic. :-)
> These are only warnings, but I prefer to not have any warnings. > THere are 6 of these. > > I get this message: > make[2]: Entering directory `/data/cdmg/dev/cdmg_toolbox/LaffPerl' > /apps/gcc/3.4.1/bin/gcc -c -D_REENTRANT -fno-strict-aliasing > -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g3 -O2 -DVERSION=\"2.00\" > -DXS_VERSION=\"2.00\" -fPIC > "-I/apps/perl/5.8.2/lib/perl5/5.8.2/sun4-solaris-thread-multi/CORE" Laff.c > Laff.c: In function `XS_Laff_Write': > Laff.c:20554: warning: initialization from incompatible pointer type > XS(XS_Laff_Write) > { > dXSARGS; > if (items < 2 || items > 3) > croak("Usage: Laff::Write(db,fp,pp=1)"); > { > Laff db; > FILE* fp = IoIFP(sv_2io(ST(1))); <<<<<<< 20554 > int pp; > int RETVAL; > > > Here is the XS code : > int > LaffWrite(db,fp,pp=1) > Laff db > FILE* fp > int pp > > Would the following fix this > int > LaffWrite(Laff db,FILE* fp,int pp=1) > > At one time I had this but it would not work for older versions of perl. > > > Here's the c code : > > int LaffWrite(laff_db* db,FILE* fp,int pp) > { > cell_p cell; > if (db EQ NULL) > { > CDMG_ERROR("arg 1 : Received null pointer. Expected laff_db*."); > return FALSE; > } > if (fp EQ NULL) > { > CDMG_ERROR("arg 2 : Received null pointer. Expected FILE*."); > return FALSE; > } > if (pp < 0) > { > CDMG_ERROR_A("Recieved %d as indention count. Should be >= 0!",pp); > return FALSE; > } > if (! LaffWriteHeader(db,fp)) > { > CDMG_ERROR("LaffWriteHeader failed."); > return FALSE; > } > if (! LaffWriteBarinfo(db,fp)) > { > CDMG_ERROR("LaffWriteBarinfo failed."); > return FALSE; > } > cell = (cell_p) cdmg_ht_next(db->cells,1); > if (cell EQ NULL) > { > CDMG_ERROR("No cell in database."); > return FALSE; > } > while (cell) > { > if (strcmp(cell->name,"BARINFO") EQ 0) > { > cell = (cell_p) cdmg_ht_next(db->cells,0); > if (cell EQ NULL) return TRUE; > continue; > } > if (cell->deleted EQ 0) > { > LaffWriteCell(db,fp,cell->head,0,(short)pp); > } > cell = (cell_p) cdmg_ht_next(db->cells,0); > } > return TRUE; > } > > > ___ _ ____ ___ __ __ > / _ )(_) / /_ __ / _ \___ _/ /_/ /____ ___ > / _ / / / / // / / ___/ _ `/ __/ __/ _ \/ _ \ > /____/_/_/_/\_, / /_/ \_,_/\__/\__/\___/_//_/ > /___/ > Texas Instruments ASIC Circuit Design Methodology Group > Dallas, Texas, 214-480-4455, [EMAIL PROTECTED]