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=jJLkz7QImKMKwRT6 C4SQY+i/IweXOtR8bAB/rzjVk8ZhB5yAJzc5zpvJkssjwDB7mUMqSuMBcjDT3CGk /QylSFofTPYntnKdds5GzPyuGXV+NozHnZIJRfn7VuGggSuGfMzoAlN35X9WWIVd CXmrOXhbEMtwqc38wTUJW1KRbmU= 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=2wuulgNdRdUofa4OxpbvfB pjrdY=; b=gblacFt8/CMi4Ud6kT9b8HgyFcX7hgJL0C320JvXHd/icHZoHnqlqN Y0iqbRRt5f0BYcDjjNcQS6L6jaUOAMd8qfWZeyl7Ln8v0RSCsvddBQKd48RC0Pf5 L9MRTK52rKIYweTFSa1JKhrNzo6tyuB2LrbIlBdapI9mj6FdLdGVY= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=-4.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=H*Ad:D*cornell.edu, H*r:8.12.10 X-HELO: limerock02.mail.cornell.edu X-CornellRouted: This message has been Routed already. 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> From: Ken Brown Message-ID: <6ecdfff0-9f53-9cd6-9934-6237c153ea7b@cornell.edu> Date: Tue, 1 Nov 2016 15:42:40 -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: <57cbf5e2-f37b-ae50-f65c-dd6782481962@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-PMX-Cornell-Gauge: Gauge=X X-PMX-CORNELL-AUTH-RESULTS: dkim-out=none; X-IsSubscribed: yes 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 > #include > > __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. Ken -- 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