libreplace: replace inet_ntoa() when it is missing
commitf46f3e485a7d5dccfcc05c8b4de6c1339f79aa73
authorMichael Adam <obnox@samba.org>
Tue, 18 Mar 2008 11:16:47 +0000 (18 12:16 +0100)
committerKarolin Seeger <kseeger@samba.org>
Sun, 13 Apr 2008 11:29:39 +0000 (13 13:29 +0200)
tree37f3ec484b08f0aa816f198d3496ad20fd293364
parentb8ef2acb4cfd16815f28065cd27549930845cd4e
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
(cherry picked from commit 974c0c45ad42644348e0b55454715b12158f1028)
(cherry picked from commit edcf2712bcdedabbfdd9ee8b9a18f46126930636)
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