This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Stop declaring non-exported externs to non-core XS modules [perl #114516]
authorSteve Hay <steve.m.hay@googlemail.com>
Wed, 26 Sep 2012 07:33:20 +0000 (08:33 +0100)
committerSteve Hay <steve.m.hay@googlemail.com>
Wed, 26 Sep 2012 07:33:34 +0000 (08:33 +0100)
commite37d7e38fe022990bbf0ce90dc77f411ebeb158a
treebe2fd3d2e2bcfd4aa9571e63b21ea8b244bae2b5
parente9ce9c73d646d9031069b35dd37dd9722353f3f2
Stop declaring non-exported externs to non-core XS modules [perl #114516]

Hide the perl.h declarations of gete?[ug]id and getlogin on Win32 since
they are already declared in win32/win32.h, nearer to their definitions
(stub functions for UNIX compatibility) in win32/win32.c.

Also only declare them, and kill(pg)?, sbrk, chown and mkstemp, under
PERL_CORE anyway since they are not exported: including declarations for
non-exported functions just hides compiler errors about the symbols being
undefined, which doesn't help when trying to fix subsequent errors from
the linker about the symbols being unresolved. (Actually, all but sbrk,
chown and mkstemp get indirected through the perlhost layer normally
anyway, but it doesn't hurt to still hide the declarations, and helps in
the case of PERL_IMPLICIT_SYS not being defined, where only kill is
redefined to something which is exported.)

The declarations of the set[ug]id stub functions remain for now because
those two symbols are currently exported.
perl.h
win32/win32.h