Re: libpq_r - Mailing list pgsql-hackers

From Larry Rosenman
Subject Re: libpq_r
Date
Msg-id 68690000.1059060610@lerlaptop-red.iadfw.net
Whole thread Raw
In response to Re: libpq_r  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: libpq_r  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers

--On Thursday, July 24, 2003 17:21:17 +0200 Peter Eisentraut 
<peter_e@gmx.net> wrote:

> Bruce Momjian writes:
>
>> Now I see what you are saying, that _REENTRANT just makes it reentrant,
>
> _REENTRANT only makes additional functions visible in the header files, it
> doesn't change any functions to behave differently.  (This is not hard to
> imagine, because the lack of reentrancy of most functions lies in the
> public interface, and you can't change that transparently.)
>
I beg to differ.  Explicitly, on UnixWare, the <errno.h> header, reproduced 
below, under
fair use, show an EXPLICIT difference in what happens with _REENTRANT:
$ cat /usr/include/errno.h
/** Copyright (c) 2002 Caldera International, Inc. All Rights Reserved.**        THIS IS UNPUBLISHED PROPRIETARY SOURCE
CODEOF*                  Caldera International, Inc.**   The copyright notice above does not evidence any actual or
intended*  publication of such source code.*/
 

#ifndef _ERRNO_H
#define _ERRNO_H
#ident  "@(#)unixsrc:usr/src/common/head/errno.h /main/uw7_nj/2"

#include <sys/errno.h>

#ifdef _REENTRANT

#ifdef __cplusplus
extern "C" {
#endif

extern int      *__thr_errno(void);

#ifdef __cplusplus
}
#endif

#define errno   (*__thr_errno())

#else /*!_REENTRANT*/

extern int      errno;

#ifdef __cplusplus /* C++ requires that this be a macro! */
#define errno   errno
#endif

#endif /*_REENTRANT*/

#endif /*_ERRNO_H*/
$


-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749



pgsql-hackers by date:

Previous
From: ohp@pyrenet.fr
Date:
Subject: Re: Feature request -- Log Database Name
Next
From: Lee Kindness
Date:
Subject: Re: libpq_r