Module Name:    src
Committed By:   kre
Date:           Thu Sep 19 22:01:07 UTC 2024

Modified Files:
        src/external/gpl2/gmake/dist: main.c

Log Message:
PR lib/58674

Hopefully allow the tools gmake to build (everywhere).

Don't use the system bsd_signal() function, even if one is
defined, use a locally defined one instead.   Note that it
cannot be declared static (which the code would do) as it
is possible that system header files might define the function,
if it exists on the host system, and that prototype would not
(cannot) be static.

This is a horrible hack, feel free to do something better.

Note: this version of gmake is (currently anyway) used only
as part of the tools used for building NetBSD - apart from that
it is used for nothing.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/gmake/dist/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl2/gmake/dist/main.c
diff -u src/external/gpl2/gmake/dist/main.c:1.1.1.1 src/external/gpl2/gmake/dist/main.c:1.2
--- src/external/gpl2/gmake/dist/main.c:1.1.1.1	Mon Aug 18 06:47:02 2014
+++ src/external/gpl2/gmake/dist/main.c	Thu Sep 19 22:01:07 2024
@@ -511,13 +511,16 @@ int fatal_signal_mask;
 # endif
 #endif
 
+#undef HAVE_BSD_SIGNAL		/* PR lib/58674 .. tools build fails */
+#undef bsd_signal		/* bsd_signal() has a weird history. skip it */
+
 #if !defined HAVE_BSD_SIGNAL && !defined bsd_signal
 # if !defined HAVE_SIGACTION
 #  define bsd_signal signal
 # else
 typedef RETSIGTYPE (*bsd_signal_ret_t) ();
 
-static bsd_signal_ret_t
+/*static*/ bsd_signal_ret_t
 bsd_signal (int sig, bsd_signal_ret_t func)
 {
   struct sigaction act, oact;

Reply via email to