I'm a new programer.When I try to read the source file of gethostbyname() in getXXbyYY.c,glibc , I found a function about macro.
INTERNAL (REENTRANT_NAME) (ADD_VARIABLES, &resbuf, buffer,buffer_size, &result H_ERRNO_VAR)
It can be resolved by following macros to be __gethostbyname_r().
#define REENTRANT_NAME APPEND_R (FUNCTION_NAME)
#define APPEND_R(name) APPEND_R1 (name)
#define APPEND_R1(name) name##_r
#define INTERNAL(name) INTERNAL1 (name)
#define INTERNAL1(name) __##name
Then I try to find the implementation of __gethostbyname_r(), but I just found the prototype in netdb.h.
So, I want to know where is the implementation of __gethostbyname_r() and what will it do ?