add/use MSC6 version macro

This commit is contained in:
Doug MacEachern 2008-04-09 20:58:35 +00:00
parent 552f0ede26
commit 0bf9cef2bd
2 changed files with 7 additions and 3 deletions

View File

@ -19,6 +19,10 @@
#ifndef SIGAR_OS_H
#define SIGAR_OS_H
#if _MSC_VER <= 1200
#define SIGAR_USING_MSC6 /* Visual Studio version 6 */
#endif
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winreg.h>
@ -144,7 +148,7 @@ typedef struct _WINSTATION_INFO {
/* end wtsapi32.h */
#if _MSC_VER <= 1200
#ifdef SIGAR_USING_MSC6
/* from winbase.h not in vs6.0 */
typedef struct {

View File

@ -2225,7 +2225,7 @@ static int sigar_get_netif_ipaddr(sigar_t *sigar,
MIB_IPADDRROW *row = &mib->table[i];
short type;
#if _MSC_VER <= 1200
#ifdef SIGAR_USING_MSC6
type = row->unused2;
#else
type = row->wType;
@ -3297,7 +3297,7 @@ int sigar_who_list_get_win32(sigar_t *sigar,
#define VER_NT_WORKSTATION 0x0000001
#endif
#if _MSC_VER <= 1200
#if SIGAR_USING_MSC6
#define sigar_wProductType wReserved[1]
#else
#define sigar_wProductType wProductType