init.c (__gnat_error_handler): Make msg const.

* init.c (__gnat_error_handler): Make msg const.

	* gmem.c (convert_addresses): Move declaration ...
	* adaint.h: ... here.
	* adaint.c (convert_addresses): Adapt addrs type to match
	prototype.

	* adaint.c (__gnat_try_lock): Cast pid_t to long, adapt format.

From-SVN: r61887
This commit is contained in:
Rainer Orth 2003-01-27 13:16:59 +00:00 committed by Rainer Orth
parent 244d05fb87
commit 437026ef88
5 changed files with 17 additions and 5 deletions

View File

@ -1,3 +1,14 @@
2003-01-27 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* init.c (__gnat_error_handler): Make msg const.
* gmem.c (convert_addresses): Move declaration ...
* adaint.h: ... here.
* adaint.c (convert_addresses): Adapt addrs type to match
prototype.
* adaint.c (__gnat_try_lock): Cast pid_t to long, adapt format.
2003-01-24 Andreas Schwab <schwab@suse.de>
* ada-tree.h (SET_TYPE_DIGITS_VALUE): Add intermediate cast to

View File

@ -366,7 +366,7 @@ __gnat_try_lock (dir, file)
int fd;
sprintf (full_path, "%s%c%s", dir, DIR_SEPARATOR, file);
sprintf (temp_file, "%s-%d-%d", dir, getpid(), getppid ());
sprintf (temp_file, "%s-%ld-%ld", dir, (long) getpid(), (long) getppid ());
/* Create the temporary file and write the process number. */
fd = open (temp_file, O_CREAT | O_WRONLY, 0600);
@ -2257,7 +2257,7 @@ int _flush_cache()
void
convert_addresses (addrs, n_addr, buf, len)
void *addrs ATTRIBUTE_UNUSED;
char *addrs[] ATTRIBUTE_UNUSED;
int n_addr ATTRIBUTE_UNUSED;
void *buf ATTRIBUTE_UNUSED;
int *len;

View File

@ -134,6 +134,9 @@ extern void __gnat_set_binary_mode PARAMS ((int));
extern void __gnat_set_text_mode PARAMS ((int));
extern char *__gnat_ttyname PARAMS ((int));
extern void convert_addresses PARAMS ((char *[], int,
void *, int *));
#ifdef IN_RTS
/* Portable definition of strdup, which is not available on all systems. */
#define xstrdup(S) strcpy ((char *) malloc (strlen (S) + 1), S)

View File

@ -71,8 +71,6 @@ static FILE *gmemfile;
static char *tracebk[TB_LEN];
static int cur_tb_len, cur_tb_pos;
extern void convert_addresses PARAMS ((char *[], int, void *,
int *));
static void gmem_read_backtrace PARAMS ((void));
static char *spc2nul PARAMS ((char *));

View File

@ -1099,7 +1099,7 @@ __gnat_error_handler (sig, sip)
{
struct Exception_Data *exception;
static int recurse = 0;
char *msg;
const char *msg;
/* If this was an explicit signal from a "kill", just resignal it. */
if (SI_FROMUSER (sip))