From d1ae77bdc20845144b0cf9038cd7687ba270603f Mon Sep 17 00:00:00 2001 From: Karl Wette Date: Thu, 12 Jul 2012 17:53:02 +0000 Subject: [PATCH] octave: use _Exit instead of _exit - _exit is a POSIX function (unistd.h), whereas _Exit is in C99 (stdlib.h) and is therefore more likely to be supported by C++ compilers (cstdlib) git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13318 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/octave/octruntime.swg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/octave/octruntime.swg b/Lib/octave/octruntime.swg index 8c14bedfe..fbb1157b5 100644 --- a/Lib/octave/octruntime.swg +++ b/Lib/octave/octruntime.swg @@ -132,8 +132,9 @@ DEFUN_DLD( swig_this, args, nargout, swig_this_usage ) { #ifdef SWIG_OCTAVE_SEGFAULT_HACK #define _SWIG_OCT_SEGF_HACK_ATEXIT_FCN(NAME) SWIG_OCT_SEGF_HACK_ATEXIT_FCN_##NAME #define SWIG_OCT_SEGF_HACK_ATEXIT_FCN(NAME) _SWIG_OCT_SEGF_HACK_ATEXIT_FCN(NAME) +#include void SWIG_OCT_SEGF_HACK_ATEXIT_FCN(SWIG_name)(void) { - _exit(exit_status); + _Exit(exit_status); } #endif