X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=win%2Finspircd_win32wrapper.h;h=b2ca05229692f9b1f8add017a4148664749dc6c0;hb=0a329440bd1d0fa642ce2f3e14bc88125377b5bd;hp=6b69e1a6d3ced27d083a397048112aec3dbfc20a;hpb=3faa9e329907bca551843119b27dd84d67eb0f40;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/win/inspircd_win32wrapper.h b/win/inspircd_win32wrapper.h index 6b69e1a6d..b2ca05229 100644 --- a/win/inspircd_win32wrapper.h +++ b/win/inspircd_win32wrapper.h @@ -1,9 +1,17 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2007 Dennis Friis - * Copyright (C) 2007 Craig Edwards - * Copyright (C) 2007 Robin Burchell + * Copyright (C) 2020 Matt Schatz + * Copyright (C) 2013-2015 Attila Molnar + * Copyright (C) 2013, 2015, 2018-2019, 2021 Sadie Powell + * Copyright (C) 2012-2013 ChrisTX + * Copyright (C) 2012 Robby + * Copyright (C) 2011, 2014, 2019 Adam + * Copyright (C) 2009 Uli Schlachter + * Copyright (C) 2007-2009 Robin Burchell + * Copyright (C) 2007-2008 Craig Edwards + * Copyright (C) 2007, 2009 Dennis Friis + * Copyright (C) 2007 burlex * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -43,7 +51,7 @@ #define VC_EXTRALEAN #define WIN32_LEAN_AND_MEAN -/* Macros for exporting symbols - dependant on what is being compiled */ +/* Macros for exporting symbols - dependent on what is being compiled */ #ifdef DLL_BUILD #define CoreExport __declspec(dllimport) @@ -53,6 +61,11 @@ #define DllExport __declspec(dllimport) #endif +// File numbers for standard streams. +#define STDIN_FILENO 0 +#define STDOUT_FILENO 1 +#define STDERR_FILENO 2 + /* Redirect main() through a different method in win32service.cpp, to intercept service startup */ #define ENTRYPOINT CoreExport int smain(int argc, char** argv) @@ -94,6 +107,8 @@ typedef SSIZE_T ssize_t; #define popen _popen #define pclose _pclose #define getpid _getpid +#define dup _dup +#define fdopen _fdopen // warning: 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2' // Normally, this is a huge problem, but due to our new/delete remap, we can ignore it. @@ -125,6 +140,9 @@ typedef SSIZE_T ssize_t; // warning C4706: assignment within conditional expression #pragma warning(disable:4706) +// warning C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning) +#pragma warning(disable:4800) + /* Shared memory allocation functions */ void * ::operator new(size_t iSize); void ::operator delete(void * ptr); @@ -178,3 +196,11 @@ struct sockaddr_un ADDRESS_FAMILY sun_family; char sun_path[6]; }; + +struct WindowsStream +{ + WORD BackgroundColor; + WORD ForegroundColor; + HANDLE Handle; + WindowsStream(DWORD handle); +};