#include "db_config.h"
#include "db_int.h"
int
__os_is_winnt()
{
#ifdef DB_WINCE
return (1);
#else
static int __os_type = -1;
if (__os_type == -1) {
if ((GetVersion() & 0x80000000) == 0)
__os_type = 1;
else
__os_type = 0;
}
return (__os_type);
#endif
}
int
__os_fs_notzero()
{
#ifdef DB_WINCE
return (1);
#else
static int __os_notzero = -1;
OSVERSIONINFO osvi;
if (__os_notzero == -1) {
if (__os_is_winnt()) {
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx(&osvi);
if (_tcscmp(osvi.szCSDVersion, _T("RTTarget-32")) == 0)
__os_notzero = 1;
else
__os_notzero = 0;
} else
__os_notzero = 1;
}
return (__os_notzero);
#endif
}
int
__os_support_direct_io()
{
return (1);
}
int
__os_support_db_register()
{
#ifdef DB_WINCE
return (0);
#else
return (__os_is_winnt());
#endif
}
int
__os_support_replication()
{
#ifdef DB_WINCE
return (0);
#else
return (__os_is_winnt());
#endif
}