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

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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=XTneiZYkgiwuAZkz
5LjMBPgy2Q/MqyhRDYRvTIrzo/ZAWHwBMG4LNb4RdoyV64JGNUDf3mItZFAk98ys
B0IqjV62QkP6qOh95Trju3AF9qbIA8M0cFd7hmfTYs2Xs2DnbBz2Nltnvya4CpXz
yvx0cb3jV6HrCuHjF4eFw418xIU=
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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=5AXoRbR6J2a9uQSQH5FARy
dmY44=; b=Ss2SUouu8OzMMOnY8MyKJfNsqQOMN69rAKCWipA7xAVXaTYT1ojZ3T
miaXo/sMqcJ0Vt68/QunbhG8V9sfmxMdMLV5sBFYPeQz29d9Go/MPZRGLTX/R04D
YMtD6ZCIF5KtqFsEcB4NaGknavLZrLcy8oU5e4zJG8swMCxa+ysLQ=
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=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=portable
X-HELO: mail-it0-f44.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=+FILyklc9WwQLbt3ysAm4+7FUBtLe1kpBjJ2/mjwOJ0=; b=lfdJ0UDcvhuLiNjBRS0DZ/TrdKJCRyCigy4zTu/ReDdVoRYNWz6LJtZlaI3NC0c8yF 2qwT41HbAOLkyc46lQpooCRUCCsiQ3p0p+hV1aQswgU7UPE7OmL/hfPn3+BdfdV5aVTt eJnOJwAWiWxEW6nhAWdR6W6gmM0HSju+Cv0w6v77b3TiWw1eVxs9QNnX5XwWdAs9YoPw nq1sWH8xZsc31Vhw/7OEGldIrD1IpMSAsbOI0P32cqRbxNzyd6nZDcExJoXNNLXQqX5y dNa8lJRcaeMKEkPfsh/tGIfytbZJlpeEH+I5WL1qkCI342GNjMgmwm3AhSsyGidGTSxM r2XA==
X-Gm-Message-State: ABUngvcFINRYldRorDXNZxdqY7+UnblBZHBh92lq55gAGMTM3J3I9Ig5p/3TziGmABWagg==
X-Received: by 10.107.136.86 with SMTP id k83mr15315639iod.99.1478657389854; Tue, 08 Nov 2016 18:09:49 -0800 (PST)
Subject: Re: sys/cdefs.h or maybe gcc build issue
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> <20161108151701 DOT GB31855 AT calimero DOT vinschen DOT de>
From: cyg Simple <cygsimple AT gmail DOT com>
Message-ID: <d79e2ea5-759c-9bd0-ddeb-5c33a2243f84@gmail.com>
Date: Tue, 8 Nov 2016 21:09:45 -0500
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0
MIME-Version: 1.0
In-Reply-To: <20161108151701.GB31855@calimero.vinschen.de>
X-IsSubscribed: yes

On 11/8/2016 10:17 AM, Corinna Vinschen wrote:
> 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!");
>>>> }
>>>> /********************************************/
>>>
>>> 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:
>>>
>>> $ gcc test.c
>>> test.c:4: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
>>> ‘void’
>>>
>>> Do you have a real use case where this issue came up?  The sample isn't
>>> very convincing as it stands.
>>
>> 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, in a few months I can remove my #ifdef __CYGWIN__ to #undef and
#define it.

-- 
cyg Simple

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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