This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Why this strange change?


> 
> hjl@lucon.org (H.J. Lu) writes:
> 
> > Where is the standard? Is that final?
> 
> Yes.  This is POSIX.1b.
> 

That is pretty dumb on POSIX. I have checked HP-UX and DIGITAL UNIX.
They all have gethostbyname_r which takes different parameters than
glibc 2. But they do return -1 on error and set errno. I really
don't think we should follow POSIX.1b blindly on this. Can we
define

extern int __posix_1b_1999_gethostbyname_r (....);
extern int __gethostbyname_r (....);

#ifdef __USE_POSIX_1b_1999xx
#define gethostbyname_r __posix_1b_1999_gethostbyname_r
#else
#define gethostbyname_r __gethostbyname_r
#endif

We turn __USE_POSIX_1b_1999xx off by default for glibc 2.1 and
issuse a warning to all glibc users. In glibc 2.2, we turn it
on by default. BTW, we still need the symbol versioning to make sure
all the old binaries still work.


-- 
H.J. Lu (hjl@gnu.org)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]