[Date Prev][Date Next] [Chronological] [Thread] [Top]

lmdb.h defining mode_t

openldap-commit2devel@OpenLDAP.org writes:
> commit 0c568117cea6764c3f12a0d69ddf54ee467d2dec
> Author: Howard Chu <hyc@symas.com>
> Date:   Sun Mar 31 08:10:43 2013 -0800
>     MSVC doesn't define mode_t

Nor should ldmb.h.  That can break if it meets a header from another
package doing almost the same thing. E.g. #define mode_t unsigned int.
  #ifndef _MSC_VER
  typedef mode_t mdb_mode_t;
  typedef int    mdb_mode_t;
  int mdb_env_open(... mdb_mode_t mode);