From: Jose Ruiz Date: Thu, 13 Dec 2007 10:19:55 +0000 (+0100) Subject: adaint.h: (__gnat_plist_init): Not defined for RTX. X-Git-Tag: releases/gcc-4.3.0~1080 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6e8413cd79b5c1775640ed5916eefdcee06af9d;p=thirdparty%2Fgcc.git adaint.h: (__gnat_plist_init): Not defined for RTX. 2007-12-06 Jose Ruiz * 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 --- diff --git a/gcc/ada/Makefile.in b/gcc/ada/Makefile.in index db65816b8779..d9792ca4744a 100644 --- a/gcc/ada/Makefile.in +++ b/gcc/ada/Makefile.in @@ -418,6 +418,9 @@ ifeq ($(strip $(filter-out m68k% wrs vx%,$(targ))),) EXTRA_GNATRTL_NONTASKING_OBJS=i-vxwork.o i-vxwoio.o EXTRA_GNATRTL_TASKING_OBJS=s-vxwork.o + EXTRA_LIBGNAT_SRCS+=vx_stack_info.c + EXTRA_LIBGNAT_OBJS+=vx_stack_info.o + ifeq ($(strip $(filter-out yes,$(TRACE))),) LIBGNAT_TARGET_PAIRS += \ s-traces.adb extern void __gnat_init_float (void); -extern void __gnat_plist_init (void); extern void __gnat_install_SEH_handler (void *); +#ifndef RTX +/* Do not define for RTX since it is only used for creating child processes + which is not supported in RTX. */ +extern void __gnat_plist_init (void); +#endif + void __gnat_initialize (void *eh) { @@ -71,9 +76,11 @@ __gnat_initialize (void *eh) given that we have set Max_Digits etc with this in mind */ __gnat_init_float (); +#ifndef RTX /* Initialize a lock for a process handle list - see adaint.c for the implementation of __gnat_portable_no_block_spawn, __gnat_portable_wait */ __gnat_plist_init(); +#endif /* Note that we do not activate this for the compiler itself to avoid a bootstrap path problem. Older version of gnatbind will generate a call diff --git a/gcc/ada/mingw32.h b/gcc/ada/mingw32.h index e58b45f760a0..8018e14986ce 100644 --- a/gcc/ada/mingw32.h +++ b/gcc/ada/mingw32.h @@ -41,9 +41,10 @@ version. It is not possible to use it with previous version due to a bug in the MingW runtime. */ -#if ((__MINGW32_MAJOR_VERSION == 3 \ +#if (((__MINGW32_MAJOR_VERSION == 3 \ && __MINGW32_MINOR_VERSION >= 9) \ - || (__MINGW32_MAJOR_VERSION >= 4)) + || (__MINGW32_MAJOR_VERSION >= 4)) \ + && !defined (RTX)) #define GNAT_UNICODE_SUPPORT #else diff --git a/gcc/ada/sysdep.c b/gcc/ada/sysdep.c index cde8e544eb7e..6aca196af76e 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