From patchwork Sun Mar 4 01:22:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 26182 Received: (qmail 95227 invoked by alias); 4 Mar 2018 01:22:16 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 94378 invoked by uid 89); 4 Mar 2018 01:22:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, SPF_NEUTRAL autolearn=ham version=3.3.2 spammy=2, h, H*r:sk:static-, d X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault Subject: [hurd,commited] hurd: Avoid using ino64_t and loff_t in headers Date: Sun, 4 Mar 2018 02:22:08 +0100 Message-Id: <20180304012208.11114-1-samuel.thibault@ens-lyon.org> * 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/Machrules ($(patsubst %,$(objpfx)%.h,$(user-interfaces)): + Process mig output through $(migheadersed). + * hurd/Makefile (migheadersed): Define variable. 2018-03-03 Andreas Schwab 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/' -e 's/\/__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), \