107 Commits

Author SHA1 Message Date
InspIRCd Robot
2b810b412a Update copyright headers. 2022-12-30 11:31:28 +00:00
Sadie Powell
33c08fc8aa Deduplicate retrieving error messages on Windows. 2022-12-13 14:17:50 +00:00
InspIRCd Robot
adbe149c56 Update copyright headers. 2021-12-30 18:52:08 +00:00
InspIRCd Robot
7b1ab06a95 Update copyright headers. 2021-03-05 02:16:11 +00:00
Sadie Powell
d55581a110 Fix not being able to colour format output to stderr on Windows. 2021-03-03 01:52:27 +00:00
Sadie Powell
dbaa0f6be1 Fix building on Windows. 2021-03-02 23:46:08 +00:00
InspIRCd Robot
1bf7ca3894 Update copyright headers. 2021-02-26 06:58:13 +00:00
Sadie Powell
aa4c7489b7 Duplicate the stdout file handle when used for logging.
Failure to do this may result in a crash on shutdown when started
in debug mode.
2021-02-01 18:10:53 +00:00
InspIRCd Robot
44489ddf7e Update copyright headers. 2020-04-24 10:23:47 +01:00
InspIRCd Robot
4f9abe96a4 Fixes by misspell-fixer 2020-04-21 00:52:12 -06:00
Matt Schatz
dff88fe6ee
Disable MSVC warning C4800. 2020-04-21 00:28:12 -06:00
InspIRCd Robot
aa692dc103 Update copyright headers. 2020-01-11 22:14:43 +00:00
Peter Powell
3faa9e3299 Move forking code into a function and remove DaemonSeed. 2019-12-08 21:19:47 +00:00
Peter Powell
a47e2df0ce Replace our Windows getopt_long wrapper with ya_getopt.
Closes #546.
2019-12-08 19:59:34 +00:00
Peter Powell
6e898936d6 Add a method for getting a list of files in a directory. 2019-06-10 13:40:37 +01:00
Adam
5e1cb9ed76
win: change ssize_t typedef to SSIZE_T
libmaxminddb redefines this when building under MSVC and breaks the
build otherwise due to the redefinition of ssize_t
2019-05-05 14:08:50 -04:00
Peter Powell
7a24867d97 Fix building on Windows. 2018-07-24 11:05:51 +01:00
Peter Powell
f2da7dd588 Purge code for Windows XP and MSVC pre-2015. 2017-08-06 21:05:50 +01:00
Attila Molnar
0b63ccd0b5 Merge insp20 2016-02-22 12:52:18 +01:00
Peter Powell
234c234993 Fix compilation with Microsoft Visual C++ 14. 2015-08-09 13:19:20 +01:00
Attila Molnar
08ea4d3e2a Remove DISABLE_WRITEV and StreamSocket code for platforms lacking writev() support 2015-03-04 20:21:45 +01:00
Attila Molnar
e0e1becc2f Add SocketEngine::WriteV() 2015-03-04 20:18:37 +01:00
Attila Molnar
3081031802 Add writev() wrapper for Windows 2015-03-04 20:05:00 +01:00
Attila Molnar
f62654a685 Merge insp20 2014-07-25 12:05:40 +02:00
Adam
88dccdd5f0 Change Windows libraries to be dynamically linked 2014-04-13 16:07:58 +02:00
Attila Molnar
d02011d69f Remove whitespace and minor style changes 2014-01-23 14:37:09 +01:00
Attila Molnar
2f3c378a39 Globally #undef min and max on Windows 2014-01-23 14:15:01 +01:00
attilamolnar
034cf50b14 Use exit code EXIT_STATUS_SERVICE on Windows when exiting because of a service error 2013-06-18 21:26:54 +02:00
attilamolnar
86c454a676 Fix Windows 2013-06-06 03:09:41 +02:00
Peter Powell
bbeb5ea386 Use iostream instead of C-style file operations. 2013-06-06 01:44:57 +01:00
Adam
f2dcf19923 Add a va_copy define for Windows 2013-05-23 13:26:11 -04:00
Peter Powell
b89aa87280 Clean up cross-platform compatibility.
- Move compatibility macros to a new header file.
- Sort system include files in alphabetical order.
- Clean up signal handling (thanks to Adam).
2013-05-07 05:00:33 +02:00
Peter Powell
11cafc12d5 Tidy up source files:
- Use #pragma once instead of include guards.
- Move header files in src/modules to include/modules.
- Fixed various spacing issues.
2013-04-12 17:03:05 +01:00
ChrisTX
25aa230671 Win32: Rewrite the service wrapper
Edited original commit to pass MAX_PATH as nSize to GetModuleFileNameA() instead of 101 after approval from author @ChrisTX (Attila Molnar)

