diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-23 13:32:44 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-23 13:32:44 +0000 |
commit | 2b89c55cc599a0c13e3514eeabd20d4893b235b2 (patch) | |
tree | e4cb2a009b5464c65617b77964d5b5b7ae9ba450 /gcc/ada/s-oscons-tmplt.c | |
parent | 4f5c3083fc525ff07099de9eb76a25986ca95762 (diff) | |
download | gcc-2b89c55cc599a0c13e3514eeabd20d4893b235b2.tar.gz |
2011-11-23 Matthew Heaney <heaney@adacore.com>
* a-coorse.ads, a-ciorse.ads, a-cborse.ads (Set_Iterator_Interfaces):
Renamed from Ordered_Set_Iterator_Interfaces.
* a-coorse.adb, a-ciorse.adb, a-cborse.adb (Iterator): Declared
Iterator type as limited (First, Last): Cursor return value
depends on iterator node value (Iterate): Use start position as
iterator node value (Next, Previous): Forward to corresponding
cursor-based operation.
* a-cohase.ads, a-cohase.adb: Implemented forward iterator.
* a-cihase.adb, a-cbhase.adb (Iterator): Removed unnecessary
node component (First, Next): Forward call to corresponding
cursor-based operation (Iterate): Representation of iterator no
longer has node component
2011-11-23 Hristian Kirtchev <kirtchev@adacore.com>
* exp_intr.adb (Expand_Unc_Deallocation): Ensure that the
dereference has a proper type before the side effect removal
mechanism kicks in.
* sem_ch3.adb (Analyze_Subtype_Declaration): Handle a rare case
where the base type of the subtype is a private itype created
to act as the partial view of a constrained record type. This
scenario manifests with equivalent class-wide types for records
with unknown discriminants.
2011-11-23 Jerome Guitton <guitton@adacore.com>
* s-osprim-vxworks.adb (Clock): Use Clock_RT_Ada.
2011-11-23 Thomas Quinot <quinot@adacore.com>
* s-oscons-tmplt.c: Fix unbalanced preprocessor directives Minor
reformatting/reorganization.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181666 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-oscons-tmplt.c')
-rw-r--r-- | gcc/ada/s-oscons-tmplt.c | 181 |
1 files changed, 91 insertions, 90 deletions
diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt.c index d8a6477c441..2bab2b93049 100644 --- a/gcc/ada/s-oscons-tmplt.c +++ b/gcc/ada/s-oscons-tmplt.c @@ -146,7 +146,7 @@ pragma Style_Checks ("M32766"); # define NATIVE -#endif +#endif /* DUMMY */ #ifndef TARGET # error Please define TARGET @@ -213,7 +213,7 @@ int counter = 0; : : "i" (__LINE__)); /* Freeform text */ -#endif +#endif /* NATIVE */ #define CST(name,comment) C(#name,String,name,comment) @@ -1208,55 +1208,6 @@ CND(IP_DROP_MEMBERSHIP, "Leave a multicast group") #endif CND(IP_PKTINFO, "Get datagram info") -#endif /* HAVE_SOCKETS */ - -/* - - ------------ - -- Clocks -- - ------------ - -*/ - -#ifdef CLOCK_REALTIME -CND(CLOCK_REALTIME, "System realtime clock") -#endif - -#ifdef CLOCK_MONOTONIC -CND(CLOCK_MONOTONIC, "System monotonic clock") -#endif - -#ifdef CLOCK_FASTEST -CND(CLOCK_FASTEST, "Fastest clock") -#endif - -#if defined (__sgi) -CND(CLOCK_SGI_FAST, "SGI fast clock") -CND(CLOCK_SGI_CYCLE, "SGI CPU clock") -#endif - -#if defined(__APPLE__) -/* There's no clock_gettime or clock_id's on Darwin */ -# define CLOCK_RT_Ada "-1" - -#elif defined(FreeBSD) || defined(_AIX) -/* On these platforms use system provided monotonic clock */ -# define CLOCK_RT_Ada "CLOCK_MONOTONIC" - -#elif defined(CLOCK_REALTIME) -/* By default use CLOCK_REALTIME */ -# define CLOCK_RT_Ada "CLOCK_REALTIME" -#endif - -#ifdef CLOCK_RT_Ada -CNS(CLOCK_RT_Ada, "Ada realtime clock") -#endif - -#ifndef CLOCK_THREAD_CPUTIME_ID -# define CLOCK_THREAD_CPUTIME_ID -1 -#endif -CND(CLOCK_THREAD_CPUTIME_ID, "Thread CPU clock") - /* ---------------------- @@ -1367,58 +1318,67 @@ CST(Inet_Pton_Linkname, "") #endif /* HAVE_SOCKETS */ -/** - ** System-specific constants follow - ** Each section should be activated if compiling for the corresponding - ** platform *or* generating the dummy version for runtime test compilation. - **/ - -#if defined (__vxworks) || defined (DUMMY) - /* - -------------------------------- - -- VxWorks-specific constants -- - -------------------------------- + --------------------- + -- Threads support -- + --------------------- + + -- Clock identifier definitions - -- These constants may be used only within the VxWorks version of - -- GNAT.Sockets.Thin. */ -CND(OK, "VxWorks generic success") -CND(ERROR, "VxWorks generic error") +#ifdef CLOCK_REALTIME +CND(CLOCK_REALTIME, "System realtime clock") +#endif +#ifdef CLOCK_MONOTONIC +CND(CLOCK_MONOTONIC, "System monotonic clock") #endif -#if defined (__MINGW32__) || defined (DUMMY) -/* +#ifdef CLOCK_FASTEST +CND(CLOCK_FASTEST, "Fastest clock") +#endif - ------------------------------ - -- MinGW-specific constants -- - ------------------------------ +#if defined (__sgi) +CND(CLOCK_SGI_FAST, "SGI fast clock") +CND(CLOCK_SGI_CYCLE, "SGI CPU clock") +#endif - -- These constants may be used only within the MinGW version of - -- GNAT.Sockets.Thin. -*/ +#if defined(__APPLE__) +/* There's no clock_gettime or clock_id's on Darwin */ +# define CLOCK_RT_Ada "-1" -CND(WSASYSNOTREADY, "System not ready") -CND(WSAVERNOTSUPPORTED, "Version not supported") -CND(WSANOTINITIALISED, "Winsock not initialized") -CND(WSAEDISCON, "Disconnected") +#elif defined(FreeBSD) || defined(_AIX) +/* On these platforms use system provided monotonic clock */ +# define CLOCK_RT_Ada "CLOCK_MONOTONIC" +#elif defined(CLOCK_REALTIME) +/* By default use CLOCK_REALTIME */ +# define CLOCK_RT_Ada "CLOCK_REALTIME" #endif -#ifdef NATIVE - putchar ('\n'); +#ifdef CLOCK_RT_Ada +CNS(CLOCK_RT_Ada, "") +#endif + +#ifndef CLOCK_THREAD_CPUTIME_ID +# define CLOCK_THREAD_CPUTIME_ID -1 #endif +CND(CLOCK_THREAD_CPUTIME_ID, "Thread CPU clock") #if defined (__APPLE__) || defined (__linux__) || defined (DUMMY) /* - -- Sizes of pthread data types (on Darwin these are padding) + -- Sizes of pthread data types + */ #if defined (__APPLE__) || defined (DUMMY) +/* + -- (on Darwin, these are just placeholders) + +*/ #define PTHREAD_SIZE __PTHREAD_SIZE__ #define PTHREAD_ATTR_SIZE __PTHREAD_ATTR_SIZE__ #define PTHREAD_MUTEXATTR_SIZE __PTHREAD_MUTEXATTR_SIZE__ @@ -1440,24 +1400,65 @@ CND(WSAEDISCON, "Disconnected") #define PTHREAD_ONCE_SIZE (sizeof (pthread_once_t)) #endif -CND(PTHREAD_SIZE, "pthread_t") +CND(PTHREAD_SIZE, "pthread_t") +CND(PTHREAD_ATTR_SIZE, "pthread_attr_t") +CND(PTHREAD_MUTEXATTR_SIZE, "pthread_mutexattr_t") +CND(PTHREAD_MUTEX_SIZE, "pthread_mutex_t") +CND(PTHREAD_CONDATTR_SIZE, "pthread_condattr_t") +CND(PTHREAD_COND_SIZE, "pthread_cond_t") +CND(PTHREAD_RWLOCKATTR_SIZE, "pthread_rwlockattr_t") +CND(PTHREAD_RWLOCK_SIZE, "pthread_rwlock_t") +CND(PTHREAD_ONCE_SIZE, "pthread_once_t") + +#endif /* __APPLE__ || __linux__ */ -CND(PTHREAD_ATTR_SIZE, "pthread_attr_t") +/** + ** System-specific constants follow + ** Each section should be activated if compiling for the corresponding + ** platform *or* generating the dummy version for runtime test compilation. + **/ -CND(PTHREAD_MUTEXATTR_SIZE, "pthread_mutexattr_t") +#if defined (__vxworks) || defined (DUMMY) -CND(PTHREAD_MUTEX_SIZE, "pthread_mutex_t") +/* -CND(PTHREAD_CONDATTR_SIZE, "pthread_condattr_t") + -------------------------------- + -- VxWorks-specific constants -- + -------------------------------- -CND(PTHREAD_COND_SIZE, "pthread_cond_t") + -- These constants may be used only within the VxWorks version of + -- GNAT.Sockets.Thin. +*/ -CND(PTHREAD_RWLOCKATTR_SIZE, "pthread_rwlockattr_t") +CND(OK, "VxWorks generic success") +CND(ERROR, "VxWorks generic error") -CND(PTHREAD_RWLOCK_SIZE, "pthread_rwlock_t") +#endif /* __vxworks */ -CND(PTHREAD_ONCE_SIZE, "pthread_once_t") +#if defined (__MINGW32__) || defined (DUMMY) +/* + ------------------------------ + -- MinGW-specific constants -- + ------------------------------ + + -- These constants may be used only within the MinGW version of + -- GNAT.Sockets.Thin. +*/ + +CND(WSASYSNOTREADY, "System not ready") +CND(WSAVERNOTSUPPORTED, "Version not supported") +CND(WSANOTINITIALISED, "Winsock not initialized") +CND(WSAEDISCON, "Disconnected") + +#endif /* __MINGW32__ */ + +/** + ** End of constants definitions + **/ + +#ifdef NATIVE + putchar ('\n'); #endif /* |