diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/psql/nls.mk | 2 | ||||
-rw-r--r-- | src/include/port.h | 2 | ||||
-rw-r--r-- | src/interfaces/libpq/nls.mk | 2 | ||||
-rw-r--r-- | src/port/Makefile | 6 | ||||
-rw-r--r-- | src/port/meson.build | 2 | ||||
-rw-r--r-- | src/port/user.c (renamed from src/port/thread.c) | 13 |
6 files changed, 8 insertions, 19 deletions
diff --git a/src/bin/psql/nls.mk b/src/bin/psql/nls.mk index cf0b8002918..8624612969c 100644 --- a/src/bin/psql/nls.mk +++ b/src/bin/psql/nls.mk @@ -23,7 +23,7 @@ GETTEXT_FILES = $(FRONTEND_COMMON_GETTEXT_FILES) \ ../../common/fe_memutils.c \ ../../common/username.c \ ../../common/wait_error.c \ - ../../port/thread.c + ../../port/user.c GETTEXT_TRIGGERS = $(FRONTEND_COMMON_GETTEXT_TRIGGERS) \ HELP0 HELPN N_ simple_prompt simple_prompt_extended GETTEXT_FLAGS = $(FRONTEND_COMMON_GETTEXT_FLAGS) \ diff --git a/src/include/port.h b/src/include/port.h index a88d403483e..5979139ebc6 100644 --- a/src/include/port.h +++ b/src/include/port.h @@ -432,7 +432,7 @@ extern size_t strlcpy(char *dst, const char *src, size_t siz); extern size_t strnlen(const char *str, size_t maxlen); #endif -/* thread.c */ +/* port/user.c */ #ifndef WIN32 extern bool pg_get_user_name(uid_t user_id, char *buffer, size_t buflen); extern bool pg_get_user_home_dir(uid_t user_id, char *buffer, size_t buflen); diff --git a/src/interfaces/libpq/nls.mk b/src/interfaces/libpq/nls.mk index 5959fa0c074..40b662dc08b 100644 --- a/src/interfaces/libpq/nls.mk +++ b/src/interfaces/libpq/nls.mk @@ -13,7 +13,7 @@ GETTEXT_FILES = fe-auth.c \ fe-secure-gssapi.c \ fe-secure-openssl.c \ win32.c \ - ../../port/thread.c + ../../port/user.c GETTEXT_TRIGGERS = libpq_append_conn_error:2 \ libpq_append_error:2 \ libpq_gettext \ diff --git a/src/port/Makefile b/src/port/Makefile index 711f59e32bd..f205c2c9c50 100644 --- a/src/port/Makefile +++ b/src/port/Makefile @@ -59,7 +59,7 @@ OBJS = \ snprintf.o \ strerror.o \ tar.o \ - thread.o + user.o # libpgport.a, libpgport_shlib.a, and libpgport_srv.a contain the same files # foo.o, foo_shlib.o, and foo_srv.o are all built from foo.c @@ -84,10 +84,6 @@ libpgport.a: $(OBJS) rm -f $@ $(AR) $(AROPT) $@ $^ -# thread.o and thread_shlib.o need PTHREAD_CFLAGS (but thread_srv.o does not) -thread.o: CFLAGS+=$(PTHREAD_CFLAGS) -thread_shlib.o: CFLAGS+=$(PTHREAD_CFLAGS) - # all versions of pg_crc32c_sse42.o need CFLAGS_CRC pg_crc32c_sse42.o: CFLAGS+=$(CFLAGS_CRC) pg_crc32c_sse42_shlib.o: CFLAGS+=$(CFLAGS_CRC) diff --git a/src/port/meson.build b/src/port/meson.build index 24416b9bfc0..9d0cd93c438 100644 --- a/src/port/meson.build +++ b/src/port/meson.build @@ -20,7 +20,7 @@ pgport_sources = [ 'snprintf.c', 'strerror.c', 'tar.c', - 'thread.c', + 'user.c', ] if host_system == 'windows' diff --git a/src/port/thread.c b/src/port/user.c index 375c89b2974..d278684fe29 100644 --- a/src/port/thread.c +++ b/src/port/user.c @@ -1,13 +1,12 @@ /*------------------------------------------------------------------------- * - * thread.c + * user.c * - * Prototypes and macros around system calls, used to help make - * threaded libraries reentrant and safe to use from threaded applications. + * Wrapper functions for user and home directory lookup. * * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group * - * src/port/thread.c + * src/port/user.c * *------------------------------------------------------------------------- */ @@ -16,12 +15,6 @@ #include <pwd.h> - -/* - * Historically, the code in this module had to deal with operating systems - * that lacked getpwuid_r(). - */ - #ifndef WIN32 /* |