Fixes #404 reported by @crchauffe
2013-03-25 14:57:05 +01:00
ChrisTX
ebdaf368e1 Replace printf(_c) with iostream 2012-10-14 02:13:49 +02:00
ChrisTX
5b9682275e Windows: In-depth cleanup (see details)
-Fix x64 builds for Windows. Now all configurations compile.
-Remove the non-working rebase stuff.
-Remove the Windows fork hack and instead use FreeConsole() to emulate the behavior. This directly allows us to compile with ASLR, which is turned on now.
-Remove the old IPC mechanism for the removed GUI. This is not needed anymore as the GUI wasn't ever supported on anything newer than 1.2
-Remove the WIN32/WINDOWS macros. _WIN32 is supported on all x86-based VC++ targets, so that's what we need.
-Enable optimizations for release builds.
-De-duplicate printf_c(), it was previously copy-pasted into colors.h for configure
-Add the VC++ specific bad files in .gitignore
-Disable PID writing on Windows. This is only making sense for *nix builds.
-Replace the CPU usage retrieval with an algorithm analogous to the *nix behavior. Also supports separated now/total values. (Tested with a dummy busy loop - seems working)
-Removed certain unused functions and variables
-Remove stdint defines from the windows wrapper
-Remove CRT debug alloc. This is a bad idea as it would define a macro to replace free which breaks builds.
-Re-evaluated the warnings list, commented it.
-Moved inspircd_config/_version to include/ to match *nix
-Removed the creation of inspircd_se_config, as it isn't used at all.
-Made non-git builds show as "r0" instead of "r" (thanks to @SaberUK for pointing this out)
-Fixed up m_spanningtree's project paths. Now all configurations (debug/release x86/x64) have been tested and build properly.
-Moved FindDNS out of the wrapper and matched its log behavior with *nix. (It's pointless having it in the wrapper after the recent slimming down)
-Replaced random/srandom wrappers with a mechanism that tries to use Windows' Random API first is no SSL module is loaded.
-Removed more old junk from support for compilers older than VC++ 2010 (we don't have project files for these, so compiling them would be hard anyways)
-Removed the unused ClearConsole()
-Removed unused includes from the wrapper. Also, do not include psapi.h here if we don't link psapi.lib. This should be done where appropriate.
-Made inet_aton an inline function for increased performance
-C4800, performance warning about bool forcing, resolved at all occurrences.
-C4701, uninitialized variable 'cached', resolved at all occurrences.
-dlerror() was migrated out of the wrapper for more thread safety (no global buffer being shared) and increased performance.
-Removed the wrong CRT debug flags. This drains a lot of performance.
-Removed the clock_gettime/gettimeofday wrappers
-Replaced all TCHAR/ANSI mix-ups of functions with the correct respective function.
-Added a block of C4355 for < VS2012
-Update project files for c870714
2012-10-12 22:31:38 +02:00
ChrisTX
84b187eace Windows: Use the WinAPI for DNS server retrieval 2012-10-04 13:49:34 +02:00
Adam
6735f2da27 Fixed Windows build, int32_t is already defined in stdint.h.
Add GnuTLS support for Windows.
Made NSIS script include extra DLL files if supplied and
include the conf/aliases and conf/modules example configuration files.
Added make_gnutls_cert.bat to generate GnuTLS certificates on Windows.
Fixed typo in gnutlscert.pm.
2012-07-09 01:53:07 -04:00
Robby-
46a3904619 Replace copyright headers with headers granting specific authors copyright 2012-04-19 20:58:29 +02:00
Adam
699a8b2fc8 Fix extras compilation under Windows 2011-06-18 17:25:35 -04:00
Adam
b56565eac2 Fixed Windows build on VS 2010 2011-04-10 17:54:20 -04:00
danieldg
7e46119759 Remove excessive gettimeofday system calls
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12293 e03df62e-2008-0410-955e-edbf42e46eb7
2010-01-18 19:36:41 +00:00
peavey
8a2e5dcbe4 Fix up finding dns server to use for windows to match latest configreader changes.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11892 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-17 20:48:20 +00:00
danieldg
170820cc8d Define DISABLE_WRITEV and use the IOHook single-copy method for Windows send()
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11848 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-12 01:13:51 +00:00
peavey
60664afca1 Include psapi.h to fix stats.cpp compiling.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11840 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-11 20:39:47 +00:00
peavey
64904b639d 3rd time lucky? Fix again for setsockopt.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11825 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-10 19:59:04 +00:00
peavey
bfa2a19d96 Slight tweak to setsockopt fix.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11824 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-10 19:53:18 +00:00
peavey
1312f2db8e * Fix inspsocket to not include uio.h on windows.
* Wrap writev and some structs to fix inspsocket compile on win.
* Fix a few compile errors due to latest trunk changes in win32wrapper code.

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11822 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-10 17:48:04 +00:00
danieldg
6d03943426 Remove InspIRCd* parameters and fields
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11763 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-26 14:13:13 +00:00
w00t
aefbcfd22f win: vs2010 requires this to link in process memory retrieval stuff
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11521 e03df62e-2008-0410-955e-edbf42e46eb7
2009-08-15 05:16:26 +00:00