Stefan Metzmacher
b28b63c911
libreplace: we need to use AC_TRY_LINK() to make sure HAVE_IPV6 is correctly detected
...
metze
(cherry picked from commit 84b5652d3e5766521436e4c7d59615b08b2bb198)
2008-05-22 15:04:32 +02:00
Stefan Metzmacher
1ca4508f3a
libreplace: add test for HAVE_IPV6
...
Samba can later just check libreplace_cv_HAVE_IPV6 = yes.
metze
(cherry picked from commit e835e7eebcc064ce0813814796828f15ad112fbd)
2008-05-22 13:02:58 +02:00
Stefan Metzmacher
c97ff995e4
lib/replace: move sys/sockio.h and sys/un.h checks into AC_LIBREPLACE_NETWORK_CHECKS
...
metze
(cherry picked from commit 7f26a5425e706a97cc07c5139b3fea4fde9e4020)
2008-05-17 13:18:33 +02:00
Stefan Metzmacher
951b8c757a
lib/replace: add checks for HAVE_SOCK_SIN_LEN and HAVE_UNIXSOCKET
...
Moved from the samba specific locations
metze
(cherry picked from commit e674128ee2f11596f358ed46104c9d25eb2f754f)
2008-05-17 13:18:32 +02:00
Stefan Metzmacher
151d62da13
libreplace: try to fix the build on HP-UX which has if_nametoindex() in -lipv6
...
metze
(cherry picked from commit da2179ee5d5b6094ab63a9d9d6a8d59893937087)
2008-05-16 08:51:53 +02:00
Stefan Metzmacher
cd37fdb240
libreplace: make sure system/network.h is only used when AC_LIBREPLACE_NETWORK_CHECKS was used
...
metze
(cherry picked from commit 3fddd36e119f73a5021370450f9687ef9d252bab)
2008-05-16 08:51:53 +02:00
Stefan Metzmacher
dbbc05c87b
libreplace: export LIBREPLACE_NETWORK_OBJS and LIBREPLACE_NETWORK_LIBS vars
...
metze
(cherry picked from commit aa7ef1af746319a3d771decd0ec03dabe8b8ad28)
2008-05-16 08:51:53 +02:00
Stefan Metzmacher
734ade407e
libreplace: include inet_ntoa.o when the system one is broken
...
metze
(cherry picked from commit 67845d3471711d24069636d0d4032f9d53748334)
2008-05-16 08:51:52 +02:00
Stefan Metzmacher
d7038405d6
libreplace: merge getifaddrs.m4 into libreplace_network.m4
...
metze
(cherry picked from commit 0234d397fefee8e1d0dcd3402f748c2251021c90)
2008-05-16 08:51:52 +02:00
Stefan Metzmacher
2f43e282e0
libreplace: merge getaddrinfo.m4 into libreplace_network.m4
...
metze
(cherry picked from commit 64591d064dc3da6074f0f7539911a6e433d9cc43)
2008-05-16 08:51:52 +02:00
Stefan Metzmacher
9aa0f6626d
libreplace: merge socketpair.m4 into libreplace_network.m4
...
metze
(cherry picked from commit f9f8f93adcc7161ebb18f5a0bf28c73d951a15ad)
2008-05-16 08:51:51 +02:00
Stefan Metzmacher
b078ae2b56
libreplace: merge inet_pton.m4 into libreplace_network.m4
...
metze
(cherry picked from commit 3a70274c908e31453942b442351eab8423c1a53d)
2008-05-16 08:51:51 +02:00
Stefan Metzmacher
438ddd9c81
libreplace: merge inet_ntop.m4 into libreplace_network.m4
...
metze
(cherry picked from commit 223ef6c08efb52251d0a772bb0c481b2803cf0ce)
2008-05-16 08:51:49 +02:00
Stefan Metzmacher
7669daa9f5
libreplace: merge inet_aton.m4 into libreplace_network.m4
...
metze
(cherry picked from commit fba00736c870f449c0eee32fe0d7b0d539dca51f)
2008-05-16 08:51:49 +02:00
Stefan Metzmacher
09632f9694
libreplace: merge inet_ntoa.m4 into libreplace_network.m4
...
metze
(cherry picked from commit 82e826253b6d18832931dbb5c1dda009889bf9e0)
2008-05-16 08:51:49 +02:00
Stefan Metzmacher
c48b2d8679
libreplace: merge socket.m4 into libreplace_network.m4
...
metze
(cherry picked from commit c70eba87dbbac6c2c1e68c343cdd410577c1686f)
2008-05-16 08:51:48 +02:00
Jelmer Vernooij
6f5f736867
Fix typo.
...
(cherry picked from commit bd089818a3182698dfe85039c1b2e22d8c2835bb)
2008-05-16 08:51:48 +02:00
William Jojo
1043168845
Add undefined symbol flag for AIX.
...
(cherry picked from commit dabdf24e86f038e3afc67532fa5bf60a37992161)
2008-05-16 08:51:47 +02:00
Stefan Metzmacher
a3d675a773
libreplace: also use AC_LIBREPLACE_NETWORK_CHECKS for the standalone build
...
metze
(cherry picked from commit 04f4523ed032946b8f0e74ac6f7458010159e3bb)
2008-05-16 08:51:47 +02:00
Stefan Metzmacher
0987c32645
libreplace: use AC_LIBREPLACE_NETWORK_CHECKS only for samba
...
metze
(cherry picked from commit 3451b54bf7f5e37a589ec261d28c2a8b6f9788ed)
2008-05-16 08:51:46 +02:00
Stefan Metzmacher
2a3ddc23cc
libreplace: split out network checks into a AC_LIBREPLACE_NETWORK_CHECKS macro
...
Note: moving it out of AC_LIBREPLACE_BROKEN_CHECKS will be the next step
metze
(cherry picked from commit 55a904b1d7aeca849d450e371b18afca5b0c6218)
2008-05-16 08:51:46 +02:00
Stefan Metzmacher
8a241cf150
libreplace: always provide utime() and utimes()
...
I'd like to also provide futimes(), but it seems
that some systems doesn't support a it at kernel level.
If someone knows how to write a portable replacement
for futimes() please tell me...
metze
(cherry picked from commit a9604fe4a323dccb537cf02ea7594437b4995803)
2008-05-16 08:51:46 +02:00
Jeremy Allison
e54c71954a
Fix replacement getpass. If we ^C at the prompt echo was left off.
...
Jeremy.
2008-05-09 14:51:45 -07:00
Stefan Metzmacher
fa443081ea
libreplace: check how portable utimes() and futimes() are
...
metze
(cherry picked from commit 8798ce3c744025b94973784dcb44d099427ef190)
2008-05-06 12:44:37 +02:00
Jeremy Allison
b496f13322
Janitor for tridge. Keep lib/replace in sync with the gcc4
...
changes.
Jeremy.
2008-04-18 00:30:50 -07:00
Stefan Metzmacher
fcb497951a
libreplace(samba4): let LIBREPLACE depend on LIBREPLACE_NETWORK for now
...
This should fix the build on solaris.
Later this needs better fixing...
metze
(cherry picked from commit 89b7955733c34e9699a3b43ee54de92cb9469b90)
2008-03-28 15:17:54 +01:00
Michael Adam
451fc9ae05
libreplace: fix coverity ID 517 - untangle close from open in test/os2_delete.c
...
This is not a proper bug but the code is clearer now
and we are tracking failure of open separate from that of close.
Michael
2008-03-27 11:46:39 +01:00
Michael Adam
03a980d8f6
libreplace: replace.c does not need system/network.h anymore.
...
Michael
(cherry picked from commit 2d3c2f34f33338ff422047dae9cc262522689328)
2008-03-19 22:40:45 +01:00
Michael Adam
6c53753246
libreplace: move rep_socketpair() to its own module.
...
Prototype is now in system/network.h,
implementation in socketpair.c, and
check in socketpair.m4.
Now the last networking function has vanished from replace.c.
Michael
(cherry picked from commit 94ac8a25be15b55f66eff96fdddc2fdc71a43b1e)
2008-03-19 22:40:45 +01:00
Michael Adam
a4f22d6e2b
libreplace: remove duplicate entry of inet_ntoa from README.
...
Michael
(cherry picked from commit 98ee8c84300757d778733a458c6ca3e6022b40ea)
2008-03-18 16:45:20 +01:00
Michael Adam
a1d24f110b
libreplace: remove trailing white spaces.
...
Michael
(cherry picked from commit 1f9ca7eed965904f67cf78fbac007432b8a057fd)
2008-03-18 16:45:10 +01:00
Michael Adam
edcf2712bc
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)
2008-03-18 16:44:59 +01:00
Michael Adam
f69e51f56f
libreplace: put inet_aton.c under LGPL instead of GPL.
...
Michael
(cherry picked from commit cca5d6626fe395f08fd4c8b2344e4e43646cb987)
2008-03-18 16:35:46 +01:00
Stefan Metzmacher
f27d5e0cf8
libreplace: remove unused SOCKET_LIBS and NSL_LIBS
...
metze
(cherry picked from commit 62bb177a6e4a3e1f949b78c7cd7583f2e1271739)
2008-03-18 16:34:12 +01:00
Stefan Metzmacher
b141fce01d
libreplace: for samba4 create LIBREPLACE_NETWORK as EXT_LIB
...
metze
(cherry picked from commit 79037c31334e271a718fcac234148038814b591e)
2008-03-18 16:34:12 +01:00
Stefan Metzmacher
7854ed24a5
libreplace: use LIBREPLACE_NETWORK_LIBS within some configure checks
...
...instead of using SOCKET_LIBS and NSL_LIBS.
metze
(cherry picked from commit cef2e8d748756f61c248ad6660e85dd1ac36308a)
2008-03-18 16:34:12 +01:00
Stefan Metzmacher
2dee62ed12
libreplace: combine SOCKET_LIBS and NSL_LIBS to LIBREPLACE_NETWORK_LIBS
...
But keep the old ones untill the callers are fixed.
metze
(cherry picked from commit e7115dcc8a0a4f420de7a901e3a21d4f35a6fcf9)
2008-03-18 16:34:12 +01:00
Volker Lendecke
471b1b0c58
Fix Coverity ID 554
2008-03-15 22:30:25 +01:00
Volker Lendecke
dc3d5e1645
Allocate one 0-byte in asprintf replacement when len==0
...
Some S3 code depends on this.
2008-03-15 21:50:55 +01:00
Michael Adam
2546da817f
libreplace: fix samba4 build (by not setting global LIBS).
...
This corrects the earlier fix of the standalone build, by setting
LIBS to the desired value only in configure.ac but not in getifaddrs.m4.
Not that this changes the standalone build in that it adds these libs
undconditionally and not only if they are needed by the getifaddrs
replacement functions.
Michael
(cherry picked from commit ff3af1703ddc9e5383f32156bc5be8351f795e76)
2008-03-14 11:33:02 +01:00
Michael Adam
ddd564e8bf
libreplace: add -I$libreplacedir to CPPFLAGS for getifaddrs tests.
...
This is needed, otherwise $libreplacedir/system/network.h does not
find $libreplacedir/getaddrinfo.h on some systems (solaris, e.g.).
Michael
(cherry picked from commit 297c3bece094ddb5f268b02e61e33f512ccfe6f5)
2008-03-14 11:32:54 +01:00
Michael Adam
83baff78ce
libreplace: add an inet_aton() function that calls inet_pton().
...
inet_aton() is even needed inside libreplace, in the implementation
of rep_getaddrinfo().
Michael
(cherry picked from commit bcb2f3a880f8da8f9bedb7a8e61d7d7b533f1919)
2008-03-14 11:32:34 +01:00
Michael Adam
77b7d7c041
libreplace: add snprintf.c to test code for getifaddrs - needed on some systems.
...
Michael
(cherry picked from commit 0aff54a12e20d5e91fcdec7aaec103fb9a371a23)
2008-02-29 09:32:11 +01:00
Michael Adam
1ff0b616a9
libreplace: ifdef out ip6 code if unsupported.
...
Michael
(cherry picked from commit 54cc0df4dbf6d63a9b94e1ac6af4ec7f7803bc30)
2008-02-29 09:32:05 +01:00
Michael Adam
34d906ef44
libreplace: fix rep_freeifaddrs to not segfault on NULL input.
...
Michael
(cherry picked from commit 0cbb87453beb52c6b0bc3a48791f49678f4030c5)
2008-02-29 09:31:57 +01:00
Michael Adam
0906120a6e
libreplace: fix silly crashbug in getifaddrs_test().
...
Michael
(cherry picked from commit 523626908d25f974fd1ae6d7306b1d4bc8414162)
2008-02-29 09:31:50 +01:00
Michael Adam
3c1843f931
libreplace: add missing newline in output of getifaddrs test.
...
Michael
(cherry picked from commit f8243cfc47c7414bab7f249d0e5d1c85e8ca7d64)
2008-02-29 09:31:39 +01:00
Michael Adam
1d906d346e
libreplace: add missing semicolon to getifaddrs.
...
Michael
(cherry picked from commit 29818a07de826fd687003ff25865d77939ecaa9a)
2008-02-29 09:31:29 +01:00
Michael Adam
650cc1da4b
libreplace: try and fix rep_getifaddrs() for Tru64.
...
Don't fail when there is no address assigned to the interface.
Put NULL into the ifaddrs structure instead.
Michael
(cherry picked from commit ee170c85e0e76411bd752de5fe51db6940dab929)
2008-02-29 09:31:19 +01:00
Michael Adam
c5932414fd
libreplace: use the new getifaddrs test also for autoconf.
...
Michael
(cherry picked from commit a2a506ff0eae2a64ebe2ddbb81a6c2a5fa7fe3da)
2008-02-29 09:31:02 +01:00