update makefiles, license year

Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
R4SAS 2020-11-23 01:44:21 +03:00
parent 771480e368
commit bc330ff0ea
12 changed files with 37 additions and 35 deletions

View file

@ -46,13 +46,13 @@ namespace fs {
dataDir = cmdline_param;
return;
}
#if defined(WIN32) || defined(_WIN32)
#ifdef _WIN32
char localAppData[MAX_PATH];
// check executable directory first
if(!GetModuleFileName(NULL, localAppData, MAX_PATH))
{
#if defined(WIN32_APP)
#ifdef WIN32_APP
MessageBox(NULL, TEXT("Unable to get application path!"), TEXT("I2Pd: error"), MB_ICONERROR | MB_OK);
#else
fprintf(stderr, "Error: Unable to get application path!");
@ -70,7 +70,7 @@ namespace fs {
{
if(SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, 0, localAppData) != S_OK)
{
#if defined(WIN32_APP)
#ifdef WIN32_APP
MessageBox(NULL, TEXT("Unable to get AppData path!"), TEXT("I2Pd: error"), MB_ICONERROR | MB_OK);
#else
fprintf(stderr, "Error: Unable to get AppData path!");

View file

@ -19,7 +19,7 @@
#include "I2PEndian.h"
#include "Timestamp.h"
#ifdef WIN32
#ifdef _WIN32
#ifndef _WIN64
#define _USE_32BIT_TIME_T
#endif

View file

@ -13,7 +13,7 @@
#include "util.h"
#include "Log.h"
#ifdef WIN32
#ifdef _WIN32
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
@ -56,7 +56,7 @@ int inet_pton_xp(int af, const char *src, void *dst)
}
return 0;
}
#else /* !WIN32 => UNIX */
#else /* !_WIN32 => UNIX */
#include <sys/types.h>
#include <ifaddrs.h>
#endif
@ -109,7 +109,7 @@ namespace util
namespace net
{
#ifdef WIN32
#ifdef _WIN32
bool IsWindowsXPorLater()
{
static bool isRequested = false;
@ -333,13 +333,13 @@ namespace net
return mtu;
}
#endif // WIN32
#endif // _WIN32
int GetMTU(const boost::asio::ip::address& localAddress)
{
int fallback = localAddress.is_v6 () ? 1280 : 620; // fallback MTU
#ifdef WIN32
#ifdef _WIN32
return GetMTUWindows(localAddress, fallback);
#else
return GetMTUUnix(localAddress, fallback);
@ -349,7 +349,7 @@ namespace net
const boost::asio::ip::address GetInterfaceAddress(const std::string & ifname, bool ipv6)
{
#ifdef WIN32
#ifdef _WIN32
LogPrint(eLogError, "NetIface: cannot get address by interface name, not implemented on WIN32");
if(ipv6)
return boost::asio::ip::address::from_string("::1");