diff options
author | Steve Langasek <vorlon@debian.org> | 2004-12-07 23:23:48 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:28 -0800 |
commit | 37f2f5e0bb11a18deecf48c7ad6bcbf7bd932db2 (patch) | |
tree | 692caebb60ec5f80ce528a403b69351ca756d530 /scmfig.h | |
parent | e21d47d7813159bb71e0671df9b52ec0470c358d (diff) | |
parent | c7d035ae1a729232579a0fe41ed5affa131d3623 (diff) | |
download | scm-e697b63e303e21b92e5a64c73192de4fa3042050.tar.gz scm-e697b63e303e21b92e5a64c73192de4fa3042050.zip |
Import Debian changes 5d9-4.1debian/5d9-4.1
scm (5d9-4.1) unstable; urgency=high
* Non-maintainer upload.
* High-urgency upload for sarge-targetted RC bugfix.
* Revert upstream "CAUTIOUS" define, which causes the scm build to
fail its test suite on alpha (and, it appears, powerpc as well).
Closes: #245810.
scm (5d9-4) unstable; urgency=low
* Apply patch from 144062 to fix hppa build (Closes: #144062)
* Change scm.1 section from Jan 4 200 to 1. (lintian)
scm (5d9-3) unstable; urgency=low
* Properly clean up info files.
* Make and install Xlibscm.info.
scm (5d9-2) unstable; urgency=low
* Fix path problem in slibcat. Hack at mklibcat.scm. (Closes: #241510)
scm (5d9-1) unstable; urgency=low
* New upstream release
* Merge NMU sparc changes (Closes: #191171, #191356)
* SHORT_INT is defined for ia64 upstream (Closes: #141928)
* Scheme imps now grouped in info file (has been for a while)
(Closes: #115452)
Diffstat (limited to 'scmfig.h')
-rw-r--r-- | scmfig.h | 66 |
1 files changed, 63 insertions, 3 deletions
@@ -52,6 +52,46 @@ # endif #endif +/* MS Windows signal handling hack added by Rainer Urian */ +/* + SCM crashes on WindowsNT after hitting control-c. + + This is because signal handling in windows console applications is + rather different from unix apps. If control-c is hit on a console + application Windows creates a new thread which executes the + control-c signal handler. Now, if the SCM handler does the longjmp + back to the repl loop it does it via the stack of the signal + handler thread which results always ever is an access violation. + + The solution to this problem is to let the signal handler thread + raise a software interrupt in the main thread. + + This is done with the following steps: + + 1. contol-c is hit + + 2. Windows creates the signal handler thread which in turn executes + the routine win32_sigint as its signal handler. + + 3. The handler suspends the main thread and gets the main threads + register context. + + 4. The handler simulates an interrupt call on the main thread by + pointing Eip to the sigintstub stub function and also simulates a + pushad , pushf of the main threads registers + + 5. The handler resumes the main thread which when scheduled will + execute sigintstub, which in turn calls the proper signal interupt + (scamble_signal) +*/ +#ifdef _WIN32 +/* POCKETCONSOLE has the signal handler implemented in the runtime */ +# ifndef POCKETCONSOLE +# define WINSIGNALS +# endif +#endif + + #include "scmflags.h" /* user specified, system independent flags */ /* IMPLINIT is the full pathname (surrounded by double quotes) of @@ -241,6 +281,10 @@ rgx.c init_rgx(); regcomp and regexec. */ #ifdef __alpha # define SHORT_INT #endif +#ifdef __ia64 +# define SHORT_INT +# define CDR_DOUBLES +#endif #ifdef MSDOS /* Microsoft C 5.10 and 6.00A */ # ifndef GO32 # define SHORT_INT @@ -273,9 +317,16 @@ rgx.c init_rgx(); regcomp and regexec. */ #ifdef MSDOS # define STDC_HEADERS #endif + +#ifdef POCKETCONSOLE +# define NOSETBUF +# define LACK_FTIME +#endif + #ifdef vms # define STDC_HEADERS #endif + #ifdef nosve # define STDC_HEADERS #endif @@ -637,8 +688,12 @@ extern ints_infot *ints_info; #endif #ifndef macintosh -# ifdef __WINDOWS__ /* there should be a better flag for this. */ -# define PROT386 +# ifndef _M_ARM +# ifndef _M_ARMT +# ifdef __WINDOWS__ /* there should be a better flag for this. */ +# define PROT386 +# endif +# endif # endif #endif @@ -721,7 +776,12 @@ typedef SCM *SCMPTR; # define SCM_INTERRUPTED(errno) (0) #endif -#define SYSCALL(line) do{errno = 0;line}while(SCM_INTERRUPTED(errno)) +#ifdef _WIN32 +// Windows doesn't set errno = EINTR +# define SYSCALL(line) do{ line; while(GetLastError() == ERROR_OPERATION_ABORTED){SetLastError(0);Sleep(10);line};}while(0) +#else +# define SYSCALL(line) do{errno = 0;line}while(SCM_INTERRUPTED(errno)) +#endif #ifdef EMFILE # ifdef ENFILE |