This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[hurd,commited] hurd: avoid including hurd/signal.h when not needed
- From: Samuel Thibault <samuel dot thibault at ens-lyon dot org>
- To: libc-alpha at sourceware dot org
- Cc: Samuel Thibault <samuel dot thibault at ens-lyon dot org>
- Date: Sun, 4 Mar 2018 01:29:55 +0100
- Subject: [hurd,commited] hurd: avoid including hurd/signal.h when not needed
- Authentication-results: sourceware.org; auth=none
thus making <hurd/port.h> and <hurd/userlink.h> includable without
_GNU_SOURCE.
* hurd/hurd/port.h: Do not include <hurd/signal.h>.
* hurd/hurd/userlink.h [!defined __USE_EXTERN_INLINES ||
!defined _LIBC || !IS_IN (libc)]: Do not include <hurd/signal.h>.
---
ChangeLog | 3 +++
hurd/hurd/port.h | 1 -
hurd/hurd/userlink.h | 6 +++++-
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9bfa1bd316..297af745e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,9 @@
* sysdeps/mach/i386/bits/mach/param.h: ... here. Update path in #error.
* sysdeps/mach/hurd/bits/param.h: Include <bits/mach/param.h> instead
of <mach/param.h>.
+ * hurd/hurd/port.h: Do not include <hurd/signal.h>.
+ * hurd/hurd/userlink.h [!defined __USE_EXTERN_INLINES ||
+ !defined _LIBC || !IS_IN (libc)]: Do not include <hurd/signal.h>.
2018-03-03 Andreas Schwab <schwab@linux-m68k.org>
diff --git a/hurd/hurd/port.h b/hurd/hurd/port.h
index eec85ccc29..0779578d03 100644
--- a/hurd/hurd/port.h
+++ b/hurd/hurd/port.h
@@ -24,7 +24,6 @@
#include <mach.h>
#include <hurd/userlink.h>
#include <spin-lock.h>
-#include <hurd/signal.h>
/* Structure describing a cell containing a port. With the lock held, a
diff --git a/hurd/hurd/userlink.h b/hurd/hurd/userlink.h
index fb7cab27c3..f9362557cb 100644
--- a/hurd/hurd/userlink.h
+++ b/hurd/hurd/userlink.h
@@ -24,7 +24,11 @@
#define __need_NULL
#include <stddef.h>
-#include <hurd/signal.h>
+#if defined __USE_EXTERN_INLINES && defined _LIBC
+# if IS_IN (libc)
+# include <hurd/signal.h>
+# endif
+#endif
#include <setjmp.h>
--
2.16.1