[Sablevm-developer] SA_SIGINFO undefined
Brought to you by:
egagnon
From: Julio M. M. V. <jm...@me...> - 2004-03-25 21:58:54
|
Hi again, the last problem I found while building sablevm under NetBSD is that it didn't find SA_SIGINFO defined. Checked the sources, and <signal.h> is included correctly, so the problem is coming from somewhere else. Digging a bit in configure, I found that it defines _POSIX_C_SOURCE. The problem is that defining this disables SA_SIGINFO, because siginfo is not POSIX compliant. According to the siginfo(2) manpage: STANDARDS The siginfo_t type conforms to X/Open System Interfaces and Headers Issue 5 (``XSH5''). Removing that definition lets the code work (because, SA_SIGINFO is defined if no _* macros are explicitly defined), but I don't think this is the solution you want. Instead, and according to the standards text I posted before, defining _XOPEN_SOURCE to 500 lets it work fine. This seems better, and is easy to fix: --- configure.ac.orig 2004-03-20 23:02:08.000000000 +0100 +++ configure.ac @@ -21,6 +21,7 @@ AC_DEFINE_UNQUOTED(_SABLEVM_PACKAGE_VERS AC_DEFINE(_REENTRANT,1,link with reentrant library functions) AC_DEFINE(_POSIX_C_SOURCE,199506L,link with POSIX library functions) +AC_DEFINE(_XOPEN_SOURCE,500,link with XOpen library functions) dnl *** uncomment if you want to insert a magic value in every object instance for debugging *** dnl AC_DEFINE(MAGIC,1,put "SableVM" in every instance) Cheers -- Julio M. Merino Vidal <jm...@me...> The NetBSD Project - http://www.NetBSD.org/ |