=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/Kan/stackmachine.c,v retrieving revision 1.35 retrieving revision 1.37 diff -u -p -r1.35 -r1.37 --- OpenXM/src/kan96xx/Kan/stackmachine.c 2006/02/02 04:16:49 1.35 +++ OpenXM/src/kan96xx/Kan/stackmachine.c 2015/09/27 08:12:42 1.37 @@ -1,4 +1,4 @@ -/* $OpenXM: OpenXM/src/kan96xx/Kan/stackmachine.c,v 1.34 2006/02/01 00:30:05 takayama Exp $ */ +/* $OpenXM: OpenXM/src/kan96xx/Kan/stackmachine.c,v 1.36 2006/02/02 05:55:33 takayama Exp $ */ /* stackmachin.c */ #include @@ -12,6 +12,18 @@ #include #include +/* The msys2 seems to make a buffer overflow of EnvOfStackmachine[]. +The code +[(x) ring_of_differential_operators 11] define_ring +( Dx*(x+Dx) ) /ff set +causes the segfault because Mp_zero is borken. Is it a bug of msys2? +Anyway, the following definition seems to be a workaround. 2015.09 +Singnals do not work properly on msys2. (gcc -dM -E ... to see macros defs) +*/ +#if defined(__MSYS__) +#define setjmp(e) _setjmp(e) +#define sigsetjmp(e,n) _setjmp(e) +#endif /* #define OPERAND_STACK_SIZE 2000 */ #define OPERAND_STACK_SIZE 30000 @@ -1068,8 +1080,9 @@ int executeToken(token) { char tmpc[1024]; if (strlen(token.token) < 900) { - sprintf(tmpc,"\n%%Warning: The identifier <<%s>> is not in the system dictionary\n%% nor in the user dictionaries. Push NullObject.\n",token.token); - }else {strcpy(tmpc,"\n%%Warning: identifier is not in the dictionaries.\n");} + sprintf(tmpc,"\n>>Warning: The identifier <<%s>> is not in the system dictionary\n>> nor in the user dictionaries. Push NullObject.\n",token.token); + }else {strcpy(tmpc,"\n>>Warning: identifier is not in the dictionaries.\n");} + /* do not use %% in a string. tmpc will be used as fprintf(stderr,tmpc); */ if (WarningMessageMode == 1 || WarningMessageMode == 2) { pushErrorStack(KnewErrorPacket(SerialCurrent,-1,tmpc)); }