From: Howard Chu Date: Sun, 31 Mar 2013 19:56:08 +0000 (+0100) Subject: Tweak mode_t def per Hallvard's suggestion X-Git-Tag: OPENLDAP_REL_ENG_2_4_36~89^2~12 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=30da15a18df0810fd71f83b15e14a64dd7deee6a;p=openldap Tweak mode_t def per Hallvard's suggestion --- diff --git a/libraries/liblmdb/lmdb.h b/libraries/liblmdb/lmdb.h index 954062456e..57c3f886f4 100644 --- a/libraries/liblmdb/lmdb.h +++ b/libraries/liblmdb/lmdb.h @@ -138,7 +138,9 @@ extern "C" { #endif #ifdef _MSC_VER -#define mode_t int +typedef int mdb_mode_t; +#else +typedef mode_t mdb_mode_t; #endif /** @defgroup mdb MDB API @@ -502,7 +504,7 @@ int mdb_env_create(MDB_env **env); *
  • EAGAIN - the environment was locked by another process. * */ -int mdb_env_open(MDB_env *env, const char *path, unsigned int flags, mode_t mode); +int mdb_env_open(MDB_env *env, const char *path, unsigned int flags, mdb_mode_t mode); /** @brief Copy an MDB environment to the specified path. * diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 04a9f1c977..39da579c62 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -3378,7 +3378,7 @@ fail: #define CHANGELESS (MDB_FIXEDMAP|MDB_NOSUBDIR|MDB_RDONLY|MDB_WRITEMAP) int -mdb_env_open(MDB_env *env, const char *path, unsigned int flags, mode_t mode) +mdb_env_open(MDB_env *env, const char *path, unsigned int flags, mdb_mode_t mode) { int oflags, rc, len, excl; char *lpath, *dpath;