2010-05-16 19:26:45 -04:00
|
|
|
/****************************************************************
|
|
|
|
* This file is distributed under the following license:
|
|
|
|
*
|
|
|
|
* Copyright (c) 2010, Thomas Kister
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
****************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This file provides helper functions for the windows environment
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef RSWIN_H_
|
|
|
|
#define RSWIN_H_
|
|
|
|
|
|
|
|
#ifdef WINDOWS_SYS
|
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
#include <string>
|
2008-11-22 12:48:09 -05:00
|
|
|
|
2009-09-03 16:43:18 -04:00
|
|
|
// For win32 systems (tested on MingW+Ubuntu)
|
2011-10-01 09:12:28 -04:00
|
|
|
#define stat64 _stati64
|
2010-05-16 19:26:45 -04:00
|
|
|
|
2013-07-01 11:12:06 -04:00
|
|
|
// Should be in Iphlpapi.h, but mingw doesn't seem to have these
|
|
|
|
// Values copied directly from:
|
|
|
|
// http://msdn.microsoft.com/en-us/library/aa366845(v=vs.85).aspx
|
|
|
|
// (Title: MIB_IPADDRROW structure)
|
|
|
|
|
|
|
|
#ifndef MIB_IPADDR_DISCONNECTED
|
|
|
|
#define MIB_IPADDR_DISCONNECTED 0x0008 // Address is on disconnected interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef MIB_IPADDR_DELETED
|
|
|
|
#define MIB_IPADDR_DELETED 0x0040 // Address is being deleted
|
|
|
|
#endif
|
|
|
|
|
2010-05-16 19:26:45 -04:00
|
|
|
#endif // WINDOWS_SYS
|
|
|
|
|
|
|
|
#endif // RSWIN_H_
|