This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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]

[hurd,commited] hurd: Avoid using ino64_t and loff_t in headers


	* mach/Machrules ($(patsubst %,$(objpfx)%.h,$(user-interfaces)):
	Process mig output through $(migheaderpipe).
	* hurd/Makefile (migheaderpipe): Define variable.
---
 ChangeLog      | 3 +++
 hurd/Makefile  | 2 ++
 mach/Machrules | 3 ++-
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 70b08c900d..819a8db2cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,9 @@
 	* hurd/hurd/fd.h (_hurd_fd_error): Fix struct initializer to be
 	trivial, for C++ conformity.
 	* sysdeps/mach/hurd/dl-sysdep.c: Include <mach/machine/vm_param.h>.
+	* mach/Machrules ($(patsubst %,$(objpfx)%.h,$(user-interfaces)):
+	Process mig output through $(migheadersed).
+	* hurd/Makefile (migheadersed): Define variable.
 
 2018-03-03  Andreas Schwab  <schwab@linux-m68k.org>
 
diff --git a/hurd/Makefile b/hurd/Makefile
index f71dc36043..cca08a175a 100644
--- a/hurd/Makefile
+++ b/hurd/Makefile
@@ -86,6 +86,8 @@ generated += $(inlines:=.c)
 CFLAGS-hurdstartup.o = $(no-stack-protector)
 CFLAGS-RPC_exec_startup_get_info.o = $(no-stack-protector)
 
+# Make generated headers compatible with all support standards
+migheaderpipe := | sed -e 's/\<ino64_t\>/__ino64_t/' -e 's/\<loff_t\>/__loff_t/'
 include ../mach/Machrules
 include ../Rules
 
diff --git a/mach/Machrules b/mach/Machrules
index 4f9ec421ec..65411f493a 100644
--- a/mach/Machrules
+++ b/mach/Machrules
@@ -29,6 +29,7 @@
 # _S_rpcname.
 
 # Includers can also add to or modify `migdefines' to set MiG flags.
+# They can also set `migheaderpipe' to mangle the MiG header output.
 
 all:
 
@@ -176,7 +177,7 @@ $(patsubst %,$(objpfx)%.h,$(user-interfaces)): $(objpfx)%.h: $(objpfx)%.__h \
 							     $(objpfx)%.uh
 # The last line of foo.__h is "#endif _foo_user_".
 # The first two lines of foo.uh are "#ifndef _foo_user_"/"#define _foo_user_".
-	(sed -e '$$d' $<; sed -e '1,2d' $(word 2,$^)) > $@-new
+	(sed -e '$$d' $<; sed -e '1,2d' $(word 2,$^)) $(migheaderpipe) > $@-new
 	mv -f $@-new $@
 
 interface-routines := $(foreach if,$(user-interfaces),			\
-- 
2.16.1


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