Reputation: 83
I see this following line in /usr/include/arpa/inet.h:
extern char *inet_ntoa (struct in_addr __in) __THROW;
but where is it really defined?
Upvotes: 0
Views: 688
Reputation: 95449
The system headers merely declare the interface for invoking functions provided by the system. The actual implementation will be compiled into a (typically shared) library on the system. On some systems, the actual implementation is unavailable in source code form and proprietary. Fortunately, on GNU/Linux, FreeBSD, and Mac OS X, one can actually find the original implementation of inet_ntoa.
For GNU/Linux, it the implementation is part of the GNU C Library (glibc).
Upvotes: 5
Reputation: 115
It has been compiled and exists in Ws2_32.lib.
You could see what is a Library
Upvotes: 0