1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-19 23:17:05 +03:00

46 Commits

Author SHA1 Message Date
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
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
c19f7a0e10 libreplace: Add tests for connect and gethostbyname.
Provide dummy replacements when a function isnt found.
The functions are also searched for in certain libraries,
and variables SOCKET_LIBS and NSL_LIBS are set accordingly.

One purpose of this is to fix the getifaddrs tests on
systems where e.g. the socket calls require special libs
for linking.

Michael
2008-02-26 13:56:12 +01:00
Jelmer Vernooij
f2f5521068 r26495: Add defines for getifaddrs/freeifaddrs.
(cherry picked from commit c9e5a3078f7baa83743658d5648f0eefdeb05d2f)
2008-02-19 21:59:27 +01:00
Jeremy Allison
a1725f4ff7 Add MAX_DNS_NAME_LENGTH, remove more pstrings.
Jeremy.
2007-11-15 18:27:26 -08:00
Jeremy Allison
e203ba2227 Always define PATH_MAX. Makes code simpler (removes
a bunch of #defines). Remove pstring from msdfs.c.
Jeremy.
2007-11-10 22:31:34 -08:00
Jeremy Allison
2a0173743d Remove more fstring/pstring bad useage. Go talloc !
Jeremy.
2007-11-08 17:25:45 -08:00
Jeremy Allison
ef8da16983 Fix bug where tdb lock call interrupted with
an alarm sig would not terminate and could lead
to runaway smbd processes.
Thanks to Dave Daugherty @ Centrify for pointing
this out to us.
Jeremy.
2007-11-06 21:47:57 -08:00
Stefan Metzmacher
0177158d85 missing stuff from samba4's libreplace
metze
2007-10-15 13:19:28 +02:00
metze
ec8e3f7f92 don't imply "system/network.h" within replace.h,
as this brings in the socket_wrapper.h in unexpected
code and we endup with a missing 'swrap_close' while linking

metze

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25602 0c0555d6-39d7-0310-84fc-f1cc0bd64818
2007-10-15 13:19:28 +02:00
Jeremy Allison
d39ce8e37e Merge from metze of libreplace header changes 2007-10-10 17:56:19 -07:00
Jelmer Vernooij
8c1669997c r25557: merge libreplace fixes from samba4 2007-10-10 12:31:13 -05:00
Jeremy Allison
760d993340 r25505: Add a replacement (IPv4 only) implementation of getaddrinfo/freeaddrinfo
under the 2 clause *BSD license for future use in IPv6 code. Original
code was from PostgreSQL and I've maintained their license even though
I've rewritten large parts of it (I probably should donate this back
to them).
Jeremy.
2007-10-10 12:31:10 -05:00
Jeremy Allison
327875182c r25472: Fix the interfaces code to detect IPv6 interfaces, using the
new standard getifaddrs() and freeifaddrs() interfaces. Currently
we only return IPv4 af_families. Needs fixing for binds to IPv6
but this has to be careful work.
Jeremy.
2007-10-10 12:31:06 -05:00
Jeremy Allison
1f71990544 r25455: Ensure we have inet_ntop and inet_pton available in lib/replace.
Jeremy.
2007-10-10 12:31:06 -05:00
Stefan Metzmacher
862046028c r25252: move macro defines to the end of replace.h
and move the include location sys/param.h
before we redefine missing macros

metze
2007-10-10 12:30:55 -05:00
Stefan Metzmacher
828d2ca061 r25232: sync lib/replace with SAMBA_4_0
metze
2007-10-10 12:30:52 -05:00
Volker Lendecke
d93b5d50a0 r24354: Remove offsetof macro
Samba4 seems not to suffer from it
2007-10-10 12:29:35 -05:00
Jelmer Vernooij
4a5fa715a6 r24341: Make libreplace provide offsetof. 2007-10-10 12:29:31 -05:00
Andrew Tridgell
c676a97114 r23798: updated old Temple Place FSF addresses to new URL 2007-10-10 12:28:26 -05:00
Andrew Tridgell
1b78cace50 r23790: LGPLv3+ conversion for our LGPLv2+ library code 2007-10-10 12:28:25 -05:00
Michael Adam
5f5b931492 r23363: Activate rep_pread and rep_pwrite in lib/replace/replace.h.
This fixes the build on a SuSE 6.1. :-)
I guess this had been merely forgotten.

But beware: The implementations of rep_pread and rep_pwrite are
not thread safe.

