summaryrefslogtreecommitdiffstats
path: root/lib/replace/replace.h
Commit message (Collapse)AuthorAgeFilesLines
* replace: Make EWOULDBLOCK always availableVolker Lendecke2014-09-171-0/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: tevent: make TEVENT_SIG_INCREMENT atomic.Jeremy Allison2014-06-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | 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>
* replace: Add socket_wrapper_enabled().Andreas Schneider2014-04-171-0/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* replace: Add nss_wrapper_hosts_enabled().Andreas Schneider2014-04-171-0/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* replace: Add nss_wrapper_enabled().Andreas Schneider2014-04-171-0/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* replace: Add uid_wrapper_enabled().Andreas Schneider2014-04-171-0/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* lib/replace: add SCNx macrosChristian Ambach2013-05-061-0/+39
| | | | | | | 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>
* lib/replace: prefer inttypes.h over stdint.hChristian Ambach2013-05-061-4/+4
| | | | | | | | | 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>
* heimdal_build: Try again to sort out the strerror_r messAndrew Bartlett2013-01-191-1/+2
| | | | Reviewed-by: Stefan Metzmacher <metze@samba.org>
* replace: Remove deprecated getpass() support.Andreas Schneider2012-12-031-11/+0
| | | | Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* lib/replace: Do not use STRERROR_R_PROTO_COMPATIBLE as only roken.h sets thisAndrew Bartlett2012-11-221-3/+1
| | | | | | | | Currently, we put strerror_r into libreplace even on systems with strerror_r. Andrew Bartlett Reviewed-by: Andreas Schneider <asn@samba.org>
* lib/replace: replace all *printf function if we replace snprintf (bug #9390)Stefan Metzmacher2012-11-141-12/+30
| | | | | | | | | | 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
* replace: Support setproctitle().Jelmer Vernooij2012-09-241-0/+9
| | | | | This uses the setproctitle() from libc, libsetproctitle or libbsd. If none is available it provides a dummy implementation.
* osX define uint64_t as long long intMatthieu Patou2012-09-101-1/+1
|
* replace: make the INT64_MAX define more portableBjörn Jacke2012-07-041-1/+1
|
* replace: define INT64_MAX when not definedBjörn Jacke2012-06-281-0/+4
| | | | | | | 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
* lib/replace: define HAVE_WORKING_STRPTIME instead of REPLACE_STRPTIMEStefan Metzmacher2012-06-141-1/+1
| | | | | | That makes the logic in 'wscript' simpler. metze
* librepace: put #defines after #include "sys/xattr.h"Andrew Bartlett2012-06-031-40/+0
| | | | | | | | | 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
* libreplace: Fix build on MacOS where we have the same fn name but more argumentsAndrew Bartlett2012-06-021-8/+8
| | | | | Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Sat Jun 2 15:52:51 CEST 2012 on sn-devel-104
* lib/replace: Merge remaining xattr test details from lib/utilAndrew Bartlett2012-06-021-8/+8
| | | | | | | I prefer the longer XATTR_ADDITIONAL_OPTIONS define and the NULL rather than 0 values in the getxattr test. Andrew Bartlett
* lib/replace: xattr wrappers in lib/replace rather than source3/lib/system.cAndrew Bartlett2012-06-021-0/+40
| | | | | | | This also moves all the still-used configure tests etc. The unused OSF API is also removed at this time. Andrew Bartlett
* On advice from Jelmer and Andrew, move the blksize_t and blkcnt_t tests into ↵Jeremy Allison2012-04-101-8/+0
| | | | | | | 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
* Move blksize_t and blkcnt_t to replace.h from includes.h. Should help with ↵Jeremy Allison2012-04-091-0/+8
| | | | | | | 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
* libreplace: Add usleep implementation.Jelmer Vernooij2012-03-241-0/+6
|
* libreplace: Add getpeereid implementation.Jelmer Vernooij2012-03-241-0/+9
|
* replace: Move memalign() from lib/util/system.c to libreplace.Jelmer Vernooij2012-03-241-0/+9
|
* replace: Add include for bsd/string.h.Jelmer Vernooij2012-02-011-0/+4
|
* Fix bug #8729 - getpass regressions on Solaris/Illumos - 3.6 and master.Ira Cooper2012-01-311-0/+11
| | | | | Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Jan 31 23:28:09 CET 2012 on sn-devel-104
* libreplace: poll based on selectVolker Lendecke2011-02-281-0/+5
|
* replace: Try to fix broken sys/capabilites.h on Linux.Stefan Metzmacher2011-02-031-0/+7
| | | | | | | | | | | | 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
* replace: restore the order for #define + rep_strtollMatthieu Patou2010-10-261-3/+3
|
* lib/replace: fix rep_strtoull() prototypeStefan Metzmacher2010-10-231-2/+2
| | | | metze
* replace: use a wrapper around strtoll if it didn't behave as expectedMatthieu Patou2010-10-221-0/+12
|
* replace: cope with systems that have fdatasync(), but don't have the prototypeAndrew Tridgell2010-10-191-0/+2
| | | | this is needed for MacOSX 10.4.1
* libreplace: fix endless strerror_r has been redefined warnings on AIXBjörn Jacke2010-09-221-0/+1
|
* libreplace: add clock_gettime replacement function for systems that don't ↵Björn Jacke2010-08-311-0/+4
| | | | have it
* replace: Fix ifndefs for formatting defines.Jelmer Vernooij2010-08-231-3/+3
| | | | Thanks to Michael Brown for pointing this out.
* libreplace: added _PUBLIC_ and _PRIVATE_ to replace.hAndrew Tridgell2010-04-181-0/+18
| | | | | these are needed for all libs that use ABI checking, so libreplace is the logical place for now
* s4-waf: use the libreplace strerror_r if neededAndrew Tridgell2010-03-291-2/+2
|
* libreplace: strerror_r() is needed by heimdal on solaris8Andrew Tridgell2010-03-261-0/+5
|
* libreplace: fixed declaration of dprintf() on FreeBSDAndrew Tridgell2010-03-241-0/+10
|
* replace: added get_current_dir_name()Andrew Tridgell2010-03-051-0/+5
|
* libreplace: add fdatasync() if not availableAndrew Tridgell2010-02-131-0/+4
|
* libreplace: some systems don't have memmem()Andrew Tridgell2010-01-021-0/+6
| | | | added rep_memmem() and a testsuite
* libreplace: added likely()/unlikely() macros for gccAndrew Tridgell2009-09-171-0/+19
| | | | | | These macros allow the compile to better optimise code that has a lot of if statements. I particularly want to use this for our low level generated NDR code.
* include unix.h if it's availableMatt Kraai2009-07-191-0/+4
|
* Avoid using deprecated form of AC_CHECK_TYPE.Brad Hards2009-04-221-0/+12
| | | | | | | | | | libreplace makes use of an older form of AC_CHECK_TYPE which basically provides a fallback definition for the type if it isn't available. http://www.gnu.org/software/hello/manual/autoconf/Obsolete-Macros.html#Obsolete-Macros shows why this isn't a good idea (its not so important, except for pointer types). This patch partly addresses the issue. Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
* lib/replace: move MAXHOSTNAMELEN to system/network.hStefan Metzmacher2009-01-311-12/+0
| | | | | | | Some platforms define it in netdb.h, so we should define the replace after including metdb.h. metze
* lib/replace: add defines to let the callers find out if pwrite and pread are ↵Stefan Metzmacher2009-01-221-0/+6
| | | | | | thread/fork safe metze
* Samba3: Remove more configure tests already done by libreplace.Jelmer Vernooij2008-11-021-1/+9
|