This is just a curiosity question and could be a bit of topic.
Why is it that most libraries (like glibc) prefix all their
functions with __. Even the ones that will eventually be exported.
I've come up with two possible reasons:

1) avoid global namespace polution. This can also be avoided
by grouping more functions into files and declaring some of then
static.
2) avoid problems with interposing. So that when a user defines
a function of the same name the internals of the library are
not affected because it uses the same function but with __ in
front of it.

Which one of these reasons most relevant? Are there other ones?

Thanks.


_______________________________________________
Bug-hurd mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-hurd

Reply via email to