cleaning up plperl warnings

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: cleaning up plperl warnings
Date: 2006-01-08 22:14:02
Message-ID: 43C18EAA.4060602@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


First, I cleaned up many of the warnings on my Windows box by running
this to fix up comments in perl's config.h:

sed -i -e 's,\(^/\*.*\)/\*,\1/ *,' config.h
unix2dos config.h

That puts a space between the / and * of what would otherwise be an
embedded comment start, and thus removes a huge number of warning messages.

Second, stopping the hijacking of stdio and other things by the perl
headers (see discussion elsewhere) cleans up most of the remaining messages.

Now, in src/include/port/win32.h we have this:

/*
* Supplement to <sys/types.h>.
*
* Perl already has conflicting defines for uid_t and gid_t.
*/
#ifndef PLPERL_HAVE_UID_GID
typedef int uid_t;
typedef int gid_t;
#else
/* These are redefined by perl. */
#define uid_t int
#define gid_t int
#endif

But in my perl installation, at least, these are not redefined at all,
but typedef''d:

typedef long uid_t;
typedef long gid_t;

Which causes a couple of pretty obscure warnings:

C:/Perl/lib/CORE/win32.h:219: warning: useless keyword or type name in empty declaration
C:/Perl/lib/CORE/win32.h:219: warning: empty declaration
C:/Perl/lib/CORE/win32.h:220: warning: useless keyword or type name in empty declaration
C:/Perl/lib/CORE/win32.h:220: warning: empty declaration

Why do we need these defines at all? We don't use either of these types anywhere in the plperl code.

Is the community perl different in what it does here from what the ActiveState perl?

cheers

andrew

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2006-01-08 22:37:21 Re: [HACKERS] Inconsistent syntax in GRANT
Previous Message Tom Lane 2006-01-08 21:34:39 Re: -HEAD compile failure on OpenBSD-current