delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/11/23/06:06:30

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
X-Spam-Score: -88.153
Message-ID: <492938E8.30603@sh.cvut.cz>
Date: Sun, 23 Nov 2008 12:05:12 +0100
From: Vaclav Haisman <v DOT haisman AT sh DOT cvut DOT cz>
User-Agent: Thunderbird 2.0.0.17 (X11/20081017)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: pthread_t
References: <003a01c94d55$62193d70$4001a8c0 AT mycomputer>
In-Reply-To: <003a01c94d55$62193d70$4001a8c0@mycomputer>
OpenPGP: id=63B6B297
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com
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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

John Emmas wrote:
> I'm trying to compile a program in which pthread_t is expected to be
> 
> typedef long unsigned int pthread_t;
The program is wrong. The pthread_t type is opaque. You should not
expect anything.

> 
> the program builds fine under Linux but when I try to compile under
> Cygwin I see this error:-
> 
>    conflicting declaration 'typedef long unsigned int pthread_t'
>    pthread_t has a previous declaration of
>    'typedef struct __pthread_t* pthread_t'
> 
> The file, /usr/include/cygwin/types.h does define it like this, although
> /usr/include/sys/types.h defines it differently:-
> 
> typedef __uint32_t pthread_t
> 
> which seems a bit closer to what I was expecting.
> 
> I just wondered which declaration I should really be using for cygwin?  The
> declaration in sys/types.h or the one in cygwin/types.h ?
The only header that you should use to get pthread_t type is pthread.h.

> 
> Thanks,
> 
> John
> 

- --
VH
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iFYEAREIAAYFAkkpOOgACgkQhQBMvHf/WHmDLgDggUrzyrsJIomR9G1WOSq7Js4S
ifuy389vrGLf9wDdHluBYtRi/LBRYvjeNWd9eVzJn4KrzWkIgYb96Q==
=/aqi
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019