pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/59002: Bootstrapping pkgsrc on HP-UX 11.11/PA-RISC fails due to lack of stdint.h



Can you please try the attached patch?
From 8b26da34e8f2b100fe26b72d910d5b530f7de236 Mon Sep 17 00:00:00 2001
From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
Date: Fri, 17 Jan 2025 15:13:40 +0000
Subject: [PATCH] lang/nawk: Provide compatibility with pre-C99 compilers.

No change to post-C99 compilers -- change is conditional on
__STDC_VERSION__ predating the C99 value.

PR pkg/59002: Bootstrapping pkgsrc on HP-UX 11.11/PA-RISC fails due
to lack of stdint.h
---
 lang/nawk/files/awk.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lang/nawk/files/awk.h b/lang/nawk/files/awk.h
index ccd16c906f3a..d6dd0f160d9f 100644
--- a/lang/nawk/files/awk.h
+++ b/lang/nawk/files/awk.h
@@ -23,8 +23,17 @@ THIS SOFTWARE.
 ****************************************************************/
 
 #include <assert.h>
+#if __STDC_VERSION__ < 199901L
+typedef long intptr_t;
+typedef int bool;
+enum {
+	false = 0,
+	true = 1,
+};
+#else
 #include <stdint.h>
 #include <stdbool.h>
+#endif
 #if __STDC_VERSION__ <= 199901L
 #define noreturn
 #else


Home | Main Index | Thread Index | Old Index