fixes to compile on MSVC again
This commit is contained in:
parent
7041d070f1
commit
240649b925
|
@ -19,9 +19,18 @@
|
||||||
#ifndef SIGAR_OS_H
|
#ifndef SIGAR_OS_H
|
||||||
#define SIGAR_OS_H
|
#define SIGAR_OS_H
|
||||||
|
|
||||||
|
#if !defined(MSVC) && defined(_MSC_VER)
|
||||||
|
#define MSVC
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef MSVC
|
#ifdef MSVC
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#define snprintf _snprintf
|
||||||
#if _MSC_VER <= 1200
|
#if _MSC_VER <= 1200
|
||||||
#define SIGAR_USING_MSC6 /* Visual Studio version 6 */
|
#define SIGAR_USING_MSC6 /* Visual Studio version 6 */
|
||||||
|
#define HAVE_MIB_IPADDRROW_WTYPE 0
|
||||||
|
#else
|
||||||
|
#define HAVE_MIB_IPADDRROW_WTYPE 1
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
/* Cross compiling */
|
/* Cross compiling */
|
||||||
|
|
|
@ -23,7 +23,9 @@
|
||||||
#include "sigar_util.h"
|
#include "sigar_util.h"
|
||||||
#include "sigar_format.h"
|
#include "sigar_format.h"
|
||||||
#include <shellapi.h>
|
#include <shellapi.h>
|
||||||
|
#ifndef MSVC
|
||||||
#include <iphlpapi.h>
|
#include <iphlpapi.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define USING_WIDE_S(s) (s)->using_wide
|
#define USING_WIDE_S(s) (s)->using_wide
|
||||||
#define USING_WIDE() USING_WIDE_S(sigar)
|
#define USING_WIDE() USING_WIDE_S(sigar)
|
||||||
|
|
Loading…
Reference in New Issue