v6-0001-Move-Windows-pthread-compatibility-functions-to-s.patch
text/x-patch
Filename: v6-0001-Move-Windows-pthread-compatibility-functions-to-s.patch
Type: text/x-patch
Part: 0
Patch
Format: format-patch
Series: patch v6-0001
Subject: Move Windows pthread compatibility functions to src/port
| File | + | − |
|---|---|---|
| configure.ac | 1 | 0 |
| src/interfaces/libpq/Makefile | 0 | 1 |
| src/interfaces/libpq/meson.build | 1 | 1 |
| src/port/meson.build | 1 | 0 |
| src/port/pthread-win32.c | 2 | 2 |
From 39ee08615c1830c5106ea0defd0ce6fd49e9316e Mon Sep 17 00:00:00 2001
From: Jelte Fennema-Nio <postgres@jeltef.nl>
Date: Sat, 13 Dec 2025 18:18:13 +0100
Subject: [PATCH v6 1/3] Move Windows pthread compatibility functions to
src/port
This is in preparation of a follow-up commit which will start to use
these functions in more places than just libpq.
---
configure.ac | 1 +
src/interfaces/libpq/Makefile | 1 -
src/interfaces/libpq/meson.build | 2 +-
src/port/meson.build | 1 +
src/{interfaces/libpq => port}/pthread-win32.c | 4 ++--
5 files changed, 5 insertions(+), 4 deletions(-)
rename src/{interfaces/libpq => port}/pthread-win32.c (94%)
diff --git a/configure.ac b/configure.ac
index 9edffe481a6..4728807c14b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1950,6 +1950,7 @@ if test "$PORTNAME" = "win32"; then
AC_LIBOBJ(dirmod)
AC_LIBOBJ(kill)
AC_LIBOBJ(open)
+ AC_LIBOBJ(pthread-win32)
AC_LIBOBJ(system)
AC_LIBOBJ(win32common)
AC_LIBOBJ(win32dlopen)
diff --git a/src/interfaces/libpq/Makefile b/src/interfaces/libpq/Makefile
index 0963995eed4..d6cfb00d655 100644
--- a/src/interfaces/libpq/Makefile
+++ b/src/interfaces/libpq/Makefile
@@ -75,7 +75,6 @@ endif
ifeq ($(PORTNAME), win32)
OBJS += \
- pthread-win32.o \
win32.o
endif
diff --git a/src/interfaces/libpq/meson.build b/src/interfaces/libpq/meson.build
index b0ae72167a1..b949780b85b 100644
--- a/src/interfaces/libpq/meson.build
+++ b/src/interfaces/libpq/meson.build
@@ -20,7 +20,7 @@ libpq_sources = files(
libpq_so_sources = [] # for shared lib, in addition to the above
if host_system == 'windows'
- libpq_sources += files('pthread-win32.c', 'win32.c')
+ libpq_sources += files('win32.c')
libpq_so_sources += rc_lib_gen.process(win32ver_rc, extra_args: [
'--NAME', 'libpq',
'--FILEDESC', 'PostgreSQL Access Library',])
diff --git a/src/port/meson.build b/src/port/meson.build
index 7296f8e3c03..a0fc13a5e62 100644
--- a/src/port/meson.build
+++ b/src/port/meson.build
@@ -32,6 +32,7 @@ if host_system == 'windows'
'dirmod.c',
'kill.c',
'open.c',
+ 'pthread-win32.c',
'system.c',
'win32common.c',
'win32dlopen.c',
diff --git a/src/interfaces/libpq/pthread-win32.c b/src/port/pthread-win32.c
similarity index 94%
rename from src/interfaces/libpq/pthread-win32.c
rename to src/port/pthread-win32.c
index cf66284f007..48d68b693a7 100644
--- a/src/interfaces/libpq/pthread-win32.c
+++ b/src/port/pthread-win32.c
@@ -5,12 +5,12 @@
*
* Copyright (c) 2004-2026, PostgreSQL Global Development Group
* IDENTIFICATION
-* src/interfaces/libpq/pthread-win32.c
+* src/port/pthread-win32.c
*
*-------------------------------------------------------------------------
*/
-#include "postgres_fe.h"
+#include "c.h"
#include "pthread-win32.h"
base-commit: cd083b54bd675a6c941b2d52f398cebbf95b060f
--
2.53.0