develooper Front page | perl.perl5.porters | Postings from April 2006

PERL_UNUSED_DECL change (27649) breaks threaded builds on Win32 withgcc-3.4.2

Steve Hay
April 4, 2006 09:44
PERL_UNUSED_DECL change (27649) breaks threaded builds on Win32 withgcc-3.4.2
Message ID:
I'm struggling to understand why, but bleadperl@27649 doesn't build with 
threads enabled on Win32 using gcc-3.4.2 (mingw-special).  27648 is fine.

I get masses of errors when the build reaches win32/perllib.c.  The 
errors kick off with:

gcc -c -I. -I.\include -I. -I.. -I..\lib\CORE -DWIN32 -DHAVE_DES_FCRYPT 
iasing -DPERL_MSVCRT_READFIX -xc++ -operllib.o perllib.c
In file included from ./win32thread.h:4,
                  from ../perl.h:2551,
                  from perllib.c:6:
./win32.h:437: error: expected primary-expression before "register"
./win32.h:437: error: expected `)' before "register"

I ran perllib.c through the cpp and found that the offending line 437 in 
win32/win32.h comes out as:

  int win32_async_check((register PerlInterpreter* my_perl));

whereas at 27648 it was:

  int win32_async_check(register PerlInterpreter* my_perl );

Seemingly every other occurrence of pTHX is similarly affected, hence 
the mountain of errors.

VC++ and Borland builds are OK because they don't have HASATTRIBUTE_UNUSED.

What's gone wrong here?

Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only. If you have received this message in error or there are any problems, please notify the sender immediately. The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden. Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd. The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email. Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About