diff --git a/runtime/mercury_memory.c b/runtime/mercury_memory.c index 0b09dfdbe..1f2bfb80d 100644 --- a/runtime/mercury_memory.c +++ b/runtime/mercury_memory.c @@ -36,12 +36,17 @@ #include "mercury_imp.h" +/* +** XXX This code is duplicated in three files: +** mercury_memory.c, mercury_memory_handlers.c, and mercury_signal.c. +*/ #ifdef HAVE_SIGCONTEXT_STRUCT /* ** Some versions of Linux call it struct sigcontext_struct, some call it ** struct sigcontext. The following #define eliminates the differences. */ #define sigcontext_struct sigcontext /* must be before #include */ + struct sigcontext; /* this forward decl avoids a gcc warning in signal.h */ /* ** On some systems (e.g. most versions of Linux) we need to #define diff --git a/runtime/mercury_memory_handlers.c b/runtime/mercury_memory_handlers.c index 5e0243b71..83ac75bed 100644 --- a/runtime/mercury_memory_handlers.c +++ b/runtime/mercury_memory_handlers.c @@ -22,12 +22,17 @@ #include #include +/* +** XXX This code is duplicated in three files: +** mercury_memory.c, mercury_memory_handlers.c, and mercury_signal.c. +*/ #ifdef HAVE_SIGCONTEXT_STRUCT /* ** Some versions of Linux call it struct sigcontext_struct, some call it ** struct sigcontext. The following #define eliminates the differences. */ #define sigcontext_struct sigcontext /* must be before #include */ + struct sigcontext; /* this forward decl avoids a gcc warning in signal.h */ /* ** On some systems (e.g. most versions of Linux) we need to #define diff --git a/runtime/mercury_signal.c b/runtime/mercury_signal.c index b19cf820b..28a363350 100644 --- a/runtime/mercury_signal.c +++ b/runtime/mercury_signal.c @@ -12,12 +12,17 @@ #include "mercury_imp.h" +/* +** XXX This code is duplicated in three files: +** mercury_memory.c, mercury_memory_handlers.c, and mercury_signal.c. +*/ #ifdef HAVE_SIGCONTEXT_STRUCT /* ** Some versions of Linux call it struct sigcontext_struct, some call it ** struct sigcontext. The following #define eliminates the differences. */ #define sigcontext_struct sigcontext /* must be before #include */ + struct sigcontext; /* this forward decl avoids a gcc warning in signal.h */ /* ** On some systems (e.g. most versions of Linux) we need to #define