lib/ntdb optimize includes in ntdb tests
authorChristian Ambach <ambi@samba.org>
Fri, 22 Nov 2013 04:18:36 +0000 (05:18 +0100)
committerChristian Ambach <ambi@samba.org>
Sat, 7 Dec 2013 15:45:15 +0000 (16:45 +0100)
use the private header (which will use libreplace or system headers)
instead of direct includes of system includes

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Rusty Russell <rusty@samba.org>
27 files changed:
lib/ntdb/test/api-12-store.c
lib/ntdb/test/api-13-delete.c
lib/ntdb/test/api-14-exists.c
lib/ntdb/test/api-16-wipe_all.c
lib/ntdb/test/api-20-alloc-attr.c
lib/ntdb/test/api-21-parse_record.c
lib/ntdb/test/api-55-transaction.c
lib/ntdb/test/api-60-noop-transaction.c
lib/ntdb/test/api-80-tdb_fd.c
lib/ntdb/test/api-81-seqnum.c
lib/ntdb/test/api-82-lockattr.c
lib/ntdb/test/api-83-openhook.c
lib/ntdb/test/api-91-get-stats.c
lib/ntdb/test/api-92-get-set-readonly.c
lib/ntdb/test/api-93-repack.c
lib/ntdb/test/api-94-expand-during-parse.c
lib/ntdb/test/api-95-read-only-during-parse.c
lib/ntdb/test/api-add-remove-flags.c
lib/ntdb/test/api-check-callback.c
lib/ntdb/test/api-firstkey-nextkey.c
lib/ntdb/test/api-fork-test.c
lib/ntdb/test/api-locktimeout.c
lib/ntdb/test/api-missing-entries.c
lib/ntdb/test/api-open-multiple-times.c
lib/ntdb/test/api-record-expand.c
lib/ntdb/test/api-simple-delete.c
lib/ntdb/test/api-summary.c

index 45274e0c67d856b43366168eddb98682ed77798c..532a8ee5c8223a33d4d31dae27c993ec8275f261 100644 (file)
@@ -1,10 +1,8 @@
 #include "config.h"
 #include "ntdb.h"
+#include "private.h"
 #include "tap-interface.h"
 #include <ccan/hash/hash.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
 
 #include "logging.h"
 
index cded8fde0bdafc3b4a0b1ad522459541a342fc24..730ade5afbb8d5366482ae484e4590a0f13ab7fc 100644 (file)
@@ -1,8 +1,5 @@
 #include "private.h" // For NTDB_TOPLEVEL_HASH_BITS
 #include <ccan/hash/hash.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
 #include "ntdb.h"
 #include "tap-interface.h"
 #include "logging.h"
index abaaae0ee54d8ca1832ab8346040819fbdd4d0d0..c40d9016cfbd71067f2dbb2b3b88da9d47dfcc1c 100644 (file)
@@ -1,9 +1,7 @@
 #include "config.h"
 #include "ntdb.h"
+#include "private.h"
 #include "tap-interface.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
 #include "logging.h"
 
 static bool test_records(struct ntdb_context *ntdb)
index 6a6075275eb8ead08e20b587d32788528c333416..4eea151e5d1bf68bfcca36056e41db25cc519082 100644 (file)
@@ -1,9 +1,7 @@
 #include "config.h"
 #include "ntdb.h"
+#include "private.h"
 #include "tap-interface.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
 #include "logging.h"
 
 static bool add_records(struct ntdb_context *ntdb)
index e4ec89a334f02720906d8e28207adb50e994c1c5..3df5003af78ac242b220ed80a431f1191a9537dd 100644 (file)
@@ -1,10 +1,8 @@
 #include "config.h"
 #include "ntdb.h"
+#include "private.h"
 #include "tap-interface.h"
 #include <ccan/hash/hash.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
 #include <assert.h>
 
 #include "logging.h"
index 975bbfaf1c97867cb0868becd6628c838e0b3dad..5af9abe00fea77dab0155998097e345020a20bc8 100644 (file)
@@ -1,9 +1,7 @@
 #include "config.h"
 #include "ntdb.h"
