Same subroutine, different names in C ?

Suu Quan hplshq quan at hpcmfs.CORP.HP.COM
Fri Feb 16 06:27:57 AEST 1990


 C or Ansi-C question

In assembly language, you can assign several symbols the same entry point.
The effect is that you can have the same subroutine take several external
names.

How do you do that in C?

In other words, I want to create a library xxx.a that contains
a subroutine s(parm1, parm2). Any one using it can use it as

s(parm1,parm2)  or
__sss(parm1,parm2)


PS : I don't want to tell the user to use tricks like
     - #define s _sss
     - #include <my-include>
       and my-include will have the necessary pointers to do the job.



More information about the Comp.unix.questions mailing list