How can I --enable-thread-safety and JUST need the getpwuid_r function and
not the strerror_r and gethostbyname_r function?

UnixWare doesn't have strerror_r and gethostbyname_r, and we DONT NEED THEM!

Please help me fix this.

Also, Olivier is right, there is an issue with the unixware template.

the below fixes that issue.

(what is running the template file??, which Shell or GMAKE?)


Index: src/template/unixware
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/template/unixware,v
retrieving revision 1.15
diff -u -r1.15 unixware
--- src/template/unixware	16 Aug 2003 15:35:51 -0000	1.15
+++ src/template/unixware	23 Aug 2003 02:22:11 -0000
@@ -11,4 +11,4 @@

 SUPPORTS_THREADS=yes
 NEED_REENTRANT_FUNC_NAMES=yes
-THREAD_CFLAGS += -D_REENTRANT
+THREAD_CFLAGS="$THREAD_CFLAGS -D_REENTRANT"


-- 
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
Fri, 22 Aug 2003 21:23:57 -0500
Larry Rosenman <ler@lerctr.org>
strerror_r and gethostbyname_r?
--On Friday, August 22, 2003 21:23:57 -0500 Larry Rosenman <ler@lerctr.org> 
wrote:

> How can I --enable-thread-safety and JUST need the getpwuid_r function and
> not the strerror_r and gethostbyname_r function?
>
> UnixWare doesn't have strerror_r and gethostbyname_r, and we DONT NEED
> THEM!
>
> Please help me fix this.
>
> Also, Olivier is right, there is an issue with the unixware template.
>
> the below fixes that issue.
>
> (what is running the template file??, which Shell or GMAKE?)
>
Here is an updated patch.  This is ugly, but with Bruce's change to 
**REQUIRE** the
*_r functions I don't see another way.

Index: src/port/thread.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/port/thread.c,v
retrieving revision 1.4
diff -u -r1.4 thread.c
--- src/port/thread.c	16 Aug 2003 15:35:51 -0000	1.4
+++ src/port/thread.c	23 Aug 2003 04:29:15 -0000
@@ -68,7 +68,7 @@
 pqGetpwuid(uid_t uid, struct passwd *resultbuf, char *buffer,
 		   size_t buflen, struct passwd **result)
 {
-#if defined(USE_THREADS) && defined(NEED_REENTRANT_FUNC_NAMES)
+#if defined(USE_THREADS) && (defined(NEED_REENTRANT_FUNC_NAMES) || 
defined(HAVE_GETPWUID_R))
 	/*
 	 * Early POSIX draft of getpwuid_r() returns 'struct passwd *'.
 	 *    getpwuid_r(uid, resultbuf, buffer, buflen)
Index: src/template/unixware
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/template/unixware,v
retrieving revision 1.15
diff -u -r1.15 unixware
--- src/template/unixware	16 Aug 2003 15:35:51 -0000	1.15
+++ src/template/unixware	23 Aug 2003 04:29:15 -0000
@@ -10,5 +10,5 @@
 fi

 SUPPORTS_THREADS=yes
-NEED_REENTRANT_FUNC_NAMES=yes
-THREAD_CFLAGS += -D_REENTRANT
+#NEED_REENTRANT_FUNC_NAMES=yes
+THREAD_CFLAGS="$THREAD_CFLAGS -D_REENTRANT -DHAVE_GETPWUID_R"

-- 
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
Fri, 22 Aug 2003 23:31:41 -0500
Larry Rosenman <ler@lerctr.org>
Re: strerror_r and gethostbyname_r?