From: Ludovic Brenta <ludovic.brenta@insalien.org>
Subject: Re: STORAGE_ERROR in adainit
Date: Thu, 12 Aug 2004 21:42:46 +0200
Date: 2004-08-12T21:43:02+02:00 [thread overview]
Message-ID: <87vffom9c9.fsf@insalien.org> (raw)
In-Reply-To: nugnh05v41e8h4qfi8j1gsebl40j93vrum@4ax.com
James Alan Farrell writes:
> From: James Alan Farrell Subject: Re: STORAGE_ERROR in adainit
> Newsgroups: comp.lang.ada
> Date: Thu, 12 Aug 2004 15:28:05 -0400
>
> I think I've found the problem:
>
> There was a function in a C library called program_error. I changed
> the name to a_program_error and the storage_error went away. I
> suspect that somewhere hidden in the ada library is a variable called
> program error.
>
> Wonder if there are any other names I should avoid using in C
> libraries?
Since this seems to be the problem, here are the names used by GNAT:
(from a-init.c)
/* Addresses of exception data blocks for predefined exceptions. */
extern struct Exception_Data constraint_error;
extern struct Exception_Data numeric_error;
extern struct Exception_Data program_error;
extern struct Exception_Data storage_error;
extern struct Exception_Data tasking_error;
extern struct Exception_Data _abort_signal;
(from s-stalib.ads)
pragma Export (C, Constraint_Error_Def, "constraint_error");
pragma Export (C, Numeric_Error_Def, "numeric_error");
pragma Export (C, Program_Error_Def, "program_error");
pragma Export (C, Storage_Error_Def, "storage_error");
pragma Export (C, Tasking_Error_Def, "tasking_error");
pragma Export (C, Abort_Signal_Def, "_abort_signal");
BTW, these are not functions but records.
Also, you will need to look for places where the C version if
program_error was called, and change the name at every call site.
HTH
> (This was on my cut down program. When I go back to the full program
> I suspect there will be other issues to hunt down. But at least I now
> have some idea of what I'm looking for and how to find it!)
>
> Thanks to everyone who sent suggestions!
> James
--
Ludovic Brenta.
next prev parent reply other threads:[~2004-08-12 19:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-11 21:31 STORAGE_ERROR in adainit James Alan Farrell
2004-08-11 22:29 ` Marc A. Criley
2004-08-12 13:35 ` James Alan Farrell
2004-08-12 14:20 ` Frode Tenneboe
2004-08-12 15:55 ` James Alan Farrell
2004-08-12 21:17 ` Björn Persson
2004-08-12 19:28 ` James Alan Farrell
2004-08-12 19:42 ` Ludovic Brenta [this message]
2004-08-12 22:10 ` Stephen Leake
2004-08-12 21:15 ` Björn Persson
2004-08-13 13:36 ` James Alan Farrell
2004-08-17 21:37 ` Björn Persson
2004-08-18 14:00 ` James Alan Farrell
2004-08-18 15:57 ` Björn Persson
2004-08-18 19:44 ` Simon Wright
2004-08-18 21:13 ` James Alan Farrell
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox