All of lore.kernel.org
 help / color / mirror / Atom feed
From: Norm Jacobs <Norm.Jacobs@Sun.COM>
To: Michael Sweet <mike@easysw.com>
Cc: printing-architecture@lists.freestandards.org, "McDonald,
	Ira" <imcdonald@sharplabs.com>
Subject: Re: [Printing-architecture] Required prefixes for symbols in new OP	specs
Date: Wed, 07 Feb 2007 21:01:19 -0600	[thread overview]
Message-ID: <45CA927F.2080306@Sun.COM> (raw)
In-Reply-To: <45CA2DDF.5000106@easysw.com>

Michael Sweet wrote:
> McDonald, Ira wrote:
>   
>> Hi Olaf,
>>
>> What prefix (if any) are you currently using for PCM
>> functions, variables, and constants?
>>
>> There was a strong concensus at the OP Steering Committee
>> meeting this Monday that we should NOT use 'fsg' as the
>> beginning of the prefix for any specs that are not yet 
>> formally approved.
>>
>> Relative to Michael Sweet's comment about #define to 
>> make consistent prefix (e.g., in existing JTAPI C headers),
>> that may or may not fix problems of linkers - dynamic
>> linking in Linux appears rather limited relative to some
>> other platforms - my impression.
>>     
>
> This isn't an issue - you define the new prefix to point to
> the old name, e.g.:
>
>      #define opjt_foo fsgjt_foo
>
> The compiler and linker use the old names, as before.  The
> developer can use the new names and be none the wiser.
>   
FWIW, this will work for applications linking with libraries exporting 
the old interface, but will not solve the problem for loadable modules 
that are dlopen()'d and dlsym()'d.  In those cases, the shim method you 
mention below will work or using weak symbol associations in the 
loadable module will work.  the weak symbols have the advantage of not 
introducing any additional calling overhead.

This can be done with

#pragma weak   new_symbol_name = old_symbol_name

Of course if we don't migrate to new names, none of this matters.

          -Norm

> Another method is to provide shim functions for all of the
> old names, calling the new names.  That has a performance
> impact, however, so I recommend using #define instead.
>
> Enumerations and other constants can be done the same way...
>   


  reply	other threads:[~2007-02-08  3:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-07 17:27 [Printing-architecture] Required prefixes for symbols in new OP specs McDonald, Ira
2007-02-07 19:51 ` Michael Sweet
2007-02-08  3:01   ` Norm Jacobs [this message]
2007-02-08  3:16     ` Michael Sweet
2007-02-07 23:20 ` Olaf Meeuwissen
  -- strict thread matches above, loose matches on Subject: below --
2007-02-07 17:36 McDonald, Ira
2007-02-07 23:43 ` Olaf Meeuwissen
2007-02-08  0:07   ` TORATANI Yasumasa
2007-02-07 17:33 McDonald, Ira
2007-02-06 17:04 McDonald, Ira
2007-02-07  0:59 ` Olaf Meeuwissen
2007-02-07  5:19 ` TORATANI Yasumasa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45CA927F.2080306@Sun.COM \
    --to=norm.jacobs@sun.com \
    --cc=imcdonald@sharplabs.com \
    --cc=mike@easysw.com \
    --cc=printing-architecture@lists.freestandards.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.