]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - win/inspircd_win32wrapper.h
Use IsCTCP in blockcolor for ignoring CTCPs.
[user/henk/code/inspircd.git] / win / inspircd_win32wrapper.h
index 7ce23f7a7c1f7d7f4acd75e942e46614f55c9226..b2ca05229692f9b1f8add017a4148664749dc6c0 100644 (file)
@@ -1,8 +1,9 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
+ *   Copyright (C) 2020 Matt Schatz <genius3000@g3k.solutions>
  *   Copyright (C) 2013-2015 Attila Molnar <attilamolnar@hush.com>
- *   Copyright (C) 2013, 2015, 2018-2019 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2013, 2015, 2018-2019, 2021 Sadie Powell <sadie@witchery.services>
  *   Copyright (C) 2012-2013 ChrisTX <xpipe@hotmail.de>
  *   Copyright (C) 2012 Robby <robby@chatbelgie.be>
  *   Copyright (C) 2011, 2014, 2019 Adam <Adam@anope.org>
@@ -50,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)
 #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)
 
@@ -101,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.
@@ -188,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);
+};