1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-29 13:04:28 +01:00

Replace WIN32 macro with _WIN32.

This commit is contained in:
Matias Fontanini
2015-05-02 16:25:59 -07:00
parent a7a63483df
commit a607ab380c
28 changed files with 108 additions and 110 deletions

View File

@@ -29,7 +29,7 @@
#include <algorithm>
#include "macros.h"
#ifndef WIN32
#ifndef _WIN32
#include <arpa/inet.h>
#ifdef BSD
#include <sys/socket.h>
@@ -64,7 +64,7 @@ IPv6Address::IPv6Address(const std::string &addr) {
}
void IPv6Address::init(const char *addr) {
#ifdef WIN32
#ifdef _WIN32
// mingw on linux somehow doesn't have InetPton
#ifdef _MSC_VER
if(InetPtonA(AF_INET6, addr, address) != 1)
@@ -84,7 +84,7 @@ void IPv6Address::init(const char *addr) {
std::string IPv6Address::to_string() const {
char buffer[INET6_ADDRSTRLEN];
#ifdef WIN32
#ifdef _WIN32
// mingw on linux somehow doesn't have InetNtop
#ifdef _MSC_VER
if(InetNtopA(AF_INET6, (PVOID)address, buffer, sizeof(buffer)) == 0)