mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-23 15:23:44 +02:00
29 lines
864 B
Diff
29 lines
864 B
Diff
# Removes the INT123_catchsignal function from the compat library because it fails to compile on some platforms.
|
|
|
|
--- a/src/compat/compat.c
|
|
+++ b/src/compat/compat.c
|
|
@@ -511,24 +511,3 @@ size_t INT123_unintr_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *st
|
|
return written;
|
|
}
|
|
|
|
-#ifndef NO_CATCHSIGNAL
|
|
-#if (!defined(WIN32) || defined (__CYGWIN__)) && defined(HAVE_SIGNAL_H)
|
|
-void (*INT123_catchsignal(int signum, void(*handler)(int)))(int)
|
|
-{
|
|
- struct sigaction new_sa;
|
|
- struct sigaction old_sa;
|
|
-
|
|
-#ifdef DONT_CATCH_SIGNALS
|
|
- fprintf (stderr, "Not catching any signals.\n");
|
|
- return ((void (*)()) -1);
|
|
-#endif
|
|
-
|
|
- new_sa.sa_handler = handler;
|
|
- sigemptyset(&new_sa.sa_mask);
|
|
- new_sa.sa_flags = 0;
|
|
- if(sigaction(signum, &new_sa, &old_sa) == -1)
|
|
- return ((void (*)(int)) -1); // Not rather NULL?
|
|
- return (old_sa.sa_handler);
|
|
-}
|
|
-#endif
|
|
-#endif
|