summaryrefslogtreecommitdiff
path: root/gcc/ada/cstreams.c
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-22 15:13:11 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-22 15:13:11 +0000
commit6189d3b3bc75c46cb811fd683bdb2818f6748b75 (patch)
treef5b4eb644e643973998c85d1fa47dcfbadc4b121 /gcc/ada/cstreams.c
parent14ce540d53f1d3b7fcfe43320064814c88e691e7 (diff)
downloadgcc-6189d3b3bc75c46cb811fd683bdb2818f6748b75.tar.gz
* Makefile.in: Disable build of gnatpa. PR ada/10110.
* cstreams.c (__gnat_full_name): Minor improvements and clean up of previous change. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72800 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/cstreams.c')
-rw-r--r--gcc/ada/cstreams.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/gcc/ada/cstreams.c b/gcc/ada/cstreams.c
index 755b6b57ea2..f56cfff44bd 100644
--- a/gcc/ada/cstreams.c
+++ b/gcc/ada/cstreams.c
@@ -140,37 +140,35 @@ int __gnat_constant_seek_end = SEEK_END;
int __gnat_constant_seek_set = SEEK_SET;
FILE *
-__gnat_constant_stderr ()
+__gnat_constant_stderr (void)
{
return stderr;
}
FILE *
-__gnat_constant_stdin ()
+__gnat_constant_stdin (void)
{
return stdin;
}
FILE *
-__gnat_constant_stdout ()
+__gnat_constant_stdout (void)
{
return stdout;
}
char *
-__gnat_full_name (nam, buffer)
- char *nam;
- char *buffer;
+__gnat_full_name (char *nam, char *buffer)
{
#if defined(__EMX__) || defined (__MINGW32__)
- char *p;
-
/* 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] == ':')
strcpy (buffer, nam);
else
{
+ char *p;
+
_fullpath (buffer, nam, __gnat_max_path_len);
for (p = buffer; *p; p++)
@@ -189,7 +187,6 @@ __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);
@@ -207,14 +204,11 @@ __gnat_full_name (nam, buffer)
strncpy (buffer, __gnat_to_host_file_spec (buffer), __gnat_max_path_len);
}
- return buffer;
-
#else
- char *p;
-
if (nam[0] != '/')
{
- p = getcwd (buffer, __gnat_max_path_len);
+ char *p = getcwd (buffer, __gnat_max_path_len);
+
if (p == 0)
{
buffer[0] = '\0';
@@ -230,7 +224,7 @@ __gnat_full_name (nam, buffer)
}
else
strcpy (buffer, nam);
+#endif
return buffer;
-#endif
}