Blame SOURCES/libtdb-revert-breaking-tdb.h.patch

b2dd21
From 7880e098039ca3e42fa43a055d6812f7b3ef9c0a Mon Sep 17 00:00:00 2001
b2dd21
From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gd@samba.org>
b2dd21
Date: Fri, 16 Jul 2021 16:56:49 +0200
b2dd21
Subject: [PATCH] Revert "tdb: fix studio compiler build"
b2dd21
b2dd21
This reverts commit 3c1013caf4b57c6af5a5d210df232c08a1227a17.
b2dd21
---
b2dd21
 lib/tdb/common/lock.c |   6 +-
b2dd21
 lib/tdb/include/tdb.h | 138 +++++++++++++++++++++---------------------
b2dd21
 2 files changed, 71 insertions(+), 73 deletions(-)
b2dd21
b2dd21
diff --git a/lib/tdb/common/lock.c b/lib/tdb/common/lock.c
b2dd21
index c4e276f84d6..5fba02f9b12 100644
b2dd21
--- tdb/common/lock.c
b2dd21
+++ tdb/common/lock.c
b2dd21
@@ -506,7 +506,6 @@ int tdb_lock(struct tdb_context *tdb, int list, int ltype)
b2dd21
 }
b2dd21
 
b2dd21
 /* lock a list in the database. list -1 is the alloc list. non-blocking lock */
b2dd21
-_PUBLIC_ int tdb_lock_nonblock(struct tdb_context *tdb, int list, int ltype);
b2dd21
 _PUBLIC_ int tdb_lock_nonblock(struct tdb_context *tdb, int list, int ltype)
