From owner-freebsd-hackers Thu Apr 8 8:44:53 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from ns.tar.com (ns.tar.com [204.95.187.2]) by hub.freebsd.org (Postfix) with ESMTP id 4D630159F6 for ; Thu, 8 Apr 1999 08:44:48 -0700 (PDT) (envelope-from dick@ns.tar.com) Received: (from dick@localhost) by ns.tar.com (8.9.3/8.9.3) id KAA24828; Thu, 8 Apr 1999 10:42:45 -0500 (CDT) (envelope-from dick) Date: Thu, 8 Apr 1999 10:42:45 -0500 From: "Richard Seaman, Jr." To: "David O'Brien" Cc: hackers@FreeBSD.ORG Subject: Re: Linuxthreads "port" status and a request Message-ID: <19990408104245.G440@tar.com> References: <19990407102539.G467@tar.com> <19990407181328.A7059@nuxi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <19990407181328.A7059@nuxi.com>; from David O'Brien on Wed, Apr 07, 1999 at 06:13:28PM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Apr 07, 1999 at 06:13:28PM -0700, David O'Brien wrote: > > Solution to header problem > > -------------------------- > > 1) copying the existing pthread.h and pthread_np.h headers to a subdirectory > > (I've proposed /usr/include/pthread/uthread -- in case the FreeBSD kernel > > threads also produces a conflict, it could use /usr/include/pthread/kthread). > > Why not just rename pthread.h to linux_pthread.h and pthread_np.h to > linux_pthread_np.h ? Could be done. But, the POSIX pthread spec names pthread.h as the primary header file. This would require apps that want to be portable to have separate non-standard include files for FreeBSD. It would be a big PITA for port in the ports tree, as well as for other apps. With my proposed solution, people would still have to add -DLINUXTHREADS to the compile options, which would be "non-standard", but thats a lot easier that editing all the source files to have different headers. Plus, FreeBSD already makes life difficult because we require the non-standard -D_THREAD_SAFE compile option (most pthreads implementations require -D_REENTRANT if they require anything at all). > > > 2) installing a new top level pthread.h that looks like: > > > > #if defined(LINUXTHREADS) || defined(LINUXTHREAD) > > #include > > What if PREFIX was set to something other than "/usr/local" when the > person compiled the port? Then the user would have to add an additional compile option like: -I/nonstandard_prefix/include/pthread/linuxthreads in order for the app to find the right files. In fact, the main alternative to what I have proposed is simply to make them do this anyway using whatever PREFIX they chose, and not mess with the FreeBSD src tree. -- Richard Seaman, Jr. email: dick@tar.com 5182 N. Maple Lane phone: 414-367-5450 Chenequa WI 53058 fax: 414-367-5852 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message