single function with multiple names

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:single function with multiple names

Post by Candy »

B1FF wrote: >Is it possible in C/C++ to create a function with more than one function name?

Code: Select all

typedef unsigned pid_t;
int kill(pid_t pid) { return pid; }
int killp(pid_t pid) __attribute__((weak, alias("kill")));
even though it's GCC++, thanks man! now back to coding (and cleaning, and laundry... living on your own isn't just fun)
Post Reply