octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MSVC compiler support [patch 41]: "== void" preprocessor directive


From: John W. Eaton
Subject: MSVC compiler support [patch 41]: "== void" preprocessor directive
Date: Wed, 25 Oct 2006 22:14:08 -0400

On 17-Oct-2006, Michael Goffioul wrote:

| MSVC preprocessor does not support comparison with "void" (non integer 
| constant)
| Index: src/sighandlers.cc
| ===================================================================
| RCS file: /cvs/octave/src/sighandlers.cc,v
| retrieving revision 1.95
| diff -p -c -r1.95 sighandlers.cc
| *** src/sighandlers.cc        28 Jun 2006 16:05:24 -0000      1.95
| --- src/sighandlers.cc        17 Oct 2006 11:07:42 -0000
| *************** static bool Vsighup_dumps_octave_core = 
| *** 72,82 ****
| --- 72,86 ----
|   // Similar to Vsighup_dumps_octave_core, but for SIGTERM signal.
|   static bool Vsigterm_dumps_octave_core = true;
|   
| + #ifndef _MSC_VER
|   #if RETSIGTYPE == void
|   #define SIGHANDLER_RETURN(status) return
|   #else
|   #define SIGHANDLER_RETURN(status) return status
|   #endif
| + #else
| + #define SIGHANDLER_RETURN(status) return
| + #endif
|   
|   #if defined (MUST_REINSTALL_SIGHANDLERS)
|   #define MAYBE_REINSTALL_SIGHANDLER(sig, handler) \

I used the following patch instead.

Thanks,

jwe


Index: configure.in
===================================================================
RCS file: /cvs/octave/configure.in,v
retrieving revision 1.534
diff -u -u -r1.534 configure.in
--- configure.in        26 Oct 2006 01:18:33 -0000      1.534
+++ configure.in        26 Oct 2006 02:12:44 -0000
@@ -1572,6 +1572,9 @@
 ])
 OCTAVE_SIGNAL_CHECK
 OCTAVE_REINSTALL_SIGHANDLERS
+if test "$ac_cv_type_signal" = "void"; then
+  AC_DEFINE(RETSIGTYPE_IS_VOID, 1, [Define if this if RETSIGTYPE is defined to 
be void.  Needed because preprocessor comparisons to void fail on some 
systems.])
+fi
 
 ### A system dependent kluge or two.
 
Index: src/sighandlers.cc
===================================================================
RCS file: /cvs/octave/src/sighandlers.cc,v
retrieving revision 1.95
diff -u -u -r1.95 sighandlers.cc
--- src/sighandlers.cc  28 Jun 2006 16:05:24 -0000      1.95
+++ src/sighandlers.cc  26 Oct 2006 02:12:48 -0000
@@ -72,7 +72,7 @@
 // Similar to Vsighup_dumps_octave_core, but for SIGTERM signal.
 static bool Vsigterm_dumps_octave_core = true;
 
-#if RETSIGTYPE == void
+#if defined (RETSIGTYPE_IS_VOID)
 #define SIGHANDLER_RETURN(status) return
 #else
 #define SIGHANDLER_RETURN(status) return status


reply via email to

[Prev in Thread] Current Thread [Next in Thread]