diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-06-09 16:18:57 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-06-09 12:07:13 +0200 |
commit | 36353a9fc359e8156cfd2e7e4288021aba789b74 (patch) | |
tree | ea0dac868e8711860d1810eb0e15f6b173673c08 /lib | |
parent | aeb3ff5c8667328f7f837412e9ec4365e3853cce (diff) | |
download | samba-36353a9fc359e8156cfd2e7e4288021aba789b74.tar.gz samba-36353a9fc359e8156cfd2e7e4288021aba789b74.tar.bz2 samba-36353a9fc359e8156cfd2e7e4288021aba789b74.zip |
tdb2: use ccan/err instead of err.h
Solaris has no err.h, so use CCAN replacement.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date(master): Sat Jun 9 12:07:15 CEST 2012 on sn-devel-104
Diffstat (limited to 'lib')
35 files changed, 11 insertions, 36 deletions
diff --git a/lib/ccan/wscript b/lib/ccan/wscript index 24c9550121..8d5782af8b 100644 --- a/lib/ccan/wscript +++ b/lib/ccan/wscript @@ -129,10 +129,10 @@ def build(bld): if bld.env.DEVELOPER_MODE: bld.SAMBA_LIBRARY('ccan-failtest', source=bld.path.ant_glob('failtest/*.c'), - deps='execinfo ccan ccan-err ccan-htable ccan-list ccan-read_write_all ccan-time', + deps='execinfo ccan ccan-htable ccan-list ccan-read_write_all ccan-time', private_library=True) bld.SAMBA_LIBRARY('ccan', source='', - deps='ccan-hash ccan-ilog ccan-likely ccan-tally', + deps='ccan-err ccan-hash ccan-ilog ccan-likely ccan-tally', private_library=True) diff --git a/lib/tdb2/_info b/lib/tdb2/_info index 7213d67a22..37c0c29e99 100644 --- a/lib/tdb2/_info +++ b/lib/tdb2/_info @@ -11,7 +11,7 @@ * Example: * #include <ccan/tdb2/tdb2.h> * #include <ccan/str/str.h> - * #include <err.h> + * #include <ccan/err/err.h> * #include <stdio.h> * * static void usage(const char *argv0) diff --git a/lib/tdb2/test/api-83-openhook.c b/lib/tdb2/test/api-83-openhook.c index 1ee745f992..acafca78fa 100644 --- a/lib/tdb2/test/api-83-openhook.c +++ b/lib/tdb2/test/api-83-openhook.c @@ -7,7 +7,6 @@ #include <stdlib.h> #include <stdbool.h> #include <stdarg.h> -#include <err.h> #include <unistd.h> #include "external-agent.h" #include "logging.h" diff --git a/lib/tdb2/test/external-agent.c b/lib/tdb2/test/external-agent.c index 9d50e8fa85..e8cff95728 100644 --- a/lib/tdb2/test/external-agent.c +++ b/lib/tdb2/test/external-agent.c @@ -4,7 +4,7 @@ #include <sys/types.h> #include <sys/wait.h> #include <unistd.h> -#include <err.h> +#include <ccan/err/err.h> #include <fcntl.h> #include <stdlib.h> #include <limits.h> diff --git a/lib/tdb2/test/helprun-layout.c b/lib/tdb2/test/helprun-layout.c index 0bce5dd89e..3e56d0ed7a 100644 --- a/lib/tdb2/test/helprun-layout.c +++ b/lib/tdb2/test/helprun-layout.c @@ -3,7 +3,7 @@ #include <stdlib.h> #include <string.h> #include <assert.h> -#include <err.h> +#include <ccan/err/err.h> #include "logging.h" struct tdb_layout *new_tdb_layout(void) diff --git a/lib/tdb2/test/run-30-exhaust-before-expand.c b/lib/tdb2/test/run-30-exhaust-before-expand.c index 12449a1fe6..c39f0591f0 100644 --- a/lib/tdb2/test/run-30-exhaust-before-expand.c +++ b/lib/tdb2/test/run-30-exhaust-before-expand.c @@ -1,6 +1,5 @@ #include "tdb2-source.h" #include "tap-interface.h" -#include <err.h> #include "logging.h" static bool empty_freetable(struct tdb_context *tdb) diff --git a/lib/tdb2/test/run-56-open-during-transaction.c b/lib/tdb2/test/run-56-open-during-transaction.c index 1ac970119f..f6fd36f6e3 100644 --- a/lib/tdb2/test/run-56-open-during-transaction.c +++ b/lib/tdb2/test/run-56-open-during-transaction.c @@ -16,7 +16,6 @@ static int ftruncate_check(int fd, off_t length); #include <stdlib.h> #include <stdbool.h> #include <stdarg.h> -#include <err.h> #include "external-agent.h" #include "logging.h" diff --git a/lib/tdb2/test/run-57-die-during-transaction.c b/lib/tdb2/test/run-57-die-during-transaction.c index 9790e92dfd..595d6ae23b 100644 --- a/lib/tdb2/test/run-57-die-during-transaction.c +++ b/lib/tdb2/test/run-57-die-during-transaction.c @@ -93,7 +93,6 @@ static void free_all(void) #include <stdbool.h> #include <stdarg.h> -#include <err.h> #include <setjmp.h> #include "external-agent.h" #include "logging.h" diff --git a/lib/tdb2/test/run-capabilities.c b/lib/tdb2/test/run-capabilities.c index e59f5009ab..1501abbe5c 100644 --- a/lib/tdb2/test/run-capabilities.c +++ b/lib/tdb2/test/run-capabilities.c @@ -5,7 +5,6 @@ #include "layout.h" #include "failtest_helper.h" #include <stdarg.h> -#include <err.h> static size_t len_of(bool breaks_check, bool breaks_write, bool breaks_open) { diff --git a/lib/tdb2/test/run-lockall.c b/lib/tdb2/test/run-lockall.c index c3e03dea7d..23273135bc 100644 --- a/lib/tdb2/test/run-lockall.c +++ b/lib/tdb2/test/run-lockall.c @@ -9,7 +9,7 @@ #include <stdlib.h> #include <stdbool.h> #include <stdarg.h> -#include <err.h> +#include <ccan/err/err.h> #include "external-agent.h" #include "logging.h" diff --git a/lib/tdb2/test/run-tdb1-3G-file.c b/lib/tdb2/test/run-tdb1-3G-file.c index c6e3042722..a278561c77 100644 --- a/lib/tdb2/test/run-tdb1-3G-file.c +++ b/lib/tdb2/test/run-tdb1-3G-file.c @@ -1,7 +1,6 @@ #include "tdb2-source.h" #include "tap-interface.h" #include <stdlib.h> -#include <err.h> #include "logging.h" static int tdb1_expand_file_sparse(struct tdb_context *tdb, diff --git a/lib/tdb2/test/run-tdb1-bad-tdb-header.c b/lib/tdb2/test/run-tdb1-bad-tdb-header.c index cedf6b6057..ed1b0085c7 100644 --- a/lib/tdb2/test/run-tdb1-bad-tdb-header.c +++ b/lib/tdb2/test/run-tdb1-bad-tdb-header.c @@ -1,7 +1,6 @@ #include "tdb2-source.h" #include "tap-interface.h" #include <stdlib.h> -#include <err.h> #include "logging.h" int main(int argc, char *argv[]) diff --git a/lib/tdb2/test/run-tdb1-check.c b/lib/tdb2/test/run-tdb1-check.c index 98295d73d3..45bcbc4a9d 100644 --- a/lib/tdb2/test/run-tdb1-check.c +++ b/lib/tdb2/test/run-tdb1-check.c @@ -1,7 +1,6 @@ #include "tdb2-source.h" #include "tap-interface.h" #include <stdlib.h> -#include <err.h> #include "logging.h" int main(int argc, char *argv[]) diff --git a/lib/tdb2/test/run-tdb1-corrupt.c b/lib/tdb2/test/run-tdb1-corrupt.c index d46570f63b..99f5578db7 100644 --- a/lib/tdb2/test/run-tdb1-corrupt.c +++ b/lib/tdb2/test/run-tdb1-corrupt.c @@ -1,7 +1,6 @@ #include "tdb2-source.h" #include "tap-interface.h" #include <stdlib.h> -#include <err.h> #include "logging.h" static int check(TDB_DATA key, TDB_DATA data, void *private) diff --git a/lib/tdb2/test/run-tdb1-endian.c b/lib/tdb2/test/run-tdb1-endian.c index c72209fcbf..43f9d5fe5e 100644 --- a/lib/tdb2/test/run-tdb1-endian.c +++ b/lib/tdb2/test/run-tdb1-endian.c @@ -1,7 +1,6 @@ #include "tdb2-source.h" #include "tap-interface.h" #include <stdlib.h> -#include <err.h> #include "logging.h" int main(int argc, char *argv[]) diff --git a/lib/tdb2/test/run-tdb1-hashsize.c b/lib/tdb2/test/run-tdb1-hashsize.c index e6a46775f1..4f37b72be6 100644 --- a/lib/tdb2/test/run-tdb1-hashsize.c +++ b/lib/tdb2/test/run-tdb1-hashsize.c @@ -1,7 +1,6 @@ #include "tdb2-source.h" #include "tap-interface.h" #include <stdlib.h> -#include <err.h> #include "logging.h" int main(int argc, char *argv[]) diff --git a/lib/tdb2/test/run-tdb1-incompatible.c b/lib/tdb2/test/run-tdb1-incompatible.c index e478900533..4a7581609a 100644 --- a/lib/tdb2/test/run-tdb1-incompatible.c +++ b/lib/tdb2/test/run-tdb1-incompatible.c @@ -1,7 +1,6 @@ #include "tdb2-source.h" #include "tap-interface.h" #include <stdlib.h> -#include <err.h> static uint64_t tdb1_dumb_hash(const void *key, size_t len, uint64_t seed, void *unused) diff --git a/lib/tdb2/test/run-tdb1-nested-transactions.c b/lib/tdb2/test/run-tdb1-nested-transactions.c index 665f28bcef..938ab486e7 100644 --- a/lib/tdb2/test/run-tdb1-nested-transactions.c +++ b/lib/tdb2/test/run-tdb1-nested-transactions.c @@ -2,7 +2,6 @@ #include "tap-interface.h" #include <stdlib.h> #include <stdbool.h> -#include <err.h> #include "logging.h" int main(int argc, char *argv[]) diff --git a/lib/tdb2/test/run-tdb1-nested-traverse.c b/lib/tdb2/test/run-tdb1-nested-traverse.c index 76bec5a176..30f9922f16 100644 --- a/lib/tdb2/test/run-tdb1-nested-traverse.c +++ b/lib/tdb2/test/run-tdb1-nested-traverse.c @@ -5,7 +5,6 @@ #undef fcntl #include <stdlib.h> #include <stdbool.h> -#include <err.h> #include "tdb1-external-agent.h" #include "logging.h" diff --git a/lib/tdb2/test/run-tdb1-no-lock-during-traverse.c b/lib/tdb2/test/run-tdb1-no-lock-during-traverse.c index 127e69ad1c..79106c58cb 100644 --- a/lib/tdb2/test/run-tdb1-no-lock-during-traverse.c +++ b/lib/tdb2/test/run-tdb1-no-lock-during-traverse.c @@ -7,7 +7,6 @@ #include "tdb2-source.h" #include "tap-interface.h" #include <stdlib.h> -#include <err.h> #include "logging.h" #undef fcntl diff --git a/lib/tdb2/test/run-tdb1-oldhash.c b/lib/tdb2/test/run-tdb1-oldhash.c index 2b7f6adde8..629ff50634 100644 --- a/lib/tdb2/test/run-tdb1-oldhash.c +++ b/lib/tdb2/test/run-tdb1-oldhash.c @@ -1,7 +1,6 @@ #include "tdb2-source.h" #include "tap-interface.h" #include <stdlib.h> -#include <err.h> #include "logging.h" int main(int argc, char *argv[]) diff --git a/lib/tdb2/test/run-tdb1-readonly-check.c b/lib/tdb2/test/run-tdb1-readonly-check.c index cd39647fc5..078b9d6148 100644 --- a/lib/tdb2/test/run-tdb1-readonly-check.c +++ b/lib/tdb2/test/run-tdb1-readonly-check.c @@ -3,7 +3,6 @@ #include "tdb2-source.h" #include "tap-interface.h" #include <stdlib.h> -#include <err.h> #include "logging.h" int main(int argc, char *argv[]) diff --git a/lib/tdb2/test/run-tdb1-rwlock-check.c b/lib/tdb2/test/run-tdb1-rwlock-check.c index a56f3ba356..08a082ff5c 100644 --- a/lib/tdb2/test/run-tdb1-rwlock-check.c +++ b/lib/tdb2/test/run-tdb1-rwlock-check.c @@ -1,7 +1,6 @@ #include "tdb2-source.h" #include "tap-interface.h" #include <stdlib.h> -#include <err.h> static void log_fn(struct tdb_context *tdb, enum tdb_log_level level, enum TDB_ERROR ecode, const char *message, void *priv) diff --git a/lib/tdb2/test/run-tdb1-seqnum-wrap.c b/lib/tdb2/test/run-tdb1-seqnum-wrap.c index aa5398f242..01cfaefb90 100644 --- a/lib/tdb2/test/run-tdb1-seqnum-wrap.c +++ b/lib/tdb2/test/run-tdb1-seqnum-wrap.c @@ -1,7 +1,6 @@ #include "tdb2-source.h" #include "tap-interface.h" #include <stdlib.h> -#include <err.h> #include "logging.h" int main(int argc, char *argv[]) diff --git a/lib/tdb2/test/run-tdb1-summary.c b/lib/tdb2/test/run-tdb1-summary.c index 34fb381b5b..a031a10519 100644 --- a/lib/tdb2/test/run-tdb1-summary.c +++ b/lib/tdb2/test/run-tdb1-summary.c @@ -1,7 +1,6 @@ #include "tdb2-source.h" #include "tap-interface.h" #include <stdlib.h> -#include <err.h> int main(int argc, char *argv[]) { diff --git a/lib/tdb2/test/run-tdb1-traverse-in-transaction.c b/lib/tdb2/test/run-tdb1-traverse-in-transaction.c index 318ec10288..6f209d9578 100644 --- a/lib/tdb2/test/run-tdb1-traverse-in-transaction.c +++ b/lib/tdb2/test/run-tdb1-traverse-in-transaction.c @@ -6,7 +6,6 @@ #undef fcntl_with_lockcheck #include <stdlib.h> #include <stdbool.h> -#include <err.h> #include "tdb1-external-agent.h" #include "logging.h" diff --git a/lib/tdb2/test/run-tdb1-wronghash-fail.c b/lib/tdb2/test/run-tdb1-wronghash-fail.c index 6a9dae3a70..725b4d2d00 100644 --- a/lib/tdb2/test/run-tdb1-wronghash-fail.c +++ b/lib/tdb2/test/run-tdb1-wronghash-fail.c @@ -1,7 +1,6 @@ #include "tdb2-source.h" #include "tap-interface.h" #include <stdlib.h> -#include <err.h> static void log_fn(struct tdb_context *tdb, enum tdb_log_level level, enum TDB_ERROR ecode, const char *message, void *priv) diff --git a/lib/tdb2/test/run-tdb1-zero-append.c b/lib/tdb2/test/run-tdb1-zero-append.c index b5e55c0222..2d8be6123b 100644 --- a/lib/tdb2/test/run-tdb1-zero-append.c +++ b/lib/tdb2/test/run-tdb1-zero-append.c @@ -1,7 +1,6 @@ #include "tdb2-source.h" #include "tap-interface.h" #include <stdlib.h> -#include <err.h> #include "logging.h" int main(int argc, char *argv[]) diff --git a/lib/tdb2/test/run-tdb1.c b/lib/tdb2/test/run-tdb1.c index 4769a5f6d8..d5b05b0bd6 100644 --- a/lib/tdb2/test/run-tdb1.c +++ b/lib/tdb2/test/run-tdb1.c @@ -1,7 +1,6 @@ #include "tdb2-source.h" #include "tap-interface.h" #include <stdlib.h> -#include <err.h> #include "logging.h" int main(int argc, char *argv[]) diff --git a/lib/tdb2/test/tap-interface.h b/lib/tdb2/test/tap-interface.h index 9ee84aaaba..f3d4ec2545 100644 --- a/lib/tdb2/test/tap-interface.h +++ b/lib/tdb2/test/tap-interface.h @@ -22,7 +22,7 @@ License along with this library; if not, see <http://www.gnu.org/licenses/>. */ #include <stdio.h> -#include <err.h> +#include <ccan/err/err.h> #ifndef __location__ #define __TAP_STRING_LINE1__(s) #s diff --git a/lib/tdb2/test/tdb1-external-agent.c b/lib/tdb2/test/tdb1-external-agent.c index 2ba05741fc..7242e22300 100644 --- a/lib/tdb2/test/tdb1-external-agent.c +++ b/lib/tdb2/test/tdb1-external-agent.c @@ -4,7 +4,6 @@ #include <sys/types.h> #include <sys/wait.h> #include <unistd.h> -#include <err.h> #include <fcntl.h> #include <stdlib.h> #include <limits.h> diff --git a/lib/tdb2/tools/growtdb-bench.c b/lib/tdb2/tools/growtdb-bench.c index ec81268bec..476e8be5da 100644 --- a/lib/tdb2/tools/growtdb-bench.c +++ b/lib/tdb2/tools/growtdb-bench.c @@ -3,7 +3,7 @@ #include <string.h> #include <stdio.h> #include <unistd.h> -#include <err.h> +#include <ccan/err/err.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> diff --git a/lib/tdb2/tools/mktdb2.c b/lib/tdb2/tools/mktdb2.c index c8c280349e..35d7a07d0b 100644 --- a/lib/tdb2/tools/mktdb2.c +++ b/lib/tdb2/tools/mktdb2.c @@ -2,7 +2,7 @@ #include <stdlib.h> #include <stdio.h> #include <fcntl.h> -#include <err.h> +#include <ccan/err/err.h> int main(int argc, char *argv[]) { diff --git a/lib/tdb2/tools/speed.c b/lib/tdb2/tools/speed.c index ccb5ae349d..259d53f6c8 100644 --- a/lib/tdb2/tools/speed.c +++ b/lib/tdb2/tools/speed.c @@ -1,5 +1,5 @@ /* Simple speed test for TDB */ -#include <err.h> +#include <ccan/err/err.h> #include <time.h> #include <sys/types.h> #include <sys/stat.h> diff --git a/lib/tdb2/tools/tdb2torture.c b/lib/tdb2/tools/tdb2torture.c index 1c1efc593a..eb12b59c4e 100644 --- a/lib/tdb2/tools/tdb2torture.c +++ b/lib/tdb2/tools/tdb2torture.c @@ -4,7 +4,7 @@ #include "config.h" #include "tdb2.h" -#include <err.h> +#include <ccan/err/err.h> #ifdef HAVE_LIBREPLACE #include <replace.h> #else |