On Dec 29, 2003, at 11:00 AM, Will Glass-Husain wrote: [..]
P.S. In case anyone else has hit this error, this was pulled directly from
cpan "install Time::Object".


[EMAIL PROTECTED] Time-Object-1.00]# make
gcc -c -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-str
ict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/include/gdbm -DPERL_POLLUTE -O2 -march=i386 -mcpu=i686 -g -DVERSI
ON=\"1.00\" -DXS_VERSION=\"1.00\" -fPIC
"-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE" Object.c
Object.xs:34: parse error before '(' token
[..]

folks are probably not going to believe what I think
is the Problem here is a bit convoluted to try to explain.

What seems to have happened in 5.8.X is that now the
embed.h is there and it is being called out by perl.h
and it would be really nice if there were some form of

#ifndef PERL_EMB_H
#define PERL_EMB_H
....
#endif

then one could modify the Makefile.PL for Time::Object

        'XSPROTOARG' => ' -prototypes',
    'DEFINE'     => '-D PERL_EMB_H',

and it would prevent the compiler from picking up where
it is re-defining bouth init_tm() and mini_mktime()

meatbop: 65:] grep init_tm *.h
embed.h:#define init_tm                 Perl_init_tm
embed.h:#define init_tm(a)              Perl_init_tm(aTHX_ a)
proto.h:PERL_CALLCONV void      Perl_init_tm(pTHX_ struct tm *ptm);
meatbop: 66:] grep mini_mktime *.h
embed.h:#define mini_mktime             Perl_mini_mktime
embed.h:#define mini_mktime(a)          Perl_mini_mktime(aTHX_ a)
proto.h:PERL_CALLCONV void      Perl_mini_mktime(pTHX_ struct tm *pm);
meatbop: 67:] pwd
/usr/lib/perl5/5.8.1/i586-linux-thread-multi/CORE
meatbop: 68:]

so the trick is to edit the Object.xs file so that
one commits the two tolks to being really the ones
that are local to the code that it will be creating

        1,$s/init_tm/time_object_init_tm/g
        1,$s/mini_mktime/time_object_mini_mktime/g

and now your code will not have function names that will
get into an argument. I have cc'd matt into this, in the
hope that he may have a better fix.

ciao
drieux



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to