X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=win%2Finspircd_win32wrapper.h;h=b2ca05229692f9b1f8add017a4148664749dc6c0;hb=7b1ab06a9551d8db141ebc9213836af6b5369284;hp=7366fc3361ebe009f62af2acda63a1aafb629925;hpb=44489ddf7e90413d8f656aea24d74445bab227af;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/win/inspircd_win32wrapper.h b/win/inspircd_win32wrapper.h index 7366fc336..b2ca05229 100644 --- a/win/inspircd_win32wrapper.h +++ b/win/inspircd_win32wrapper.h @@ -3,7 +3,7 @@ * * Copyright (C) 2020 Matt Schatz * Copyright (C) 2013-2015 Attila Molnar - * Copyright (C) 2013, 2015, 2018-2019 Sadie Powell + * Copyright (C) 2013, 2015, 2018-2019, 2021 Sadie Powell * Copyright (C) 2012-2013 ChrisTX * Copyright (C) 2012 Robby * Copyright (C) 2011, 2014, 2019 Adam @@ -61,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) @@ -102,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. @@ -189,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); +};