diff options
author | dannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-22 21:34:51 +0000 |
---|---|---|
committer | dannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-22 21:34:51 +0000 |
commit | f0a28ccbd3dd7601546a27587720799563e5dbb5 (patch) | |
tree | 1780c9b5b3a2f29ec96b896c364f0c77eb0c06ca /gcc/ada | |
parent | 5a6901d63a598a4992f1bbbf22a7fe1010d76dd6 (diff) | |
download | gcc-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')
-rw-r--r-- | gcc/ada/ChangeLog | 23 | ||||
-rw-r--r-- | gcc/ada/adaint.c | 33 | ||||
-rw-r--r-- | gcc/ada/ctrl_c.c | 4 | ||||
-rw-r--r-- | gcc/ada/decl.c | 2 | ||||
-rw-r--r-- | gcc/ada/sysdep.c | 2 |
5 files changed, 46 insertions, 18 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 15eee43fd7e..1eb48bf41d4 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,26 @@ +2003-10-22 Danny Smith <dannysmith@users.sourceforge.net> + + * 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. + 2003-10-22 Arnaud Charlet <charlet@act-europe.fr> * Makefile.in: Disable build of gnatpa. PR ada/10110. 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(); diff --git a/gcc/ada/ctrl_c.c b/gcc/ada/ctrl_c.c index 7d7eef043e4..22d00667275 100644 --- a/gcc/ada/ctrl_c.c +++ b/gcc/ada/ctrl_c.c @@ -48,8 +48,6 @@ void __gnat_install_int_handler (void (*) (void)); /* __gnat_uninstall_int_handler will reinstall the original handler */ void __gnat_uninstall_int_handler (void); -static void __gnat_int_handler (int); - /* POSIX implementation */ #if (defined (_AIX) || defined (unix)) && !defined (__vxworks) @@ -104,7 +102,7 @@ __gnat_uninstall_int_handler (void) #include "mingw32.h" #include <windows.h> -void (*sigint_intercepted) () = NULL; +void (*sigint_intercepted) (void) = NULL; static BOOL WINAPI __gnat_int_handler (DWORD dwCtrlType) diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c index dd4b427c2e0..bbad5b50e46 100644 --- a/gcc/ada/decl.c +++ b/gcc/ada/decl.c @@ -6451,7 +6451,7 @@ create_concat_name (gnat_entity, suffix) { Entity_Kind kind = Ekind (gnat_entity); - char *prefix = "_imp__"; + const char *prefix = "_imp__"; int plen = strlen (prefix); if ((kind == E_Variable || kind == E_Constant) diff --git a/gcc/ada/sysdep.c b/gcc/ada/sysdep.c index 0b9d2c3b750..836f3d53528 100644 --- a/gcc/ada/sysdep.c +++ b/gcc/ada/sysdep.c @@ -298,6 +298,8 @@ __gnat_ttyname (filedes) #ifdef __MINGW32__ #if OLD_MINGW #include <termios.h> +#else +#include <conio.h> /* for getch(), kbhit() */ #endif #else #include <termios.h> |