diff options
author | Jose Ruiz <ruiz@adacore.com> | 2007-12-13 11:19:55 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2007-12-13 11:19:55 +0100 |
commit | a6e8413cd79b5c1775640ed5916eefdcee06af9d (patch) | |
tree | 824f194b17e9e4fc20003b76cd51c67d9f3feadd /gcc/ada/sysdep.c | |
parent | 561b58498765f443cf6905b7ee246af5a1a0f626 (diff) | |
download | gcc-a6e8413cd79b5c1775640ed5916eefdcee06af9d.tar.gz |
adaint.h: (__gnat_plist_init): Not defined for RTX.
2007-12-06 Jose Ruiz <ruiz@adacore.com>
* adaint.h: (__gnat_plist_init): Not defined for RTX.
* initialize.c (__gnat_initialize): Do not call __gnat_plist_init for
RTX systems.
* Makefile.in: Add new files s-tasinf-linux.ads and s-tasinf-linux.adb.
(LIBGNAT_TARGET_PAIRS, MISCLIB, THREADSLIB,
EXTRA_GNATRTL_NONTASKING_OBJS, EXTRA_GNATRTL_TASKING_OBJS,
GNATLIB_SHARED for RTX run time): Use the versions required by RTX.
* mingw32.h:
Do not define GNAT_UNICODE_SUPPORT for RTX since it is not supported.
* sysdep.c (winflush_function for RTX): Procedure that does nothing
since we only have problems with Windows 95/98, which are not
supported by RTX.
(__gnat_ttyname): Return the empty string on Nucleus, just as
done on vxworks.
From-SVN: r130816
Diffstat (limited to 'gcc/ada/sysdep.c')
-rw-r--r-- | gcc/ada/sysdep.c | 57 |
1 files changed, 24 insertions, 33 deletions
diff --git a/gcc/ada/sysdep.c b/gcc/ada/sysdep.c index cde8e544eb7..6aca196af76 100644 --- a/gcc/ada/sysdep.c +++ b/gcc/ada/sysdep.c @@ -6,7 +6,7 @@ * * * C Implementation File * * * - * Copyright (C) 1992-2006, Free Software Foundation, Inc. * + * Copyright (C) 1992-2007, 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- * @@ -213,6 +213,23 @@ __gnat_ttyname (int filedes) Calling FlushConsoleInputBuffer just after getch() fix the bug under 95/98. */ +#ifdef RTX + +static void winflush_nt (void); + +/* winflush_function will do nothing since we only have problems with Windows + 95/98 which are not supported by RTX. */ + +static void (*winflush_function) (void) = winflush_nt; + +static void +winflush_nt (void) +{ + /* Does nothing as there is no problem under NT. */ +} + +#else + static void winflush_init (void); static void winflush_95 (void); @@ -279,6 +296,8 @@ __gnat_is_windows_xp (void) #endif +#endif + #else static const char *mode_read_text = "r"; @@ -309,15 +328,13 @@ __gnat_set_text_mode (int handle ATTRIBUTE_UNUSED) char * __gnat_ttyname (int filedes) { -#ifndef __vxworks +#if defined (__vxworks) || defined (__nucleus) + return ""; +#else extern char *ttyname (int); return ttyname (filedes); - -#else - return ""; - -#endif +#endif /* defined (__vxworks) || defined (__nucleus) */ } #endif @@ -872,30 +889,4 @@ __gnat_get_task_options (void) #endif } -typedef struct -{ - int size; - char *base; - char *end; -} stack_info; - -/* __gnat_get_stack_info is used by s-stchop.adb only for VxWorks. This - procedure fills the stack information associated to the currently - executing task. */ -extern void __gnat_get_stack_info (stack_info *vxworks_stack_info); - -void -__gnat_get_stack_info (stack_info *vxworks_stack_info) -{ - TASK_DESC descriptor; - - /* Ask the VxWorks kernel about stack values */ - taskInfoGet (taskIdSelf (), &descriptor); - - /* Fill the stack data with the information provided by the kernel */ - vxworks_stack_info->size = descriptor.td_stackSize; - vxworks_stack_info->base = descriptor.td_pStackBase; - vxworks_stack_info->end = descriptor.td_pStackEnd; -} - #endif |