tdb2: use ccan/err instead of err.h
authorRusty Russell <rusty@rustcorp.com.au>
Sat, 9 Jun 2012 06:48:57 +0000 (16:18 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Sat, 9 Jun 2012 10:07:13 +0000 (12:07 +0200)
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

35 files changed:
lib/ccan/wscript
lib/tdb2/_info
lib/tdb2/test/api-83-openhook.c
lib/tdb2/test/external-agent.c
lib/tdb2/test/helprun-layout.c
lib/tdb2/test/run-30-exhaust-before-expand.c
lib/tdb2/test/run-56-open-during-transaction.c
lib/tdb2/test/run-57-die-during-transaction.c
lib/tdb2/test/run-capabilities.c
lib/tdb2/test/run-lockall.c
lib/tdb2/test/run-tdb1-3G-file.c
lib/tdb2/test/run-tdb1-bad-tdb-header.c
lib/tdb2/test/run-tdb1-check.c
lib/tdb2/test/run-tdb1-corrupt.c
lib/tdb2/test/run-tdb1-endian.c
lib/tdb2/test/run-tdb1-hashsize.c
lib/tdb2/test/run-tdb1-incompatible.c
lib/tdb2/test/run-tdb1-nested-transactions.c
lib/tdb2/test/run-tdb1-nested-traverse.c
lib/tdb2/test/run-tdb1-no-lock-during-traverse.c
lib/tdb2/test/run-tdb1-oldhash.c
lib/tdb2/test/run-tdb1-readonly-check.c
lib/tdb2/test/run-tdb1-rwlock-check.c
lib/tdb2/test/run-tdb1-seqnum-wrap.c
lib/tdb2/test/run-tdb1-summary.c
lib/tdb2/test/run-tdb1-traverse-in-transaction.c
lib/tdb2/test/run-tdb1-wronghash-fail.c
lib/tdb2/test/run-tdb1-zero-append.c
lib/tdb2/test/run-tdb1.c
lib/tdb2/test/tap-interface.h
lib/tdb2/test/tdb1-external-agent.c
lib/tdb2/tools/growtdb-bench.c
lib/tdb2/tools/mktdb2.c
lib/tdb2/tools/speed.c
lib/tdb2/tools/tdb2torture.c

index 24c9550121bac604471dfcb0731c403214ba4426..8d5782af8bc1d28df254b3f7bc3999b5fc3b2217 100644 (file)
@@ -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)
index 7213d67a22ae05d97d4f108f753161e5033c89e8..37c0c29e99b1f80a9c83720c583c64346e61a839 100644 (file)
@@ -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)
index 1ee745f992bdbc1a04bb81a5d1434b45a810d715..acafca78fa7bca2f8e5faee6909f4e9f5ed5f608 100644 (file)
@@ -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"
index 9d50e8fa85a555abd42ead5dbdb0311a485717e5..e8cff957280597d9e861d25afef70422a6550686 100644 (file)
@@ -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>
index 0bce5dd89e5fbe4e4f13df0be99a9768bcb45840..3e56d0ed7a4657225d78d34595a2fb250571e9aa 100644 (file)
@@ -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)
index 12449a1fe637b3f6e27d29cb93c44d0d5a6a0406..c39f0591f0c97cc252e5c04cedbe80e8f92dbade 100644 (file)
@@ -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)
index 1ac970119f8d281d49df20b8c6d2aa4b1eb21718..f6fd36f6e3f9f17774c9fd565b7079858b752a2b 100644 (file)
@@ -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"
 
