aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/cstreams.c
diff options
context:
space:
mode:
authorJerome Lambourg <lambourg@adacore.com>2018-01-11 08:53:52 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-01-11 08:53:52 +0000
commitc9e8030617cb310758929ee622cc8bff2372bb55 (patch)
tree8bbfbb2d0d8dc25dc3dfb2f4beac437eca3a92e8 /gcc/ada/cstreams.c
parent4727f693ad0f5ea1f3496d76361204e16abd2615 (diff)
downloadgcc-c9e8030617cb310758929ee622cc8bff2372bb55.zip
gcc-c9e8030617cb310758929ee622cc8bff2372bb55.tar.gz
gcc-c9e8030617cb310758929ee622cc8bff2372bb55.tar.bz2
[Ada] QNX: various runtime fixes for file I/O, timers, timezone
2018-01-11 Jerome Lambourg <lambourg@adacore.com> gcc/ada/ * libgnat/g-soliop__qnx.ads: New. * adaint.c, adaint.h, cstreams.c, s-oscons-tmplt.c, sysdep.c: Update for QNX. From-SVN: r256512
Diffstat (limited to 'gcc/ada/cstreams.c')
-rw-r--r--gcc/ada/cstreams.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ada/cstreams.c b/gcc/ada/cstreams.c
index e4e6147..cdcb531 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-2017, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2018, 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- *
@@ -198,6 +198,19 @@ __gnat_full_name (char *nam, char *buffer)
getcwd approach instead. */
realpath (nam, buffer);
+#elif defined (__QNX__)
+
+ int length;
+
+ if (__gnat_is_absolute_path (nam, strlen (nam)))
+ realpath (nam, buffer);
+ else
+ {
+ length = __gnat_max_path_len;
+ __gnat_get_current_dir (buffer, &length);
+ strncat (buffer, nam, __gnat_max_path_len - length - 1);
+ }
+
#elif defined (__vxworks)
/* On VxWorks systems, an absolute path can be represented (depending on