From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 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 21CE51F45A for ; Sat, 29 Oct 2022 13:36:56 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="A7FuvYSU"; dkim-atps=neutral Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oom0d-000819-Qj; Sat, 29 Oct 2022 09:36:23 -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 1oom0c-0007zJ-AQ; Sat, 29 Oct 2022 09:36:22 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oom0X-0005vp-Th; Sat, 29 Oct 2022 09:36:22 -0400 Received: by mail-wm1-x336.google.com with SMTP id m29-20020a05600c3b1d00b003c6bf423c71so8153944wms.0; Sat, 29 Oct 2022 06:36:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-disposition:mime-version:mail-followup-to:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=tLLyi7J69HCdc9JI2pOJ1l6ZYVwkHpzpCXgILsYlBDY=; b=A7FuvYSUsHTvbOOTR5Ic9fzUHmIPqH/NnI8Ou23N34Yo3SYOTKJzdOHkgeaQfRwg3+ R+SEd1CAcJ/ev++btsldfSZ2Izo5UNhiB0bOXWnAt1FZ7TtzPZLGGkugrx8x0QTMFHuk gM6DwYm8U/sHgxe8DuyNhlDeC/XqbwhYEPKQN+0/lT0e6PW2jW4R4+2AmUhA/rjbxPiJ 6HIPnW1CZbPBOJLYgeplnZJJg1/ZMGjjTSngqeJZA84y2FyNJkFiBQImiSHZmgkf4LKH paTkv0kIizI9AirzW14hl66Z924Bc84f3pTZ6QSqR21xy1k0d/hZ1UbrnEsgKzimYr2p W0DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:mail-followup-to:message-id :subject:cc:to:date:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=tLLyi7J69HCdc9JI2pOJ1l6ZYVwkHpzpCXgILsYlBDY=; b=S+4apDlZZ+X7IJrm2JAi1bEPUMP1z2RjK5PE4bK/dw8ruVTT5/S7i05Xk2IG+buyCA 8P+OqILegkRZzgeseAuvgPu1VsDuRVpvTDpChn8ojbf7nO/6G2sDLMMBYhFQaqqgEGzE 62l/XXx5HPQbfJ4+G8yHm32q4+Aw+IpYItsHaTNviGXXw/FyELPotKgv6miToUBfg1JF X5HrjaykRfkWgdujEN9u45xs3lojw1KtYZ7jbk5S27M+dykPYSN2z1iLBMTAKB3actZ+ tD8HM8M/qTYcZJIA4eIEpEY3qY/ZfhSyUZUXDm3KHlkOyZgj45AHvoAUEe1hF2Vkk4t/ +ZtQ== X-Gm-Message-State: ACrzQf20umEy17i0UkGwgBiI8t7Hyfx7ZMrICgDpTc9A4/Td3n9JwAxg qAr3dzCOI6tscZPj0uCzhoGpXuoX7ww= X-Google-Smtp-Source: AMsMyM47a/oScVONyiEtm9UiC2mAZ3+hZbJBfBcgzGyVUOSz6WX2ce1DdR6To5j5bFuf1BqMgZ3iAg== X-Received: by 2002:a05:600c:1c1e:b0:3c6:fa3c:32a9 with SMTP id j30-20020a05600c1c1e00b003c6fa3c32a9mr12489193wms.203.1667050575194; Sat, 29 Oct 2022 06:36:15 -0700 (PDT) Received: from localhost (241.84.90.146.dyn.plus.net. [146.90.84.241]) by smtp.gmail.com with ESMTPSA id k5-20020a5d6285000000b0022e57e66824sm1790240wru.99.2022.10.29.06.36.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Oct 2022 06:36:14 -0700 (PDT) From: Gavin Smith X-Google-Original-From: Gavin Smith Date: Sat, 29 Oct 2022 14:36:13 +0100 To: bug-gnulib@gnu.org Cc: bug-texinfo@gnu.org Subject: Avoid gnulib redefinitions - MDA, free-posix Message-ID: Mail-Followup-To: Gavin Smith , bug-gnulib@gnu.org, bug-texinfo@gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=gavinsmith0123@gmail.com; helo=mail-wm1-x336.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=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: , Sender: "bug-gnulib" Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Previously in the Texinfo project, we added variables to configure.ac to stop the redefinition of "Microsoft deprecated aliases": https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00004.html For example, GNULIB_MDA_FDOPEN to stop the redefinition of 'fdopen'. Recently, it was reported that this didn't work when building on MS-Windows. I found that it should maybe be GL_GNULIB_MDA_FDOPEN instead: https://lists.gnu.org/archive/html/bug-texinfo/2022-10/msg00180.html I had identified the following change as potentially being responsible: 2021-04-11 Bruno Haible Support several gnulib-tool invocations under the same configure.ac. Reported by Reuben Thomas in . This is done by defining the Gnulib module indicator variables per gnulib-tool invocation. So that a generated .h file is no longer influenced by the set of modules used in other gnulib-tool invocations. * gnulib-tool (func_compute_include_guard_prefix): Set module_indicator_prefix. Should we use the variables with the GL_ prefix now and is this something we can rely on? Or should we simply #undef fdopen and the other symbols? We don't use fdopen, putenv or mktemp in the library being built, but these are pulled in by Gnulib dependencies. I don't know if it is possible at all but it would seem to be better for Gnulib not to redefine symbols that are not actually used in the program. I'd like to keep the use of Gnulib code to a minimum, only using it where there is a significant portability benefit. Likewise, there is a warning about the redefinition of "free", that comes from the free-posix module. The issue is, when building a Perl extension module, some source files include Perl headers that also redefine "free". free-posix is to work around the possibility that free overwrites the value of errno. It's unlikely that this would cause a problem in our code, but free-posix is required internally by Gnulib code. It seems undesirable to override such a simple function as 'free', when this is not something the user has asked for - as in our case, it caused a conflict with other uses (Perl headers). This may be hard for you to change, though. Here is one idea. When using a module like 'free-posix', if it is loaded as a dependency only, use the redefinition in Gnulib code only, but do not override symbols in user code. It would be as if there were two modules, say gl-free-posix and free-posix, where gl-free-posix made the redefinition of rpl_gl_free and free-posix (requested by the user) redirected rpl_free to rpl_gl_free.