diff options
author | Amitay Isaacs <amitay@gmail.com> | 2012-02-21 15:29:22 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-02-21 15:29:22 +1030 |
commit | 4e9072660a96324f8d9421f35593057b730ca185 (patch) | |
tree | ee1d0ad351b469bfa536a9dada2fb3fd8a558af9 | |
parent | a63d731ae05af78bdc33db58880387169429753e (diff) | |
download | samba-4e9072660a96324f8d9421f35593057b730ca185.tar.gz samba-4e9072660a96324f8d9421f35593057b730ca185.tar.bz2 samba-4e9072660a96324f8d9421f35593057b730ca185.zip |
lib/tdb2: Mark public function as such
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r-- | lib/tdb2/check.c | 2 | ||||
-rw-r--r-- | lib/tdb2/hash.c | 8 | ||||
-rw-r--r-- | lib/tdb2/lock.c | 8 | ||||
-rw-r--r-- | lib/tdb2/open.c | 12 | ||||
-rw-r--r-- | lib/tdb2/summary.c | 2 | ||||
-rw-r--r-- | lib/tdb2/tdb.c | 30 | ||||
-rw-r--r-- | lib/tdb2/tdb1_hash.c | 2 | ||||
-rw-r--r-- | lib/tdb2/transaction.c | 8 | ||||
-rw-r--r-- | lib/tdb2/traverse.c | 8 |
9 files changed, 40 insertions, 40 deletions
diff --git a/lib/tdb2/check.c b/lib/tdb2/check.c index ecd6c13c53..6ad1ebd362 100644 --- a/lib/tdb2/check.c +++ b/lib/tdb2/check.c @@ -794,7 +794,7 @@ static enum TDB_ERROR check_linear(struct tdb_context *tdb, return TDB_SUCCESS; } -enum TDB_ERROR tdb_check_(struct tdb_context *tdb, +_PUBLIC_ enum TDB_ERROR tdb_check_(struct tdb_context *tdb, enum TDB_ERROR (*check)(TDB_DATA, TDB_DATA, void *), void *data) { diff --git a/lib/tdb2/hash.c b/lib/tdb2/hash.c index 619d56f811..0d4d7805ce 100644 --- a/lib/tdb2/hash.c +++ b/lib/tdb2/hash.c @@ -851,7 +851,7 @@ static enum TDB_ERROR chainlock(struct tdb_context *tdb, const TDB_DATA *key, /* lock/unlock one hash chain. This is meant to be used to reduce contention - it cannot guarantee how many records will be locked */ -enum TDB_ERROR tdb_chainlock(struct tdb_context *tdb, TDB_DATA key) +_PUBLIC_ enum TDB_ERROR tdb_chainlock(struct tdb_context *tdb, TDB_DATA key) { if (tdb->flags & TDB_VERSION1) { if (tdb1_chainlock(tdb, key) == -1) @@ -862,7 +862,7 @@ enum TDB_ERROR tdb_chainlock(struct tdb_context *tdb, TDB_DATA key) "tdb_chainlock"); } -void tdb_chainunlock(struct tdb_context *tdb, TDB_DATA key) +_PUBLIC_ void tdb_chainunlock(struct tdb_context *tdb, TDB_DATA key) { uint64_t h = tdb_hash(tdb, key.dptr, key.dsize); tdb_off_t lockstart, locksize; @@ -882,7 +882,7 @@ void tdb_chainunlock(struct tdb_context *tdb, TDB_DATA key) tdb_unlock_hashes(tdb, lockstart, locksize, F_WRLCK); } -enum TDB_ERROR tdb_chainlock_read(struct tdb_context *tdb, TDB_DATA key) +_PUBLIC_ enum TDB_ERROR tdb_chainlock_read(struct tdb_context *tdb, TDB_DATA key) { if (tdb->flags & TDB_VERSION1) { if (tdb1_chainlock_read(tdb, key) == -1) @@ -893,7 +893,7 @@ enum TDB_ERROR tdb_chainlock_read(struct tdb_context *tdb, TDB_DATA key) "tdb_chainlock_read"); } -void tdb_chainunlock_read(struct tdb_context *tdb, TDB_DATA key) +_PUBLIC_ void tdb_chainunlock_read(struct tdb_context *tdb, TDB_DATA key) { uint64_t h = tdb_hash(tdb, key.dptr, key.dsize); tdb_off_t lockstart, locksize; diff --git a/lib/tdb2/lock.c b/lib/tdb2/lock.c index a71c95f6e5..df0ec0c208 100644 --- a/lib/tdb2/lock.c +++ b/lib/tdb2/lock.c @@ -851,22 +851,22 @@ void tdb_unlock_free_bucket(struct tdb_context *tdb, tdb_off_t b_off) tdb_nest_unlock(tdb, free_lock_off(b_off), F_WRLCK); } -enum TDB_ERROR tdb_lockall(struct tdb_context *tdb) +_PUBLIC_ enum TDB_ERROR tdb_lockall(struct tdb_context *tdb) { return tdb_allrecord_lock(tdb, F_WRLCK, TDB_LOCK_WAIT, false); } -void tdb_unlockall(struct tdb_context *tdb) +_PUBLIC_ void tdb_unlockall(struct tdb_context *tdb) { tdb_allrecord_unlock(tdb, F_WRLCK); } -enum TDB_ERROR tdb_lockall_read(struct tdb_context *tdb) +_PUBLIC_ enum TDB_ERROR tdb_lockall_read(struct tdb_context *tdb) { return tdb_allrecord_lock(tdb, F_RDLCK, TDB_LOCK_WAIT, false); } -void tdb_unlockall_read(struct tdb_context *tdb) +_PUBLIC_ void tdb_unlockall_read(struct tdb_context *tdb) { tdb_allrecord_unlock(tdb, F_RDLCK); } diff --git a/lib/tdb2/open.c b/lib/tdb2/open.c index 2730f218d2..b93fa831a0 100644 --- a/lib/tdb2/open.c +++ b/lib/tdb2/open.c @@ -210,7 +210,7 @@ static enum TDB_ERROR tdb_new_file(struct tdb_context *tdb) return TDB_SUCCESS; } -enum TDB_ERROR tdb_set_attribute(struct tdb_context *tdb, +_PUBLIC_ enum TDB_ERROR tdb_set_attribute(struct tdb_context *tdb, const union tdb_attribute *attr) { switch (attr->base.attr) { @@ -256,7 +256,7 @@ enum TDB_ERROR tdb_set_attribute(struct tdb_context *tdb, return TDB_SUCCESS; } -enum TDB_ERROR tdb_get_attribute(struct tdb_context *tdb, +_PUBLIC_ enum TDB_ERROR tdb_get_attribute(struct tdb_context *tdb, union tdb_attribute *attr) { switch (attr->base.attr) { @@ -320,7 +320,7 @@ enum TDB_ERROR tdb_get_attribute(struct tdb_context *tdb, return TDB_SUCCESS; } -void tdb_unset_attribute(struct tdb_context *tdb, +_PUBLIC_ void tdb_unset_attribute(struct tdb_context *tdb, enum tdb_attribute_type type) { switch (type) { @@ -424,7 +424,7 @@ static enum TDB_ERROR capabilities_ok(struct tdb_context *tdb, return ecode; } -struct tdb_context *tdb_open(const char *name, int tdb_flags, +_PUBLIC_ struct tdb_context *tdb_open(const char *name, int tdb_flags, int open_flags, mode_t mode, union tdb_attribute *attr) { @@ -825,7 +825,7 @@ fail_errno: return NULL; } -int tdb_close(struct tdb_context *tdb) +_PUBLIC_ int tdb_close(struct tdb_context *tdb) { int ret = 0; struct tdb_context **i; @@ -873,7 +873,7 @@ int tdb_close(struct tdb_context *tdb) return ret; } -void tdb_foreach_(int (*fn)(struct tdb_context *, void *), void *p) +_PUBLIC_ void tdb_foreach_(int (*fn)(struct tdb_context *, void *), void *p) { struct tdb_context *i; diff --git a/lib/tdb2/summary.c b/lib/tdb2/summary.c index f3a3a085f3..8ddd26ef03 100644 --- a/lib/tdb2/summary.c +++ b/lib/tdb2/summary.c @@ -211,7 +211,7 @@ static void add_capabilities(struct tdb_context *tdb, size_t num, char *summary) } } -enum TDB_ERROR tdb_summary(struct tdb_context *tdb, +_PUBLIC_ enum TDB_ERROR tdb_summary(struct tdb_context *tdb, enum tdb_summary_flags flags, char **summary) { diff --git a/lib/tdb2/tdb.c b/lib/tdb2/tdb.c index 5e965acabd..c9224bdeed 100644 --- a/lib/tdb2/tdb.c +++ b/lib/tdb2/tdb.c @@ -107,7 +107,7 @@ static enum TDB_ERROR update_data(struct tdb_context *tdb, return ecode; } -enum TDB_ERROR tdb_store(struct tdb_context *tdb, +_PUBLIC_ enum TDB_ERROR tdb_store(struct tdb_context *tdb, struct tdb_data key, struct tdb_data dbuf, int flag) { struct hash_info h; @@ -174,7 +174,7 @@ out: return tdb->last_error = ecode; } -enum TDB_ERROR tdb_append(struct tdb_context *tdb, +_PUBLIC_ enum TDB_ERROR tdb_append(struct tdb_context *tdb, struct tdb_data key, struct tdb_data dbuf) { struct hash_info h; @@ -248,7 +248,7 @@ out: return tdb->last_error = ecode; } -enum TDB_ERROR tdb_fetch(struct tdb_context *tdb, struct tdb_data key, +_PUBLIC_ enum TDB_ERROR tdb_fetch(struct tdb_context *tdb, struct tdb_data key, struct tdb_data *data) { tdb_off_t off; @@ -280,7 +280,7 @@ enum TDB_ERROR tdb_fetch(struct tdb_context *tdb, struct tdb_data key, return tdb->last_error = ecode; } -bool tdb_exists(struct tdb_context *tdb, TDB_DATA key) +_PUBLIC_ bool tdb_exists(struct tdb_context *tdb, TDB_DATA key) { tdb_off_t off; struct tdb_used_record rec; @@ -301,7 +301,7 @@ bool tdb_exists(struct tdb_context *tdb, TDB_DATA key) return off ? true : false; } -enum TDB_ERROR tdb_delete(struct tdb_context *tdb, struct tdb_data key) +_PUBLIC_ enum TDB_ERROR tdb_delete(struct tdb_context *tdb, struct tdb_data key) { tdb_off_t off; struct tdb_used_record rec; @@ -346,7 +346,7 @@ unlock: return tdb->last_error = ecode; } -unsigned int tdb_get_flags(struct tdb_context *tdb) +_PUBLIC_ unsigned int tdb_get_flags(struct tdb_context *tdb) { return tdb->flags; } @@ -372,7 +372,7 @@ static bool readonly_changable(struct tdb_context *tdb, const char *caller) return true; } -void tdb_add_flag(struct tdb_context *tdb, unsigned flag) +_PUBLIC_ void tdb_add_flag(struct tdb_context *tdb, unsigned flag) { if (tdb->flags & TDB_INTERNAL) { tdb->last_error = tdb_logerr(tdb, TDB_ERR_EINVAL, @@ -409,7 +409,7 @@ void tdb_add_flag(struct tdb_context *tdb, unsigned flag) } } -void tdb_remove_flag(struct tdb_context *tdb, unsigned flag) +_PUBLIC_ void tdb_remove_flag(struct tdb_context *tdb, unsigned flag) { if (tdb->flags & TDB_INTERNAL) { tdb->last_error = tdb_logerr(tdb, TDB_ERR_EINVAL, @@ -454,7 +454,7 @@ void tdb_remove_flag(struct tdb_context *tdb, unsigned flag) } } -const char *tdb_errorstr(enum TDB_ERROR ecode) +_PUBLIC_ const char *tdb_errorstr(enum TDB_ERROR ecode) { /* Gcc warns if you miss a case in the switch, so use that. */ switch (TDB_ERR_TO_OFF(ecode)) { @@ -471,7 +471,7 @@ const char *tdb_errorstr(enum TDB_ERROR ecode) return "Invalid error code"; } -enum TDB_ERROR tdb_error(struct tdb_context *tdb) +_PUBLIC_ enum TDB_ERROR tdb_error(struct tdb_context *tdb) { return tdb->last_error; } @@ -506,7 +506,7 @@ enum TDB_ERROR COLD tdb_logerr(struct tdb_context *tdb, return ecode; } -enum TDB_ERROR tdb_parse_record_(struct tdb_context *tdb, +_PUBLIC_ enum TDB_ERROR tdb_parse_record_(struct tdb_context *tdb, TDB_DATA key, enum TDB_ERROR (*parse)(TDB_DATA k, TDB_DATA d, @@ -548,12 +548,12 @@ enum TDB_ERROR tdb_parse_record_(struct tdb_context *tdb, return tdb->last_error = ecode; } -const char *tdb_name(const struct tdb_context *tdb) +_PUBLIC_ const char *tdb_name(const struct tdb_context *tdb) { return tdb->name; } -int64_t tdb_get_seqnum(struct tdb_context *tdb) +_PUBLIC_ int64_t tdb_get_seqnum(struct tdb_context *tdb) { tdb_off_t off; @@ -577,7 +577,7 @@ int64_t tdb_get_seqnum(struct tdb_context *tdb) } -int tdb_fd(const struct tdb_context *tdb) +_PUBLIC_ int tdb_fd(const struct tdb_context *tdb) { return tdb->file->fd; } @@ -600,7 +600,7 @@ static int repack_traverse(struct tdb_context *tdb, TDB_DATA key, TDB_DATA data, return 0; } -enum TDB_ERROR tdb_repack(struct tdb_context *tdb) +_PUBLIC_ enum TDB_ERROR tdb_repack(struct tdb_context *tdb) { struct tdb_context *tmp_db; struct traverse_state state; diff --git a/lib/tdb2/tdb1_hash.c b/lib/tdb2/tdb1_hash.c index 2d5e4961a3..1d4e4ae3c7 100644 --- a/lib/tdb2/tdb1_hash.c +++ b/lib/tdb2/tdb1_hash.c @@ -340,7 +340,7 @@ static uint32_t hashlittle( const void *key, size_t length ) return c; } -uint64_t tdb1_incompatible_hash(const void *key, size_t len, uint64_t seed, +_PUBLIC_ uint64_t tdb1_incompatible_hash(const void *key, size_t len, uint64_t seed, void *unused) { return hashlittle(key, len); diff --git a/lib/tdb2/transaction.c b/lib/tdb2/transaction.c index dbdaf32cef..f6d75572a0 100644 --- a/lib/tdb2/transaction.c +++ b/lib/tdb2/transaction.c @@ -517,7 +517,7 @@ static void _tdb_transaction_cancel(struct tdb_context *tdb) start a tdb transaction. No token is returned, as only a single transaction is allowed to be pending per tdb_context */ -enum TDB_ERROR tdb_transaction_start(struct tdb_context *tdb) +_PUBLIC_ enum TDB_ERROR tdb_transaction_start(struct tdb_context *tdb) { enum TDB_ERROR ecode; @@ -621,7 +621,7 @@ fail_allrecord_lock: /* cancel the current transaction */ -void tdb_transaction_cancel(struct tdb_context *tdb) +_PUBLIC_ void tdb_transaction_cancel(struct tdb_context *tdb) { if (tdb->flags & TDB_VERSION1) { tdb1_transaction_cancel(tdb); @@ -1065,7 +1065,7 @@ static enum TDB_ERROR _tdb_transaction_prepare_commit(struct tdb_context *tdb) /* prepare to commit the current transaction */ -enum TDB_ERROR tdb_transaction_prepare_commit(struct tdb_context *tdb) +_PUBLIC_ enum TDB_ERROR tdb_transaction_prepare_commit(struct tdb_context *tdb) { if (tdb->flags & TDB_VERSION1) { if (tdb1_transaction_prepare_commit(tdb) == -1) @@ -1078,7 +1078,7 @@ enum TDB_ERROR tdb_transaction_prepare_commit(struct tdb_context *tdb) /* commit the current transaction */ -enum TDB_ERROR tdb_transaction_commit(struct tdb_context *tdb) +_PUBLIC_ enum TDB_ERROR tdb_transaction_commit(struct tdb_context *tdb) { const struct tdb_methods *methods; int i; diff --git a/lib/tdb2/traverse.c b/lib/tdb2/traverse.c index 50acce2b52..a93e4d1d68 100644 --- a/lib/tdb2/traverse.c +++ b/lib/tdb2/traverse.c @@ -18,7 +18,7 @@ #include "private.h" #include <ccan/likely/likely.h> -int64_t tdb_traverse_(struct tdb_context *tdb, +_PUBLIC_ int64_t tdb_traverse_(struct tdb_context *tdb, int (*fn)(struct tdb_context *, TDB_DATA, TDB_DATA, void *), void *p) @@ -57,7 +57,7 @@ int64_t tdb_traverse_(struct tdb_context *tdb, return count; } -enum TDB_ERROR tdb_firstkey(struct tdb_context *tdb, struct tdb_data *key) +_PUBLIC_ enum TDB_ERROR tdb_firstkey(struct tdb_context *tdb, struct tdb_data *key) { struct traverse_info tinfo; @@ -75,7 +75,7 @@ enum TDB_ERROR tdb_firstkey(struct tdb_context *tdb, struct tdb_data *key) } /* We lock twice, not very efficient. We could keep last key & tinfo cached. */ -enum TDB_ERROR tdb_nextkey(struct tdb_context *tdb, struct tdb_data *key) +_PUBLIC_ enum TDB_ERROR tdb_nextkey(struct tdb_context *tdb, struct tdb_data *key) { struct traverse_info tinfo; struct hash_info h; @@ -110,7 +110,7 @@ static int wipe_one(struct tdb_context *tdb, return (*ecode != TDB_SUCCESS); } -enum TDB_ERROR tdb_wipe_all(struct tdb_context *tdb) +_PUBLIC_ enum TDB_ERROR tdb_wipe_all(struct tdb_context *tdb) { enum TDB_ERROR ecode; int64_t count; |