FAQ
ppport.h is throwing warnings when compiling on Fedora Core 5
(with perl-5.8.8-4). I gather from the comments in the head
of that file that we ought to look for a newer version.

regards, tom lane

Search Discussions

  • Andrew Dunstan at May 30, 2006 at 1:42 pm

    Tom Lane wrote:
    ppport.h is throwing warnings when compiling on Fedora Core 5
    (with perl-5.8.8-4). I gather from the comments in the head
    of that file that we ought to look for a newer version.
    I don't currently have an FC5 box to test with. Here's what to try: move
    the ppport.h aside, and in the plperl directory run this command to
    generate a replacement:

    perl -MDevel::PPPort -e 'Devel::PPPort::WriteFile();'

    and then recompile.

    The last substantial change to ppport.h was when I mangled the old one a
    bit to get it to work with perl 5.05 - which we no longer support (see
    recent discussion). It does have some fairly horrible stuff (e.g.
    function bodies).

    cheers

    andrew
  • Tom Lane at May 30, 2006 at 2:08 pm

    Andrew Dunstan writes:
    I don't currently have an FC5 box to test with. Here's what to try: move
    the ppport.h aside, and in the plperl directory run this command to
    generate a replacement:
    perl -MDevel::PPPort -e 'Devel::PPPort::WriteFile();'
    and then recompile.
    Hm. It compiles without warnings, but the new ppport.h is about 100K
    larger than the old one :-(. The change we seem to actually need is
    just to put "#ifndef PERL_UNUSED_DECL" around the attempted declaration
    of that macro, so I'm inclined to just commit that rather than buy into
    everything else that seems to have been done to PPPort lately.
    Thoughts?

    regards, tom lane
  • Tom Lane at May 30, 2006 at 3:10 pm

    Andrew Dunstan writes:
    Tom Lane wrote:
    Hm. It compiles without warnings, but the new ppport.h is about 100K
    larger than the old one :-(. The change we seem to actually need is
    just to put "#ifndef PERL_UNUSED_DECL" around the attempted declaration
    of that macro, so I'm inclined to just commit that rather than buy into
    everything else that seems to have been done to PPPort lately.
    Well, if we start to use newer APIs at some stage, or if older APIs get
    replaced and moved into ppport.h, we will probably have to upgrade. That
    doesn't seem to be the case for now, so the minimal change seems
    reasonable - in fact Devrim asked me about this a week or so ago and in
    effect that's what I suggested to him, although I never heard back from him.
    A more radical solution is to remove ppport.h from our distribution
    entirely, and have the Makefile generate it at build time, using that
    same little bit of script you showed. Or is Devel::PPPort not part of
    the standard Perl distribution?

    regards, tom lane
  • Andrew Dunstan at May 30, 2006 at 3:17 pm

    Tom Lane wrote:
    A more radical solution is to remove ppport.h from our distribution
    entirely, and have the Makefile generate it at build time, using that
    same little bit of script you showed. Or is Devel::PPPort not part of
    the standard Perl distribution?

    It is, but this misses the point. You want to use the latest ppport.h
    even when building with earlier perls.

    The man page says:

    just take the most recent copy of ppport.h that you
    can find (e.g. by generating it with the latest "Devel::PPPort"
    release
    from CPAN), copy it into your project, adjust your project to use it,
    and distribute the header along with your module.

    We are using ppport.h correctly - we're just a bit out of date, that's all.

    cheers

    andrew
  • Tom Lane at May 30, 2006 at 3:35 pm

    Andrew Dunstan writes:
    It is, but this misses the point. You want to use the latest ppport.h
    even when building with earlier perls.
    Doh, of course. Well, for the moment I'll just put in the #ifndef.

    FWIW, it looks like a large part of the bloat in the newer file is
    in-line documentation, which we hardly need to include in our
    distribution. I'll leave it to someone more familiar with Perl to
    determine whether we want to try to use a slimmed-down copy of the
    up-to-date output.

    regards, tom lane
  • Martijn van Oosterhout at May 31, 2006 at 7:22 am

    On Tue, May 30, 2006 at 11:35:12AM -0400, Tom Lane wrote:
    FWIW, it looks like a large part of the bloat in the newer file is
    in-line documentation, which we hardly need to include in our
    distribution. I'll leave it to someone more familiar with Perl to
    determine whether we want to try to use a slimmed-down copy of the
    up-to-date output.
    Not sure whether it's worth it, but this sed line strips the POD docs:

    sed -e '/^=/,/^=cut/d' < ppport.h

    Have a nice day,
    --
    Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
    From each according to his ability. To each according to his ability to litigate.
  • Andrew Dunstan at May 31, 2006 at 9:05 pm

    Martijn van Oosterhout wrote:
    On Tue, May 30, 2006 at 11:35:12AM -0400, Tom Lane wrote:

    FWIW, it looks like a large part of the bloat in the newer file is
    in-line documentation, which we hardly need to include in our
    distribution. I'll leave it to someone more familiar with Perl to
    determine whether we want to try to use a slimmed-down copy of the
    up-to-date output.
    Not sure whether it's worth it, but this sed line strips the POD docs:

    sed -e '/^=/,/^=cut/d' < ppport.h

    Have a nice day,
    The changes are a lot more substantive than this, from my quick look.

    We'll have to upgrade some day, but for now we are OK. This module is
    regularly updated, but we should only update our copy as needed. I think
    we are good to go with Tom's patch.

    cheers

    andrew
  • Devrim GÃNDÃZ at May 31, 2006 at 8:17 pm
    Hi,
    On Tue, 2006-05-30 at 08:29 -0400, Tom Lane wrote:
    ppport.h is throwing warnings when compiling on Fedora Core 5
    (with perl-5.8.8-4). I gather from the comments in the head
    of that file that we ought to look for a newer version.
    I've informed Andrew about this, he sent me a patch a few days before,
    but I could not have time to test it.

    Let me test it soon.
    --
    The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564
    PostgreSQL Replication, Consulting, Custom Development, 24x7 support
    Managed Services, Shared and Dedicated Hosting
    Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-hackers @
categoriespostgresql
postedMay 30, '06 at 12:29p
activeMay 31, '06 at 9:05p
posts9
users4
websitepostgresql.org...
irc#postgresql

People

Translate

site design / logo © 2022 Grokbase