sysdep.c: Include conio.h if __MINGW32__ and !OLD_MINGW.
* 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. From-SVN: r72824
This commit is contained in:
parent
218d5a871c
commit
25412599b4
5 changed files with 46 additions and 18 deletions
|
@ -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.
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Reference in a new issue