delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/05/18/14:44:06

From: Waldemar Schultz <schultz AT ma DOT tum DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Porting from DJGPP C to FreePascal: Problem with signals
Date: Thu, 18 May 2000 10:16:30 +0200
Organization: [posted via] Leibniz-Rechenzentrum, Muenchen (Germany)
Lines: 55
Message-ID: <3923A6DE.B996832A@ma.tum.de>
References: <036e48e6 DOT 0809ece7 AT usw-ex0108-062 DOT remarq DOT com>
NNTP-Posting-Host: pcritter10.mathematik.tu-muenchen.de
Mime-Version: 1.0
X-Trace: wsc10.lrz-muenchen.de 958637872 3870 131.159.69.74 (18 May 2000 08:17:52 GMT)
X-Complaints-To: news AT lrz-muenchen DOT de
NNTP-Posting-Date: 18 May 2000 08:17:52 GMT
X-Mailer: Mozilla 4.6 [de] (Win98; I)
X-Accept-Language: de,en,en-US
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Bernhard Stiftner schrieb:
> 
> 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 <signal.h>
> 
> 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

What? how do you compile C-files with a Pascal Compiler ?

-- 
 Gruss Waldemar Schultz.
 Technische Universität München, Zentrum Mathematik M1, D 80290 München
 Tel: +49 (0)89 2892 8226        FAX: +49 (0)89 2892 8228

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019