[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
- MSVC compiler support [patch 38]: include <algorithm>, (continued)
- MSVC compiler support [patch 39]: include <direct.h>, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 39]: include <direct.h>, John W. Eaton, 2006/10/17
- Re: MSVC compiler support [patch 39]: include <direct.h>, Michael Goffioul, 2006/10/18
- Re: MSVC compiler support [patch 39]: include <direct.h>, John W. Eaton, 2006/10/20
- Message not available
- Message not available
- Re: MSVC compiler support [patch 39]: include <direct.h>, Michael Goffioul, 2006/10/21
- MSVC compiler support [patch 40]: win32lib, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 40]: win32lib, John W. Eaton, 2006/10/26
- MSVC compiler support [patch 41]: "== void" preprocessor directive, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 41]: "== void" preprocessor directive,
John W. Eaton <=
RE: Re: Compiling octave with MSVC, michael . goffioul, 2006/10/23
RE: Re: Compiling octave with MSVC, michael . goffioul, 2006/10/24