Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 251359 | Differences between
and this patch

Collapse All | Expand All

(-)pth-2.0.7/aclocal.m4 (+3 lines)
Lines 1104-1109 Link Here
1104
    *-*-cygwin* )
1104
    *-*-cygwin* )
1105
        ac_cv_check_sjlj=sjljw32
1105
        ac_cv_check_sjlj=sjljw32
1106
        ;;
1106
        ;;
1107
    *-*-mint* )
1108
        ac_cv_check_sjlj=sjljmint
1109
        ;;
1107
esac
1110
esac
1108
])dnl
1111
])dnl
1109
$3="$ac_cv_check_sjlj"
1112
$3="$ac_cv_check_sjlj"
(-)pth-2.0.7/configure.ac (-4 / +4 lines)
Lines 356-362 Link Here
356
    AC_IFALLYES(func:sigstack,    mctx_stk=ss)
360
    AC_IFALLYES(func:sigstack,    mctx_stk=ss)
357
    AC_IFALLYES(func:sigaltstack, mctx_stk=sas)
361
    AC_IFALLYES(func:sigaltstack, mctx_stk=sas)
358
    case $mctx_dsp in
362
    case $mctx_dsp in
359
         sjljlx|sjljisc|sjljw32 ) mctx_stk=none
363
         sjljlx|sjljisc|sjljw32|sjljmint ) mctx_stk=none
360
    esac
364
    esac
361
else
365
else
362
    AC_ERROR([no appropriate mctx method found])
366
    AC_ERROR([no appropriate mctx method found])
Lines 376-383 Link Here
376
AC_ARG_WITH(mctx-dsp,dnl
380
AC_ARG_WITH(mctx-dsp,dnl
377
[  --with-mctx-dsp=ID      force mctx dispatching (sc,ssjlj,sjlj,usjlj,sjlje,...)],[
381
[  --with-mctx-dsp=ID      force mctx dispatching (sc,ssjlj,sjlj,usjlj,sjlje,...)],[
378
case $withval in
382
case $withval in
379
    sc|ssjlj|sjlj|usjlj|sjlje|sjljlx|sjljisc|sjljw32 ) mctx_dsp=$withval ;;
383
    sc|ssjlj|sjlj|usjlj|sjlje|sjljlx|sjljisc|sjljw32|sjljmint ) mctx_dsp=$withval ;;
380
    * ) AC_ERROR([invalid mctx dispatching -- allowed: sc,ssjlj,sjlj,usjlj,sjlje,sjljlx,sjljisc,sjljw32]) ;;
384
    * ) AC_ERROR([invalid mctx dispatching -- allowed: sc,ssjlj,sjlj,usjlj,sjlje,sjljlx,sjljisc,sjljw32,sjljmint]) ;;
381
esac
385
esac
382
])dnl
386
])dnl
383
AC_ARG_WITH(mctx-stk,dnl
387
AC_ARG_WITH(mctx-stk,dnl
Lines 438-444 Link Here
438
        pth_sigsetjmp='setjmp(buf)'
442
        pth_sigsetjmp='setjmp(buf)'
439
        pth_siglongjmp='longjmp(buf,val)'
443
        pth_siglongjmp='longjmp(buf,val)'
440
        ;;
444
        ;;
441
    sjljlx|sjljisc|sjljw32 )
445
    sjljlx|sjljisc|sjljw32|sjljmint )
442
        pth_sigjmpbuf='sigjmp_buf'
446
        pth_sigjmpbuf='sigjmp_buf'
443
        pth_sigsetjmp='sigsetjmp(buf,1)'
447
        pth_sigsetjmp='sigsetjmp(buf,1)'
444
        pth_siglongjmp='siglongjmp(buf,val)'
448
        pth_siglongjmp='siglongjmp(buf,val)'
(-)pth-2.0.7/pth_acmac.h.in (+1 lines)
Lines 55-60 Link Here
55
#define PTH_MCTX_DSP_sjljlx  6
55
#define PTH_MCTX_DSP_sjljlx  6
56
#define PTH_MCTX_DSP_sjljisc 7
56
#define PTH_MCTX_DSP_sjljisc 7
57
#define PTH_MCTX_DSP_sjljw32 8
57
#define PTH_MCTX_DSP_sjljw32 8
58
#define PTH_MCTX_DSP_sjljmint 9
58
#define PTH_MCTX_STK_mc      1
59
#define PTH_MCTX_STK_mc      1
59
#define PTH_MCTX_STK_ss      2
60
#define PTH_MCTX_STK_ss      2
60
#define PTH_MCTX_STK_sas     3
61
#define PTH_MCTX_STK_sas     3
(-)pth-2.0.7/pth_mctx.c (-1 / +31 lines)
Lines 180-186 Link Here
180
#elif PTH_MCTX_MTH(sjlj)     &&\
180
#elif PTH_MCTX_MTH(sjlj)     &&\
181
      !PTH_MCTX_DSP(sjljlx)  &&\
181
      !PTH_MCTX_DSP(sjljlx)  &&\
182
      !PTH_MCTX_DSP(sjljisc) &&\
182
      !PTH_MCTX_DSP(sjljisc) &&\
183
      !PTH_MCTX_DSP(sjljw32)
183
      !PTH_MCTX_DSP(sjljw32) &&\
184
      !PTH_MCTX_DSP(sjljmint)
184
185
185
/*
186
/*
186
 * VARIANT 2: THE SIGNAL STACK TRICK
187
 * VARIANT 2: THE SIGNAL STACK TRICK
Lines 532-537 Link Here
532
#endif
533
#endif
533
    sigemptyset(&mctx->sigs);
534
    sigemptyset(&mctx->sigs);
534
    mctx->error = 0;
535
    mctx->error = 0;
536
    return TRUE;
537
}
538
539
/*
540
 * VARIANT 6: MINT SPECIFIC JMP_BUF FIDDLING
541
 *
542
 * Oh hell, Mint has setjmp(3), but no sigstack(2) or sigaltstack(2).
543
 * So we have to fiddle around with the jmp_buf here too...
544
 */
545
546
#elif PTH_MCTX_MTH(sjlj) && PTH_MCTX_DSP(sjljmint)
547
intern int
548
pth_mctx_set(pth_mctx_t *mctx, void (*func)(void),
549
             char *sk_addr_lo, char *sk_addr_hi)
550
{
551
    pth_mctx_save(mctx);
552
    sigemptyset(&mctx->sigs);
553
554
    mctx->error = 0;
555
556
#ifdef __TURBOC__
557
	/* Well, it can be supported if you know how Turbo C save the PC
558
	   and SP in the jmp_buf (see setjmp.h in the Mintlib include) */
559
	#error "Turbo C compiler not supported"
560
#else
561
    mctx->jb[0] = (char *)func;
562
    mctx->jb[12] = sk_addr_hi;
563
#endif
564
535
    return TRUE;
565
    return TRUE;
536
}
566
}
537
567

Return to bug 251359