delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/11/01/22:30:10

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=ONaHVMyZpQpsKUDR
EvUIXkCOXn4UgGmnWtIsD2j7n27h26zP4jONEEFyKo4d5nPj3zVVjDG2nU1Smq/c
+Z2+sLTmC0iTVsqLjKneSlT4M2lDZFx8lRbYS9BBUeJlt9r0yebTuND0Ec0jNnQ7
MxTgUWTsctYukimE2g0qTnCnEVQ=
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=UKZSCgihRJXw4J8i/0Wg0a
noAiA=; b=UlefjtfKMTtZNWx+H+5U3l+Fl3VVSLt3mx+6qaLNmWhzON3ZAo+pEz
35qqdgGlPQUtL5MdfvHPAIs+7GdHE9Bkp/FNg6uisA7cLQ0hfvuagYbWomOeNOw1
fKnVRnq7m+mIJjXJifrOiGf4BnQAqQ689q3cshWj720xVlaKfeHWI=
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.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=Ken, incorrectly, Hx-languages-length:1318, H*MI:sk:6ecdfff
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=TlA1arJO3HAi+YA+kiLmIEx8cWXjn5DFwkXtFmWbvsw=; b=SySQ5pQtYYyvbAMM+xZ+VcCSqy1K+k8U9nG0uO/yH0y8IW2hF5ZEf5qdKDPjtRHPZl h+drQykMpjw0sMjA5k/EyN4PJNbIYRIAfZahrtG/7LCs8EcykxXB3SoLna9u4NOgf+7U N2Qlw3b96fV/poJxRGO97zhiP/iI/iUQ4fy5JSuM153Ueo2/DsTE7G0TzBW8IYQsctRE 4dqlAPEagVbkF40T5UU7ZruQRYAvuFuxyyuFHFPMdjci2wRmc+1+kb4Upk9gO/9rPwqJ X+egZA7gjo+Pik3ky2cWOIreEZ2fIvarFic/PqvQW/jLXgXHJuEC1kTCBdoRklMTcsXX 7OZQ==
X-Gm-Message-State: ABUngveJWZ6ciPs+vx9nuuD4D3xe/cZThVs+JlRMrDl5F+l24hkw59wR1CeRJ77t348a0g==
X-Received: by 10.107.15.153 with SMTP id 25mr1757281iop.168.1478053780997; Tue, 01 Nov 2016 19:29:40 -0700 (PDT)
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>
From: cyg Simple <cygsimple AT gmail DOT com>
Message-ID: <a4f02950-0178-4a83-482d-03452958e0a9@gmail.com>
Date: Tue, 1 Nov 2016 22:29:28 -0400
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: <6ecdfff0-9f53-9cd6-9934-6237c153ea7b@cornell.edu>
X-IsSubscribed: yes

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.

-- 
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