From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11103 invoked by alias); 20 Feb 2013 17:01:06 -0000 Received: (qmail 11080 invoked by uid 22791); 20 Feb 2013 17:01:05 -0000 X-SWARE-Spam-Status: No, hits=-5.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-we0-f174.google.com (HELO mail-we0-f174.google.com) (74.125.82.174) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 20 Feb 2013 17:00:59 +0000 Received: by mail-we0-f174.google.com with SMTP id r6so6820685wey.5 for ; Wed, 20 Feb 2013 09:00:58 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.180.8.197 with SMTP id t5mr35639659wia.27.1361379658327; Wed, 20 Feb 2013 09:00:58 -0800 (PST) Received: by 10.217.6.69 with HTTP; Wed, 20 Feb 2013 09:00:58 -0800 (PST) In-Reply-To: <51242375.1070904@homemail.com.au> References: <5122CF4E.1050301@homemail.com.au> <51242375.1070904@homemail.com.au> Date: Wed, 20 Feb 2013 17:01:00 -0000 Message-ID: Subject: Re: feature request: not need to specify PTW32_STATIC_LIB for static usage possible ? From: Roger Pack To: Ross Johnson Cc: pthreads-win32@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact pthreads-win32-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sourceware.org X-SW-Source: 2013/txt/msg00004.txt.bz2 > Sounds like you wanted to address this to the list but I think you > replied only to me. oops, moving back on list...suggest the ML be modified so the default reply-to is the ML :) > In Linux, the usual 'static' qualifier on declarations controls > visibility, regardless of dynamic or static linking but is restricted to > a file (or perhaps more accurately a compilation unit). If this isn't > convenient then GCC 4 and above recognise __attribute__ > ((visibility("hidden"))), and also "#pragma GCC visibility > push(hidden)/#pragma GCC visibility pop" for block coverage in e.g. > header files. Otherwise everything is visible by default. > > So I believe GNU can build a Windows dynamic or static library using the > merged pthread.c after adding 'static' qualifiers where necessary, but I > don't know off-hand if this works for MSVS. If it does, i.e. replace the > need for _declspec(export/import), then we probably have a solution. Yeah I know for FFmpeg they ended up basically "having" to use _declspec at least for shared constants (for the rest I guess there was some way around it, using their av_export symbol, but I'm no pro here :) I suppose the status quo is all right for now, thanks. -roger-