From patchwork Mon May 20 17:40:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1102269 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-102119-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="sCBkSHWq"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4575m64KJ9z9s1c for ; Tue, 21 May 2019 03:41:10 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; q=dns; s=default; b=bE3IELLAaOGWKWxATPis5Dw9H4kmm d8rnyiev0CGchy88fMgcbHQOc8ldz3a3cpdFJJLRxnRNVFgSP7vM40gWhA25odpQ SxC5aQpI+8nVkDG6/8qX+ANnFYJuap8H19b+zKkgQPWExGA/RofszOAgRxjfPIik r4JHtEoeIjFSac= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; s=default; bh=nz3CiOiw9uaCAhKlBwpFGNxnjzc=; b=sCB kSHWqz+U4n6jRKvK1UW7RIeuAL1bdLC2v9Aun4jy0cqnptePkLBvyCcfHFpxwnX8 1vR9iEFNrF3cEjf7baqSGUxZbPWi6IA5HW9Osyo8LoMvT7gR3RuF/BeCjObvC6Nk 6wvjBCmhDw5DdfTudIwr2JjKuwJyGHX3CgRWHHrw= Received: (qmail 100506 invoked by alias); 20 May 2019 17:41:04 -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 100498 invoked by uid 89); 20 May 2019 17:41:04 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1841 X-HELO: mx1.redhat.com From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH] support: Expose sbindir as support_sbindir_prefix Date: Mon, 20 May 2019 19:40:58 +0200 Message-ID: <87woilgh1x.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 2019-05-20 Florian Weimer * support/support.h (support_sbindir_prefix): Declare. * support/Makefile (CFLAGS-support_paths.c): Define SBINDIR_PATH. * support/support_paths.c (support_sbindir_prefix): Define. diff --git a/support/Makefile b/support/Makefile index 18d39f5a50..56c1ed43bb 100644 --- a/support/Makefile +++ b/support/Makefile @@ -181,6 +181,7 @@ CFLAGS-support_paths.c = \ -DINSTDIR_PATH=\"$(prefix)\" \ -DLIBDIR_PATH=\"$(libdir)\" \ -DBINDIR_PATH=\"$(bindir)\" \ + -DSBINDIR_PATH=\"$(sbindir)\" \ -DROOTSBINDIR_PATH=\"$(rootsbindir)\" ifeq (,$(CXX)) diff --git a/support/support.h b/support/support.h index 13076b75ba..53271cedf1 100644 --- a/support/support.h +++ b/support/support.h @@ -108,6 +108,8 @@ extern const char support_libdir_prefix[]; /* Corresponds to the install's bin/ directory. */ extern const char support_bindir_prefix[]; /* Corresponds to the install's sbin/ directory. */ +extern const char support_sbindir_prefix[]; +/* Corresponds to the install's sbin/ directory. */ extern const char support_install_rootsbindir[]; extern ssize_t support_copy_file_range (int, off64_t *, int, off64_t *, diff --git a/support/support_paths.c b/support/support_paths.c index 1fe32835b1..ff1df2bf20 100644 --- a/support/support_paths.c +++ b/support/support_paths.c @@ -65,6 +65,13 @@ const char support_bindir_prefix[] = BINDIR_PATH; # error please -DBINDIR_PATH=something in the Makefile #endif +#ifdef SBINDIR_PATH +/* Corresponds to the install's bin/ directory. */ +const char support_sbindir_prefix[] = SBINDIR_PATH; +#else +# error please -DSBINDIR_PATH=something in the Makefile +#endif + #ifdef ROOTSBINDIR_PATH /* Corresponds to the install's sbin/ directory. */ const char support_install_rootsbindir[] = ROOTSBINDIR_PATH;