From: Bernhard Stiftner Subject: Porting from DJGPP C to FreePascal: Problem with signals Newsgroups: comp.os.msdos.djgpp Message-ID: <036e48e6.0809ece7@usw-ex0108-062.remarq.com> Lines: 50 Bytes: 1593 X-Originating-Host: 195.3.96.210 Organization: http://www.remarq.com: The World's Usenet/Discussions Start Here X-Wren-Trace: eI6rg4Kb3Jbd3Y6PjdqBgo6OkY2fnc+KjqKGgJ/UmcuVyJ/W1YDIztvZxNnRng== Date: Wed, 17 May 2000 10:01:22 -0700 NNTP-Posting-Host: 10.0.2.62 X-Complaints-To: wrenabuse AT remarq DOT com X-Trace: WReNphoon3 958584427 10.0.2.62 (Wed, 17 May 2000 10:27:07 PDT) NNTP-Posting-Date: Wed, 17 May 2000 10:27:07 PDT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hello everyone, I'm now porting Allegro (for DOS of course, that's the only real thing!) to FreePascal (or I'm trying to do this, at least). Ah yes, concering FreePascal: a great compiler for people like me who are already familiar with Borland TurboPascal and Delphi - download it at http://www.freepascal.org However, I'm having problems with the allegro_init function (can be found in allegro/src/allegro.c, I think). The FreePascal program produces a runtime error number 201 (=Range check error). After experimenting a bit, I found out that FreePascal seems to have a problem with the following code in an external DJGPP C file: #include static void *old_sig_kill = NULL; static void signal_handler(int num) { /* this function seems to be OK, so I've cut away all the code to reduce the message length */ } int allegro_init(void) { /* ... */ old_sig_int = signal(SIGINT, signal_handler); /* works OK */ old_sig_kill = signal(SIGKILL, signal_handler); /* error in FreePascal exe */ /* ... */ } I wonder why all this signal stuff works except for SIGKILL... PS: Perhaps this is not the right newsgroup for this sort of questions (although it has to do a bit with DJGPP). Please tell me if there is a better one. PPS: Of course I will release my work to the public (if it ever gets finished). I think I will upload it to the freepascal.org units collection. * Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful