On Windows, I see the following build error:

      CC       sigprocmask.o
    sigprocmask.c:32:11: fatal error: windows-spin.h: No such file or directory
       32 | # include "windows-spin.h"
          |           ^~~~~~~~~~~~~~~~
    compilation terminated.

The issue is that configure.ac does not define
GNULIB_SIGPROCMASK_SINGLE_THREAD. The attached patch fixes that.

Collin

>From afbb76983993418ccc7399caeaf10274ec32d704 Mon Sep 17 00:00:00 2001
Message-ID: <afbb76983993418ccc7399caeaf10274ec32d704.1780776391.git.collin.fu...@gmail.com>
From: Collin Funk <[email protected]>
Date: Sat, 6 Jun 2026 12:47:00 -0700
Subject: [PATCH] build: fix compilation error on Windows

* configure.ac (GNULIB_SIGPROCMASK_SINGLE_THREAD): Define macro so that
sigprocmask.c from Gnulib does not include windows-spin.h.
---
 configure.ac | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/configure.ac b/configure.ac
index e38d15a..4f27f7c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,6 +70,9 @@ AC_DEFINE([GNULIB_MBRTOWC_SINGLE_THREAD], [1],
 AC_DEFINE([GNULIB_REGEX_SINGLE_THREAD], [1],
   [Define to 1 as the 'regex' module's functions
    are invoked from a single thread.])
+AC_DEFINE([GNULIB_SIGPROCMASK_SINGLE_THREAD], [1],
+  [Define to 1 if programs call functions like pthread_sigmask, signal,
+   and sigaction from a single thread.])
 
 # The test suite needs to know if we have a working perl.
 AM_CONDITIONAL([HAVE_PERL], [test "$gl_cv_prog_perl" != no])
-- 
2.54.0

Reply via email to