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=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,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 33CD01F619 for ; Mon, 24 Feb 2020 20:09:08 +0000 (UTC) Received: from localhost ([::1]:41676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6K2M-0007pa-VW for normalperson@yhbt.net; Mon, 24 Feb 2020 15:09:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42671) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6K2H-0007oy-Ho for bug-gnulib@gnu.org; Mon, 24 Feb 2020 15:09:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6K2G-0002dc-D0 for bug-gnulib@gnu.org; Mon, 24 Feb 2020 15:09:01 -0500 Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::11]:16851) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6K2F-0002cc-NZ for bug-gnulib@gnu.org; Mon, 24 Feb 2020 15:09:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1582574937; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=GA0WgRcgMxrpfK1CvGaj9TxoyMd4qmBryEoPe+VXQAk=; b=bLajmYIShm2jUJlyErvr/wK6FGIgrgvLmOQOG5lsBbFdFiMHAmqZq7zkZanL5XkOrA eObEX9DOIGLqqFzHenAqc3vuLBlw//477kn43Owm5s2z9fLiiXT7vq/mDmP0oye1hQIn Xx25iLT4R3SZ+wzg+sHFK01fo4+ShKfC84noCJILV3k9QIheV9vIuA/t7lY/P/D2fEF3 rgCO6F8oG4qVMQw8Nd/J1N+M4/bsU0hhWrQ7g/UuWA9HX6uwYX7p8G1490QcNM/SbRuG ahtJ72BEw8jUblL3TU3eH/mXfEUPDBv3/n8tnycV2UL14DCpv+CwHb92a1G5JMQg0GLV JlcA== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOH6fzxfs=" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 46.1.12 DYNA|AUTH) with ESMTPSA id g00701w1OK8qn5w (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Mon, 24 Feb 2020 21:08:52 +0100 (CET) From: Bruno Haible To: bug-gnulib@gnu.org Subject: Re: [PATCH 2/2] modules: fcntl: allow being detected by importing projects Date: Mon, 24 Feb 2020 21:08:52 +0100 Message-ID: <2770786.0FvDkCl2kk@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-171-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20200224125649.19109-2-sno@netbsd.org> References: <20200224125649.19109-1-sno@netbsd.org> <20200224125649.19109-2-sno@netbsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:238:20a:202:5300::11 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jens Rehsack Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Jens Rehsack wrote: > battle of compatibility layers. Yes, we need C preprocessor macros to avoid conflicts between compatibility layers. It's preferable to have this witness macro defined through the .h file. 2020-02-24 Bruno Haible fcntl: Add witness of gnulib override. Reported by Jens Rehsack in . * lib/fcntl.in.h (GNULIB_defined_rpl_fcntl, GNULIB_defined_fcntl): New macros. diff --git a/lib/fcntl.in.h b/lib/fcntl.in.h index b2e1e51..0a21c95 100644 --- a/lib/fcntl.in.h +++ b/lib/fcntl.in.h @@ -116,9 +116,15 @@ _GL_WARN_ON_USE (creat, "creat is not always POSIX compliant - " # endif _GL_FUNCDECL_RPL (fcntl, int, (int fd, int action, ...)); _GL_CXXALIAS_RPL (fcntl, int, (int fd, int action, ...)); +# if !GNULIB_defined_rpl_fcntl +# define GNULIB_defined_rpl_fcntl 1 +# endif # else # if !@HAVE_FCNTL@ _GL_FUNCDECL_SYS (fcntl, int, (int fd, int action, ...)); +# if !GNULIB_defined_fcntl +# define GNULIB_defined_fcntl 1 +# endif # endif _GL_CXXALIAS_SYS (fcntl, int, (int fd, int action, ...)); # endif