[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: library fuction calls

Dwivedi Ajay kumar forced the electrons to say:
> 	Now I am thinking of compiling the glibc and rename connect.S (for
> the i386 linux) to some psedoconnect.S, make my connect.c call
> psedoconnect ... Will it work? and good pointers about hacking glibc?

I have a really good pointer about hacking glibc - dont do it. glibc is
a really huge and messy piece of software, without which your computer
will not function at all. A compile usually takes a few hours on a
normal system (I have noticed that it takes more time than the kernel
or gcc). One gotcha and you have effectively trashed your system. You
don't know what will break where if you change even the simplest of

You can rest assured that connect() in glibc is written in the best
possible way, you may not be able to improve upon the implementation. If
what you need is error checking, I am sure all the current programs on
your system do that anyway; and if you want any further programs that
you write to use your connect, then put it in a library of your own
and link that in your code. There is not much that you can achieve by
trapping all calls to connect in your library. Unless you have a really
interesting idea.