diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-01 07:38:17 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-01 07:38:17 +0000 |
commit | a2cac78a1e3570ba547fd08d02bf5bda34b5acc5 (patch) | |
tree | 5cc23759918ac2fbfb6e5057c09b0781c2d30dd9 /gcc/ada/cstreams.c | |
parent | db9e03b6c39fa394401d023a0da5850ea3f98d00 (diff) | |
download | gcc-a2cac78a1e3570ba547fd08d02bf5bda34b5acc5.tar.gz |
2008-08-01 Jose Ruiz <ruiz@adacore.com>
* cstreams.c (__gnat_full_name): RTSS applications cannot ask for the
current directory so only fully qualified names are allowed.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138460 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/cstreams.c')
-rw-r--r-- | gcc/ada/cstreams.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gcc/ada/cstreams.c b/gcc/ada/cstreams.c index fe81bcbe97e..79dde9331c0 100644 --- a/gcc/ada/cstreams.c +++ b/gcc/ada/cstreams.c @@ -6,7 +6,7 @@ * * * Auxiliary C functions for Interfaces.C.Streams * * * - * Copyright (C) 1992-2007, Free Software Foundation, Inc. * + * Copyright (C) 1992-2008, Free Software Foundation, Inc. * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * @@ -156,7 +156,18 @@ __gnat_constant_stdout (void) char * __gnat_full_name (char *nam, char *buffer) { -#if defined(__EMX__) || defined (__MINGW32__) +#ifdef RTSS + /* RTSS applications have no current-directory notion, so RTSS file I/O + requests must use fully qualified path names, such as: + c:\temp\MyFile.txt (for a file system object) + \\.\MyDevice0 (for a device object) + */ + if (nam[1] == ':' || nam[0] == '\\') + strcpy (buffer, nam); + else + buffer[0] = '\0'; + +#elif 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] == ':') |