From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id DB6A01F44D for ; Tue, 23 Apr 2024 10:28:19 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=sc3d.org header.i=@sc3d.org header.a=rsa-sha256 header.s=google header.b=oNvXrasY; dkim-atps=neutral Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rzDNe-00079j-9x; Tue, 23 Apr 2024 06:28:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rzDNb-00079C-Uf for bug-gnulib@gnu.org; Tue, 23 Apr 2024 06:28:04 -0400 Received: from mail-yb1-xb2f.google.com ([2607:f8b0:4864:20::b2f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rzDNX-0001wn-N8 for bug-gnulib@gnu.org; Tue, 23 Apr 2024 06:28:03 -0400 Received: by mail-yb1-xb2f.google.com with SMTP id 3f1490d57ef6-de462f3d992so5748688276.2 for ; Tue, 23 Apr 2024 03:27:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google; t=1713868078; x=1714472878; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=QvOid5xg6OvKAgcrzXfglY7NKmzSLg8JaEohpJoObuE=; b=oNvXrasYiGZAscsNSkdSw3GLIWdFG89DDuAjcH5gAWH5dWoUgt2jK9GktPi/2eZV07 K5CfWgXHPKRHtl627btfpEmSI+2K8d8IET1YgtR7qGmSJGfP2+PPlwjg8G98Puj2egM0 NpiDBIBQRS8ayOHvVrJ+i4y7v+iJDX+cr2JxQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713868078; x=1714472878; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=QvOid5xg6OvKAgcrzXfglY7NKmzSLg8JaEohpJoObuE=; b=bO5zgkMhT/O3ULIgRM/TBwuvVA1mkFvCstt4lX4QFVZgNFweGUniqU+cGn9ktR2lqN AjozoP4oyfpyGjqsGQEuFzRcB/Oa+mOL1Ocmd5kqWEzhPTznBC2eIpj38PnBki1ktaAB T7J/rmqbp9dZrAykjktIVwap9oc+ozJxyw7Rel6Pi//ERjUBZ3BwDlcxx6A/ClrcteaI GirSA0GOooL5s6CyXF35ArbgLTIppDZwCgtaH+Q0yZuPZDoxRVAn9r3zglyJVD+6YgZN SmM7wf4yrR2NDdm+MJSS6G5Qpggi4J2Xv+c7mNaBJ8O5I7gTsVVxaTNyIzk75LkoHodk GrKQ== X-Gm-Message-State: AOJu0Yz0IYuSjS3zhxZYYQss2a74ujCZWBfLPrRfglF3mxf+xdMkfeQF 7ehCCRtN2Xh8tqHgkRgkQn+GuTycZy4wXgoEqcjvuDiWomx+yvkYrMj19SimqFBzc0rWUfR0cvG nc/Ek7/ttp6G7ilfp5syqOTdZ1MHBxtTiQE0qtVgiK+MjO7vH5n4= X-Google-Smtp-Source: AGHT+IGn78XiG62HVpL0DQImjszIx/pK6YukL9TPV1FbiMy5Qbuz22Jn/KFdjjuyh1eyi2VcsL6fMfQ1tIrjU0TcJ60= X-Received: by 2002:a25:8d91:0:b0:de5:5bca:ecb0 with SMTP id o17-20020a258d91000000b00de55bcaecb0mr415707ybl.0.1713868077543; Tue, 23 Apr 2024 03:27:57 -0700 (PDT) MIME-Version: 1.0 From: Reuben Thomas Date: Tue, 23 Apr 2024 12:27:46 +0200 Message-ID: Subject: 'relocatable' project built without --enable-relocatable To: bug-gnulib Content-Type: multipart/alternative; boundary="000000000000f455c60616c10165" Received-SPF: pass client-ip=2607:f8b0:4864:20::b2f; envelope-from=rrt@sc3d.org; helo=mail-yb1-xb2f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org --000000000000f455c60616c10165 Content-Type: text/plain; charset="UTF-8" relocatable.h has partial support for building without --enable-relocatable: it #defines relocate and relocate2 to empty macros. This is great! Could macros be similarly added for the other relocatable.h APIs, namely set_relocation_prefix and compute_curr_prefix? This would allow relocate-using code to be entirely #ifdef free. This would help me currently because I am using this module from Vala. Vala's compiler outputs C sources. In order to avoid the user of my package needing a Vala compiler, I am taking advantage of automake's support for shipping the generated C sources, and allowing the user to compile those directly. However, this means that my Vala source code cannot depend on configure-time settings. Further, Vala does not offer any way to generate #ifdef-guarded C code. My current solution for this situation, which I also face for Windows-specific code, is to have separate Vala files which are built or not according to automake settings. For relocatable, I can also simply define my own empty macros for the above APIs, and insert them in config.h with AH_BOTTOM. But this made my wonder why some of the APIs, but not all, are already provided with "empty" versions like this. -- https://rrt.sc3d.org --000000000000f455c60616c10165 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
relocatable.h has partial support for b= uilding without --enable-relocatable: it #defines relocate and relocate2 to= empty macros. This is great! Could macros be similarly added for the other= relocatable.h APIs, namely set_relocation_prefix and compute_curr_prefix? = This would allow relocate-using code to be entirely #ifdef free.

This would help me currently bec= ause I am using this module from Vala. Vala's compiler outputs C source= s. In order to avoid the user of my package needing a Vala compiler, I am t= aking advantage of automake's support for shipping the generated C sour= ces, and allowing the user to compile those directly. However, this means t= hat my Vala source code cannot depend on configure-time settings. Further, = Vala does not offer any way to generate #ifdef-guarded C code.

My current solution for this situa= tion, which I also face for Windows-specific code, is to have separate Vala= files which are built or not according to automake settings.

For relocatable, I can also simply = define my own empty macros for the above APIs, and insert them in config.h = with AH_BOTTOM. But this made my wonder why some of the APIs, but not all, = are already provided with "empty" versions like this.

--
--000000000000f455c60616c10165--