1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

658 Commits

Author SHA1 Message Date
Stefan Metzmacher
4683fc0f1d wafsamba: move -fvisibility=hidden checks from lib/replace to wafsamba
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2015-01-08 23:38:07 +01:00
Stefan Metzmacher
208be32c6a wafsamba: move '-fstack-protector' checks from lib/replace to wafsamba
This moves the check to the end of the configure run,
which means we no longer use this on configure checks,
but only for the real build.

This behavior is similar than our developer cflags.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2015-01-08 23:38:07 +01:00
Stefan Metzmacher
0f4ce418ae wafsamba: move WERROR_CFLAGS checks from lib/replace to wafsamba
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2015-01-08 23:38:07 +01:00
Stefan Metzmacher
7a3dc66852 wafsamba: move compiler / cflags related stuff from lib/replace to wafsamba
We should have this just in one central place.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2015-01-08 23:38:07 +01:00
Jelmer Vernooij
2afc5b7978 Don't use a nested function when testing for visibility attribute support.
Some compilers support __attribute__((visibility)), but not nested
functions (e.g. http://www.cprover.org/goto-cc/)

Change-Id: I01a5dd6f5f913664621c4090e2dca177527436bb
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749983
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749985
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749986
Signed-Off-By: Jelmer Vernooij <jelmer@debian.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Nov 10 08:29:19 CET 2014 on sn-devel-104
2014-11-10 08:29:19 +01:00
Martin Schwenke
2f7ba8175e replace: Fix includes of unistd.h
This should always be conditional.  system/passwd.h wants it too so
that uid_t is defined.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
2014-09-19 18:11:11 +02:00
Volker Lendecke
b3cc5e204d replace: Make EWOULDBLOCK always available
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-09-17 00:31:21 +02:00
Jelmer Vernooij
2440845ace Look for system setproctitle before trying -lbsd.
Change-Id: I390c186d7c1400287c6a18909a5d6587f2052243
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-08-31 21:21:13 +02:00
Jelmer Vernooij
3c28ccc5f1 replace: remove tabs.
Change-Id: Ie87f3c8a60f6292b7d2302425c946f5befaf5fcc
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-08-31 21:21:13 +02:00
Jelmer Vernooij
2c3203f170 replace: remove unused and duplicate imports.
Change-Id: I6cfd2cf80efe19fa31bcd6b3881a1eb01f05d1b4
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-08-31 21:21:13 +02:00
Martin Schwenke
47e7440be9 replace: Remove unused item returned by FAILED()
The (return) value of FAILED() is a constant 1.  However, it is never
used, so the compiler complains when run with -Wall:

  lib/replace/test/os2_delete.c: In function ‘cleanup’:
  lib/replace/test/os2_delete.c:39:163: warning: right-hand operand of comma expression has no effect [-Wunused-value]
   FAILED("system");

So just get remove the ", 1" since it is the bit that does nothing and
is never used.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Wed Aug 20 16:54:31 CEST 2014 on sn-devel-104
2014-08-20 16:54:31 +02:00
Michael Adam
2c50c25d02 replace:build: improve detection of srcdir
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-06-20 23:38:10 +02:00
Jeremy Allison
536c799f00 lib: tevent: make TEVENT_SIG_INCREMENT atomic.
On arm platforms incrementing a variable is not
an atomic operation, so may be interrupted by
signal processing (if a signal interrupts another
signal handler).

Use compiler built-ins to make this atomic.
__sync_fetch_and_add() works on gcc, llvm,
IBM xlC on AIX, and Intel icc (10.1 and
above).

atomic_add_32() works on Oracle Solaris.

Based on an inital patch from kamei@osstech.co.jp.

Bug #10640 - smbd is not responding - tevent_common_signal_handler() increments non-atomic variables

https://bugzilla.samba.org/show_bug.cgi?id=10640

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
2014-06-07 03:15:14 +02:00
Volker Lendecke
549338ff38 libreplace: Define PTHREAD_MUTEX_ROBUST along with pthread_mutexattr_setrobust
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-22 21:05:15 +02:00
Volker Lendecke
4baa2d021c libreplace-waf: Only check for _np functions if standard functions are not available
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-22 21:05:15 +02:00
Volker Lendecke
4ea036c26d libreplace: Add support for pthread_mutex_consistent
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-22 21:05:15 +02:00
Volker Lendecke
1993f605a4 libreplace: Add support for pthread_mutexattr_setrobust
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-22 21:05:15 +02:00
Stefan Metzmacher
730745d560 libreplace: only add PTHREAD CFLAGS and LDFLAGS globally if asked for
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-22 21:05:15 +02:00
Volker Lendecke
a8a9183400 libreplace: Move thread checks from source3/wscript
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-22 21:05:15 +02:00
Andreas Schneider
d407446ddc Remove special socket_wrapper code.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17 14:56:06 +02:00
Andreas Schneider
a9c1d5bd63 replace: Add socket_wrapper_enabled().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17 14:56:06 +02:00
Andreas Schneider
b2163f23c0 Remove special nss_wrapper code
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17 14:56:06 +02:00
Andreas Schneider
115a80d381 replace: Add nss_wrapper_hosts_enabled().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17 14:56:06 +02:00
Andreas Schneider
30860e0d0e replace: Add nss_wrapper_enabled().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17 14:56:06 +02:00
Andreas Schneider
751b2b2d2a Remove uid_wrapper related code.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17 14:56:05 +02:00
Andreas Schneider
6d23354f72 lib: Change uid_wrapper to preloadable version.
This imports version 1.0.1 of uid_wrapper.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17 14:56:05 +02:00
Andreas Schneider
f318a44ec7 replace: Add uid_wrapper_enabled().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17 14:56:05 +02:00
Andrew Bartlett
cec833063e auth: Remove plaintext OSF1 password support
The WAF build does not have the code to detect getprpwnam on which
this is based, and so this is dead code.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-04-15 10:13:12 +02:00
Christian Ambach
6a7c420a79 waf:lib/replace fix iconv checks on HP/UX
we need to copy away the list of LDFLAGS
to be tried before modifying it instead of
just creating a new reference and then continuing
with a modified list while it should have been
reset back to the original value

Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911

Signed-off-by: Christian Ambach <ambi@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Feb 13 02:01:03 CET 2014 on sn-devel-104
2014-02-13 02:01:03 +01:00
Volker Lendecke
50cc510584 libreplace: free() deals fine with NULL pointers
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-01-24 13:55:47 -08:00
Christian Ambach
da891e2101 waf:lib/replace gettext configure checks
Make sure we only try to work with gettext if we found
the prototypes and were able to link

Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Fri Jan 17 19:30:33 CET 2014 on sn-devel-104
2014-01-17 19:30:33 +01:00
Christian Ambach
31db0c8acd waf:lib/replace fix gettext detection
if the user has specified a path for gettext, add it to CFLAGS and LDFLAGS
so we can find it during configure and build

Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-03 05:04:44 +01:00
Christian Ambach
a83f491810 waf:lib/replace change detection of gettext
convert this to an automatic check: if no option is given, try to find gettext
and if found, use it
if user has specified --with-gettext, then bail out if it could not be found
in case of --without-gettext, skip all gettext related configure checks

Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-03 05:04:44 +01:00
Christian Ambach
df6ddcfbfc waf:lib/replace fix up libintl related checks
on a default installation of AIX, libintl.a exists but
libintl.h does not
So check for the declarations of those functions as well
to make sure that the build works.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-03 05:04:44 +01:00
Christian Ambach
1a42ff7d8d waf:lib/replace correct detection of libiconv
add -liconv as a complete command line argument,
not all characters on their own

Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-03 05:04:44 +01:00
Volker Lendecke
168db8b9d2 waf: Fix the FreeBSD build with libinotify
Signed-off-by: Volker Lendecke <vl@samba.org>
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Jan  6 19:50:22 CET 2014 on sn-devel-104
2014-01-06 19:50:22 +01:00
Christian Ambach
de55856745 lib/replace remove orphaned code
this is not compiled and used anymore

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-By: Jelmer Vernooij <jelmer@samba.org>

Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Wed Dec  4 22:55:12 CET 2013 on sn-devel-104
2013-12-04 22:55:12 +01:00
David Disseldorp
fb042b35ed replace: fix typo in variable name
13550a2b5e added a typo causing
compilation failure.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Thu Nov 28 18:16:27 CET 2013 on sn-devel-104
2013-11-28 18:16:27 +01:00
Volker Lendecke
13550a2b5e replace: Don't run over dst in strlcat
If "d" is not 0-terminated, the pure strlen will read beyond the end
of the given bufsize. strlcat in libbsd deliberately avoids this, so we
should do the same.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-11-28 12:33:10 +01:00
Andreas Schneider
979d9dbbb7 replace: Fix developer build on BSD.
This fixes bsd_attr_list() calling geteuid().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Nov 21 03:37:59 CET 2013 on sn-devel-104
2013-11-21 03:37:59 +01:00
Björn Jacke
374b2cfde7 xattr: fix listing EAs on *BSD for non-root users
Thanks to Stefan Rompf for reporting.

This fixes bug #10247

Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Nov  8 20:43:30 CET 2013 on sn-devel-104
2013-11-08 20:43:29 +01:00
Christian Ambach
07b3a04872 waf: consolidate libintl related checks
consolidate the dealing with functions from libintl and the
handling of checking if libiconv is required or not
to a common place in lib/replace

also add a new samba_intl subsystem that has dependencies
on the appropriate set of libraries (libintl, libintl+libiconv or none)
that can be used as a general dependency by code that depends
on the internationalization libraries

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-09 22:46:57 +02:00
Bill Parker
9b58da9866 Fix bug 10025 - Lack of Sanity Checking in calls to malloc()/calloc().
In reviewing various files in Samba-4.0.7, I found a number
of instances where malloc()/calloc() were called without the
checking the return value for a value of NULL, which would
indicate failure.

(NB. The changes needed to ccan, iniparser, popt and heimdal
will be reported upstream, not patched inside Samba).

Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Source <idra@samba.org>
2013-07-17 16:12:19 -07:00
David Disseldorp
8a6743e4ed Bug 8997: change libreplace GPL source to LGPL
libreplace currently includes socket.c and getifaddrs.c both of which
are GPL licensed.
Although not required, talloc and tdb build alongside this source,
leading to some ambiguity regarding their LGPL licences.

The following copyright holders have agreed to the GPL->LGPL change:
lib/replace/getifaddrs.c
   Copyright (C) Andrew Tridgell 1998
   Copyright (C) Jeremy Allison 2007
   Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007

lib/replace/test/getifaddrs.c
lib/replace/socket.c
 * Copyright (C) Michael Adam <obnox@samba.org> 2008

Signed-off-by: David Disseldorp <ddiss@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Jun  3 18:06:18 CEST 2013 on sn-devel-104
2013-06-03 18:06:18 +02:00
Andrew Bartlett
cd4b413cb0 build: Remove autoconf build system
We are now confident that that waf build system meets enough of our needs
that we will work to improve it, rather than maintain two build systems.

Andrew Bartlett

Reviewed-by: Jelmer Vernooij <jelmer@samba.org>

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-28 12:17:10 +10:00
Andrew Bartlett
940a6a6205 lib/replace: Remove unused install-sh
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon May 27 05:51:04 CEST 2013 on sn-devel-104
2013-05-27 05:51:04 +02:00
Andrew Bartlett
9ddfd7d878 lib/replace: Set BROKEN_STRNLEN and BROKEN_STRNDUP on all AIX
The background is in https://bugzilla.samba.org/show_bug.cgi?id=1097
and wider reports are at
http://stackoverflow.com/questions/2091460/strndup-call-is-currupting-stack-frames

Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu May 23 03:52:10 CEST 2013 on sn-devel-104
2013-05-23 03:52:10 +02:00
Christian Ambach
162ec83f68 waf: only use -fstack-protector when both compiler and linker support it
otherwise build with xlc on AIX fails because the compiler silently ignores the parameter
but the linker does not like it

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-05-17 11:16:33 +02:00
Christian Ambach
a4cc41d4d0 lib/replace: add SCNx macros
we already have PRI*, but the corresponding SCN* were missing

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-05-06 16:33:38 +02:00
Christian Ambach
d68e676cac lib/replace: prefer inttypes.h over stdint.h
according to C99 7.8, inttypes.h should include stdint.h so prefer inttypes.h
and fall back to stdint.h (and our own definitions of PRI*) only when inttypes.h
could not be found

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-05-06 16:33:38 +02:00
Ira Cooper
7fa4795607 waf: add -fstack-protector to LDFLAGS if detected.
If we compile with -fstack-protector, we should link
with it.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Mar  6 04:06:04 CET 2013 on sn-devel-104
2013-03-06 04:06:04 +01:00
Andreas Schneider
def575bc29 waf: Correctly check for prctl in just one place.
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-03-05 23:29:43 +01:00
Stefan Metzmacher
602cd7f6c6 lib/replace: add AC_CHECK_VALUEOF() macro
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-03-01 11:58:43 -08:00
Björn Jacke
240a55249d build: use -fstack-protector if available
Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: Matthieu Patou <mat@samba.org>

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Fri Feb 22 15:38:21 CET 2013 on sn-devel-104
2013-02-22 15:38:21 +01:00
Björn Jacke
d537d64ab8 Revert "wafbuild: use -Wstack-protector if available"
This reverts commit e6643fbf48.

Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: Matthieu Patou <mat@samba.org>
2013-02-22 12:15:13 +01:00
Andrew Bartlett
dda48146a2 heimdal_build: Try again to sort out the strerror_r mess
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-19 10:32:17 +01:00
Björn Baumbach
41955b711f build(waf)-libreplace: remove redundant check for flistea function
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-01-15 14:49:19 +01:00
Jeremy Allison
0258138e20 lib/replace: Include sys/ucontext.h if available.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-15 08:28:45 +01:00
Jeremy Allison
fe6e323add lib/replace: Add ucontext configure autoconf checks.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-15 08:28:45 +01:00
Jeremy Allison
7fe400de4c lib/replace: Add ucontext configure waf checks.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-15 08:28:45 +01:00
Jeremy Allison
e54252ceec lib/replace: Add missing check for sys/wait.h
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-01-15 08:28:45 +01:00
Volker Lendecke
e0bfb59803 Fix bug 9548: Correctly detect O_DIRECT
Reviewed by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Jan 14 21:16:23 CET 2013 on sn-devel-104
2013-01-14 21:16:23 +01:00
Jesper Larsen
411440d2d9 replace: Fix compilation of rep_mkstemp
Commit 1fbc185 removed the variable 'p'.
Use the equivalent variable 'template' instead.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jan  9 07:18:33 CET 2013 on sn-devel-104
2013-01-09 07:18:33 +01:00
Andreas Schneider
5323508773 replace: Remove deprecated getpass() support.
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2012-12-03 14:35:10 +01:00
Andrew Bartlett
c704f0daa5 lib/replace: Do not use STRERROR_R_PROTO_COMPATIBLE as only roken.h sets this
Currently, we put strerror_r into libreplace even on systems with strerror_r.

Andrew Bartlett

Reviewed-by: Andreas Schneider <asn@samba.org>
2012-11-22 10:21:16 +01:00
Stefan Metzmacher
a15da36258 lib/replace: replace all *printf function if we replace snprintf (bug #9390)
This fixes segfaults in log level = 10 on Solaris.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Björn Jacke <bj@sernet.de>

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Wed Nov 14 19:41:14 CET 2012 on sn-devel-104
2012-11-14 19:41:14 +01:00
Björn Jacke
e6643fbf48 wafbuild: use -Wstack-protector if available
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Tue Oct 30 15:04:30 CET 2012 on sn-devel-104
2012-10-30 15:04:30 +01:00
Björn Jacke
7fcb2532b9 wafbuild: reorder the Werror checks so that the ambigous w2 option is being checked last 2012-10-30 13:18:50 +01:00
Björn Jacke
51692042d9 wafbuild: merge the missing IBM compiler Werror flag "-qhalt=w" to waf 2012-10-30 13:18:50 +01:00
Björn Jacke
0342ca4062 wfabuild: fix the -errwarn compile flag test
as in the autoconf build this must be "-errwarn=%all"
2012-10-30 13:18:50 +01:00
Andrew Bartlett
2756c3ce5c lib/replace: Return size of xattr if size argument is 0
This makes rep_{f,}getxattr a more complete replacement for the linux function.

Andrew Bartlett
2012-10-28 16:32:42 +11:00
Andrew Bartlett
6d73fd07f9 lib/replace: Fix configure on FreeBSD: define_ret is not correct here
define_ret is for when the output of the compiled and run program
should be put into the configure define.  This is not the case
here.

Andrew Bartlett
2012-10-23 09:29:19 +02:00
Andrew Bartlett
debb2b2b9e lib/replace: Fix detection of rpcsrv/yp_prot.h on FreeBSD 2012-10-23 09:29:18 +02:00
Andrew Bartlett
931ed2509d lib/replace: Add test for what flag we need for -Werror behaviour 2012-09-29 14:50:00 +10:00
Jelmer Vernooij
6749cfb418 replace: Avoid returning value in void setproctitle() replacement.
Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Tue Sep 25 06:38:40 CEST 2012 on sn-devel-104
2012-09-25 06:38:40 +02:00
Jelmer Vernooij
fd8d4ec347 replace: Support setproctitle().
This uses the setproctitle() from libc, libsetproctitle or libbsd.
If none is available it provides a dummy implementation.
2012-09-24 23:06:07 +02:00
Andrew Bartlett
2e51c386be lib/replace: Look for special flags needed for c99
This is normally handled by the waf core, but for HP-UX we currently fail.

The autoconf code hard-codes a case for HP-UX, but I want to try testing
it using a generic system first.

Andrew Bartlett
2012-09-24 03:51:07 +02:00
Andrew Bartlett
0727ad7321 lib/replace: Improve mkstemp test in autoconf and waf
On the Sernet-solaris8 host, this test passed in the autoconf build,
then failed in the recursive waf build.  This newer test should probe
the behaviour more closely, by checking we get two distinct, secure
files.

Andrew Bartlett
2012-09-24 03:51:07 +02:00
Andrew Bartlett
ffb3f2a19f lib/replace: Remove unused nap and therefore the SCO define
In any case, the Samba Team stopped supporting SCO systems a long time ago.

Andrew Bartlett
2012-09-23 14:52:28 +10:00
Andrew Bartlett
502135df9f lib/replace: Try to fix build on HP-UX for os2_delete test
The issue is that this file is both used in an autoconf test, and
later in a smbtorture test.  Because os2_delete.c does not include
replace.h, bool may not be defined.

So, instead we shift the need for bool to a different header.

(The readdir tests in repdir.m4 are not yet in the waf configure).

Andrew Bartlett
2012-09-23 14:31:01 +10:00
Andrew Bartlett
08d3062fc3 ntdb: Try to fix the build on Solaris which does not have err 2012-09-23 14:31:01 +10:00
Björn Jacke
ea96d79e21 replace: fix 520c9b0b0a
fix typo in ifdef. Thanks to Joachim Schmitz for spotting this!

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Tue Sep 18 16:06:18 CEST 2012 on sn-devel-104
2012-09-18 16:06:18 +02:00
Joachim Schmitz
7542b63188 libreplace: Bug 8107, Fix poll replacement to become a msleep replacement
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-09-17 15:01:39 -07:00
Björn Jacke
520c9b0b0a replace: add some includes for poll.h
See bug #8107

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Sun Sep 16 04:05:08 CEST 2012 on sn-devel-104
2012-09-16 04:05:07 +02:00
Michael Adam
d237427f18 lib/replace: remove duplicate check for inotify 2012-09-11 14:29:54 +02:00
Matthieu Patou
f2ec75c7df osX define uint64_t as long long int 2012-09-10 05:57:21 +02:00
Björn Jacke
5c3769b056 build: define _BSD_TYPES on IRIX to have types like u_short
why the hell do IRIX systems headers like quota.h use types that are available
only with such a define...?
2012-09-07 16:42:14 +02:00
Björn Jacke
4f0b8f30c9 s3/aio_fork: fix build on irix
IRIX needs _XOPEN_SOURCE defined for SCM_RIGHTS to be available
2012-07-26 18:27:40 +02:00
Björn Jacke
fa98ef112b replace: make the INT64_MAX define more portable 2012-07-04 12:01:20 +02:00
Jeremy Allison
485787f0df Move back to using per-thread credentials on Linux. Fixes the glibc native AIO lost wakeup problem.
See this post:

https://lists.samba.org/archive/samba-technical/2012-June/085101.html

for details.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jun 29 03:57:45 CEST 2012 on sn-devel-104
2012-06-29 03:57:45 +02:00
Björn Jacke
0a1aaca1bd replace: define INT64_MAX when not defined
Tru64 doesn't have any stdint.h

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Thu Jun 28 00:45:58 CEST 2012 on sn-devel-104
2012-06-28 00:45:58 +02:00
Jelmer Vernooij
8283d9ec4a attr: Look for attr/attributes.h too.
Fixes finding of ATTR_ROOT on GNU/kFreeBSD.

Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Sat Jun 16 18:54:27 CEST 2012 on sn-devel-104
2012-06-16 18:54:26 +02:00
Stefan Metzmacher
deca298d7b lib/replace: define HAVE_WORKING_STRPTIME instead of REPLACE_STRPTIME
That makes the logic in 'wscript' simpler.

metze
2012-06-14 09:34:14 +02:00
Stefan Metzmacher
0a92ac2ddc lib/replace: execute strptime.c tests
They need runtime verification.

metze
2012-06-14 09:34:13 +02:00
Stefan Metzmacher
e3a3c0d764 Revert "replace: use replace for non 'samba' compliant strptime"
This reverts commit 4ea7d4694a.

A better fix will follow.

metze
2012-06-14 09:34:13 +02:00
Stefan Metzmacher
4430d6a0d9 lib/replace: add more condition to add snprintf.c
metze
2012-06-14 09:34:13 +02:00
Stefan Metzmacher
1746ffe090 Revert "lib/replace: Fix snprintf() override for systems with a broken snprintf()"
This reverts commit bbc1b0c985.

A more generic fix will follow.

metze
2012-06-14 09:34:13 +02:00
Stefan Metzmacher
4e1ebdc0c4 lib/replace: s/execute=1/execute=True
metze
2012-06-14 09:34:13 +02:00
Björn Jacke
6edb239f8e replace: fix unused variable warning
e2747fc62c fixed ...

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Wed Jun 13 23:57:58 CEST 2012 on sn-devel-104
2012-06-13 23:57:57 +02:00
Björn Jacke
6a3b3fa3b0 Revert "replace: fix unused variable warning"
This reverts commit e2747fc62c.

one line slipped into a wrong ifndef ...
2012-06-13 21:55:42 +02:00
Björn Jacke
e2747fc62c replace: fix unused variable warning
found by the IRIX compiler
2012-06-13 18:55:56 +02:00
Andrew Bartlett
bbc1b0c985 lib/replace: Fix snprintf() override for systems with a broken snprintf()
This ensures we provide the replacement functions that we need.

Andrew Bartlett
2012-06-06 08:23:10 +02:00
Andrew Bartlett
edd7251257 libreplace: Add copyrights to ease tracking of this file in future
As GIT didn't realise this was a copy out of lib/system.c, this should
make it easier to track the copyright holders on this file.  Herb's
name wasn't on the original file, but was the only other author I
could find in the git logs.

I've added my copyright here too.

Andrew Bartlett
2012-06-05 04:27:36 +02:00
Andrew Bartlett
5f583591db libreplace: Remove autoconf build system
This leaves the parts required to build libreplace as a static lib for the autoconf build

Andrew Bartlett
2012-06-05 04:27:36 +02:00
Andrew Bartlett
01106230dd libreplace: Ensure we link xattr.c on MacOS
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Jun  4 02:36:55 CEST 2012 on sn-devel-104
2012-06-04 02:36:55 +02:00
Andrew Bartlett
d42d4523ed librepace: put #defines after #include "sys/xattr.h"
This avoids redefining the system xattr functions, which should fix MacOS.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sun Jun  3 09:46:44 CEST 2012 on sn-devel-104
2012-06-03 09:46:44 +02:00
Andrew Bartlett
aa08fc066b lib/replace: Undo change of 0 -> NULL
This reverts part of e9d797e153 as
in the autoconf tests, NULL isn't available!

(it is available in waf, which caused confusion)

Andrew Bartlett
2012-06-03 15:46:15 +10:00
Andrew Bartlett
c0b9a128d1 libreplace: Fix up MacOS xattr functions
We need undo the rep_ macro to call the real OS function.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sun Jun  3 06:21:21 CEST 2012 on sn-devel-104
2012-06-03 06:21:21 +02:00
Andrew Bartlett
5bf6971c38 libreplace: Link libreplace against attr when required
The autoconf Samba build will return to over-linking with -lattr on
systems with both the XFS compat API and native xattrs.

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sun Jun  3 03:56:05 CEST 2012 on sn-devel-104
2012-06-03 03:56:05 +02:00
Andrew Bartlett
33eb88e6de libreplace: Use true rather than True in xattr.c
This should fix the build on IRIX.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sun Jun  3 02:05:35 CEST 2012 on sn-devel-104
2012-06-03 02:05:35 +02:00
Andrew Bartlett
e7dcb9125c libreplace: Fix build on MacOS where we have the same fn name but more arguments
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sat Jun  2 15:52:51 CEST 2012 on sn-devel-104
2012-06-02 15:52:51 +02:00
Andrew Bartlett
901e235385 libreplace: Solaris needs system/dir.h for that xattr wrapper implementation 2012-06-02 14:03:44 +02:00
Andrew Bartlett
75c03b332c libreplace: Add missing tests for HAVE_MREMAP and HAVE_SHARED_MMAP 2012-06-02 15:56:41 +10:00
Andrew Bartlett
80913ae2a8 libreplace: Fix autoconf build on platforms needing xattrs
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sat Jun  2 07:23:32 CEST 2012 on sn-devel-104
2012-06-02 07:23:32 +02:00
Andrew Bartlett
81a754fb64 lib/replace: Relicence xattr.c to LGPLv3
By the kind consent of the copyright holders.  (There wasn't any code from tridge
in the code brought in from source3/lib/system.c).

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sat Jun  2 04:00:42 CEST 2012 on sn-devel-104
2012-06-02 04:00:42 +02:00
Andrew Bartlett
e9d797e153 lib/replace: Merge remaining xattr test details from lib/util
I prefer the longer XATTR_ADDITIONAL_OPTIONS define and the NULL
rather than 0 values in the getxattr test.

Andrew Bartlett
2012-06-02 02:13:49 +02:00
Andrew Bartlett
f9b7cd53b9 s4-xattr: Use libreplace xattr functions directly 2012-06-02 02:13:49 +02:00
Andrew Bartlett
c290cdb934 lib/replace: xattr wrappers in lib/replace rather than source3/lib/system.c
This also moves all the still-used configure tests etc.  The unused OSF API
is also removed at this time.

Andrew Bartlett
2012-06-02 02:13:49 +02:00
Andrew Bartlett
664af060ac lib/replace: We cannot use strchr_m in lib/replace
In any case, it is always safe to search for . even in a multibyte string.

Andrew Bartlett
2012-06-02 02:13:49 +02:00
Andrew Bartlett
954da1b81e lib/replace: DEBUG is not acceptable here, as this may not be linked into Samba 2012-06-02 02:13:48 +02:00
Andrew Bartlett
b347067a67 lib/replace: Copy lib/system.c xattr wrappers to lib/replace 2012-06-02 02:13:48 +02:00
Alexander Bokovoy
2ddf89a2bc Introduce system MIT krb5 build with --with-system-mitkrb5 option.
System MIT krb5 build also enabled by specifying --without-ad-dc

When --with-system-mitkrb5 (or --withou-ad-dc) option is passed to top level
configure in WAF build we are trying to detect and use system-wide MIT krb5
libraries. As result, Samba 4 DC functionality will be disabled due to the fact
that it is currently impossible to implement embedded KDC server with MIT krb5.

Thus, --with-system-mitkrb5/--without-ad-dc build will only produce
  * Samba 4 client libraries and their Python bindings
  * Samba 3 server (smbd, nmbd, winbindd from source3/)
  * Samba 3 client libraries

In addition, Samba 4 DC server-specific tests will not be compiled into smbtorture.
This in particular affects spoolss_win, spoolss_notify, and remote_pac rpc tests.
2012-05-23 17:51:50 +03:00
Jelmer Vernooij
cf67da70c9 libreplace: Fix symbol names for snprintf/asprintf/vasprintf.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun May 13 05:16:28 CEST 2012 on sn-devel-104
2012-05-13 05:16:28 +02:00
Simo Sorce
1fbc185725 replace: Fix use of mktemp
mktemp always returns the template, so checking for NULL doesn't cactch any
error. Errors are reported by turning the template into an empty string.

Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Thu Apr 26 16:14:24 CEST 2012 on sn-devel-104
2012-04-26 16:14:24 +02:00
Alexander Bokovoy
594e316181 lib/replace: split out GSSAPI from lib/replace/system/kerberos.h into lib/replace/system/gssapi.h
With waf build include directories are defined by dependencies specified to subsystems.
Without proper dependency <gssapi/gssapi.h> cannot be found for embedded Heimdal builds
when there are no system-wide gssapi/gssapi.h available.

Split out GSSAPI header includes in a separate replacement header and use that explicitly
where needed.

Autobuild-User: Alexander Bokovoy <ab@samba.org>
Autobuild-Date: Wed Apr 25 00:18:33 CEST 2012 on sn-devel-104
2012-04-25 00:18:32 +02:00
Andrew Tridgell
2eb899de6a replace: added ENOATTR define if undefined
this fixes the build of the tdb xattr wrapper code on systems without
xattr headers

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2012-04-18 07:48:05 +02:00
Jeremy Allison
81d17493d6 Remove overly complex attemt to define blkcnt_t and blksize_t. AC_CHECK_TYPE should just do it.
Still trying to fix the buildfarm.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Apr 12 04:28:29 CEST 2012 on sn-devel-104
2012-04-12 04:28:29 +02:00
Jeremy Allison
d425a4cd3d On advice from Jelmer and Andrew, move the blksize_t and blkcnt_t tests into libreplace to make it standalone.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Apr 10 04:07:11 CEST 2012 on sn-devel-104
2012-04-10 04:07:11 +02:00
Jeremy Allison
5701a4d861 Move blksize_t and blkcnt_t to replace.h from includes.h. Should help with platforms that don't have these.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Apr  9 21:40:42 CEST 2012 on sn-devel-104
2012-04-09 21:40:40 +02:00
Volker Lendecke
5184f41cd8 libreplace: We have a poll replacement based on select
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Mon Apr  9 19:39:51 CEST 2012 on sn-devel-104
2012-04-09 19:39:51 +02:00
Andrew Bartlett
813d31183d lib/replace: Add getconf LFS_CFLAGS support to autoconf build 2012-04-05 02:39:08 +02:00
Jelmer Vernooij
3c9b32b5eb replace: Avoid DEBUG(), which is not available in libreplace.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Mar 25 00:13:59 CET 2012 on sn-devel-104
2012-03-25 00:13:59 +01:00
Jelmer Vernooij
49eca290d3 libreplace: Add usleep implementation. 2012-03-24 22:41:05 +01:00
Jelmer Vernooij
456abea894 replace: Work around socket wrapper.
It's fine to ignore socket wrapper here, as it doesn't deal with unix domain sockets.
2012-03-24 17:05:29 +01:00
Jelmer Vernooij
10dd5f186f replace: Add system/network.h for ucred struct. 2012-03-24 16:50:37 +01:00
Jelmer Vernooij
71d41a015a libreplace: Add getpeereid implementation. 2012-03-24 16:00:36 +01:00
Jelmer Vernooij
d4c4cb06c5 replace: Move memalign() from lib/util/system.c to libreplace. 2012-03-24 14:43:21 +01:00
Rusty Russell
584b996a1a lib/replace: test for incoherent mmap.
We test for other mmap features here, and both tdb1 and tdb2 want this check.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-03-22 01:57:37 +01:00
Andrew Bartlett
3cd7fdab62 build: Add libbsd as a dep for LIBREPLACE_HOSTCC
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Feb 20 02:58:20 CET 2012 on sn-devel-104
2012-02-20 02:58:20 +01:00
Jelmer Vernooij
e3dac4b61a replace: Only add bsd dependency when bsd library was found.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Feb  2 05:18:45 CET 2012 on sn-devel-104
2012-02-02 05:18:45 +01:00
Jelmer Vernooij
5931e1da87 replace: Add include for bsd/string.h. 2012-02-01 01:07:11 +01:00
Ira Cooper
a1901b55cf Fix bug #8729 - getpass regressions on Solaris/Illumos - 3.6 and master.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Jan 31 23:28:09 CET 2012 on sn-devel-104
2012-01-31 23:28:09 +01:00
Jelmer Vernooij
c83ce7bcc6 replace: Only include C files from which there are actually functions used.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Jan 31 15:21:04 CET 2012 on sn-devel-104
2012-01-31 15:21:04 +01:00
Jelmer Vernooij
5c50e08983 replace: use libbsd for strlcat/strlcpy when available. 2012-01-31 13:44:17 +01:00
Volker Lendecke
c3a4057a21 libreplace: Don't check for standards.h on darwin (Lion)
standards.h on Lion holds a #warning that standards.h will be removed. This is
annoying during the build.
2011-12-25 13:31:58 +01:00
Andreas Schneider
7b5fb7d9e8 replace: Add don't include unistd.h directly and add uid_wrapper. 2011-10-27 13:32:02 +02:00
Andreas Schneider
7cb08171ce Include uid_wrapper correctly. 2011-10-27 13:32:02 +02:00
Andreas Schneider
c7fbcf9b98 replace: Add checks for setreuid and setregid. 2011-10-27 13:32:00 +02:00
Andreas Schneider
72c95baa4b replace: Make sure we compile without uid_wrapper. 2011-10-27 13:32:00 +02:00
Michael Adam
0ef506d4f3 libreplace: add a missing "eval" to the AC_VERIFY_C_PROTOTYPE macro
Without this eval, upon test success the corresponding actions
(like defining corresponding variables) are not taken.

Found by Timur I. Bakeyev, and based on his patch for 3.5.
2011-10-14 15:11:16 +02:00
Rusty Russell
5dcce64bbd config.h: define HAVE_LIBREPLACE
tdb2 wants to know if it should use replace.h.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Thu Oct 13 08:58:35 CEST 2011 on sn-devel-104
2011-10-13 08:58:35 +02:00
Stefan Metzmacher
2c741efc99 lib/replace: include <sys/uio.h> in "system/filesys.h" in order to have struct iovec
This is needed on some platforms, e.g. NetBSD5.

metze
2011-09-08 08:51:48 +02:00
Simo Sorce
a171938408 replace: Check if we have mremap() available 2011-08-14 19:51:45 -04:00
Jeremy Allison
0c67efdd68 Fix bug 7462 - Non-standard SA_RESETHAND is used in ...lib/tevent/tevent_signal.c
Make SA_RESETHAND conditional on its existance.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Aug  1 22:03:45 CEST 2011 on sn-devel-104
2011-08-01 22:03:45 +02:00
Björn Jacke
65f0800a34 replace: remove waring if IOV_MAX is not defined
as discussed on samba-techincal we currelty don't rely on it and we don't want
to flood this warning message during compile.

Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Tue May 31 18:36:53 CEST 2011 on sn-devel-104
2011-05-31 18:36:53 +02:00
Björn Jacke
a4d03620cb replace: fix build issues on GNU Hurd (#7998)
Patch from Samuel Thibault <sthibault@debian.org> to fix Debian Bug 610678
resp. BSO #7998. IOV_MAX and UIO_MAXIOV are not defined on GNU Hurd.

Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Mon May 30 00:53:59 CEST 2011 on sn-devel-104
2011-05-30 00:53:59 +02:00
Jeremy Allison
66c3d5d74b Fix bug found when building on an IPv6-only system by Kai Blin.
When building on IPv6-only, doing:

hints.ai_family = AF_INET;
getaddrinfo("0.0.0.0", NULL, &hints, &ppres)

fails as AF_INET is unavailable on an IPv6-only system. This
causes us to fallback to our replacement getaddrinfo code
which is IPv4-only.

As we're only trying to detect a specific AIX bug here,
broaden the tests to find that bug, and also test for
working getaddrinfo in an IPv6-only safe way.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu May 19 02:21:54 CEST 2011 on sn-devel-104
2011-05-19 02:21:54 +02:00
Michael Adam
0791da4fdd lib/replace: fix an #if HAVE_GSSAPI_GSSAPI_EXT_H to be an #ifdef 2011-05-10 20:54:06 +02:00
Gordon Ross
ac25835ab7 Fix Samba3 on OpenIndiana.
I'd like Samba to use the native OpenLDAP and MIT Kerberos libs.
Attached are some patches to do that. (relative to git master)
It does not build for me without these.

(OpenIndiana is an off-shoot of OpenSolaris  See http://www.openindiana.org)

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat May  7 02:20:14 CEST 2011 on sn-devel-104
2011-05-07 02:20:14 +02:00
Andrew Bartlett
e1eae82285 kerberos: Only include gssapi/gssapi_krb5.h when available 2011-04-30 04:58:04 +02:00
Andrew Bartlett
e04bab4a19 libcli/auth Move Samba4's gssapi_error_string from GENSEC to libcli/auth
This will allow the GSSAPI PAC fetch code to use it.

Andrew Bartlett
2011-04-27 11:21:37 +10:00
Andrew Bartlett
4ba1375526 libcli/auth Move krb5 wrapper functions from s3 into common
This requires a small rework of the build system to ensure that the
correct #define statements are made in both the s3 and top level
builds.  We now define the various HAVE_ macros in config.h at all
times, using heimdal_build/wscript_configure when that is in use.

Andrew Bartlett
2011-04-14 16:38:26 +10:00
Jelmer Vernooij
a8eea9e946 lib/replace/test: Add missing include for prototype.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Mar 19 16:45:56 CET 2011 on sn-devel-104
2011-03-19 16:45:56 +01:00
Jelmer Vernooij
f70a658b82 libreplace: Fix prototypes for all functions. 2011-03-19 03:20:05 +01:00
Günther Deschner
9167d70e77 libreplace: move "struct timespec" checks into libreplace (where timespec is already used).
Bjoern, Metze, please check.

Guenther
2011-03-04 00:28:27 +01:00
Volker Lendecke
0fc1650e09 libreplace: poll based on select 2011-02-28 16:40:19 +01:00
Andrew Tridgell
e1f2442096 s3-waf: move the KRB5_DEPRECATED configure check out of lib/replace
this needs to be in souce3/, as otherwise it can't handle an in-tree
kerberos library

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-17 00:55:56 +01:00
Sumit Bose
d02b5cd655 replace: Add missing eval to m4 script
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Feb 10 16:14:21 CET 2011 on sn-devel-104
2011-02-10 16:14:21 +01:00
Günther Deschner
6baa3ef648 waf: add clock_gettime clock ID checks to libreplace wscript.
Guenther
2011-02-07 13:21:50 +01:00
Andrew Tridgell
8b8caac6d0 build: removed the old autogen.sh and autogen-waf.sh scripts
for the builds that use waf only, these are no longer needed and just
cause confusion

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-07 15:03:40 +11:00
Stefan Metzmacher
1e42aa6b3a replace: Try to fix broken sys/capabilites.h on Linux.
As this is more or less a broken header we need to include linux/types.h
before sys/capabilities.h to avoid redefinitions.

Systems like ClearOS 5.2 need linux/types.h very early.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Feb  3 05:26:12 CET 2011 on sn-devel-104
2011-02-03 05:26:11 +01:00
Stefan Metzmacher
5f18925e69 Revert "replace: Try to fix broken sys/capabilites.h on Linux."
This reverts commit c2207e9b2c.

This still doesn't build for me on ClearOS 5.2.

metze
2011-02-03 04:32:43 +01:00
Andreas Schneider
c2207e9b2c replace: Try to fix broken sys/capabilites.h on Linux.
As this is more or less a broken header we need to include linux/types.h
before sys/capabilities.h to avoid redefinitions.

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Wed Feb  2 11:57:04 CET 2011 on sn-devel-104
2011-02-02 11:57:04 +01:00
Andrew Tridgell
005c6370cd waf: ensure "make dist" works from a clean git tree for all libraries
this uses a temporary waf lock file to force the build directory

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Sat Jan  8 02:35:22 CET 2011 on sn-devel-104
2011-01-08 02:35:22 +01:00
Matthias Dieter Wallnöfer
da78e24ca2 lib/replace/testsuite.c - fix test output 2010-12-23 12:42:37 +01:00
Matthieu Patou
93ea5cb6f0 change searched name from _ss_family to __ss_family
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Sun Dec 12 20:05:23 CET 2010 on sn-devel-104
2010-12-12 20:05:23 +01:00
Matthieu Patou
864335ec18 build: add a check for _ss_family as it used on aix to replace ss_family 2010-12-12 12:07:39 +03:00
Matthieu Patou
993b4aa07e replace: add comments to make the #ifdef/#else/endif more readable 2010-12-12 12:07:38 +03:00
Matthieu Patou
617871ee28 build: add a dependency on lib iconv for lib intl if we are not able to find it
This is due that on some platform lib intl depend on lib iconv, failling
to provide this library cause waf to be unable to link with lib intl and
makes it think that the library doesn't exists !
2010-12-11 19:21:09 +03:00
Matthias Dieter Wallnöfer
7128c15b65 replace:wscript - reintroduce the size check for "bool" due to a request of metze 2010-11-28 16:38:16 +01:00
Matthias Dieter Wallnöfer
3c0725001e replace:wscript - change the "bool" checks to be compatible with more platforms
- If the type was found then we are fine and define "HAVE_BOOL"
- Othewise we substitute it in "replace.h" as "_Bool" or if not possible as "int"
- This prevents lot of warnings on platforms where we don't have a "bool" type as Tru64
- The length check for "bool" is not really useful and therefore removed
2010-11-28 16:38:16 +01:00
Matthias Dieter Wallnöfer
ef8349e28d replace:wscript - reintroduce the size check for "bool" due to a request of metze
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sun Nov 28 15:48:40 CET 2010 on sn-devel-104
2010-11-28 15:48:40 +01:00
Matthias Dieter Wallnöfer
b028a6001a replace:wscript - change the "bool" checks to be compatible with more platforms
- If the type was found then we are fine and define "HAVE_BOOL"
- Othewise we substitute it in "replace.h" as "_Bool" or if not possible as "int"
- This prevents lot of warnings on platforms where we don't have a "bool" type as Tru64
- The length check for "bool" is not really useful and therefore removed
2010-11-28 13:33:19 +01:00
Andrew Tridgell
14718a725b build: a more portable way of finding waf in makefiles
this avoids using the non-portable shell command in makefiles

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Nov  3 22:44:59 UTC 2010 on sn-devel-104
2010-11-03 22:44:59 +00:00
Stefan Metzmacher
d1dd2117db replace/wscript: add size checks for stdint.h types
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Nov  3 19:12:39 UTC 2010 on sn-devel-104
2010-11-03 19:12:39 +00:00
Stefan Metzmacher
f5a6c1e6dc replace/wscript: do the size checks directly after the type checks
metze
2010-11-03 18:31:16 +00:00
Stefan Metzmacher
811a36282a replace/wscript: define bool to int instead of off_t
metze
2010-11-03 18:31:16 +00:00
Stefan Metzmacher
3dcec24173 replace/wscript: check for uint8_t
metze
2010-11-03 18:31:16 +00:00
Jelmer Vernooij
d5883c8d00 replace/talloc: Avoid automatically pulling in new configure/Makefile,
as these files are checked in, and the source might not be available.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Oct 31 22:27:56 UTC 2010 on sn-devel-104
2010-10-31 22:27:56 +00:00
Jelmer Vernooij
c402e75be9 replace: Look harder for waf. 2010-10-31 17:24:04 +00:00
Jelmer Vernooij
f99c009b61 replace: Build using waf by default.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Oct 31 02:45:21 UTC 2010 on sn-devel-104
2010-10-31 02:45:21 +00:00
Jelmer Vernooij
4dee76f1cd replace: Fix formatting.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Oct 30 16:32:15 UTC 2010 on sn-devel-104
2010-10-30 16:32:15 +00:00
Jelmer Vernooij
d1eba07e54 replace: Avoid autoproto as it breaks standalone builds.
Automatic prototype generation uses ../../source4/script/mkproto.pl.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2010-10-30 17:49:41 +02:00
Jelmer Vernooij
58e99ae916 replace: Only build replace-test in standalone build.
This allows turning libreplace-test back into a subsystem.
2010-10-30 17:49:38 +02:00
Andrew Tridgell
d6299d2667 replace: create a private replace-test library
used by replace_testuite and smbtorture
2010-10-30 23:48:59 +11:00
Matthieu Patou
62eb450bc2 replace: restore the order for #define + rep_strtoll 2010-10-26 23:59:55 +04:00
Jelmer Vernooij
49ef288819 waf: Rename some BUNDLED_ functios to PRIVATE_. 2010-10-23 22:24:06 +00:00
Stefan Metzmacher
96601cab1c lib/replace: use snprintf() in test code to avoid warnings in the IBM-Checker
metze
2010-10-23 08:49:29 +02:00
Stefan Metzmacher
d65896cc3c lib/replace: fix rep_strtoull() prototype
metze
2010-10-23 08:49:28 +02:00
Matthieu Patou
4ea7d4694a replace: use replace for non 'samba' compliant strptime 2010-10-22 01:00:54 +04:00
Matthieu Patou
2d0ac59fcc replace: use a wrapper around strtoll if it didn't behave as expected 2010-10-22 01:00:53 +04:00
Andrew Tridgell
a913e79ee5 replace: make libreplace a private library
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-21 19:03:24 +11:00
Andrew Tridgell
ec90b249ec replace: cope with systems that have fdatasync(), but don't have the prototype
this is needed for MacOSX 10.4.1
2010-10-19 11:22:35 +11:00
Björn Jacke
9b73bb0099 libreplace: fix endless strerror_r has been redefined warnings on AIX 2010-09-22 11:18:59 -07:00
Björn Jacke
9c00fb4aa6 libreplace: use CLOCK_HIGHRES when available
in Solaris 8 CLOCK_HIGHRES was the (only) name for CLOCK_MONOTONIC
2010-09-14 22:11:59 +02:00
Matthias Dieter Wallnöfer
ea3f21dff6 lib/replace/wscript:Tru64 build - Better use version 600 for _XOPEN_SOURCE
This means we request the "Single UNIX Specification, Version 3" with C99
compatibility as the Python 2.5 release on the system. This prevents
redefinitions with different values.

> [ 451/1918] Compiling scripting/python/pyglue.c
> cc: Warning: /usr/local/include/python2.5/pyconfig.h, line 951: The redefinition of the macro "_XOPEN_SOURCE" conflicts with a current definition because the replacement lists differ.  The redefinition is now in effect. (macroredef)
> #define _XOPEN_SOURCE 600
> ----------------------^
> cc: Warning: default/source4/include/config.h, line 54: The redefinition of the macro "_XOPEN_SOURCE" conflicts with a current definition because the replacement lists differ.  The redefinition is now in effect. (macroredef)
> #define _XOPEN_SOURCE 500
> ----------------------^
2010-09-11 17:23:55 +02:00
Matthias Dieter Wallnöfer
2442d25636 lib/replace:wscript - additional attempt to fix the build on Tru64
Obviously we really need both definitions ("socklen_t" has been found by
"_XOPEN_SOURCE"=500). But now FIONREAD wasn't accessible.
2010-09-11 12:18:33 +02:00
Matthias Dieter Wallnöfer
b8f28c2e70 lib/replace:wscript - don't check twice for type "bool" 2010-09-11 09:16:22 +02:00
Matthias Dieter Wallnöfer
ae5d807725 lib/replace:wscript - attempt to fix the features detection on Tru64
Hopefully now we detect the built-in "socklen_t"

https://bugs.internet2.edu/jira/browse/SSPCPP-114
http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V50_HTML/MAN/MAN5/0001____.HTM
2010-09-11 09:16:22 +02:00
Björn Jacke
e2de1b8e71 libreplace: clock_gettime sets errno 2010-09-10 23:10:26 +02:00
Björn Jacke
7c88ccde30 replace/waf: add rt to deps at this place 2010-08-31 11:33:22 +02:00
Björn Jacke
63b1f2ee81 libreplace: make a define for a best effort monotonic clock 2010-08-31 10:24:37 +02:00
Björn Jacke
3df1037a74 libreplace: add clock_gettime replacement function for systems that don't have it 2010-08-31 09:07:29 +02:00
Björn Jacke
9f87bc4588 libreplace/waf: look for clock_gettime 2010-08-31 09:07:22 +02:00
Björn Jacke
4e104f185e libreplace: move detection of clock_gettime to libreplace 2010-08-31 09:07:13 +02:00
Björn Jacke
e8662248c8 libreplace: move gettimeofday TZ arg check here 2010-08-31 09:07:08 +02:00
Jelmer Vernooij
481044f8b3 replace: Fix ifndefs for formatting defines.
Thanks to Michael Brown for pointing this out.
2010-08-23 15:10:07 +02:00
Andrew Tridgell
0d7557e2dc libreplace: fixed the strptime() waf test
Thanks to Jelmer for pointing this out
2010-08-23 15:55:38 +10:00
Björn Jacke
5390baeb6b tdb: add TDB_DEPS variable filled with required libraries
This is required for Solaris, which needs to link in librt to make use of
fdatasync().
2010-08-13 14:57:44 +02:00
Jelmer Vernooij
f2527d217c replace: Avoid hiding symbols when libreplace is builtin, as this
appears to cause unresolved symbols at the moment.
2010-06-18 23:51:40 +02:00
James Peach
3eac633522 libreplace: Fix readline build with libedit.
libedit on MAc OSX 10.5 does not have the rl_completion_t typedef,
but uses a internal typedef names CPPFunction.

Signed-off-by: Günther Deschner <gd@samba.org>
2010-06-03 16:33:43 +02:00
Günther Deschner
fc9644a7d6 lib/replace: fix some c++ build warnings in testsuite.
Guenther
2010-06-01 16:49:24 +02:00
Björn Jacke
6a78241f4a libreplace: include sys/file.h only when available
thanks to Joachim Schmitz <schmitz@hp.com>. This fixes #7460.
2010-05-30 21:46:35 +02:00
Volker Lendecke
4a653798df fix a typo 2010-05-24 18:25:38 +02:00
Andrew Tridgell
c85008e084 s3-waf: move the KRB5_DEPRECATED check into lib/replace
this needs to be with the krb5.h check
2010-05-20 22:16:13 +02:00
Kai Blin
f860a12d2f build: Don't look for krb5.h in libreplace 2010-05-20 22:16:13 +02:00
Björn Jacke
eff3a41bb8 waf:libreplace: set _OSF_SOURCE to fix build on Tru64 2010-05-11 15:25:54 +02:00
Stefan Metzmacher
26e6fb0efe lib/replace/wscript: make sure IPV6_V6ONLY is available for IPv6 support
We really on IPV6_V6ONLY being supported.

metze
2010-04-24 20:30:24 +02:00
Stefan Metzmacher
41cd6f9928 lib/replace: make sure IPV6_V6ONLY is available for IPv6 support
We really on IPV6_V6ONLY being supported.

metze
2010-04-24 20:30:23 +02:00
Stefan Metzmacher
db29b2d6d2 lib/replace/wscript: add replacement for IPV6_V6ONLY on linux systems with broken headers
This is needed on SLES8.

metze
2010-04-24 20:30:23 +02:00
Stefan Metzmacher
e06cf39502 lib/replace: add replacement for IPV6_V6ONLY on linux systems with broken headers
This is needed on SLES8.

metze
2010-04-24 20:30:17 +02:00
Andrew Tridgell
7818e2cc8c replace-waf: hide symbols in libreplace if a builtin library 2010-04-18 15:00:37 +10:00
Andrew Tridgell
4e448e2d2c libreplace: added _PUBLIC_ and _PRIVATE_ to replace.h
these are needed for all libs that use ABI checking, so libreplace
is the logical place for now
2010-04-18 15:00:37 +10:00
Stefan Metzmacher
8921834be8 lib/replace/wscript: avoid global deps for LIBREPLACE_HOSTCC
metze
2010-04-12 12:31:14 +02:00
Stefan Metzmacher
2a727ef6e7 lib/replace/wscript: inline LIBREPLACE_EXT into 'replace' as the autoconf system does
metze
2010-04-12 12:31:14 +02:00
Stefan Metzmacher
dd38853b56 lib/replace/wscript: add dependency to 'dl'
metze
2010-04-12 12:31:13 +02:00
Stefan Metzmacher
14c05405cb lib/replace/wscript: rename LIBREPLACE_H => LIBREPLACE_HOSTCC
metze
2010-04-12 12:31:13 +02:00
Andrew Tridgell
d70a7befb6 s4-waf: move the KRB5_DEPRECATED check into lib/replace
this needs to be with the krb5.h check for the source3 build
2010-04-12 17:47:29 +10:00
Stefan Metzmacher
33bb334e80 s4-waf: inline LIBREPLACE_NETWORK into 'replace'
metze
2010-04-12 09:13:43 +02:00
Stefan Metzmacher
b1393087ac lib/replace/wscript: rename REPLACE_H_SOURCE => REPLACE_HOSTCC_SOURCE
metze
2010-04-12 09:13:42 +02:00
Stefan Metzmacher
0d307f25a0 lib/replace/wscript: implement the same getpass detection logic as the autoconf version
metze
2010-04-12 08:52:03 +02:00
Stefan Metzmacher
e37b834a62 lib/replace/wscript: inline LIBREPLACE_GETPASS into 'replace'
metze
2010-04-12 08:39:44 +02:00
Andrew Tridgell
98942c8d84 build: use a common autogen-waf.sh for all builds
the symlink will get updated with the right target when waf dist is
used in each directory
2010-04-12 11:17:35 +10:00
Stefan Metzmacher
b2e1441864 lib/replace: create a LIBREPLACE_H subsystem
metze
2010-04-10 09:51:28 +02:00
Andrew Tridgell
7ae4372124 s4-waf: fixed waf distcheck for our standalone libs and s4 2010-04-06 20:27:26 +10:00
Andrew Tridgell
ccfce0bbae s4-waf: autogen-waf.sh for the standalone library builds 2010-04-06 20:27:25 +10:00
Andrew Tridgell
553324bc10 s4-waf: move to a universal method of recursing into subdirs
This works with both standalone lib builds and bundled builds
2010-04-06 20:27:25 +10:00
Andrew Tridgell
8dc8d31f4a s4-waf: fixed finding of buildtools and srcdir 2010-04-06 20:27:25 +10:00
Andrew Tridgell
1883ee6dbc s4-waf: avoid having to run waf configure before waf dist
This should be useful for building tarballs from a clean checkout
2010-04-06 20:27:25 +10:00
Andrew Tridgell
b498378c8f s4-waf: fixed some of the group ordering
We need to try to keep targets in the right groups
2010-04-06 20:27:18 +10:00