From owner-freebsd-current Fri Dec 4 01:58:53 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA14126 for freebsd-current-outgoing; Fri, 4 Dec 1998 01:58:53 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from smtp05.wxs.nl (smtp05.wxs.nl [195.121.6.57]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA14121 for ; Fri, 4 Dec 1998 01:58:51 -0800 (PST) (envelope-from asmodai@wxs.nl) Received: from chronias.ninth-circle.org ([195.121.56.71]) by smtp05.wxs.nl (Netscape Messaging Server 3.6) with ESMTP id AAA562A; Fri, 4 Dec 1998 10:58:33 +0100 Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <199812032343.PAA03354@devel.dns-host.com> Date: Fri, 04 Dec 1998 11:03:58 +0100 (CET) Organization: Ninth Circle Enterprises From: Jeroen Ruigrok/Asmodai To: Icom Development Subject: RE: libc_r pthread build problem Cc: current@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 03-Dec-98 Icom Development wrote: > Hi, > My "make" in /usr/src fails with the errors I have appended, > on uthread_mutex.c. Have I missed an update or is this a known problem? > > --- BEGIN INCLUDED TEXT --- > ===> lib/libc_r > cc -O -pipe -DLIBC_RCS -DSYSLIBC_RCS -I/usr/src/lib/libc_r/../libc/include > -DPTHREAD_KERNEL -D_THREAD_SAFE -DNOPOLL -I/usr/src/lib/libc_r/uthread > -D__DBINTERFACE_PRIVATE -DPOSIX_MISTAKE -I/usr/src/lib/libc_r/../libc/locale > -DBROKEN_DES -DYP -c /usr/src/lib/libc_r/uthread/uthread_mutex.c -o > uthread_mutex.o > /usr/src/lib/libc_r/uthread/uthread_mutex.c: In function > `pthread_mutex_init': > /usr/src/lib/libc_r/uthread/uthread_mutex.c:56: `PTHREAD_MUTEX_DEFAULT' > undeclared (first use this function) > /usr/src/lib/libc_r/uthread/uthread_mutex.c:56: (Each undeclared identifier > is reported only once > /usr/src/lib/libc_r/uthread/uthread_mutex.c:56: for each function it appears > in.) > /usr/src/lib/libc_r/uthread/uthread_mutex.c:78: `PTHREAD_MUTEX_NORMAL' > undeclared (first use this function) > /usr/src/lib/libc_r/uthread/uthread_mutex.c:79: `PTHREAD_MUTEX_ERRORCHECK' > undeclared (first use this function) > /usr/src/lib/libc_r/uthread/uthread_mutex.c:84: `PTHREAD_MUTEX_RECURSIVE' > undeclared (first use this function) > /usr/src/lib/libc_r/uthread/uthread_mutex.c:90: warning: unreachable code at > beginning of switch statement > /usr/src/lib/libc_r/uthread/uthread_mutex.c: In function > `pthread_mutex_trylock': > /usr/src/lib/libc_r/uthread/uthread_mutex.c:179: `PTHREAD_MUTEX_NORMAL' > undeclared (first use this function) > /usr/src/lib/libc_r/uthread/uthread_mutex.c:180: `PTHREAD_MUTEX_DEFAULT' > undeclared (first use this function) > /usr/src/lib/libc_r/uthread/uthread_mutex.c:181: `PTHREAD_MUTEX_ERRORCHECK' > undeclared (first use this function) > /usr/src/lib/libc_r/uthread/uthread_mutex.c:193: `PTHREAD_MUTEX_RECURSIVE' > undeclared (first use this function) > /usr/src/lib/libc_r/uthread/uthread_mutex.c:214: warning: unreachable code at > beginning of switch statement > /usr/src/lib/libc_r/uthread/uthread_mutex.c: In function > `pthread_mutex_lock': > /usr/src/lib/libc_r/uthread/uthread_mutex.c:248: `PTHREAD_MUTEX_NORMAL' > undeclared (first use this function) > /usr/src/lib/libc_r/uthread/uthread_mutex.c:257: `PTHREAD_MUTEX_ERRORCHECK' > undeclared (first use this function) > /usr/src/lib/libc_r/uthread/uthread_mutex.c:264: `PTHREAD_MUTEX_DEFAULT' > undeclared (first use this function) > /usr/src/lib/libc_r/uthread/uthread_mutex.c:294: `PTHREAD_MUTEX_RECURSIVE' > undeclared (first use this function) > /usr/src/lib/libc_r/uthread/uthread_mutex.c:329: warning: unreachable code at > beginning of switch statement > /usr/src/lib/libc_r/uthread/uthread_mutex.c: In function > `pthread_mutex_unlock': > /usr/src/lib/libc_r/uthread/uthread_mutex.c:358: `PTHREAD_MUTEX_NORMAL' > undeclared (first use this function) > /usr/src/lib/libc_r/uthread/uthread_mutex.c:359: `PTHREAD_MUTEX_DEFAULT' > undeclared (first use this function) > /usr/src/lib/libc_r/uthread/uthread_mutex.c:360: `PTHREAD_MUTEX_ERRORCHECK' > undeclared (first use this function) > /usr/src/lib/libc_r/uthread/uthread_mutex.c:377: `PTHREAD_MUTEX_RECURSIVE' > undeclared (first use this function) > /usr/src/lib/libc_r/uthread/uthread_mutex.c:401: warning: unreachable code at > beginning of switch statement > --- END INCLUDED TEXT --- I have cvsupped twice or thrice (about 6 hours in between) in between builds to make sure I didn't miss a commit... looking at the file uthread_mutex.c reveals two include files which might contain the PTHREAD declarations: pthread.h and pthread_private.h pthread.h contains the declarations after examination. Curious thing is that the datestamp is from November the 29th, just a day or two before the problems started... snip of pthread.h enum pthread_mutextype { PTHREAD_MUTEX_DEFAULT = 1, PTHREAD_MUTEX_RECURSIVE = 2, PTHREAD_MUTEX_NORMAL = 3, PTHREAD_MUTEX_ERRORCHECK = 4, MUTEX_TYPE_MAX }; This enumeration looks good to me... Now to look at uthread_mutex.c: #ifdef _THREAD_SAFE #include #include "pthread_private.h" Most logical conclusion I can make is that _THREAD_SAFE isn't defined somewhere... Else we would have the declarations of pthread.h at our disposal. Someone care to enlighten me some more on the matter? Because I have no clue where to look for the #define of _THREAD_SAFE. Also some more info upon what it's trying to do here might help my understanding somewhat better... It's trying to build up some sort of thread routines, I read through pthread(3) but cannot see what uthread is for then... --- Jeroen Ruigrok van der Werven/Asmodai asmodai(at)wxs.nl | Cum angelis et pueris, Junior Network/Security Specialist | fideles inveniamur *BSD & picoBSD: The Power to Serve... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message