Simplify some locale_t code

This commit is contained in:
Evan Miller
2021-08-22 12:20:13 -04:00
parent d1369407c5
commit d3eea5f38e
2 changed files with 24 additions and 15 deletions

View File

@@ -65,6 +65,13 @@
// M$VC see http://stackoverflow.com/questions/1113409/attribute-constructor-equivalent-in-vc
#define MDB_DEPRECATED(type, funcname) type __attribute__((deprecated)) funcname
#if defined(_WIN32) || defined(WIN32) || defined(_WIN64) || defined(WIN64) || defined(WINDOWS)
typedef _locale_t mdb_locale_t;
#else
typedef locale_t mdb_locale_t;
#endif
enum {
MDB_PAGE_DB = 0,
MDB_PAGE_DATA,
@@ -311,10 +318,8 @@ typedef struct {
#if MDBTOOLS_H_HAVE_ICONV_H
iconv_t iconv_in;
iconv_t iconv_out;
#elif defined(_WIN32) || defined(WIN32) || defined(_WIN64) || defined(WIN64) || defined(WINDOWS)
_locale_t locale;
#else
locale_t locale;
mdb_locale_t locale;
#endif
} MdbHandle;