From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20732 invoked by alias); 1 Nov 2016 19:42:47 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 20704 invoked by uid 89); 1 Nov 2016 19:42:46 -0000 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 Received: from limerock02.mail.cornell.edu (HELO limerock02.mail.cornell.edu) (128.84.13.242) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 01 Nov 2016 19:42:45 +0000 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite3.serverfarm.cornell.edu [10.16.197.8]) by limerock02.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id uA1JghNX001310 for ; Tue, 1 Nov 2016 15:42:43 -0400 Received: from [10.13.22.4] (50-192-26-108-static.hfc.comcastbusiness.net [50.192.26.108]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id uA1JgffU005684 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Tue, 1 Nov 2016 15:42:42 -0400 Subject: Re: sys/cdefs.h or maybe gcc build issue To: cygwin@cygwin.com References: <57cbf5e2-f37b-ae50-f65c-dd6782481962@gmail.com> From: Ken Brown Message-ID: <6ecdfff0-9f53-9cd6-9934-6237c153ea7b@cornell.edu> Date: Tue, 01 Nov 2016 19:42:00 -0000 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 X-SW-Source: 2016-11/txt/msg00004.txt.bz2 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