I have been trying to find out if inet_ntop is reentrant or not. I seem to get varying responses on the different sites I found when googling.
I am sure versions of the library matter but I am not exactly sure what version I have and am not sure how to tell. If someone can tell me how to find out the library version I can provide that info as well.
Thanks for the help.
Unlike inet_ntoa, inet_ntop takes a pointer to the result buffer. The reason this was done was almost certainly to provide re-entrancy.
Originally Posted by stevfletchcom
Thanks for the reply. That helps out a lot. It eliminates a large possible area of bugs for me in the code.
Another related question.
Is there an easy way to tell if a library function is threadsafe and or reentrant?
I have some callback functions that need to be thread safe and reentrant, apparently there is a difference between the two, and I am not sure if I can use some standard library functions within the callback functions.