typedef mode_t mdb_mode_t;
#endif
-#ifndef _WIN32
- /** An abstraction for a file handle.
- * On POSIX systems file handles are small integers. On Windows
- * they're opaque pointers.
- */
-#define HANDLE int
+/** An abstraction for a file handle.
+ * On POSIX systems file handles are small integers. On Windows
+ * they're opaque pointers.
+ */
+#ifdef _WIN32
+typedef void *mdb_filehandle_t;
+#else
+typedef int mdb_filehandle_t;
#endif
/** @defgroup mdb MDB API
* have already been opened for Write access.
* @return A non-zero error value on failure and 0 on success.
*/
-int mdb_env_copyfd(MDB_env *env, HANDLE fd);
+int mdb_env_copyfd(MDB_env *env, mdb_filehandle_t fd);
/** @brief Return statistics about the MDB environment.
*
*/
#define ErrCode() errno
+ /** An abstraction for a file handle.
+ * On POSIX systems file handles are small integers. On Windows
+ * they're opaque pointers.
+ */
+#define HANDLE int
+
/** A value for an invalid file handle.
* Mainly used to initialize file variables and signify that they are
* unused.
}
int
-mdb_env_copyfd(MDB_env *env, int fd)
+mdb_env_copyfd(MDB_env *env, HANDLE fd)
{
MDB_txn *txn = NULL;
int rc;