libreplace: replace inet_ntoa() when it is missing
authorMichael Adam <obnox@samba.org>
Tue, 18 Mar 2008 11:16:47 +0000 (12:16 +0100)
committerMichael Adam <obnox@samba.org>
Tue, 18 Mar 2008 15:30:15 +0000 (16:30 +0100)
commit974c0c45ad42644348e0b55454715b12158f1028
treea7e5ec4196beb586138608c5b08211f0eff458bc
parentcca5d6626fe395f08fd4c8b2344e4e43646cb987
libreplace: replace inet_ntoa() when it is missing

...not only replace it when it is broken.

This moves the defintion of rep_inet_ntoa from replace.c
to inet_ntoa.c and adds configure checks for existence
of inet_ntoa(). Checks are moved to an include file of its own.

NOTE: The original rep_inet_ntoa in replace.c was wrapped
into a "#ifndef WITH_PTHREADS" but the prototype in replace.h
and the define in system/network.h were not. I removed that
ifndef since the inet_ntoa() function is usually not thread safe
anyways, since it returns a pointer to a static buffer.

So whoever calls inet_ntoa() should be aware that it is not
thread safe anyways.

Michael
source/lib/replace/inet_ntoa.c [new file with mode: 0644]
source/lib/replace/inet_ntoa.m4 [new file with mode: 0644]
source/lib/replace/libreplace.m4
source/lib/replace/replace.c
source/lib/replace/replace.h
source/lib/replace/system/network.h