summaryrefslogtreecommitdiff
path: root/lib/replace
AgeCommit message (Collapse)AuthorFilesLines
2015-10-01libreplace: Fix the build on SolarisVolker Lendecke2-1/+6
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2015-09-10replace: Fix check for gettimeofday()Andreas Schneider1-1/+3
The check does not include <sys/time.h> the test might fail with a implicit function declaration error. 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 Sep 10 00:36:16 CEST 2015 on sn-devel-104
2015-08-19replace: Fix bug 11455Volker Lendecke1-0/+1
Don't call rep_strtoull recursively Bug: https://bugzilla.samba.org/show_bug.cgi?id=11455 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Wed Aug 19 11:22:38 CEST 2015 on sn-devel-104
2015-07-29lib: replace: Add strsep function (missing on Solaris).Jeremy Allison3-2/+27
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11359 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ira Cooper <ira@wakeful.net> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jul 29 02:24:55 CEST 2015 on sn-devel-104
2015-06-22replace: Replace BSD strtoll by wrapping strtoll instead of strtoqFelix Janda1-6/+2
When it is detected that strtoll returns EINVAL not only in the case that the base is not supported, HAVE_BSD_STRTOLL is declared and strtoll is replaced. The current replacement code wraps strtoq in order to replace strtoll and errors out when strtoq is missing. In order to remove this possible error path, we can use strtoll instead of strtoq since the code is only used when it is known that strtoll exists. The fixes a compilation problem on linux systems using musl libc, which has a BSD-like strtoll but no strtoq. Signed-off-by: Felix Janda <felix.janda@posteo.de> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: "Stefan (metze) Metzmacher" <metze@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Jun 22 12:49:10 CEST 2015 on sn-devel-104
2015-06-12lib/replace: remove unused ↵Stefan Metzmacher1-10/+0
HAVE_DECL_PTHREAD_{MUTEXATTR_SETROBUST,MUTEX_CONSISTENT}_NP checks BUG: https://bugzilla.samba.org/show_bug.cgi?id=11319 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2015-06-12lib/replace: fix PTHREAD_MUTEX_ROBUST fallback to PTHREAD_MUTEX_ROBUST_NP on ↵Stefan Metzmacher2-6/+9
solaris 11 Without this we got the following defines in config.h: #define HAVE_DECL_PTHREAD_MUTEXATTR_SETROBUST_NP 1 #define HAVE_DECL_PTHREAD_MUTEX_CONSISTENT_NP 1 #define HAVE_PTHREAD_MUTEXATTR_SETROBUST 1 #define HAVE_PTHREAD_MUTEX_CONSISTENT 1 #define HAVE_ROBUST_MUTEXES 1 #define USE_TDB_MUTEX_LOCKING 1 And the build failed with PTHREAD_MUTEX_ROBUST being unknown. Note that PTHREAD_MUTEX_ROBUST and PTHREAD_MUTEX_ROBUST_NP are enum values while they're defines on solaris 11 BUG: https://bugzilla.samba.org/show_bug.cgi?id=11319 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2015-06-10lib/replace: add signal related configure checksStefan Metzmacher1-0/+1
These should be in a central place available for all lib/replace users instead of having each caller do its own checks. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11326 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2015-05-06lib: Fix CID 1034836 Resource leakVolker Lendecke1-0/+4
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
2015-03-31replace: check for dirname() and basename()David Disseldorp1-1/+2
These functions are provided by libgen.h, and conform to POSIX.1-2001. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-03-26Move waf into third_party/.Jelmer Vernooij1-1/+1
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2015-03-26replace: clean-up strlcpy and add note on return valueDavid Disseldorp1-4/+12
The existing implementation uses single line ifs, making the code hard to visually parse. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2015-03-13replace: Remove superfluous check for gcrypt header.Andreas Schneider1-1/+1
We only need to check for the header if we need gnutls with gcrypt support. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11135 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Mar 13 01:00:27 CET 2015 on sn-devel-104
2015-03-10lib: Fix CID 1034840 Resource leakVolker Lendecke1-0/+5
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
2015-03-10lib: Fix CID 1034839 Resource leakVolker Lendecke1-0/+7
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
2015-03-10lib: Fix CID 1034838 Resource leakVolker Lendecke1-0/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
2015-03-10libreplace: Fix CID 1034926 Destination buffer too smallVolker Lendecke1-1/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
2015-02-15Add Solaris ports as a tevent backend.Jeremy Allison2-0/+9
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Sun Feb 15 23:25:07 CET 2015 on sn-devel-104
2015-02-12snprintf: Try to support %jVolker Lendecke1-0/+4
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Feb 12 23:34:33 CET 2015 on sn-devel-104
2015-01-08wafsamba: move -fvisibility=hidden checks from lib/replace to wafsambaStefan Metzmacher1-7/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2015-01-08wafsamba: move '-fstack-protector' checks from lib/replace to wafsambaStefan Metzmacher1-4/+0
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-08wafsamba: move WERROR_CFLAGS checks from lib/replace to wafsambaStefan Metzmacher1-13/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2015-01-08wafsamba: move compiler / cflags related stuff from lib/replace to wafsambaStefan Metzmacher1-21/+0
We should have this just in one central place. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2014-11-10Don't use a nested function when testing for visibility attribute support.Jelmer Vernooij1-2/+2
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-09-19replace: Fix includes of unistd.hMartin Schwenke3-4/+9
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-17replace: Make EWOULDBLOCK always availableVolker Lendecke2-0/+5
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-08-31Look for system setproctitle before trying -lbsd.Jelmer Vernooij1-2/+2
Change-Id: I390c186d7c1400287c6a18909a5d6587f2052243 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-08-31replace: remove tabs.Jelmer Vernooij1-4/+4
Change-Id: Ie87f3c8a60f6292b7d2302425c946f5befaf5fcc Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-08-31replace: remove unused and duplicate imports.Jelmer Vernooij1-2/+2
Change-Id: I6cfd2cf80efe19fa31bcd6b3881a1eb01f05d1b4 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-08-20replace: Remove unused item returned by FAILED()Martin Schwenke1-1/+1
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-06-20replace:build: improve detection of srcdirMichael Adam1-1/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2014-06-07lib: tevent: make TEVENT_SIG_INCREMENT atomic.Jeremy Allison2-0/+30
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-05-22libreplace: Define PTHREAD_MUTEX_ROBUST along with pthread_mutexattr_setrobustVolker Lendecke1-0/+8
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-22libreplace-waf: Only check for _np functions if standard functions are not ↵Volker Lendecke1-8/+14
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-22libreplace: Add support for pthread_mutex_consistentVolker Lendecke2-2/+17
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-22libreplace: Add support for pthread_mutexattr_setrobustVolker Lendecke2-0/+49
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-22libreplace: only add PTHREAD CFLAGS and LDFLAGS globally if asked forStefan Metzmacher1-2/+3
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-22libreplace: Move thread checks from source3/wscriptVolker Lendecke1-0/+32
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-04-17Remove special socket_wrapper code.Andreas Schneider3-13/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17replace: Add socket_wrapper_enabled().Andreas Schneider2-0/+6
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17Remove special nss_wrapper codeAndreas Schneider2-13/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17replace: Add nss_wrapper_hosts_enabled().Andreas Schneider2-0/+6
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17replace: Add nss_wrapper_enabled().Andreas Schneider2-0/+6
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17Remove uid_wrapper related code.Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17lib: Change uid_wrapper to preloadable version.Andreas Schneider3-33/+0
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-17replace: Add uid_wrapper_enabled().Andreas Schneider3-0/+34
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-15auth: Remove plaintext OSF1 password supportAndrew Bartlett1-3/+0
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-02-13waf:lib/replace fix iconv checks on HP/UXChristian Ambach1-1/+1
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-01-24libreplace: free() deals fine with NULL pointersVolker Lendecke1-6/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-01-17waf:lib/replace gettext configure checksChristian Ambach1-0/+9
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