+#include "private.h"
 #include "tap-interface.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
 #include "logging.h"
 
 static enum NTDB_ERROR parse(NTDB_DATA key, NTDB_DATA data, NTDB_DATA *expected)
index 01a1dcea1b8f33e64801806ca8f8ed7add3c6d6d..3d3e53998ea7d7956e1fe698a8493e12c3777796 100644 (file)
@@ -1,9 +1,6 @@
 #include "private.h" // struct ntdb_context
 #include "ntdb.h"
 #include "tap-interface.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
 #include <stdlib.h>
 #include "logging.h"
 
index a429e679074e57526f7373c26ea519e099aacad2..5e56dbc521bcfcc30618996a9b6e5fd24fb8d1ce 100644 (file)
@@ -1,9 +1,6 @@
 #include "private.h" // struct ntdb_context
 #include "ntdb.h"
 #include "tap-interface.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
 #include <stdlib.h>
 #include "logging.h"
 
index 81b7284749ec169bec3715701f3eb30045b3d7f6..ca520a9967d4155270800890f3fc7abfafa86384 100644 (file)
@@ -1,9 +1,7 @@
 #include "config.h"
 #include "ntdb.h"
+#include "private.h"
 #include "tap-interface.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
 #include "logging.h"
 
 int main(int argc, char *argv[])
index 04f49cdbe3d192eeaf22b1f8081dfcdc0e696383..45963ff5a6fd39d94c97c74597184957a06505bf 100644 (file)
@@ -1,9 +1,7 @@
 #include "config.h"
 #include "ntdb.h"
+#include "private.h"
 #include "tap-interface.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
 #include <stdlib.h>
 #include "logging.h"
 
index 4fbe1d232a6ac1f78005929fe65ddb1f2b38568a..f71600c182b4478a7cb5d1a7d1007a10c6ec9292 100644 (file)
@@ -1,9 +1,6 @@
 #include "private.h" // for ntdb_fcntl_unlock
 #include "ntdb.h"
 #include "tap-interface.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
 #include <errno.h>
 #include "logging.h"
 
index 3816eef209ccff24013ff8bc07273f8b4b786658..d2930acf552916fab9d1edd6e8a6bd474e229640 100644 (file)
@@ -1,13 +1,7 @@
 #include "config.h"
 #include "ntdb.h"
+#include "private.h"
 #include "tap-interface.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <stdbool.h>
-#include <stdarg.h>
-#include <unistd.h>
 #include "external-agent.h"
 #include "logging.h"
 
index 1ed36f028daa1e7fc980ee861d78b38dc8db91e3..1041cba53b5a106db4d8377f5e1ea3b2ed210444 100644 (file)
@@ -1,11 +1,7 @@
 #include "config.h"
 #include "ntdb.h"
+#include "private.h"
 #include "tap-interface.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <stddef.h>
 #include "logging.h"
 
 int main(int argc, char *argv[])
index 81eadff32321bd5a7ddc3353543a4b5387b72e6e..c557f34cf990649534f613790b1f119a654126be 100644 (file)
@@ -1,9 +1,7 @@
 #include "config.h"
 #include "ntdb.h"
+#include "private.h"
 #include "tap-interface.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
 #include "logging.h"
 
 int main(int argc, char *argv[])
index 4a30c57edfa2380d0540ce41fdf633683bacc2f5..0fade08224fd0ced678282d7f5f077cf81d93b1b 100644 (file)
@@ -1,9 +1,7 @@
 #include "config.h"
 #include "ntdb.h"
+#include "private.h"
 #include "tap-interface.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
 #include "logging.h"
 
 #define NUM_TESTS 1000
index 4963e47fe7e746e8cc2fba03eb451a70e446711b..3aca88bd78bb54ca2cfe4d953e5f135b5994df02 100644 (file)
@@ -2,9 +2,6 @@
 #include "config.h"
 #include "ntdb.h"
 #include "tap-interface.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
 #include "logging.h"
 #include "../private.h" /* To establish size, esp. for NTDB_INTERNAL dbs */
 
index 8252b812d22c843dd0a46b09696c9af0d487c86c..53adbc3ceb77d86ac45ac2e32c2465a214ab142e 100644 (file)
@@ -1,10 +1,8 @@
 /* Make sure write operations fail during ntdb_parse(). */
 #include "config.h"
 #include "ntdb.h"
