delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; q=dns; s= | |
default; b=lsOUilrGxbKj+J1ho9J/jG4BynU6UvFw5h1v6zrp6+LgzK9z5Y+bb | |
sQPqUfg5UgUNfE0hKH4gmeN8yglEairgkAMPfCMYbRN4cvQc+VN9pn0bfbhjkaUZ | |
uwpGXznSh9nvDBdtpLFQGZZd9HowsSbIEnItMAHP0jQkFYeUNnOvt4= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; s=default; | |
bh=2c6W2ltoW0QwScfSfTpvXxNrOAM=; b=UjDsHDsWXNqofFswEH93FsVGRkad | |
CQHLzTIPHV3U3epD7l7p0I/Yx0ils0irfttSFc09WFKkvAd6K0dwjAMYS18JOZGo | |
ISYXgA9lACn+sNiMO8xq14aT8e0eiC9NawaGyVzBd3hjpZ6aiIT7ws3HnH3fHpb/ | |
ULUasgw26/qpEhw= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
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 |
Date: | Thu, 29 Nov 2018 11:27:55 +0100 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: _GNU_SOURCE doesn't enable cuserid() declaration |
Message-ID: | <20181129102755.GA30649@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <20181129022242 DOT 3llewsc7gottm6yv AT mars DOT tony DOT develop-help DOT com> |
MIME-Version: | 1.0 |
In-Reply-To: | <20181129022242.3llewsc7gottm6yv@mars.tony.develop-help.com> |
User-Agent: | Mutt/1.9.2 (2017-12-15) |
--yAzUYvkKIfeS0jQX Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 AT mars:~/play$ cat testcuserid.c > #define _GNU_SOURCE > #include <stdio.h> >=20 > int main() { > puts(cuserid(NULL)); > return 0; > } > tony AT mars:~/play$ gcc -otestcuserid -Werror=3Dall testcuserid.c > tony AT mars:~/play$ ./testcuserid > tony > tony AT 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" -----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--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |