]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Ada: Add GNU/Hurd glibc api bits
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 22 Dec 2024 00:13:03 +0000 (01:13 +0100)
committerEric Botcazou <ebotcazou@adacore.com>
Sun, 22 Dec 2024 11:28:17 +0000 (12:28 +0100)
They are mostly shared with Linux

gcc/ada/ChangeLog:

* s-oscons-tmplt.c [__GNU__] (_XOPEN_SOURCE, _BSD_SOURCE): Define.
[__GNU__]: Include <pthread.h> and <signal.h>
[__GNU__]: Set MSG_Forced_Flags to "MSG_NOSIGNAL".
[__GNU__]: Define SIZEOF_sigset.
[__GNU__]: Define PTHREAD_*SIZE

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
gcc/ada/s-oscons-tmplt.c

index 96eb99dfdac4c5c9786e2925c7f352c417894a38..4e1f6fbdd2b0830ed1498da0ca279c1660cd5edd 100644 (file)
@@ -86,7 +86,7 @@ pragma Style_Checks ("N");
  ** a number of non-POSIX but useful/required features.
  **/
 
-#if defined (__linux__) || defined (__ANDROID__)
+#if defined (__linux__) || defined (__ANDROID__) || defined (__GNU__)
 
 /* Define _XOPEN_SOURCE to get IOV_MAX */
 # if !defined (_XOPEN_SOURCE)
@@ -96,7 +96,7 @@ pragma Style_Checks ("N");
 /* Define _BSD_SOURCE to get CRTSCTS */
 # define _BSD_SOURCE
 
-#endif /* defined (__linux__) || defined (__ANDROID__) */
+#endif /* defined (__linux__) || defined (__ANDROID__) || defined (__GNU__) */
 
 /* Include gsocket.h before any system header so it can redefine FD_SETSIZE */
 
@@ -160,7 +160,7 @@ pragma Style_Checks ("N");
 #endif
 
 #if defined (__linux__) || defined (__ANDROID__) || defined (__QNX__) \
-  || defined (__rtems__)
+  || defined (__rtems__) || defined (__GNU__)
 # include <pthread.h>
 # include <signal.h>
 #endif
@@ -1469,7 +1469,7 @@ CND(MSG_WAITALL, "Wait for full reception")
 #endif
 CND(MSG_NOSIGNAL, "No SIGPIPE on send")
 
-#if defined (__linux__) || defined (__ANDROID__) || defined (__QNX__)
+#if defined (__linux__) || defined (__ANDROID__) || defined (__QNX__) || defined (__GNU__)
 # define MSG_Forced_Flags "MSG_NOSIGNAL"
 #else
 # define MSG_Forced_Flags "0"
@@ -1938,7 +1938,7 @@ CST(Poll_Linkname, "")
 
 #endif /* HAVE_SOCKETS */
 
-#if defined (__linux__) || defined (__ANDROID__) || defined (__QNX__)
+#if defined (__linux__) || defined (__ANDROID__) || defined (__QNX__) || defined (__GNU__)
 #define SIZEOF_sigset (sizeof (sigset_t))
 CND(SIZEOF_sigset, "sigset")
 #endif
@@ -1999,7 +1999,7 @@ CNS(CLOCK_RT_Ada, "")
 
 #if defined (__APPLE__) || defined (__ANDROID__) || defined (DUMMY) \
   || defined (__FreeBSD__) || defined (__linux__) \
-  || defined (__QNX__) || defined (__rtems__)
+  || defined (__QNX__) || defined (__rtems__) || defined (__GNU__)
 
 /*
 
@@ -2044,7 +2044,7 @@ CND(PTHREAD_RWLOCK_SIZE,     "pthread_rwlock_t")
 CND(PTHREAD_ONCE_SIZE,       "pthread_once_t")
 
 #endif /* __APPLE__ || __ANDROID__ || __FreeBSD ||__linux__
-          || __QNX__|| __rtems__ */
+          || __QNX__|| __rtems__ || __GNU__ */
 
 /*