aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/cio.c
diff options
context:
space:
mode:
authorJose Ruiz <ruiz@adacore.com>2008-07-30 15:03:32 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2008-07-30 15:03:32 +0200
commitf921a1cd93f089a81c2ae2cee22bc9b0ee3beee5 (patch)
treec8d430dcadbd4486ea1435759e643eff045f98f3 /gcc/ada/cio.c
parent88462e8132982857e69c9e7f0d8481f8443e8bbc (diff)
downloadgcc-f921a1cd93f089a81c2ae2cee22bc9b0ee3beee5.zip
gcc-f921a1cd93f089a81c2ae2cee22bc9b0ee3beee5.tar.gz
gcc-f921a1cd93f089a81c2ae2cee22bc9b0ee3beee5.tar.bz2
2008-07-30 Jose Ruiz <ruiz@adacore.com>
* adaint.c (__gnat_file_exists): Do not use __gnat_stat for RTX. (__main for RTX in RTSS mode): Create this dummy procedure symbol to avoid the use of this symbol from libgcc.a in RTX kernel mode. * cio.c (put_int, put_int_stderr, put_char, put_char_stderr): For RTX we call the function RtPrintf for console output. * argv.c Do not use the environ variable for RTX. * gnatlink.adb (gnatlink): The part that handles the --RTS option has been moved before the call to Osint.Add_Default_Search_Dirs in order to take into account the flags in system.ads (RTX_RTSS_Kernel_Module) from the appropriate run time. * targparm.ads (RTX_RTSS_Kernel_Module_On_Target): Add this flag that is set to True if target is a RTSS module for RTX. * targparm.adb (Targparm_Tags, RTX_Str, Targparm_Str): Add tag RTX for RTX_RTSS_Kernel_Module (Get_Target_Parameters): Add processing of RTX_RTSS_Kernel_Module flag. * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for RTX): Use gcc exception handling mechanism for Windows and RTX in Win32 mode, but not for RTX in kernel mode (RTSS). (LIBGNAT_SRCS): Remove ada.h From-SVN: r138305
Diffstat (limited to 'gcc/ada/cio.c')
-rw-r--r--gcc/ada/cio.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/gcc/ada/cio.c b/gcc/ada/cio.c
index 6fba5a0..67dcfc3 100644
--- a/gcc/ada/cio.c
+++ b/gcc/ada/cio.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * Copyright (C) 1992-2005, 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- *
@@ -56,6 +56,11 @@
#undef getchar
#endif
+#ifdef RTX
+#include <windows.h>
+#include <Rtapi.h>
+#endif
+
int
get_char (void)
{
@@ -78,27 +83,43 @@ get_int (void)
void
put_int (int x)
{
+#ifdef RTX
+ RtPrintf ("%d", x);
+#else
/* Use fprintf rather than printf, since the latter is unbuffered
on vxworks */
fprintf (stdout, "%d", x);
+#endif
}
void
put_int_stderr (int x)
{
+#ifdef RTX
+ RtPrintf ("%d", x);
+#else
fprintf (stderr, "%d", x);
+#endif
}
void
put_char (int c)
{
+#ifdef RTX
+ RtPrintf ("%c", c);
+#else
putchar (c);
+#endif
}
void
put_char_stderr (int c)
{
+#ifdef RTX
+ RtPrintf ("%c", c);
+#else
fputc (c, stderr);
+#endif
}
#ifdef __vxworks