develooper Front page | perl.perl5.porters | Postings from September 2001

Re: macro redefinitions on Win32 (was Re: Question about PERLIO)

Thread Previous | Thread Next
From:
Nikola Knezevic
Date:
September 29, 2001 13:37
Subject:
Re: macro redefinitions on Win32 (was Re: Question about PERLIO)
Message ID:
16012942253.20010929223506@tesla.rcub.bg.ac.yu
The clock just beat 01:28:46, when Jarkko said:

>> > > Could you give a pointer to the latest patch supposed to fix this?
>> > > I could retry it in Tru64, maybe I was seeing gremlins.
>> > This was hoped to fix it. Need to rerun embed.pl to make a new embed.h
>> I see gremlin droppings all over my keyboard.  No warnings now in Tru64.
Jarkko> The patch now applied.

After setting -DCRIPPLED_CC there are no warnings.

Interesting bit is how to set CRIPPLED_CC when one is under Win32 and
using nmake (that's me:)).
In Makefile states that BUILDOPT are additional defines for compiler,
but they are not passed while building miniperl. These targets get
$CFLAGS, but $CFLAGS_O is $(CFLAGS) $(BUILDOPT).
But there are to many places where $(CFLAGS) exists, altough $(CFLAGS_O)
is more appropriate. (Why is there CFLAGS_O, when BUILDOPT should be passed
everywhere, isn't it?)

So I took different approach (when I don't know what to change).
I've added extra variable EXTRA_DEFS which is interpolated in $DEFINES
thus being passed everywhere. Patch is in another message.

One more thing. After issuing
shell> perl embed.pl
[since there is no regen_headers on Win32 (at least not in
win32/Makefile)] everything was ok, until I typed cd win32 & nmake.
The I got the following:
------------
e:\perl_extra\workin_bleadperl>cd win32 & nmake

Microsoft (R) Program Maintenance Utility   Version 1.62.7022
Copyright (C) Microsoft Corp 1988-1997. All rights reserved.

        cl -c -nologo -Gf -W3 -I..\lib\CORE -I.\include -I. -I.. -DWIN32 -D_CONS
OLE -DNO_STRICT   -DPERLDLL -DPERL_CORE   -O1 -MD -DNDEBUG -DPERL_EXTERNAL_GLOB
-Fo.\mini\av.obj ..\av.c
av.c
..\proto.h(7) : error C2282: 'return_type' is followed by 'S_function_name' (mis
sing ','?)
..\embed.h(2178) : warning C4005: 'sv_2pv' : macro redefinition
..\embed.h(2195) : warning C4005: 'sv_catpvn' : macro redefinition
..\embed.h(2196) : warning C4005: 'sv_catsv' : macro redefinition
..\embed.h(2229) : warning C4005: 'sv_pvn_force' : macro redefinition
..\embed.h(2248) : warning C4005: 'sv_setsv' : macro redefinition
..\embed.h(2363) : warning C4005: 'sv_utf8_upgrade' : macro redefinition
NMAKE : fatal error U1077: 'd:\DevStudio\VC\BIN\cl.exe' : return code '0x2'
Stop.
----------

Below are incriminating parts of proto.h:
---------
/*
 * !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
 * This file is autogenerated from data in embed.pl.  Edit that file
 * and run 'make regen_headers' to effect changes.
 */

STATIC return_type      S_function_name(pTHX_ arg1, arg2, ..., argN);

START_EXTERN_C

#if defined(PERL_IMPLICIT_SYS)
PERL_CALLCONV PerlInterpreter*  perl_alloc_using(struct IPerlMem* m, struct IPerlMem* ms, struct IPerlMem* mp, struct IPerlEnv* e, struct IPerlStdIO* io, struct IPerlLIO* lio, struct IPerlDir* d, struct IPerlSock* s, struct IPerlProc* p);
#endif
------------


-- 

Nikola Knezevic [indy@hemo.net] [ http://users.hemo.net/indy ]


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About