Michael
2007-10-10 12:23:10 -05:00
Stefan Metzmacher
20965d800f r23309: sync lib/replace with SAMBA_4_0
metze
2007-10-10 12:23:05 -05:00
Stefan Metzmacher
5e9b84326b r23307: move readahead stuff out of libreplace and make it samba3 specific
as we can't replace this function in libreplace and we do
the some stuff for other function in the same way.

metze
2007-10-10 12:23:05 -05:00
Michael Adam
18a7e739ea r23109: Redo the change from r22772 I accidentially undid in r23108.
Michael
2007-10-10 12:22:47 -05:00
Michael Adam
5a06726e68 r23108: Add defines of RTLD_NOW and RTLD_GLOBAL to replace.h.
Fixing build of ldb for instance on some systems without dlfcn.h.
2007-10-10 12:22:46 -05:00
Derrell Lipman
7d05fa8b32 r22772: - Still working on the fact that readahead() is not declared (on at least one
OS) but is available for linking.  Instead of running configure tests with
  -Werror-implicit-function-declaration in developer mode (which may lead to
  different library functions being used in developer mode than when not in
  developer mode), add tests for whether readahead is declared.  If not,
  provide a replacement declaration in lib/replace.
2007-10-10 12:21:56 -05:00
Stefan Metzmacher
8a7d2e633b r22298: move ZERO_*, ARRAY_SIZE and PTR_DIFF macros into libreplace
metze
2007-10-10 12:19:24 -05:00
Stefan Metzmacher
5ca1854644 r22274: merge from samba4:
- provide __LINESTR__ macro
- add __STRINGSTRING() macro to really create a string of __LINE__
- fix __location__ macro

metze
2007-10-10 12:19:23 -05:00
Stefan Metzmacher
3f87165771 r22271: merge from samba4:
provide __location__ in replace.h

and see how the build-farm likes this simpler version

metze
2007-10-10 12:19:23 -05:00
Stefan Metzmacher
66b0a6cc51 r22264: merge from samba4:
use AC_HAVE_DECL() because AC_CHECK_DECLS() defines to 1 or 0
and #ifndef doesn't work.

metze
2007-10-10 12:19:23 -05:00
Stefan Metzmacher
42ccfaf5e5 r22252: merge from samba4:
add prototype of setenv

metze
2007-10-10 12:19:22 -05:00
Stefan Metzmacher
8f4a39127f r22227: merge from samba4:
move discard_const macros to librelace

metze
2007-10-10 12:19:21 -05:00
Stefan Metzmacher
057c1c04d0 r22221: merge from samba4:
- libreplace unsetenv() and strptime() replacements

metze
2007-10-10 12:19:21 -05:00
Stefan Metzmacher
352ee73030 r20817: sync lib/replace with samba4
metze
2007-10-10 12:17:09 -05:00
Stefan Metzmacher
a3a082c42c r19240: move the NO_CONFIG_H check to libreplace
this fixes the quota detection configure and maybe more
configure tests

metze
2007-10-10 12:15:24 -05:00
Stefan Metzmacher
61aa60c60f r19030: merge missing stuff from samba4:
- strnlen() and strndup() are broken on AIX
- we need some extra CFLAGS on HPUX 11.11

metze
2007-10-10 12:15:03 -05:00
Stefan Metzmacher
8899bc45f9 r18998: - make more usage of PRINTF_ATTRIBUTE()
- vsyslog takes a 'const char *format'

metze
2007-10-10 12:14:55 -05:00
Volker Lendecke
00f09d851c r18991: Fix bug 4133 -- Thanks to Olaf Flebbe 2007-10-10 12:14:54 -05:00
Andrew Tridgell
6d5f507136 r18864: merge lib/replace changes from samba4 2007-10-10 12:01:06 -05:00
Stefan Metzmacher
454d9590de r18784: hopefully fix the BOOL bug on AIX
metze
2007-10-10 12:00:57 -05:00
Stefan Metzmacher
65013a8d9e r18673: define the macros even if we don't define bool ourself
metze
2007-10-10 12:00:46 -05:00
Stefan Metzmacher
6c101d2068 r18672: fix the build on Tru64
metze
2007-10-10 12:00:46 -05:00
Stefan Metzmacher
5a589bb16c r18671: try to fix the build on solaris 10 and maybe some other hosts
we need to define 'BOOL_DEFINED' to make sure it didn't get redefined
by <rpcsvc/yp_prot.h>

metze
2007-10-10 12:00:46 -05:00
Stefan Metzmacher
dd76f4f5f3 r18649: the PRINTF_ATTRIUTE() macro is provided by libreplace
metze
2007-10-10 11:52:19 -05:00
Stefan Metzmacher
596cbe73dd r18644: bring in libreplace in lib/replace
metze
2007-10-10 11:52:03 -05:00