tracebak.c (MAX): Avoid redefinition warning.

* tracebak.c (MAX): Avoid redefinition warning.

	* init.c [sgi] (__gnat_error_handler): Remove i, unused.
	Change msg to const char *.
	(__gnat_install_handler): Remove ss, unused.
	[sun && __SVR4 && !__vxworks] (__gnat_error_handler): Change msg
	to const char *.
	* cstreams.c (__gnat_full_name): Declare p only when used.
	(__gnat_full_name) [sgi] Return buffer.

From-SVN: r72794
This commit is contained in:
Rainer Orth 2003-10-22 11:34:08 +00:00 committed by Rainer Orth
parent 907393db60
commit e97c30aaa7
4 changed files with 20 additions and 6 deletions

View File

@ -1,3 +1,15 @@
2003-10-22 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* tracebak.c (MAX): Avoid redefinition warning.
* init.c [sgi] (__gnat_error_handler): Remove i, unused.
Change msg to const char *.
(__gnat_install_handler): Remove ss, unused.
[sun && __SVR4 && !__vxworks] (__gnat_error_handler): Change msg
to const char *.
* cstreams.c (__gnat_full_name): Declare p only when used.
(__gnat_full_name) [sgi] Return buffer.
2003-10-22 Arnaud Charlet <charlet@act-europe.fr>
* mingw32.h: New file.

View File

@ -162,9 +162,9 @@ __gnat_full_name (nam, buffer)
char *nam;
char *buffer;
{
#if defined(__EMX__) || defined (__MINGW32__)
char *p;
#if defined(__EMX__) || defined (__MINGW32__)
/* If this is a device file return it as is; under Windows NT and
OS/2 a device file end with ":". */
if (nam[strlen (nam) - 1] == ':')
@ -189,6 +189,7 @@ __gnat_full_name (nam, buffer)
getcwd approach instead. */
realpath (nam, buffer);
return buffer;
#elif defined (VMS)
strncpy (buffer, __gnat_to_canonical_file_spec (nam), __gnat_max_path_len);
@ -209,6 +210,8 @@ __gnat_full_name (nam, buffer)
return buffer;
#else
char *p;
if (nam[0] != '/')
{
p = getcwd (buffer, __gnat_max_path_len);

View File

@ -1062,9 +1062,7 @@ __gnat_error_handler (sig, code, sc)
{
struct Machine_State *mstate;
struct Exception_Data *exception;
char *msg;
int i;
const char *msg;
switch (sig)
{
@ -1142,7 +1140,6 @@ __gnat_error_handler (sig, code, sc)
void
__gnat_install_handler ()
{
stack_t ss;
struct sigaction act;
/* Setup signal handler to map synchronous signals to appropriate
@ -1194,7 +1191,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))

View File

@ -327,7 +327,9 @@ extern unsigned int _image_base__;
#define VALID_STACK_FRAME(ptr) 1
#endif
#ifndef MAX
#define MAX(x,y) ((x) > (y) ? (x) : (y))
#endif
/* Define a dummy function to call if FORCE_CALL is defined. Don't
define it otherwise, as this could lead to "defined but not used"