index 9790e92dfdbfeee0f03dfbd92144d6e4c7d3b0e4..595d6ae23b3d4d8b669a5848d27387f957ca4c8a 100644 (file)
@@ -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"
index e59f5009abfda750d0bee0364f4fe0714066ccf7..1501abbe5cf8dd5a7a286dff7e4d4630f08bebc1 100644 (file)
@@ -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)
 {
index c3e03dea7d8ce1f88e35c209e3856399b1bb4947..23273135bca464517e9ffb54152b8b4331264c09 100644 (file)
@@ -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"
 
index c6e3042722d860be9660e053b3d51e79bf947cff..a278561c777231fcaf4a43dd50e5b08d6746d711 100644 (file)
@@ -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,
index cedf6b6057b52f12c28cbccda3dddc1d903c65ef..ed1b0085c790c5dea40521ebcd7b3cb7b4f54990 100644 (file)
@@ -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[])
index 98295d73d3c8fcf1dc2e438b8bf287b1a3de0c47..45bcbc4a9d8921921ceb68b774551763a3f47516 100644 (file)
@@ -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[])
index d46570f63b721a1b2550f0a9401482fac936f28d..99f5578db72d1dd189157046e11771e4651d84a0 100644 (file)
@@ -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)
index c72209fcbf9c9b17aaddf892aa97f6f16bace335..43f9d5fe5e5486b9f38b23d4c9cdaee235d0e889 100644 (file)
@@ -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[])
index e6a46775f12988ae84520324b14373a2342ba110..4f37b72be6383b0074f30758447f9cbdcbbbcebe 100644 (file)
@@ -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[])
index e478900533484476511fee6931a7381a6b200f1b..4a7581609abb053dc0ccdf6f208acc7c083fff14 100644 (file)
@@ -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)
index 665f28bcefbb6791e63a0a2d1b2364f53667c386..938ab486e70f854c55ea4e749a1d1ad8243fd1ce 100644 (file)
@@ -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[])
index 76bec5a176af4ec1815e88b38366b0cebb238156..30f9922f1679b4b88a20a2442e2480fc9e2e48b8 100644 (file)
@@ -5,7 +5,6 @@
 #undef fcntl
 #include <stdlib.h>
 #include <stdbool.h>
-#include <err.h>
 #include "tdb1-external-agent.h"
 #include "logging.h"
 
index 127e69ad1cfdb6dec7248db9e153f1cc5a7b0fc0..79106c58cb590932dc23bdb1d24da46b44fcff80 100644 (file)
@@ -7,7 +7,6 @@
 #include "tdb2-source.h"
 #include "tap-interface.h"
 #include <stdlib.h>
-#include <err.h>
 #include "logging.h"
 
 #undef fcntl
index 2b7f6adde883934222d480fb74c147236acade5c..629ff50634f313836e88890fc6b360009321f5a3 100644 (file)
@@ -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[])
index cd39647fc57462a90da22f183c65c9ea6c6b898c..078b9d61484b2c5610188a10e7e3cb2d3da994e5 100644 (file)
@@ -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[])
index a56f3ba356da7fb45e5605d66b094f256d42b191..08a082ff5c8ace62715dc0387898a5878e2a39da 100644 (file)
@@ -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)
index aa5398f242e03510ba4c46d7c5bbd45e816ac5a9..01cfaefb90b29b4b3b87f7361fcd78d205f09d8e 100644 (file)
@@ -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[])
index 34fb381b5b9ff6bbb4faa1e971f0e5934ee1cd8c..a031a105198b6855f121349e8d5a07a84388246d 100644 (file)
@@ -1,7 +1,6 @@
 #include "tdb2-source.h"
 #include "tap-interface.h"
 #include <stdlib.h>
-#include <err.h>
 
 int main(int argc, char *argv[])
 {
index 318ec102889540002291c0f1b13e72db0d44e6f1..6f209d9578ca52cb446d69e9f1d56c9ba99f12a8 100644 (file)
@@ -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"
 
index 6a9dae3a70b255bd71fdbd873dab8da6a815a57b..725b4d2d0022aa57a4dd73895fdf40ee864da087 100644 (file)
@@ -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)
index b5e55c02228c3df3b8f007df745ab907dd9cfa85..2d8be6123b24269d1b446488f3cc37e0c57db8ea 100644 (file)
@@ -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[])
index 4769a5f6d8ea250e9fc849161f927cd8ab5f0030..d5b05b0bd688ba116797537ff0da5bf89cc588c4 100644 (file)
@@ -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[])
index 9ee84aaabae98d04a7259aea113c8131b1ac9f3b..f3d4ec2545f317c0133fb25a4350139ed8c97972 100644 (file)
@@ -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
index 2ba05741fce983a25892bd0c187c38290b1a6941..7242e2230057b024b3babf431aa2cf419e2df050 100644 (file)
@@ -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>
index ec81268bec7a1a0c692369534ea428fdfa641183..476e8be5daba39dcb2b0ad5e6bc701d209ff1ace 100644 (file)
@@ -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>
index c8c280349e67b316720adc2a7493185ee59912ab..35d7a07d0bc514830017b7cd11c1075dd73856aa 100644 (file)
@@ -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[])
 {
index ccb5ae349d894f43d57ce0349b280d6539713e7d..259d53f6c81ee1eac49897daace63bc3d68586eb 100644 (file)
@@ -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>
index 1c1efc593ae2bbc65bbc5ae79627e2e8509c3cdb..eb12b59c4e7f4c366c96d68e76e1c7748970c1ee 100644 (file)
@@ -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