int isc_win32os_versioncheck(unsigned int major, unsigned int minor, unsigned int spmajor, unsigned int spminor) { initialize_action(); if (major < isc_win32os_majorversion()) return (1); if (major > isc_win32os_majorversion()) return (-1); if (minor < isc_win32os_minorversion()) return (1); if (minor > isc_win32os_minorversion()) return (-1); if (spmajor < isc_win32os_servicepackmajor()) return (1); if (spmajor > isc_win32os_servicepackmajor()) return (-1); if (spminor < isc_win32os_servicepackminor()) return (1); if (spminor > isc_win32os_servicepackminor()) return (-1); /* Exact */ return (0); }
static void initialize(void) { if(once == ISC_FALSE) { initialize_action(); once = ISC_TRUE; } }
unsigned int isc_os_ncpus(void) { long ncpus = 1; initialize_action(); ncpus = SystemInfo.dwNumberOfProcessors; if (ncpus <= 0) ncpus = 1; return ((unsigned int)ncpus); }
unsigned int isc_win32os_servicepackminor(void) { initialize_action(); return ((unsigned int)osVer.wServicePackMinor); }
unsigned int isc_win32os_minorversion(void) { initialize_action(); return ((unsigned int)osVer.dwMinorVersion); }