This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] PR ada/91268 Do not redefine macros


This should fix PR ada/91268 by only defining macros if not already
done.

Tested on x86_64-pc-linux-gnu, committed on trunk

2019-09-17  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* adaint.c (_REENTRANT, _THREAD_SAFE): Only define if needed.
--- gcc/ada/adaint.c
+++ gcc/ada/adaint.c
@@ -35,8 +35,14 @@
    library calls directly. This file contains all other routines.  */
 
 /* Ensure access to errno is thread safe.  */
+
+#ifndef _REENTRANT
 #define _REENTRANT
+#endif
+
+#ifndef _THREAD_SAFE
 #define _THREAD_SAFE
+#endif
 
 /* Use 64 bit Large File API */
 #if defined (__QNX__)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]