bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feature Branch Solaris Build Broken - lib/glob.c errors


From: Derek Price
Subject: Re: Feature Branch Solaris Build Broken - lib/glob.c errors
Date: Tue, 24 May 2005 17:21:16 -0400
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

It looks like your header is using some sort of #pragma to redefine the
function names, which I would hope would make them look less like macros
and actually remap the functions, allowing us to use the macros in
glob.c as they stand.

You are still encountering this problem with the latest glob.c?  We were
encountering problems using the *64 structs and functions on HP-UX and I
rewrote the file this morning to attempt to let compiler magic take care
of the 64 bit conversion, which is supposed to work transparently on all
systems.

Regards,

Derek


Conrad T. Pino wrote:

>Hi Derek,
>
>This platform's "sys/stat.h" implementation in this case
>defines macros for "stat", "fstat" and "lstat" to be the
>tokens "stat64", "fstat64" and "lstat64" respectively.
>My analysis of "sys/stat.h" relevent section is below.
>
>These macro definitions are in effect when "struct stat"
>definition is encountered which becomes "struct stat64".
>
>Line 187 of "lib/glob.c" redefines "stat64" as:
>
> # define stat64 stat
>
>which causes later "struct stat" references to be become
>"struct stat64" which becomes "struct stat" which is an
>empty forward declaration at best.
>
>It seems defining macros for "stat", "fstat", "lstat",
>"stat64", "fstat64" and "lstat64" on this platform is
>a risky proposition.
>
>Conrad
>
>/*
> * large file compilation environment setup
> */
>#if !defined(_LP64) && _FILE_OFFSET_BITS == 64
>// This is true #error Die
>#ifdef __PRAGMA_REDEFINE_EXTNAME
>// This is false #error Die
>#pragma redefine_extname fstat fstat64
>#pragma redefine_extname stat stat64
>
>#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
> defined(_XPG4_2) || defined(__EXTENSIONS__)
>// This is false #error Die
>#pragma redefine_extname lstat lstat64
>#endif
>#else /* __PRAGMA_REDEFINE_EXTNAME */
>// This is true #error Die
>#define fstat fstat64
>#define stat stat64
>#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
> defined(_XPG4_2) || defined(__EXTENSIONS__)
>// This is true #error Die
>#define lstat lstat64
>#endif
>#endif /* __PRAGMA_REDEFINE_EXTNAME */
>#endif /* !_LP64 && _FILE_OFFSET_BITS == 64 */
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCk5rLLD1OTBfyMaQRAhbVAJ4weUVLak0/PGsMQUPYxK+mVgy91gCeMJSV
Z/A53LJrStIsU8S9irOFLlY=
=MgP1
-----END PGP SIGNATURE-----






reply via email to

[Prev in Thread] Current Thread [Next in Thread]