From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8584 invoked by alias); 28 Jul 2005 20:33:12 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 8574 invoked by uid 22791); 28 Jul 2005 20:33:09 -0000 Received: from mail.ut.sco.com (HELO mail.ut.sco.com) (216.250.130.2) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Thu, 28 Jul 2005 20:33:09 +0000 Received: (qmail 28123 invoked from network); 28 Jul 2005 20:33:07 -0000 Received: from mail.sco.com (216.250.130.37) by mail.ut.sco.com with SMTP; 28 Jul 2005 20:33:07 -0000 Received: from mail.sco.com (localhost [127.0.0.1]) by localhost (Postfix) with ESMTP id 97F37154AA05; Thu, 28 Jul 2005 14:33:01 -0600 (MDT) Received: from [127.0.0.1] (sillenius.vpn.sco.com [192.168.252.123]) by mail.sco.com (Postfix) with ESMTP id 9212C154AA04; Thu, 28 Jul 2005 14:33:00 -0600 (MDT) Message-ID: <42E940FA.8020301@sco.com> Date: Thu, 28 Jul 2005 20:33:00 -0000 From: Kean Johnston Reply-To: jkj@sco.com User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) MIME-Version: 1.0 To: Gabriel Dos Reis Cc: Mike Stump , gcc@gcc.gnu.org Subject: Re: Guidance please: static or extern __inline__ References: <42E903E5.4040905@sco.com> <99167485-19FC-46B4-985E-6FC48D385898@apple.com> <42E93543.2040006@sco.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-07/txt/msg01189.txt.bz2 > So, can I summarize your question as a way of trying to make "open" > and alias for open32 or open63 and not having to get into the trap of > different function address? If yes, does glibc's weak_alias would > work for you without creating new problems? Yeah thats pretty much it, but I dont think weak aliasing is the trick (if I understand what you mean by weak aliasing -- if you mean something other than #pragma weak then ignore the next paragraph). The problem with weak symbols is that they are only really useful at link-edit time, and then only if you want to override the symbol with one of your own. Considering that you offered weak_alias as a solution, I am guessing that you are not talking about simple weak symbols. I need this to be resolved at compile time (so that we call the right version of open, stat, whatever) without getting into the CPP namespace quagmire. But you said "glibc's weak_alias" ... I think that puts me out of the running considering this is a SCO platform :( This has to inteface with our libc (this wont be the first or last time I have wished I could use glibc). I think for right now, I am going to go with the extern inline and always_inline approach, and test the hell out of the beast, with as much code as I can (testsuites and stuff like php, apache, postgresql, Xorg, KDE, Xalan, Xerces). If those all work I will consider my work done :) If it doesn't work its trivial to adjust the fixincludes stuff to use static inline, and I will do so before I submit my patches. Kean