From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3576 invoked by alias); 29 Nov 2018 10:28:01 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 3517 invoked by uid 89); 29 Nov 2018 10:28:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-98.2 required=5.0 tests=BAYES_50,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=Debian, Cook, cook, cuserid X-HELO: mout.kundenserver.de Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.126.133) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 29 Nov 2018 10:27:59 +0000 Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MStKw-1fy5NC1vu2-00UHjX for ; Thu, 29 Nov 2018 11:27:56 +0100 Received: by calimero.vinschen.de (Postfix, from userid 500) id BBF4CA80586; Thu, 29 Nov 2018 11:27:55 +0100 (CET) Date: Thu, 29 Nov 2018 10:28:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: _GNU_SOURCE doesn't enable cuserid() declaration Message-ID: <20181129102755.GA30649@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <20181129022242.3llewsc7gottm6yv@mars.tony.develop-help.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="yAzUYvkKIfeS0jQX" Content-Disposition: inline In-Reply-To: <20181129022242.3llewsc7gottm6yv@mars.tony.develop-help.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-SW-Source: 2018-11/txt/msg00239.txt.bz2 --yAzUYvkKIfeS0jQX Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 876 On Nov 29 13:22, Tony Cook wrote: > Linux stdio.h exposes the declaration of cuserid() both with standard > version macros and with _GNU_SOURCE: >=20 > tony@mars:~/play$ cat testcuserid.c > #define _GNU_SOURCE > #include >=20 > int main() { > puts(cuserid(NULL)); > return 0; > } > tony@mars:~/play$ gcc -otestcuserid -Werror=3Dall testcuserid.c > tony@mars:~/play$ ./testcuserid > tony > tony@mars:~/play$ uname -a > Linux mars 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) x86_= 64 GNU/Linux >=20 > while on Cygwin _GNU_SOURCE doesn't expose cuserid(): Thanks, I pushed a patch. https://sourceware.org/git/?p=3Dnewlib-cygwin.git;a=3Dcommitdiff;h=3D09870c= 6e958c Of course, that doesn't make cuserid more portable. The rule given in the Linux man page still applies: "Do not use cuserid()." Corinna --=20 Corinna Vinschen Cygwin Maintainer --yAzUYvkKIfeS0jQX Content-Type: application/pgp-signature; name="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAlv/vysACgkQ9TYGna5E T6BR4RAAo6sEZ14MexXuirIizUKM3TQ5vk3Nk8aZm6coKSkJ/wdlk7NOQX7/CFJl EUZ/7vM3cZMsusT466PlgNNIcHuNWNjFNSxKML8G0+7/V4WlSureL/KcGFmUytTS FvTYyanNxPBJZvTRcJdb9/wXJPKYxJog1QyiuMHL+HvQ6QMrJXFD+W0zpZubyvKk Jpal7qF/YxTlmf4JsX1YpNV1BbRvj2QACmtljMKeOBA6ltvgIZdAqxL5UvEZkq1l LfYm/gZGpp+Tg/9JeVU5YC3mYZWnYnqznmpK3cQXhpLD94MIm/Xe1ldcLqBGqXcW NiA/vWcLWWQORLWttaXbzZfWRp9BkD6D+tBrGCFNVL+eWedNfkw0khpa7GFeqjum J1E2/c4rO/bSDEkdfAwdwRCqaDQ22b8bB3Q1lVahsPGzCPciJoqqswNAvsontlV6 9YZUve3gMKFmXPLNFrZcHvKMsVyWPq9Y79B50du3FGN6hJvHIkxdiy8lVYR6dOsg rzMpl+GVqFjpnr8CyajgAwFh80j7sAlwU+hsJXx0Yr/vScMAnDrBsG/TtOry3UjU fw2AQ4ouSa1N+W2yc6IeHBZImYAZplGwoH4DUPSGluU9ompLQMq7MUMmIA5MWS9k EwpPdUfCmmag/GadzqTZ8gBezdl7+naQQ7r3ZwgpBfDrpvpcuL0= =Vc2P -----END PGP SIGNATURE----- --yAzUYvkKIfeS0jQX--