b2dd21
 {
b2dd21
 	return tdb_lock_list(tdb, list, ltype, TDB_LOCK_NOWAIT);
b2dd21
@@ -568,7 +567,6 @@ int tdb_nest_unlock(struct tdb_context *tdb, uint32_t offset, int ltype,
b2dd21
 	return ret;
b2dd21
 }
b2dd21
 
b2dd21
-_PUBLIC_ int tdb_unlock(struct tdb_context *tdb, int list, int ltype);
b2dd21
 _PUBLIC_ int tdb_unlock(struct tdb_context *tdb, int list, int ltype)
b2dd21
 {
b2dd21
 	/* a global lock allows us to avoid per chain locks */
b2dd21
@@ -1019,14 +1017,14 @@ void tdb_release_transaction_locks(struct tdb_context *tdb)
b2dd21
 /* Following functions are added specifically to support CTDB. */
b2dd21
 
b2dd21
 /* Don't do actual fcntl locking, just mark tdb locked */
b2dd21
-_PUBLIC_ int tdb_transaction_write_lock_mark(struct tdb_context *tdb);
b2dd21
+int tdb_transaction_write_lock_mark(struct tdb_context *tdb);
b2dd21
 _PUBLIC_ int tdb_transaction_write_lock_mark(struct tdb_context *tdb)
b2dd21
 {
b2dd21
 	return tdb_transaction_lock(tdb, F_WRLCK, TDB_LOCK_MARK_ONLY);
b2dd21
 }
b2dd21
 
b2dd21
 /* Don't do actual fcntl unlocking, just mark tdb unlocked */
b2dd21
-_PUBLIC_ int tdb_transaction_write_lock_unmark(struct tdb_context *tdb);
b2dd21
+int tdb_transaction_write_lock_unmark(struct tdb_context *tdb);
b2dd21
 _PUBLIC_ int tdb_transaction_write_lock_unmark(struct tdb_context *tdb)
b2dd21
 {
b2dd21
 	return tdb_nest_unlock(tdb, TRANSACTION_LOCK, F_WRLCK, true);
b2dd21
diff --git a/lib/tdb/include/tdb.h b/lib/tdb/include/tdb.h
b2dd21
index 696547c8cd9..9d63a96b4ac 100644
b2dd21
--- tdb/include/tdb.h
b2dd21
+++ tdb/include/tdb.h
b2dd21
@@ -159,7 +159,7 @@ struct tdb_logging_context {
b2dd21
  *
b2dd21
  * @return              A tdb context structure, NULL on error.
b2dd21
  */
b2dd21
-_PUBLIC_ struct tdb_context *tdb_open(const char *name, int hash_size, int tdb_flags,
b2dd21
+struct tdb_context *tdb_open(const char *name, int hash_size, int tdb_flags,
b2dd21
 		      int open_flags, mode_t mode);
b2dd21
 
b2dd21
 /**
b2dd21
@@ -206,7 +206,7 @@ _PUBLIC_ struct tdb_context *tdb_open(const char *name, int hash_size, int tdb_f
b2dd21
  *
b2dd21
  * @see tdb_open()
b2dd21
  */
b2dd21
-_PUBLIC_ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
b2dd21
+struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
b2dd21
 			 int open_flags, mode_t mode,
b2dd21
 			 const struct tdb_logging_context *log_ctx,
b2dd21
 			 tdb_hash_func hash_fn);
b2dd21
@@ -218,7 +218,7 @@ _PUBLIC_ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int td
b2dd21
  *
b2dd21
  * @param[in]  max_dead The maximum number of dead records per hash chain.
b2dd21
  */
b2dd21
-_PUBLIC_ void tdb_set_max_dead(struct tdb_context *tdb, int max_dead);
b2dd21
+void tdb_set_max_dead(struct tdb_context *tdb, int max_dead);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Reopen a tdb.
b2dd21
@@ -233,7 +233,7 @@ _PUBLIC_ void tdb_set_max_dead(struct tdb_context *tdb, int max_dead);
b2dd21
  * @note Don't call tdb_error() after this function cause the tdb context will
b2dd21
  *       be freed on error.
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_reopen(struct tdb_context *tdb);
b2dd21
+int tdb_reopen(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Reopen all tdb's
b2dd21
@@ -248,7 +248,7 @@ _PUBLIC_ int tdb_reopen(struct tdb_context *tdb);
b2dd21
  *
b2dd21
  * @return              0 on success, -1 on error.
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_reopen_all(int parent_longlived);
b2dd21
+int tdb_reopen_all(int parent_longlived);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Set a different tdb logging function.
b2dd21
@@ -257,7 +257,7 @@ _PUBLIC_ int tdb_reopen_all(int parent_longlived);
b2dd21
  *
b2dd21
  * @param[in]  log_ctx  The logging function to set.
b2dd21
  */
b2dd21
-_PUBLIC_ void tdb_set_logging_function(struct tdb_context *tdb, const struct tdb_logging_context *log_ctx);
b2dd21
+void tdb_set_logging_function(struct tdb_context *tdb, const struct tdb_logging_context *log_ctx);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Get the tdb last error code.
b2dd21
@@ -268,7 +268,7 @@ _PUBLIC_ void tdb_set_logging_function(struct tdb_context *tdb, const struct tdb
b2dd21
  *
b2dd21
  * @see TDB_ERROR
b2dd21
  */
b2dd21
-_PUBLIC_ enum TDB_ERROR tdb_error(struct tdb_context *tdb);
b2dd21
+enum TDB_ERROR tdb_error(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Get a error string for the last tdb error
b2dd21
@@ -277,7 +277,7 @@ _PUBLIC_ enum TDB_ERROR tdb_error(struct tdb_context *tdb);
b2dd21
  *
b2dd21
  * @return              An error string.
b2dd21
  */
b2dd21
-_PUBLIC_ const char *tdb_errorstr(struct tdb_context *tdb);
b2dd21
+const char *tdb_errorstr(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Fetch an entry in the database given a key.
b2dd21
@@ -294,7 +294,7 @@ _PUBLIC_ const char *tdb_errorstr(struct tdb_context *tdb);
b2dd21
  * @see tdb_error()
b2dd21
  * @see tdb_errorstr()
b2dd21
  */
b2dd21
-_PUBLIC_ TDB_DATA tdb_fetch(struct tdb_context *tdb, TDB_DATA key);
b2dd21
+TDB_DATA tdb_fetch(struct tdb_context *tdb, TDB_DATA key);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Hand a record to a parser function without allocating it.
b2dd21
@@ -319,7 +319,7 @@ _PUBLIC_ TDB_DATA tdb_fetch(struct tdb_context *tdb, TDB_DATA key);
b2dd21
  * @return              -1 if the record was not found. If the record was found,
b2dd21
  *                      the return value of "parser" is passed up to the caller.
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_parse_record(struct tdb_context *tdb, TDB_DATA key,
b2dd21
+int tdb_parse_record(struct tdb_context *tdb, TDB_DATA key,
b2dd21
 			      int (*parser)(TDB_DATA key, TDB_DATA data,
b2dd21
 					    void *private_data),
b2dd21
 			      void *private_data);
b2dd21
@@ -333,7 +333,7 @@ _PUBLIC_ int tdb_parse_record(struct tdb_context *tdb, TDB_DATA key,
b2dd21
  *
b2dd21
  * @return              0 on success, -1 if the key doesn't exist.
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_delete(struct tdb_context *tdb, TDB_DATA key);
b2dd21
+int tdb_delete(struct tdb_context *tdb, TDB_DATA key);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Store an element in the database.
b2dd21
@@ -355,7 +355,7 @@ _PUBLIC_ int tdb_delete(struct tdb_context *tdb, TDB_DATA key);
b2dd21
  * @see tdb_error()
b2dd21
  * @see tdb_errorstr()
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_store(struct tdb_context *tdb, TDB_DATA key, TDB_DATA dbuf, int flag);
b2dd21
+int tdb_store(struct tdb_context *tdb, TDB_DATA key, TDB_DATA dbuf, int flag);
b2dd21
 
b2dd21
 
b2dd21
 /**
b2dd21
@@ -380,7 +380,7 @@ _PUBLIC_ int tdb_store(struct tdb_context *tdb, TDB_DATA key, TDB_DATA dbuf, int
b2dd21
  * @see tdb_error()
b2dd21
  * @see tdb_errorstr()
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_storev(struct tdb_context *tdb, TDB_DATA key,
b2dd21
+int tdb_storev(struct tdb_context *tdb, TDB_DATA key,
b2dd21
 	       const TDB_DATA *dbufs, int num_dbufs, int flag);
b2dd21
 
b2dd21
 /**
b2dd21
@@ -399,7 +399,7 @@ _PUBLIC_ int tdb_storev(struct tdb_context *tdb, TDB_DATA key,
b2dd21
  * @see tdb_error()
b2dd21
  * @see tdb_errorstr()
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_append(struct tdb_context *tdb, TDB_DATA key, TDB_DATA new_dbuf);
b2dd21
+int tdb_append(struct tdb_context *tdb, TDB_DATA key, TDB_DATA new_dbuf);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Close a database.
b2dd21
@@ -411,7 +411,7 @@ _PUBLIC_ int tdb_append(struct tdb_context *tdb, TDB_DATA key, TDB_DATA new_dbuf
b2dd21
  * @note Don't call tdb_error() after this function cause the tdb context will
b2dd21
  *       be freed on error.
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_close(struct tdb_context *tdb);
b2dd21
+int tdb_close(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Find the first entry in the database and return its key.
b2dd21
@@ -423,7 +423,7 @@ _PUBLIC_ int tdb_close(struct tdb_context *tdb);
b2dd21
  * @return              The first entry of the database, an empty TDB_DATA entry
b2dd21
  *                      if the database is empty.
b2dd21
  */
b2dd21
-_PUBLIC_ TDB_DATA tdb_firstkey(struct tdb_context *tdb);
b2dd21
+TDB_DATA tdb_firstkey(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Find the next entry in the database, returning its key.
b2dd21
@@ -437,7 +437,7 @@ _PUBLIC_ TDB_DATA tdb_firstkey(struct tdb_context *tdb);
b2dd21
  * @return              The next entry of the current key, an empty TDB_DATA
b2dd21
  *                      entry if there is no entry.
b2dd21
  */
b2dd21
-_PUBLIC_ TDB_DATA tdb_nextkey(struct tdb_context *tdb, TDB_DATA key);
b2dd21
+TDB_DATA tdb_nextkey(struct tdb_context *tdb, TDB_DATA key);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Traverse the entire database.
b2dd21
@@ -459,7 +459,7 @@ _PUBLIC_ TDB_DATA tdb_nextkey(struct tdb_context *tdb, TDB_DATA key);
b2dd21
  *
b2dd21
  * @return              The record count traversed, -1 on error.
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_traverse(struct tdb_context *tdb, tdb_traverse_func fn, void *private_data);
b2dd21
+int tdb_traverse(struct tdb_context *tdb, tdb_traverse_func fn, void *private_data);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Traverse the entire database.
b2dd21
@@ -478,7 +478,7 @@ _PUBLIC_ int tdb_traverse(struct tdb_context *tdb, tdb_traverse_func fn, void *p
b2dd21
  *
b2dd21
  * @return              The record count traversed, -1 on error.
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_traverse_read(struct tdb_context *tdb, tdb_traverse_func fn, void *private_data);
b2dd21
+int tdb_traverse_read(struct tdb_context *tdb, tdb_traverse_func fn, void *private_data);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Traverse a single hash chain
b2dd21
@@ -511,7 +511,7 @@ _PUBLIC_ int tdb_traverse_read(struct tdb_context *tdb, tdb_traverse_func fn, vo
b2dd21
  * @return              The record count traversed, -1 on error.
b2dd21
  */
b2dd21
 
b2dd21
-_PUBLIC_ int tdb_traverse_chain(struct tdb_context *tdb,
b2dd21
+int tdb_traverse_chain(struct tdb_context *tdb,
b2dd21
 		       unsigned chain,
b2dd21
 		       tdb_traverse_func fn,
b2dd21
 		       void *private_data);
b2dd21
@@ -543,7 +543,7 @@ _PUBLIC_ int tdb_traverse_chain(struct tdb_context *tdb,
b2dd21
  * @return              The record count traversed, -1 on error.
b2dd21
  */
b2dd21
 
b2dd21
-_PUBLIC_ int tdb_traverse_key_chain(struct tdb_context *tdb,
b2dd21
+int tdb_traverse_key_chain(struct tdb_context *tdb,
b2dd21
 			   TDB_DATA key,
b2dd21
 			   tdb_traverse_func fn,
b2dd21
 			   void *private_data);
b2dd21
@@ -560,7 +560,7 @@ _PUBLIC_ int tdb_traverse_key_chain(struct tdb_context *tdb,
b2dd21
  *
b2dd21
  * @return              1 if the key is found, 0 if not.
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_exists(struct tdb_context *tdb, TDB_DATA key);
b2dd21
+int tdb_exists(struct tdb_context *tdb, TDB_DATA key);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Lock entire database with a write lock.
b2dd21
@@ -572,7 +572,7 @@ _PUBLIC_ int tdb_exists(struct tdb_context *tdb, TDB_DATA key);
b2dd21
  * @see tdb_error()
b2dd21
  * @see tdb_errorstr()
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_lockall(struct tdb_context *tdb);
b2dd21
+int tdb_lockall(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Lock entire database with a write lock.
b2dd21
@@ -587,7 +587,7 @@ _PUBLIC_ int tdb_lockall(struct tdb_context *tdb);
b2dd21
  * @see tdb_error()
b2dd21
  * @see tdb_errorstr()
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_lockall_nonblock(struct tdb_context *tdb);
b2dd21
+int tdb_lockall_nonblock(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Unlock entire database with write lock.
b2dd21
@@ -600,7 +600,7 @@ _PUBLIC_ int tdb_lockall_nonblock(struct tdb_context *tdb);
b2dd21
  * @see tdb_error()
b2dd21
  * @see tdb_errorstr()
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_unlockall(struct tdb_context *tdb);
b2dd21
+int tdb_unlockall(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Lock entire database with a read lock.
b2dd21
@@ -612,7 +612,7 @@ _PUBLIC_ int tdb_unlockall(struct tdb_context *tdb);
b2dd21
  * @see tdb_error()
b2dd21
  * @see tdb_errorstr()
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_lockall_read(struct tdb_context *tdb);
b2dd21
+int tdb_lockall_read(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Lock entire database with a read lock.
b2dd21
@@ -627,7 +627,7 @@ _PUBLIC_ int tdb_lockall_read(struct tdb_context *tdb);
b2dd21
  * @see tdb_error()
b2dd21
  * @see tdb_errorstr()
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_lockall_read_nonblock(struct tdb_context *tdb);
b2dd21
+int tdb_lockall_read_nonblock(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Unlock entire database with read lock.
b2dd21
@@ -640,7 +640,7 @@ _PUBLIC_ int tdb_lockall_read_nonblock(struct tdb_context *tdb);
b2dd21
  * @see tdb_error()
b2dd21
  * @see tdb_errorstr()
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_unlockall_read(struct tdb_context *tdb);
b2dd21
+int tdb_unlockall_read(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Lock entire database with write lock - mark only.
b2dd21
@@ -654,7 +654,7 @@ _PUBLIC_ int tdb_unlockall_read(struct tdb_context *tdb);
b2dd21
  * @see tdb_error()
b2dd21
  * @see tdb_errorstr()
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_lockall_mark(struct tdb_context *tdb);
b2dd21
+int tdb_lockall_mark(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Lock entire database with write lock - unmark only.
b2dd21
@@ -668,7 +668,7 @@ _PUBLIC_ int tdb_lockall_mark(struct tdb_context *tdb);
b2dd21
  * @see tdb_error()
b2dd21
  * @see tdb_errorstr()
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_lockall_unmark(struct tdb_context *tdb);
b2dd21
+int tdb_lockall_unmark(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Get the name of the current tdb file.
b2dd21
@@ -679,7 +679,7 @@ _PUBLIC_ int tdb_lockall_unmark(struct tdb_context *tdb);
b2dd21
  *
b2dd21
  * @return              The name of the database.
b2dd21
  */
b2dd21
-_PUBLIC_ const char *tdb_name(struct tdb_context *tdb);
b2dd21
+const char *tdb_name(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Get the underlying file descriptor being used by tdb.
b2dd21
@@ -691,7 +691,7 @@ _PUBLIC_ const char *tdb_name(struct tdb_context *tdb);
b2dd21
  *
b2dd21
  * @return              The file descriptor or -1.
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_fd(struct tdb_context *tdb);
b2dd21
+int tdb_fd(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Get the current logging function.
b2dd21
@@ -704,7 +704,7 @@ _PUBLIC_ int tdb_fd(struct tdb_context *tdb);
b2dd21
  *
b2dd21
  * @see tdb_get_logging_private()
b2dd21
  */
b2dd21
-_PUBLIC_ tdb_log_func tdb_log_fn(struct tdb_context *tdb);
b2dd21
+tdb_log_func tdb_log_fn(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Get the private data of the logging function.
b2dd21
@@ -715,7 +715,7 @@ _PUBLIC_ tdb_log_func tdb_log_fn(struct tdb_context *tdb);
b2dd21
  *
b2dd21
  * @see tdb_log_fn()
b2dd21
  */
b2dd21
-_PUBLIC_ void *tdb_get_logging_private(struct tdb_context *tdb);
b2dd21
+void *tdb_get_logging_private(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Is a transaction active?
b2dd21
@@ -733,7 +733,7 @@ _PUBLIC_ void *tdb_get_logging_private(struct tdb_context *tdb);
b2dd21
  * @see tdb_transaction_commit()
b2dd21
  * @see tdb_transaction_cancel()
b2dd21
  */
b2dd21
-_PUBLIC_ bool tdb_transaction_active(struct tdb_context *tdb);
b2dd21
+bool tdb_transaction_active(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Start a transaction.
b2dd21
@@ -766,7 +766,7 @@ _PUBLIC_ bool tdb_transaction_active(struct tdb_context *tdb);
b2dd21
  * @see tdb_error()
b2dd21
  * @see tdb_errorstr()
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_transaction_start(struct tdb_context *tdb);
b2dd21
+int tdb_transaction_start(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Start a transaction, non-blocking.
b2dd21
@@ -779,7 +779,7 @@ _PUBLIC_ int tdb_transaction_start(struct tdb_context *tdb);
b2dd21
  * @see tdb_errorstr()
b2dd21
  * @see tdb_transaction_start()
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_transaction_start_nonblock(struct tdb_context *tdb);
b2dd21
+int tdb_transaction_start_nonblock(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Prepare to commit a current transaction, for two-phase commits.
b2dd21
@@ -796,7 +796,7 @@ _PUBLIC_ int tdb_transaction_start_nonblock(struct tdb_context *tdb);
b2dd21
  * @see tdb_error()
b2dd21
  * @see tdb_errorstr()
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_transaction_prepare_commit(struct tdb_context *tdb);
b2dd21
+int tdb_transaction_prepare_commit(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Commit a current transaction.
b2dd21
@@ -810,7 +810,7 @@ _PUBLIC_ int tdb_transaction_prepare_commit(struct tdb_context *tdb);
b2dd21
  * @see tdb_error()
b2dd21
  * @see tdb_errorstr()
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_transaction_commit(struct tdb_context *tdb);
b2dd21
+int tdb_transaction_commit(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Cancel a current transaction.
b2dd21
@@ -825,7 +825,7 @@ _PUBLIC_ int tdb_transaction_commit(struct tdb_context *tdb);
b2dd21
  * @see tdb_error()
b2dd21
  * @see tdb_errorstr()
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_transaction_cancel(struct tdb_context *tdb);
b2dd21
+int tdb_transaction_cancel(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Get the tdb sequence number.
b2dd21
@@ -845,7 +845,7 @@ _PUBLIC_ int tdb_transaction_cancel(struct tdb_context *tdb);
b2dd21
  * @see tdb_open()
b2dd21
  * @see tdb_enable_seqnum()
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_get_seqnum(struct tdb_context *tdb);
b2dd21
+int tdb_get_seqnum(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Get the hash size.
b2dd21
@@ -854,7 +854,7 @@ _PUBLIC_ int tdb_get_seqnum(struct tdb_context *tdb);
b2dd21
  *
b2dd21
  * @return              The hash size.
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_hash_size(struct tdb_context *tdb);
b2dd21
+int tdb_hash_size(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Get the map size.
b2dd21
@@ -863,7 +863,7 @@ _PUBLIC_ int tdb_hash_size(struct tdb_context *tdb);
b2dd21
  *
b2dd21
  * @return             The map size.
b2dd21
  */
b2dd21
-_PUBLIC_ size_t tdb_map_size(struct tdb_context *tdb);
b2dd21
+size_t tdb_map_size(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Get the tdb flags set during open.
b2dd21
@@ -872,7 +872,7 @@ _PUBLIC_ size_t tdb_map_size(struct tdb_context *tdb);
b2dd21
  *
b2dd21
  * @return              The flags set to on the database.
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_get_flags(struct tdb_context *tdb);
b2dd21
+int tdb_get_flags(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Add flags to the database.
b2dd21
@@ -881,7 +881,7 @@ _PUBLIC_ int tdb_get_flags(struct tdb_context *tdb);
b2dd21
  *
b2dd21
  * @param[in]  flag     The tdb flags to add.
b2dd21
  */
b2dd21
-_PUBLIC_ void tdb_add_flags(struct tdb_context *tdb, unsigned flag);
b2dd21
+void tdb_add_flags(struct tdb_context *tdb, unsigned flag);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Remove flags from the database.
b2dd21
@@ -890,7 +890,7 @@ _PUBLIC_ void tdb_add_flags(struct tdb_context *tdb, unsigned flag);
b2dd21
  *
b2dd21
  * @param[in]  flag     The tdb flags to remove.
b2dd21
  */
b2dd21
-_PUBLIC_ void tdb_remove_flags(struct tdb_context *tdb, unsigned flag);
b2dd21
+void tdb_remove_flags(struct tdb_context *tdb, unsigned flag);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Enable sequence number handling on an open tdb.
b2dd21
@@ -899,7 +899,7 @@ _PUBLIC_ void tdb_remove_flags(struct tdb_context *tdb, unsigned flag);
b2dd21
  *
b2dd21
  * @see tdb_get_seqnum()
b2dd21
  */
b2dd21
-_PUBLIC_ void tdb_enable_seqnum(struct tdb_context *tdb);
b2dd21
+void tdb_enable_seqnum(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Increment the tdb sequence number.
b2dd21
@@ -912,7 +912,7 @@ _PUBLIC_ void tdb_enable_seqnum(struct tdb_context *tdb);
b2dd21
  * @see tdb_enable_seqnum()
b2dd21
  * @see tdb_get_seqnum()
b2dd21
  */
b2dd21
-_PUBLIC_ void tdb_increment_seqnum_nonblock(struct tdb_context *tdb);
b2dd21
+void tdb_increment_seqnum_nonblock(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Create a hash of the key.
b2dd21
@@ -921,7 +921,7 @@ _PUBLIC_ void tdb_increment_seqnum_nonblock(struct tdb_context *tdb);
b2dd21
  *
b2dd21
  * @return              The hash.
b2dd21
  */
b2dd21
-_PUBLIC_ unsigned int tdb_jenkins_hash(TDB_DATA *key);
b2dd21
+unsigned int tdb_jenkins_hash(TDB_DATA *key);
b2dd21
 
b2dd21
 /**
b2dd21
  * @brief Check the consistency of the database.
b2dd21
@@ -944,7 +944,7 @@ _PUBLIC_ unsigned int tdb_jenkins_hash(TDB_DATA *key);
b2dd21
  * @see tdb_error()
b2dd21
  * @see tdb_errorstr()
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_check(struct tdb_context *tdb,
b2dd21
+int tdb_check(struct tdb_context *tdb,
b2dd21
 	      int (*check) (TDB_DATA key, TDB_DATA data, void *private_data),
b2dd21
 	      void *private_data);
b2dd21
 
b2dd21
@@ -966,7 +966,7 @@ _PUBLIC_ int tdb_check(struct tdb_context *tdb,
b2dd21
  * @see tdb_error()
b2dd21
  * @see tdb_errorstr()
b2dd21
  */
b2dd21
-_PUBLIC_ int tdb_rescue(struct tdb_context *tdb,
b2dd21
+int tdb_rescue(struct tdb_context *tdb,
b2dd21
 	       void (*walk) (TDB_DATA key, TDB_DATA data, void *private_data),
b2dd21
 	       void *private_data);
b2dd21
 
b2dd21
@@ -989,34 +989,34 @@ _PUBLIC_ int tdb_rescue(struct tdb_context *tdb,
b2dd21
  *
b2dd21
  * @see TDB_MUTEX_LOCKING
b2dd21
  */
b2dd21
-_PUBLIC_ bool tdb_runtime_check_for_robust_mutexes(void);
b2dd21
+bool tdb_runtime_check_for_robust_mutexes(void);
b2dd21
 
b2dd21
 /* @} ******************************************************************/
b2dd21
 
b2dd21
 /* Low level locking functions: use with care */
b2dd21
-_PUBLIC_ int tdb_chainlock(struct tdb_context *tdb, TDB_DATA key);
b2dd21
-_PUBLIC_ int tdb_chainlock_nonblock(struct tdb_context *tdb, TDB_DATA key);
b2dd21
-_PUBLIC_ int tdb_chainunlock(struct tdb_context *tdb, TDB_DATA key);
b2dd21
-_PUBLIC_ int tdb_chainlock_read(struct tdb_context *tdb, TDB_DATA key);
b2dd21
-_PUBLIC_ int tdb_chainlock_read_nonblock(struct tdb_context *tdb, TDB_DATA key);
b2dd21
-_PUBLIC_ int tdb_chainunlock_read(struct tdb_context *tdb, TDB_DATA key);
b2dd21
-_PUBLIC_ int tdb_chainlock_mark(struct tdb_context *tdb, TDB_DATA key);
b2dd21
-_PUBLIC_ int tdb_chainlock_unmark(struct tdb_context *tdb, TDB_DATA key);
b2dd21
+int tdb_chainlock(struct tdb_context *tdb, TDB_DATA key);
b2dd21
+int tdb_chainlock_nonblock(struct tdb_context *tdb, TDB_DATA key);
b2dd21
+int tdb_chainunlock(struct tdb_context *tdb, TDB_DATA key);
b2dd21
+int tdb_chainlock_read(struct tdb_context *tdb, TDB_DATA key);
b2dd21
+int tdb_chainlock_read_nonblock(struct tdb_context *tdb, TDB_DATA key);
b2dd21
+int tdb_chainunlock_read(struct tdb_context *tdb, TDB_DATA key);
b2dd21
+int tdb_chainlock_mark(struct tdb_context *tdb, TDB_DATA key);
b2dd21
+int tdb_chainlock_unmark(struct tdb_context *tdb, TDB_DATA key);
b2dd21
 
b2dd21
-_PUBLIC_ void tdb_setalarm_sigptr(struct tdb_context *tdb, volatile sig_atomic_t *sigptr);
b2dd21
+void tdb_setalarm_sigptr(struct tdb_context *tdb, volatile sig_atomic_t *sigptr);
b2dd21
 
b2dd21
 /* wipe and repack */
b2dd21
-_PUBLIC_ int tdb_wipe_all(struct tdb_context *tdb);
b2dd21
-_PUBLIC_ int tdb_repack(struct tdb_context *tdb);
b2dd21
+int tdb_wipe_all(struct tdb_context *tdb);
b2dd21
+int tdb_repack(struct tdb_context *tdb);
b2dd21
 
b2dd21
 /* Debug functions. Not used in production. */
b2dd21
-_PUBLIC_ void tdb_dump_all(struct tdb_context *tdb);
b2dd21
-_PUBLIC_ int tdb_printfreelist(struct tdb_context *tdb);
b2dd21
-_PUBLIC_ int tdb_validate_freelist(struct tdb_context *tdb, int *pnum_entries);
b2dd21
-_PUBLIC_ int tdb_freelist_size(struct tdb_context *tdb);
b2dd21
-_PUBLIC_ char *tdb_summary(struct tdb_context *tdb);
b2dd21
+void tdb_dump_all(struct tdb_context *tdb);
b2dd21
+int tdb_printfreelist(struct tdb_context *tdb);
b2dd21
+int tdb_validate_freelist(struct tdb_context *tdb, int *pnum_entries);
b2dd21
+int tdb_freelist_size(struct tdb_context *tdb);
b2dd21
+char *tdb_summary(struct tdb_context *tdb);
b2dd21
 
b2dd21
-_PUBLIC_ extern TDB_DATA tdb_null;
b2dd21
+extern TDB_DATA tdb_null;
b2dd21
 
b2dd21
 #ifdef  __cplusplus
b2dd21
 }
b2dd21
-- 
b2dd21
2.31.1
b2dd21