Commits

Anonymous committed cb35df9

ChangeLog
Document changes

CxxUtils/SealCommon.h
Extend Apple #defines

CxxUtils/SealSignal.h
Add #include <climits> in order to get access to CHAR_BIT and add
fields in siginfo_t for MacOSX

src/SealSignal.cxx
Add #include <sys/stat.h>

David Quarrie

Comments (0)

Files changed (4)

+2008-11-17  David Quarrie <David.Quarrie@cern.ch>
+	* CxxUtils/SealCommon.h: Extend Apple #defines
+	* CxxUtils/SealSignal.h: Add #include <climits> in order to get access to CHAR_BIT and add fields in siginfo_t for MacOSX
+	* src/SealSignal.cxx: Add #include <sys/stat.h>
+	* Tagging CxxUtils-00-00-07
+
 2008-11-14  Wim Lavrijsen <WLavrijsen@lbl.gov>
         * added Apple #defines to SealCommon.h (taken from MacOSX 10.5 config.h)
 

CxxUtils/SealCommon.h

 #ifdef __APPLE__
 
 /* C++ features --------------------------------------------------------- */
+#define HAVE_R_DEBUG 1
 
 /* Define if you have standard C++ C headers like <cstdlib>. */
 #define HAVE_CXX_STDC_HEADERS 1

CxxUtils/SealSignal.h

 // want to have <csignal> -- we need all the extra POSIX stuff.
 # include <signal.h>
 # include <sys/types.h>
+# include <climits>
 
 //<<<<<< PUBLIC DEFINES                                                 >>>>>>
+
+// Hacks for fields we might not have in siginfo_t.  Just print zero.
+# if !HAVE_SIGINFO_SI_UTIME		// darwin
+#  define si_utime si_signo ? 0 : 0
+#  define si_stime si_signo ? 0 : 0
+# endif
+# if !HAVE_SIGINFO_SI_INT
+#  if HAVE_SIGINFO_SI_VALUE		// darwin
+#   define si_int   si_value.sigval_int
+#   define si_ptr   si_value.sigval_ptr
+#  else					// (none known)
+#   define si_int   si_signo ? 0 : 0
+#   define si_ptr   si_signo ? (void *) 0 : (void *) 0
+#  endif
+# endif
+
 //<<<<<< PUBLIC CONSTANTS                                               >>>>>>
 //<<<<<< PUBLIC TYPES                                                   >>>>>>
 //<<<<<< PUBLIC VARIABLES                                               >>>>>>

src/SealSignal.cxx

 static const int SIGNAL_MESSAGE_BUFSIZE = 256;
 // end copy from SealBase/sysapi/Signal.h
 #include <cerrno>                              // wlav
+#include <sys/stat.h>
 
 /* http://dmawww.epfl.ch/ebt-bin/nph-dweb/dynaweb/SGI_Developer/
      T_IRIX_Prog/@Generic__BookTextView/7525