From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 22F32385F021 for ; Wed, 21 Jul 2021 10:16:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 22F32385F021 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-248-s0KamQn0Nky9anfHcdl91w-1; Wed, 21 Jul 2021 06:16:14 -0400 X-MC-Unique: s0KamQn0Nky9anfHcdl91w-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C17281015160; Wed, 21 Jul 2021 10:16:13 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-113-201.ams2.redhat.com [10.36.113.201]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B678A61093; Wed, 21 Jul 2021 10:16:12 +0000 (UTC) From: Florian Weimer To: Andreas Schwab Cc: Florian Weimer via Libc-alpha Subject: Re: [PATCH 22/24] resolv: Move res_query functions into libc References: <14af4941936fa9402cb3165ae7a018842dc6361e.1626339932.git.fweimer@redhat.com> <87o8awq9eg.fsf@igel.home> Date: Wed, 21 Jul 2021 12:16:11 +0200 In-Reply-To: <87o8awq9eg.fsf@igel.home> (Andreas Schwab's message of "Wed, 21 Jul 2021 11:54:47 +0200") Message-ID: <87r1fsnf9w.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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-List-Received-Date: Wed, 21 Jul 2021 10:16:20 -0000 * Andreas Schwab: > fedfs-utils wants __res_querydomain. Do we want to support this? > > https://build.opensuse.org/package/live_build_log/home:Andreas_Schwab:glibc:rebuild/fedfs-utils/f/x86_64 The configure test looks like this: AC_CHECK_LIB([resolv], [__res_querydomain], [AC_SUBST([LIBRESOLV], ["-lresolv"]) AC_DEFINE([HAVE_LIBRESOLV], [1], [Define if you have libresolv])], [AC_MSG_ERROR([libresolv not found.])]) The AC_MSG_ERROR probably needs to be removed. HAVE_LIBRESOLV is unused, and LIBRESOLV is not needed if __res_querydomain is not available (because res_querydomain is in libc). I'm not sure if we need to cater to such configure tests. In my opinion, if programmers want to check for the presence of such (non-POSIX) functions, they need to include and use an appropriate source code fragment. As far as I can see, other software (emacs, mtr, sendmail) checks both __res_* and res_* names and should be fine with __res_* as compat symbols. Thanks, Florian