+#include "private.h"
 #include "tap-interface.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
 #include "logging.h"
 
 static struct ntdb_context *ntdb;
index c5a3f421fc99c627d12bdd9c79808510d64493c6..c16ceeb2f6a3b8b18d360272182a68ac7b59c921 100644 (file)
@@ -1,9 +1,6 @@
 #include "private.h" // for ntdb_context
 #include "ntdb.h"
 #include "tap-interface.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
 #include "logging.h"
 
 int main(int argc, char *argv[])
index b5ca8a057c13d198bed76cf25588f7b7d57e6405..20c88e7175b78cea08b1809885bab9ef22a4990c 100644 (file)
@@ -1,9 +1,7 @@
 #include "config.h"
 #include "ntdb.h"
+#include "private.h"
 #include "tap-interface.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
 #include "logging.h"
 
 #define NUM_RECORDS 1000
index 5e83e6bf77d988cade2b6df69430eb2ab0baf19e..179cf76c8e2c0fa540872019d164ab9bc593177c 100644 (file)
@@ -1,10 +1,7 @@
 #include "config.h"
 #include "ntdb.h"
+#include "private.h"
 #include "tap-interface.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <stdlib.h>
 #include "logging.h"
 
 #define NUM_RECORDS 1000
index 6298a4af01874f28c2216057a180c1451555a3cf..4b114d6f60b7ea9a495a54256256123b44aff482 100644 (file)
  */
 #include "config.h"
 #include "ntdb.h"
+#include "private.h"
 #include "tap-interface.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <unistd.h>
-#include <stdlib.h>
 #include "logging.h"
 
 static bool am_child = false;
index 5e24d58dc438e6946fb46cd089d216e11a69f808..4c0fda28974bf1cd6c33a472e9999cf29f0fe810 100644 (file)
@@ -1,13 +1,8 @@
 #include "config.h"
 #include "ntdb.h"
+#include "private.h"
 #include "tap-interface.h"
-#include "system/wait.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <fcntl.h>
 #include <limits.h>
-#include <errno.h>
 #include "logging.h"
 #include "external-agent.h"
 
index d9a1fd97d5ad107bb4ceb60efa7ea00dd4f1f032..2a00f1b33e87692dca49c2196b99f57c51084750 100644 (file)
@@ -1,11 +1,9 @@
 /* Another test revealed that we lost an entry.  This reproduces it. */
 #include "config.h"
 #include "ntdb.h"
+#include "private.h"
 #include <ccan/hash/hash.h>
 #include "tap-interface.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
 #include "logging.h"
 
 #define NUM_RECORDS 1189
index 8663b8a24c4f94191ab4ec2c3bb691df9c415319..6b97bc9718b1062aabc3d864ce1b4084d06ee253 100644 (file)
@@ -1,9 +1,6 @@
 #include "config.h"
 #include "ntdb.h"
 #include "tap-interface.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
 #include <stdlib.h>
 #include "logging.h"
 #include "../private.h"
index 8786fc7e5c4c8f8603e18d608f2a33cf79ab23da..74fb27fc47b8883875bb07b1e85031dda7bee993 100644 (file)
@@ -1,10 +1,7 @@
 #include "config.h"
 #include "ntdb.h"
+#include "private.h"
 #include "tap-interface.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <stdlib.h>
 #include "logging.h"
 
 #define MAX_SIZE 10000
index dedc433d1fcc2a99e9ba331ed2af92369162860e..e8baf4c51661ba8efb6696efbd16b652e6115c76 100644 (file)
@@ -1,9 +1,7 @@
 #include "config.h"
 #include "ntdb.h"
+#include "private.h"
 #include "tap-interface.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
 #include "logging.h"
 
 int main(int argc, char *argv[])
index df5d092a60b9ad1a6450abc7cd3bc319d70763e9..af1b59581f8da29e5ba49250402755523aed57f2 100644 (file)
@@ -1,10 +1,7 @@
 #include "config.h"
 #include "ntdb.h"
+#include "private.h"
 #include "tap-interface.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <stdlib.h>
 #include "logging.h"
 
 int main(int argc, char *argv[])