Unix Technical Forum

plperl warnings on win32

This is a discussion on plperl warnings on win32 within the Pgsql Patches forums, part of the PostgreSQL category; --> When building with MingW, we get a ton of warnings of the type: C:/Perl/lib/CORE/config.h:39:20: warning: "/*" within comment (see ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 11:26 AM
Magnus Hagander
 
Posts: n/a
Default plperl warnings on win32

When building with MingW, we get a ton of warnings of the type:
C:/Perl/lib/CORE/config.h:39:20: warning: "/*" within comment

(see
http://pgbuildfarm.org/cgi-bin/show_...00011&stg=make)

Attached patch removes this by disabling the warning specifically for
plperl on mingw.

Any objections? If not, I'll go ahead and apply...

//Magnus



---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-18-2008, 11:26 AM
Gregory Stark
 
Posts: n/a
Default Re: plperl warnings on win32


"Magnus Hagander" <magnus@hagander.net> writes:

> When building with MingW, we get a ton of warnings of the type:
> C:/Perl/lib/CORE/config.h:39:20: warning: "/*" within comment
>
> (see
> http://pgbuildfarm.org/cgi-bin/show_...00011&stg=make)


Huh, what's actually in your /Perl/lib/CORE/config.h ?

Perhaps older versions of perl weren't so careful but on my machine perl
generates a config.h like this:

/* HAS_GETPGRP2:
* This symbol, if defined, indicates that the getpgrp2() (as in DG/UX)
* routine is available to get the current process group.
*/
/*#define HAS_GETPGRP2 / **/

/* HAS_GETPPID:
* This symbol, if defined, indicates that the getppid routine is
* available to get the parent process ID.
*/
#define HAS_GETPPID /**/


--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-18-2008, 11:26 AM
Magnus Hagander
 
Posts: n/a
Default Re: plperl warnings on win32

On Tue, Jul 24, 2007 at 12:42:38PM +0100, Gregory Stark wrote:
>
> "Magnus Hagander" <magnus@hagander.net> writes:
>
> > When building with MingW, we get a ton of warnings of the type:
> > C:/Perl/lib/CORE/config.h:39:20: warning: "/*" within comment
> >
> > (see
> > http://pgbuildfarm.org/cgi-bin/show_...00011&stg=make)

>
> Huh, what's actually in your /Perl/lib/CORE/config.h ?


/*#define HAS_BCMP /**/


and similar.


> Perhaps older versions of perl weren't so careful but on my machine perl
> generates a config.h like this:


The difference is in the space. This is with perl 5.8.8.819 from
ActiveState - the latest is 5.8.8.820, and I doubt they've changed
that there.

//Magnus

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-18-2008, 11:26 AM
Gregory Stark
 
Posts: n/a
Default Re: plperl warnings on win32

"Magnus Hagander" <magnus@hagander.net> writes:

> /*#define HAS_BCMP /**/
>
> The difference is in the space. This is with perl 5.8.8.819 from
> ActiveState - the latest is 5.8.8.820, and I doubt they've changed
> that there.


Huh, I'm on 5.8.8 here as well. I suppose ActiveState has to generate the
config.h file themselves and they missed this detail.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-18-2008, 11:26 AM
Andrew Dunstan
 
Posts: n/a
Default Re: plperl warnings on win32



Magnus Hagander wrote:
> When building with MingW, we get a ton of warnings of the type:
> C:/Perl/lib/CORE/config.h:39:20: warning: "/*" within comment
>
> (see
> http://pgbuildfarm.org/cgi-bin/show_...00011&stg=make)
>
> Attached patch removes this by disabling the warning specifically for
> plperl on mingw.
>
> Any objections? If not, I'll go ahead and apply...
>
>

I recall I hacked the perl header on one machine to silence this. I
guess this is acceptable. We really should grumble loudly at the perl/AS
people, but then we cater for all sorts of header oddities elsewhere
too, so this isn't much different.

cheers

andrew

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-18-2008, 11:26 AM
Tom Lane
 
Posts: n/a
Default Re: plperl warnings on win32

Magnus Hagander <magnus@hagander.net> writes:
> override CPPFLAGS += -DPLPERL_HAVE_UID_GID
> + # Perl on win32 contains /* within comment all over the header file,
> + # so disable this warning.
> + override CFLAGS += -Wno-comment
> endif


If you insist you can apply that in some way that makes it Windows-only.
I object strongly to the patch in this form, because it will mask our
own mistakes as well as one particular Perl build's mistakes.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-18-2008, 11:26 AM
Magnus Hagander
 
Posts: n/a
Default Re: plperl warnings on win32

On Tue, Jul 24, 2007 at 09:55:57AM -0400, Tom Lane wrote:
> Magnus Hagander <magnus@hagander.net> writes:
> > override CPPFLAGS += -DPLPERL_HAVE_UID_GID
> > + # Perl on win32 contains /* within comment all over the header file,
> > + # so disable this warning.
> > + override CFLAGS += -Wno-comment
> > endif

>
> If you insist you can apply that in some way that makes it Windows-only.
> I object strongly to the patch in this form, because it will mask our
> own mistakes as well as one particular Perl build's mistakes.


Uh, it's already inside a win32-only block. So it'll only affect mingw.

Do you know of a way to do it from inside gcc, like the #pragma that exists
for win32 to disable specific warnings? If so we could just disable it on
the line before we #include the perl header, and re-enable it after...

//Magnus

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-18-2008, 11:26 AM
Andrew Dunstan
 
Posts: n/a
Default Re: plperl warnings on win32



Magnus Hagander wrote:
> On Tue, Jul 24, 2007 at 09:55:57AM -0400, Tom Lane wrote:
>
>> Magnus Hagander <magnus@hagander.net> writes:
>>
>>> override CPPFLAGS += -DPLPERL_HAVE_UID_GID
>>> + # Perl on win32 contains /* within comment all over the header file,
>>> + # so disable this warning.
>>> + override CFLAGS += -Wno-comment
>>> endif
>>>

>> If you insist you can apply that in some way that makes it Windows-only.
>> I object strongly to the patch in this form, because it will mask our
>> own mistakes as well as one particular Perl build's mistakes.
>>

>
> Uh, it's already inside a win32-only block. So it'll only affect mingw.
>
> Do you know of a way to do it from inside gcc, like the #pragma that exists
> for win32 to disable specific warnings? If so we could just disable it on
> the line before we #include the perl header, and re-enable it after...
>


see

http://gcc.gnu.org/onlinedocs/gcc/Di...nostic-Pragmas


cheers

andrew

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 04-18-2008, 11:26 AM
Magnus Hagander
 
Posts: n/a
Default Re: plperl warnings on win32

On Tue, Jul 24, 2007 at 10:11:52AM -0400, Andrew Dunstan wrote:
>
>
> Magnus Hagander wrote:
> >On Tue, Jul 24, 2007 at 09:55:57AM -0400, Tom Lane wrote:
> >
> >>Magnus Hagander <magnus@hagander.net> writes:
> >>
> >>> override CPPFLAGS += -DPLPERL_HAVE_UID_GID
> >>>+ # Perl on win32 contains /* within comment all over the header file,
> >>>+ # so disable this warning.
> >>>+ override CFLAGS += -Wno-comment
> >>> endif
> >>>
> >>If you insist you can apply that in some way that makes it Windows-only.
> >>I object strongly to the patch in this form, because it will mask our
> >>own mistakes as well as one particular Perl build's mistakes.
> >>

> >
> >Uh, it's already inside a win32-only block. So it'll only affect mingw.
> >
> >Do you know of a way to do it from inside gcc, like the #pragma that exists
> >for win32 to disable specific warnings? If so we could just disable it on
> >the line before we #include the perl header, and re-enable it after...
> >

>
> see
>
> http://gcc.gnu.org/onlinedocs/gcc/Di...nostic-Pragmas


This seems to be new in gcc 4.2, so we can't really use that

//Magnus

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 04-18-2008, 11:26 AM
Andrew Dunstan
 
Posts: n/a
Default Re: plperl warnings on win32



Magnus Hagander wrote:
> On Tue, Jul 24, 2007 at 09:55:57AM -0400, Tom Lane wrote:
>
>> Magnus Hagander <magnus@hagander.net> writes:
>>
>>> override CPPFLAGS += -DPLPERL_HAVE_UID_GID
>>> + # Perl on win32 contains /* within comment all over the header file,
>>> + # so disable this warning.
>>> + override CFLAGS += -Wno-comment
>>> endif
>>>

>> If you insist you can apply that in some way that makes it Windows-only.
>> I object strongly to the patch in this form, because it will mask our
>> own mistakes as well as one particular Perl build's mistakes.
>>

>
> Uh, it's already inside a win32-only block. So it'll only affect mingw.
>
> Do you know of a way to do it from inside gcc, like the #pragma that exists
> for win32 to disable specific warnings? If so we could just disable it on
> the line before we #include the perl header, and re-enable it after...
>
>


An alternative might be to provide a perl script in the tools directory
which would fix the perl header file.

cheers

andrew

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:32 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com