Skip to content

Commit

Permalink
Merge branch 'bareos-15.2' into bareos-16.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco van Wieringen committed Aug 29, 2016
2 parents 85b63f2 + 6aae37e commit 1a8ba8f
Show file tree
Hide file tree
Showing 4 changed files with 201 additions and 199 deletions.
4 changes: 4 additions & 0 deletions src/dird/ua_status.c
Expand Up @@ -709,6 +709,10 @@ static void do_scheduler_status(UAContext *ua)
*/
LockRes();
foreach_res(sched, R_SCHEDULE) {
if (!schedulegiven && !sched->enabled) {
continue;
}

if (!acl_access_ok(ua, Schedule_ACL, sched->hdr.name)) {
continue;
}
Expand Down
36 changes: 30 additions & 6 deletions src/lmdb/lmdb.h
Expand Up @@ -167,6 +167,7 @@

#include <sys/types.h>
#include <inttypes.h>
#include <limits.h>

#ifdef __cplusplus
extern "C" {
Expand All @@ -179,11 +180,30 @@ typedef int mdb_mode_t;
typedef mode_t mdb_mode_t;
#endif

#ifdef MDB_VL32
typedef uint64_t mdb_size_t;
#define mdb_env_create mdb_env_create_vl32 /**< Prevent mixing with non-VL32 builds */
#ifdef _WIN32
# define MDB_FMT_Z "I"
#else
# define MDB_FMT_Z "z" /**< printf/scanf format modifier for size_t */
#endif

#ifndef MDB_VL32
/** Unsigned type used for mapsize, entry counts and page/transaction IDs.
*
* It is normally size_t, hence the name. Defining MDB_VL32 makes it
* uint64_t, but do not try this unless you know what you are doing.
*/
typedef size_t mdb_size_t;
# define MDB_SIZE_MAX SIZE_MAX /**< max #mdb_size_t */
/** #mdb_size_t printf formats, \b t = one of [diouxX] without quotes */
# define MDB_PRIy(t) MDB_FMT_Z #t
/** #mdb_size_t scanf formats, \b t = one of [dioux] without quotes */
# define MDB_SCNy(t) MDB_FMT_Z #t
#else
typedef uint64_t mdb_size_t;
# define MDB_SIZE_MAX UINT64_MAX
# define MDB_PRIy(t) PRI##t##64
# define MDB_SCNy(t) SCN##t##64
# define mdb_env_create mdb_env_create_vl32 /**< Prevent mixing with non-VL32 builds */
#endif

/** An abstraction for a file handle.
Expand Down Expand Up @@ -320,7 +340,8 @@ typedef void (MDB_rel_func)(MDB_val *item, void *oldptr, void *newptr, void *rel
#define MDB_REVERSEKEY 0x02
/** use sorted duplicates */
#define MDB_DUPSORT 0x04
/** numeric keys in native byte order: either unsigned int or size_t.
/** numeric keys in native byte order, either unsigned int or #mdb_size_t.
* (lmdb expects 32-bit int <= size_t <= 32/64-bit mdb_size_t.)
* The keys must all be of the same size. */
#define MDB_INTEGERKEY 0x08
/** with #MDB_DUPSORT, sorted dup items have fixed size */
Expand Down Expand Up @@ -456,8 +477,10 @@ typedef enum MDB_cursor_op {
#define MDB_BAD_VALSIZE (-30781)
/** The specified DBI was changed unexpectedly */
#define MDB_BAD_DBI (-30780)
/** Unexpected problem - txn should abort */
#define MDB_PROBLEM (-30779)
/** The last defined error code */
#define MDB_LAST_ERRCODE MDB_BAD_DBI
#define MDB_LAST_ERRCODE MDB_PROBLEM
/** @} */

/** @brief Statistics for a database in the environment */
Expand Down Expand Up @@ -1105,7 +1128,8 @@ int mdb_txn_renew(MDB_txn *txn);
* keys must be unique and may have only a single data item.
* <li>#MDB_INTEGERKEY
* Keys are binary integers in native byte order, either unsigned int
* or size_t, and will be sorted as such.
* or #mdb_size_t, and will be sorted as such.
* (lmdb expects 32-bit int <= size_t <= 32/64-bit mdb_size_t.)
* The keys must all be of the same size.
* <li>#MDB_DUPFIXED
* This flag may only be used in combination with #MDB_DUPSORT. This option
Expand Down

0 comments on commit 1a8ba8f

Please sign in to comment.