delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/11/08/10:17:41

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=bcf2rjpZ9peOWDmppb08WONuHXFV+iJJgXKDZCVBkGJqtDxxFn3XP
fYEHWo9iPckxXwkaIQp5pzHLQ/ykdmn2+TDh2hqLVxiQO8AZj/FZF5qTadV7WDNc
97HgQ9dRZhzDgmL/DRtmq2NiRFUafXnMeYDoKcZpfVDgzixJpr5EAw=
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=U+ZUsTT8R43ZCYApVIYFWe7o7w0=; b=gdHydQpAAbYzpPPoLbGPBYYJvsth
IgxuWdeLNb8GlLnlKoDpeM8XqOGJwOzqRy6pJ1HMdaZrf40jW0UZ62wUFAQPxdTg
owa+IEX2BQwrAFFFSDjzYPrgWqUKVjCMKbF10X0zLLOle7KTuxthtdvj7zovmX2q
UU9stak5H3zgibg=
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-Virus-Found: No
X-Spam-SWARE-Status: No, score=-101.5 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=DOT, Ken, convincing, portable
X-HELO: drew.franken.de
Date: Tue, 8 Nov 2016 16:17:01 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: sys/cdefs.h or maybe gcc build issue
Message-ID: <20161108151701.GB31855@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <57cbf5e2-f37b-ae50-f65c-dd6782481962 AT gmail DOT com> <6ecdfff0-9f53-9cd6-9934-6237c153ea7b AT cornell DOT edu> <a4f02950-0178-4a83-482d-03452958e0a9 AT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <a4f02950-0178-4a83-482d-03452958e0a9@gmail.com>
User-Agent: Mutt/1.7.1 (2016-10-04)

--rwEMma7ioTxnRzrJ
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Nov  1 22:29, cyg Simple wrote:
> On 11/1/2016 3:42 PM, Ken Brown wrote:
> > On 10/30/2016 2:23 PM, cyg Simple wrote:
> >> The below sample code will give a warning that visibility isn't
> >> supported in this configuration.  Either the GCC build is incorrect or
> >> the sys/cdefs.h needs to be modified to define __hidden to empty.
> >>
> >> /********************************************/
> >> #include <sys/cdefs.h>
> >> #include <stdio.h>
> >>
> >> __hidden void hello (char * str) {
> >>     printf("%s %s\n", "Hello", str);
> >> }
> >>
> >> int main (int argc, char ** argv) {
> >>     hello("cruel world!");
> >> }
> >> /********************************************/
> >=20
> > If you're trying to write portable code, why would you assume that
> > __hidden is defined?  It's not defined in glibc, for example, and your
> > sample program doesn't compile on Linux:
> >=20
> > $ gcc test.c
> > test.c:4: error: expected =E2=80=98=3D=E2=80=99, =E2=80=98,=E2=80=99, =
=E2=80=98;=E2=80=99, =E2=80=98asm=E2=80=99 or =E2=80=98__attribute__=E2=80=
=99 before
> > =E2=80=98void=E2=80=99
> >=20
> > Do you have a real use case where this issue came up?  The sample isn't
> > very convincing as it stands.
>=20
> I don't in the real case sense but in Cygwin __hidden is defined.  And
> obviously it is incorrectly defined in _YOUR_ Linux.  If the visibility
> attribute isn't supported by the GCC compiler these helper macros
> shouldn't be defined as if they were.

Fixed in the repo.


Thanks,
Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--rwEMma7ioTxnRzrJ
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJYIextAAoJEPU2Bp2uRE+gJE4QAJeIZZw3o3bkTa7e+Htxlf4v
jNAg454Ny3kvh8za3lc3VZAiy5HPDCWzTkjAGFLSNBaAhKcP+W2vMK13gitZBBDu
itM9MvW8k3GbVkthJPEfLLaqabx25mO0vmckhdKXh9+GlZ4olSGsIdTLiYscDrXW
QZw8HtO3gnFvqDHhE107AeTzw51Mtu80g4PTZPaxq7pDwTTrIccbX4pU5Bsk+1vV
mfJcw3m9XAQqAdvhQYLrVx1hwwELHvKx3J7yFNkVJPWiq3vOIZx1SQ8huHOccW5s
agag6KNS3Rj0bky16txFZSk7JEF0rY5QSUn42JBmuW+zqx0TZGIVqzifdUKhkNth
5isWapv3SfS/n9dxATDTvUlqep7iCTs8WPNOI6QdgVhJhmMBVZBt8ts9jpTrGM75
odhB1+DKPyVSEX1wgjaJ2DIq3320JEgHXaOYW1IzblMac4afNUixn8OD8tf9xEcw
zHBRk54x8IyrJbRSfTYQ6OPhEvSrocohyT9n6k9WVv15EPOfTjq9O7NB2VbtJHTO
ngq0V0X6b8H5g2jOH01WDfGDyjgfogsogMRS6Wfz5ct5RboP3/nNR1OvPNjL+jtO
9rKgFUi5ey78Oc3SdB9q+enayEyZgDbJfWEZbWIIbGGUc24AIyFyEymlSrgCGDS6
BE8T/XD3sA6tq/pA3BHv
=B/AN
-----END PGP SIGNATURE-----

--rwEMma7ioTxnRzrJ--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019