From owner-freebsd-threads@FreeBSD.ORG Mon Mar 9 04:28:20 2009 Return-Path: Delivered-To: threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D874E106564A; Mon, 9 Mar 2009 04:28:20 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 95F608FC17; Mon, 9 Mar 2009 04:28:20 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.3/8.14.3/NETPLEX) with ESMTP id n2941IYh022532; Mon, 9 Mar 2009 00:01:18 -0400 (EDT) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.0 (mail.netplex.net [204.213.176.10]); Mon, 09 Mar 2009 00:01:19 -0400 (EDT) Date: Mon, 9 Mar 2009 00:01:18 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: David Xu In-Reply-To: <49B480F7.8040800@freebsd.org> Message-ID: References: <49B480F7.8040800@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: threads@freebsd.org, Pawel Worach Subject: Re: libthr does not obey WITHOUT_SYSCALL_COMPAT X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Mar 2009 04:28:21 -0000 On Mon, 9 Mar 2009, David Xu wrote: > Pawel Worach wrote: >> Hi, >> >> If libc is built using WITHOUT_SYSCALL_COMPAT applications linked with >> libthr end up having unresolved symbols since libthr references >> __fcntl_compat unconditionally. >> Here is a patch to make libthr also obey WITHOUT_SYSCALL_COMPAT >> http://www.vlakno.cz/~pwo/libthr.diff >> >> Regards > > Committed! I never got around to replying to this... I don't quite understand why __fcntl_compat is there. We have F_GETFD, F_SETFD, F_DUPFD, F_DUP2FD, F_GETFL, F_SETFL, F_GETOWN, and F_SETOWN according to fcntl(2). But thr_syscalls.c only handles F_DUPFD, F_SETFD, F_SETFL, F_GETFD, and F_GETFL, leaving F_DUP2FD, F_GETOWN, and F_SETOWN to be handled by the default case. And the default case does nothing now if WITHOUT_SYSCALL_COMPAT is defined. So how do F_DUP2FD, F_GETOWN, and F_SETOWN get handled? Do we really need to call __sys_fcntl_compat() from libthr? When did the ABI change, before or after libc.so.7? -- DE