summaryrefslogtreecommitdiff
path: root/gcc/ada/adaint.c
diff options
context:
space:
mode:
authordannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-22 21:34:51 +0000
committerdannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-22 21:34:51 +0000
commitf0a28ccbd3dd7601546a27587720799563e5dbb5 (patch)
tree1780c9b5b3a2f29ec96b896c364f0c77eb0c06ca /gcc/ada/adaint.c
parent5a6901d63a598a4992f1bbbf22a7fe1010d76dd6 (diff)
downloadgcc-f0a28ccbd3dd7601546a27587720799563e5dbb5.tar.gz
* sysdep.c: Include conio.h if __MINGW32__ and !OLD_MINGW.
* ctrl_c.c (__gnat_int_handler): Remove declaration. * decl.c (creat_concat_name): Const-ify prefix. * adaint.c: Include ctype.h if __MINGW32__. (__gnat_readlink): Mark arguments as possibly unused. (__gnat_symlink): Likewise. (__gnat_is_symbolic_link): Likewise. (__gnat_portable_spawn): Likewise. Cast last arg of spawnvp to match declaration (__gnat_file_time_name): Don't declare struct stat statbuf when not needed. (__gnat_is_absolute_path): Add parenthesis around condition of 'if' statement to avoid warning. (__gnat_plist_init): Specify void as parameter. (plist_enter): Likewise. (plist_leave): Likewise. (remove_handle): Make static. Initialize prev. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72824 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/adaint.c')
-rw-r--r--gcc/ada/adaint.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
index 44fd3357868..6ad07530b8d 100644
--- a/gcc/ada/adaint.c
+++ b/gcc/ada/adaint.c
@@ -69,6 +69,7 @@
#ifdef __MINGW32__
#include "mingw32.h"
#include <sys/utime.h>
+#include <ctype.h>
#else
#ifndef VMS
#include <utime.h>
@@ -312,7 +313,9 @@ __gnat_to_gm_time
OS/2 and vxworks, always return -1. */
int
-__gnat_readlink (char *path, char *buf, size_t bufsiz)
+__gnat_readlink (char *path ATTRIBUTE_UNUSED,
+ char *buf ATTRIBUTE_UNUSED,
+ size_t bufsiz ATTRIBUTE_UNUSED)
{
#if defined (MSDOS) || defined (_WIN32) || defined (__EMX__)
return -1;
@@ -330,7 +333,8 @@ __gnat_readlink (char *path, char *buf, size_t bufsiz)
Interix and VMS, always return -1. */
int
-__gnat_symlink (char *oldpath, char *newpath)
+__gnat_symlink (char *oldpath ATTRIBUTE_UNUSED,
+ char *newpath ATTRIBUTE_UNUSED)
{
#if defined (MSDOS) || defined (_WIN32) || defined (__EMX__)
return -1;
@@ -826,7 +830,6 @@ win32_filetime (HANDLE h)
time_t
__gnat_file_time_name (char *name)
{
- struct stat statbuf;
#if defined (__EMX__) || defined (MSDOS)
int fd = open (name, O_RDONLY | O_BINARY);
@@ -841,7 +844,7 @@ __gnat_file_time_name (char *name)
CloseHandle (h);
return ret;
#else
-
+ struct stat statbuf;
(void) __gnat_stat (name, &statbuf);
#ifdef VMS
/* VMS has file versioning. */
@@ -1343,7 +1346,7 @@ __gnat_is_absolute_path (char *name)
{
return (*name == '/' || *name == DIR_SEPARATOR
#if defined (__EMX__) || defined (MSDOS) || defined (WINNT)
- || strlen (name) > 1 && isalpha (name[0]) && name[1] == ':'
+ || (strlen (name) > 1 && isalpha (name[0]) && name[1] == ':')
#endif
);
}
@@ -1421,7 +1424,7 @@ __gnat_set_readonly (char *name)
}
int
-__gnat_is_symbolic_link (char *name)
+__gnat_is_symbolic_link (char *name ATTRIBUTE_UNUSED)
{
#if defined (__vxworks)
return 0;
@@ -1455,11 +1458,11 @@ int
__gnat_portable_spawn (char *args[])
{
int status = 0;
- int finished;
- int pid;
+ int finished ATTRIBUTE_UNUSED;
+ int pid ATTRIBUTE_UNUSED;
#if defined (MSDOS) || defined (_WIN32)
- status = spawnvp (P_WAIT, args[0], args);
+ status = spawnvp (P_WAIT, args[0],(const char* const*)args);
if (status < 0)
return -1;
else
@@ -1512,19 +1515,19 @@ __gnat_portable_spawn (char *args[])
static CRITICAL_SECTION plist_cs;
void
-__gnat_plist_init ()
+__gnat_plist_init (void)
{
InitializeCriticalSection (&plist_cs);
}
static void
-plist_enter ()
+plist_enter (void)
{
EnterCriticalSection (&plist_cs);
}
static void
-plist_leave ()
+plist_leave (void)
{
LeaveCriticalSection (&plist_cs);
}
@@ -1558,9 +1561,11 @@ add_handle (HANDLE h)
plist_leave();
}
-void remove_handle (HANDLE h)
+static void
+remove_handle (HANDLE h)
{
- Process_List *pl, *prev;
+ Process_List *pl;
+ Process_List *prev = NULL;
plist_enter();