* Makefile.in: Add libusr32.a to DLL_IMPORTS.
* wincap.h (wincaps::is_server): New flag. (wincapc::version): Change type to OSVERSIONINFOEX. (wincapc::is_server): New function. * wincap.cc (wincap_unknown::is_server): New initializer. (wincap_95): Ditto. (wincap_95osr2): Ditto. (wincap_98): Ditto. (wincap_me): Ditto. (wincap_nt3): Ditto. (wincap_nt4): Ditto. (wincap_nt4sp4): Ditto. (wincap_2000): Ditto. (wincap_xp): Ditto. (wincapc::init): Adapt to OSVERSIONINFOEX. Add detection of NT server systems. * sched.cc: Include windows.h and registry.h. (sched_rr_get_interval): Re-implement for NT systems.
This commit is contained in:
@@ -17,6 +17,7 @@ struct wincaps
|
||||
DWORD chunksize;
|
||||
int shared;
|
||||
unsigned is_winnt : 1;
|
||||
unsigned is_server : 1;
|
||||
unsigned access_denied_on_delete : 1;
|
||||
unsigned has_delete_on_close : 1;
|
||||
unsigned has_page_guard : 1;
|
||||
@@ -56,9 +57,9 @@ struct wincaps
|
||||
|
||||
class wincapc
|
||||
{
|
||||
OSVERSIONINFO version;
|
||||
char osnam[40];
|
||||
void *caps;
|
||||
OSVERSIONINFOEX version;
|
||||
char osnam[40];
|
||||
void *caps;
|
||||
|
||||
public:
|
||||
void init ();
|
||||
@@ -67,12 +68,13 @@ public:
|
||||
|
||||
const char *osname () const { return osnam; }
|
||||
|
||||
#define IMPLEMENT(cap) cap() const { return ((wincaps *)this->caps)->cap; }
|
||||
#define IMPLEMENT(cap) cap() const { return ((wincaps *) this->caps)->cap; }
|
||||
|
||||
DWORD IMPLEMENT (lock_file_highword)
|
||||
DWORD IMPLEMENT (chunksize)
|
||||
int IMPLEMENT (shared)
|
||||
bool IMPLEMENT (is_winnt)
|
||||
bool IMPLEMENT (is_server)
|
||||
bool IMPLEMENT (access_denied_on_delete)
|
||||
bool IMPLEMENT (has_delete_on_close)
|
||||
bool IMPLEMENT (has_page_guard)
|
||||
|
Reference in New Issue
Block a user