summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/pg_config.h.in12
-rw-r--r--src/include/port.h18
2 files changed, 29 insertions, 1 deletions
diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in
index 60f9536dff0..6e8cac0e99a 100644
--- a/src/include/pg_config.h.in
+++ b/src/include/pg_config.h.in
@@ -121,6 +121,9 @@
/* Define to 1 if you have the `getaddrinfo' function. */
#undef HAVE_GETADDRINFO
+/* Define to 1 if you have the `gethostbyname_r' function. */
+#undef HAVE_GETHOSTBYNAME_R
+
/* Define to 1 if you have the `gethostname' function. */
#undef HAVE_GETHOSTNAME
@@ -136,6 +139,9 @@
/* Define to 1 if you have the `getpeereid' function. */
#undef HAVE_GETPEEREID
+/* Define to 1 if you have the `getpwuid_r' function. */
+#undef HAVE_GETPWUID_R
+
/* Define to 1 if you have the `getrusage' function. */
#undef HAVE_GETRUSAGE
@@ -375,6 +381,9 @@
/* Define to 1 if you have the `strerror' function. */
#undef HAVE_STRERROR
+/* Define to 1 if you have the `strerror_r' function. */
+#undef HAVE_STRERROR_R
+
/* Define to 1 if cpp supports the ANSI # stringizing operator. */
#undef HAVE_STRINGIZE
@@ -579,6 +588,9 @@
/* Define to select SysV-style shared memory. */
#undef USE_SYSV_SHARED_MEMORY
+/* Define to 1 to build libpq with threads. (--with-threads) */
+#undef USE_THREADS
+
/* Define to select unnamed POSIX semaphores. */
#undef USE_UNNAMED_POSIX_SEMAPHORES
diff --git a/src/include/port.h b/src/include/port.h
index 783d41cc0ed..16f733d67ca 100644
--- a/src/include/port.h
+++ b/src/include/port.h
@@ -6,11 +6,15 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: port.h,v 1.6 2003/06/12 08:15:29 momjian Exp $
+ * $Id: port.h,v 1.7 2003/06/14 14:35:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
+/* for thread.c */
+#include <pwd.h>
+#include <netdb.h>
+
/* Portable path handling for Unix/Win32 */
bool is_absolute_path(const char *filename);
char *first_path_separator(const char *filename);
@@ -98,3 +102,15 @@ extern long random(void);
#ifndef HAVE_SRANDOM
extern void srandom(unsigned int seed);
#endif
+
+/* thread.h */
+extern char *pqStrerror(int errnum, char *strerrbuf, size_t buflen);
+
+extern int pqGetpwuid(uid_t uid, struct passwd *resultbuf, char *buffer,
+ size_t buflen, struct passwd **result);
+
+extern int pqGethostbyname(const char *name,
+ struct hostent *resbuf,
+ char *buf, size_t buflen,
+ struct hostent **result,
+ int *herrno);