From patchwork Sun Mar 26 20:00:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Geissler X-Patchwork-Id: 1761303 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=MHSUkHCD; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pl6KC0GdCz1yXq for ; Mon, 27 Mar 2023 07:01:35 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 07FCF385B51C for ; Sun, 26 Mar 2023 20:01:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 07FCF385B51C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679860893; bh=eVKP5Ip4naklry3vuStuqUCXQdBjDo0fELPG3JTTzSg=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=MHSUkHCDXVrjhGn1zshkfTfqZXv+P077caWiAitmD1O0gx0c3d/tpJQWnIUH0RHGS 3JlwbSr1RwM2vtCVWXNnHZVcKx2BlPzubv0gCuGzlW5i4N5+aobl7PhiCMkK0xw0g5 UuiXBf126l6+c0abtYV7EnlvYDrX97ItoMmvLCyE= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by sourceware.org (Postfix) with ESMTPS id EC1FE385842B for ; Sun, 26 Mar 2023 20:00:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EC1FE385842B Received: by mail-wm1-x329.google.com with SMTP id u1so3855317wmn.5 for ; Sun, 26 Mar 2023 13:00:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679860840; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eVKP5Ip4naklry3vuStuqUCXQdBjDo0fELPG3JTTzSg=; b=MKESngNxlDNCLLKCgF7lU6y/pxrDhcy+zv80t60ixvwTQKzQ8ZoM6RoO4DWszBtZhV ayF85UkC4t7qZ/gHMaLGCjJioM/axZmbJwn0XfYVf7KTfsH37+QPBbuufZsicVylGmAK LEfQAEGN8Rx3Xd8em/2jZVKu3czgd7Yhcioi3/g/N9g6WDQ7wymrcrQavO3yJg/NAE/b x195/WCdPCl5lHuM9UOqZ9+28GZvD7glvvLNsxh57+jkJu071AxgjRiULEzMlG0bx91X 8WCSQum5uwL733YAXfI+hnXnqurRMQTbKTlJ9W2p7v6GjtXVsqJp1NZlwf8jFGfgekHu UcmQ== X-Gm-Message-State: AO0yUKVXfc52rW3FjJyl5SkjN78+OZsDd3aopuLB6Dqqi8CgZz8t8++j ZA6MmQRWsx6PCchhjtHf3ZCXZBNoNVjw1A== X-Google-Smtp-Source: AK7set9XK/B3Qmw3cegfq3nm9yaexSSWMdhUdPe2RN+VLDdtoyUR98mrLCwxOKEcsVuSI3vU9PzSKQ== X-Received: by 2002:a05:600c:1e86:b0:3ed:ebcb:e2c6 with SMTP id be6-20020a05600c1e8600b003edebcbe2c6mr7838753wmb.3.1679860840544; Sun, 26 Mar 2023 13:00:40 -0700 (PDT) Received: from localhost ([82.66.26.140]) by smtp.gmail.com with ESMTPSA id l1-20020a1c7901000000b003eae73f0fc1sm11352133wme.18.2023.03.26.13.00.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Mar 2023 13:00:40 -0700 (PDT) X-Google-Original-From: Romain Geissler To: libc-alpha@sourceware.org Cc: romain.geissler@amadeus.com Subject: [PATCH 1/3] support: introduce support_sysconfdir_prefix Date: Sun, 26 Mar 2023 20:00:14 +0000 Message-Id: <20230326200016.219-2-romain.geissler@amadeus.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230326200016.219-1-romain.geissler@amadeus.com> References: <20230326200016.219-1-romain.geissler@amadeus.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Romain Geissler via Libc-alpha From: Romain Geissler Reply-To: Romain Geissler Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" --- support/Makefile | 3 ++- support/support.h | 2 ++ support/support_paths.c | 7 +++++++ 3 files changed, 11 insertions(+), 1 deletion(-) Reviewed-by: Adhemerval Zanella diff --git a/support/Makefile b/support/Makefile index 05b31159ea5..71d51485132 100644 --- a/support/Makefile +++ b/support/Makefile @@ -231,7 +231,8 @@ CFLAGS-support_paths.c = \ -DSBINDIR_PATH=\"$(sbindir)\" \ -DSLIBDIR_PATH=\"$(slibdir)\" \ -DROOTSBINDIR_PATH=\"$(rootsbindir)\" \ - -DCOMPLOCALEDIR_PATH=\"$(complocaledir)\" + -DCOMPLOCALEDIR_PATH=\"$(complocaledir)\" \ + -DSYSCONFDIR_PATH=\"$(sysconfdir)\" # In support_timespec_check_in_range we may be passed a very tight # range for which we should produce a correct result for expected diff --git a/support/support.h b/support/support.h index 525ff1ebcec..b7f76bf0809 100644 --- a/support/support.h +++ b/support/support.h @@ -144,6 +144,8 @@ extern const char support_slibdir_prefix[]; extern const char support_install_rootsbindir[]; /* Corresponds to the install's compiled locale directory. */ extern const char support_complocaledir_prefix[]; +/* Corresponds to the install's etc/ directory. */ +extern const char support_sysconfdir_prefix[]; /* Copies the file at the path FROM to TO. If TO does not exist, it is created. If TO is a regular file, it is truncated before diff --git a/support/support_paths.c b/support/support_paths.c index f9d75998cf2..0710bcd4122 100644 --- a/support/support_paths.c +++ b/support/support_paths.c @@ -92,3 +92,10 @@ const char support_complocaledir_prefix[] = COMPLOCALEDIR_PATH; #else # error please -DCOMPLOCALEDIR_PATH=something in the Makefile #endif + +#ifdef SYSCONFDIR_PATH +/* Corresponds to the install's etc/ directory. */ +const char support_sysconfdir_prefix[] = SYSCONFDIR_PATH; +#else +# error please -DSYSCONFDIR_PATH=something in the Makefile +#endif