From owner-freebsd-threads@FreeBSD.ORG Fri Apr 21 21:20:54 2006 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EBF3216A402 for ; Fri, 21 Apr 2006 21:20:54 +0000 (UTC) (envelope-from rand@meridian-enviro.com) Received: from newman.meridian-enviro.com (newman.meridian-enviro.com [207.109.235.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 632CF43D46 for ; Fri, 21 Apr 2006 21:20:54 +0000 (GMT) (envelope-from rand@meridian-enviro.com) X-Envelope-To: Received: from delta.meridian-enviro.com (delta.meridian-enviro.com [10.10.10.43]) by newman.meridian-enviro.com (8.13.1/8.13.1) with ESMTP id k3LLKrgF052010 for ; Fri, 21 Apr 2006 16:20:53 -0500 (CDT) (envelope-from rand@meridian-enviro.com) Date: Fri, 21 Apr 2006 16:20:51 -0500 Message-ID: <8764l2pqvg.wl%rand@meridian-enviro.com> From: "Douglas K. Rand" To: freebsd-threads@freebsd.org User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/21.3 (i386--freebsd) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: ClamAV 0.88/1412/Fri Apr 21 15:33:41 2006 on newman.meridian-enviro.com X-Virus-Status: Clean Subject: Gnu PTH on FreeBSD 6.0 X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Apr 2006 21:20:55 -0000 I've been trying to get Nagios to use the pthreads implementation from GNU's PTH library rather than FreeBSD's. Even a trivial program, such as: #include #include #include produces syntax errors: $ cc -c -I/usr/local/include/pth x.c In file included from x.c:3: /usr/local/include/pth/pthread.h:285: error: conflicting types for 'pthread_t' /usr/include/sys/_pthreadtypes.h:64: error: previous declaration of 'pthread_t' was here /usr/local/include/pth/pthread.h:286: error: conflicting types for 'pthread_attr_t' /usr/include/sys/_pthreadtypes.h:65: error: previous declaration of 'pthread_attr_t' was here /usr/local/include/pth/pthread.h:288: error: conflicting types for 'pthread_once_t' /usr/include/sys/_pthreadtypes.h:71: error: previous declaration of 'pthread_once_t' was here /usr/local/include/pth/pthread.h:289: error: conflicting types for 'pthread_mutexattr_t' /usr/include/sys/_pthreadtypes.h:67: error: previous declaration of 'pthread_mutexattr_t' was here /usr/local/include/pth/pthread.h:290: error: conflicting types for 'pthread_mutex_t' /usr/include/sys/_pthreadtypes.h:66: error: previous declaration of 'pthread_mutex_t' was here /usr/local/include/pth/pthread.h:291: error: conflicting types for 'pthread_condattr_t' /usr/include/sys/_pthreadtypes.h:69: error: previous declaration of 'pthread_condattr_t' was here /usr/local/include/pth/pthread.h:292: error: conflicting types for 'pthread_cond_t' /usr/include/sys/_pthreadtypes.h:68: error: previous declaration of 'pthread_cond_t' was here /usr/local/include/pth/pthread.h:293: error: conflicting types for 'pthread_rwlockattr_t' /usr/include/sys/_pthreadtypes.h:73: error: previous declaration of 'pthread_rwlockattr_t' was here /usr/local/include/pth/pthread.h:294: error: conflicting types for 'pthread_rwlock_t' /usr/include/sys/_pthreadtypes.h:72: error: previous declaration of 'pthread_rwlock_t' was here It seems that revision 1.92 of sys/types.h now includes sys/_pthreadtypes.h, which conflicts with PTH's pth/pthread.h. Is there anyway to use GNU PTH's pthread implementation on FreeBSD 6.1? History as to why I'm trying this can be found at: http://www.freebsd.org/cgi/getmsg.cgi?fetch=165398+171880+/usr/local/www/db/text/2005/freebsd-hackers/20050821.freebsd-hackers