From owner-freebsd-questions@FreeBSD.ORG Fri Oct 28 08:27:12 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4199916A41F for ; Fri, 28 Oct 2005 08:27:12 +0000 (GMT) (envelope-from spamrefuse@yahoo.com) Received: from web36214.mail.mud.yahoo.com (web36214.mail.mud.yahoo.com [209.191.68.240]) by mx1.FreeBSD.org (Postfix) with SMTP id D4DA243D45 for ; Fri, 28 Oct 2005 08:27:11 +0000 (GMT) (envelope-from spamrefuse@yahoo.com) Received: (qmail 18914 invoked by uid 60001); 28 Oct 2005 08:27:11 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Oo6AJHYt+XJrgEMp7UgkeqCn/LZWE+72OaYGp/KTr4ACeqIVITDD7k2Ul5pf+1IN4Hg++Jed4TjrZMuWQBT2SDbxg7B9aho6JgngOVWy4UB+2P1w8QrtnT77jI63Wmi4WBEoEnxB+uiaez+72qJEq/uRYNJXmGtPC1Dt8opzSvk= ; Message-ID: <20051028082711.18912.qmail@web36214.mail.mud.yahoo.com> Received: from [147.46.44.181] by web36214.mail.mud.yahoo.com via HTTP; Fri, 28 Oct 2005 01:27:11 PDT Date: Fri, 28 Oct 2005 01:27:11 -0700 (PDT) From: Rob To: Igor Robul , FreeBSD questions In-Reply-To: <4361DCA6.7030201@speechpro.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: Subject: Re: math/grace port: "libXcursor.so.1.0" not found ?? [SOLVED] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2005 08:27:12 -0000 --- Igor Robul wrote: > Rob wrote: > > >> > >>The dlsym() function returns a null pointer if the > >>symbol cannot be > >>found, and sets an error condition > >> which may be queried with dlerror(). > >> > >> > > > >This is a matter of symantic and logic. > > > >I /can/ read this as follows: > > > >If the symbol cannot be found, then dlsym() returns > >a null pointer *AND* sets the error condition. > > > > > Ok, English is not my native language, and I even > had not learned it in > school :-). Neither is it for me, though I had some English language classes at high school. However, I assume everybody to understand the language of logic and symantics when it comes to computer problems :). > >However, dlsym() can also return the null pointer, > >*WITHOUT* setting the error condition. The latter > >case seems to be better specified in the Linux > >manpages of dlsym(). Hence the conflict between > >FreeBSD and Linux/Grace, I guess. > > > > > Maybe. But I see conflict in using > previous/non-grace result from dlerror(), which > I think grace should not do. Indeed, so the proper way is to call dlerror() prior to a dlsym() call, to reset any previous error condition. Something like this: /* clear error condition */ dlerror(); /* use dlsym and check for error */ data = dlsym(....); if ( (error = dlerror()) != NULL ) { errmsg(error); return FAILURE; } Rob. __________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com