Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com Date: Tue, 20 Mar 2001 15:26:13 +0100 From: Corinna Vinschen To: cygwin-developers AT cygwin DOT com Subject: Re: YANDQ Message-ID: <20010320152613.A17995@cygbert.vinschen.de> Reply-To: Corinna Vinschen Mail-Followup-To: cygwin-developers AT cygwin DOT com References: <006501c0b120$094af0f0$0200a8c0 AT lifelesswks> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <006501c0b120$094af0f0$0200a8c0@lifelesswks>; from robert.collins@itdomain.com.au on Tue, Mar 20, 2001 at 08:27:45PM +1100 On Tue, Mar 20, 2001 at 08:27:45PM +1100, Robert Collins wrote: > YetAnotherNewDeveloperQuestion (couldn't see anything obvious in the > archives either) > > The posix specs I'm reading http://www.opengroup.org/onlinepubs/7908799/ > indicate that most of the types I'm working with (sem_t pthread_*_t) > should be defined in with only the prototypes and #defines > in the respective header files. > > Are these specs way of base? If not, how do I go about altering > sys/types.h (which I note appears to be part of newlib). We could introduce a #ifdef __CYGWIN__ #include #endif into newlib's sys/types.h and then you can use cygwin/threads.h as you like. > > The question arises because I have an external typedef which is > different from the internal typedef. While I could type cast everything > to make it match up (class pthread ** to void ** for instance) it reads > a lot more easily (which helps debugging) with no casting involved. > > FYI the external typedefs are of the form > typedef void * foo_t > and the internal ones > typedef class foo * foo_t. You could use #ifdef __INSIDE_CYGWIN__ typedef class foo * foo_t; #else typedef void * foo_t; #endif Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc.