96 Commits

Author SHA1 Message Date
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
w00t
b50bf7a2ce win: don't define error constants on VS2009, they're defined for us (finally)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11520 e03df62e-2008-0410-955e-edbf42e46eb7
2009-08-15 05:02:29 +00:00
w00t
6d2182da18 Fix types on Windows. Hooray for not supporting stdint.h. Thanks to Special.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11471 e03df62e-2008-0410-955e-edbf42e46eb7
2009-08-03 17:42:26 +00:00
peavey
9b35fab349 Fix our getops implementation on windows. Have optind available, and make sure it always points to the next entry in the argv list as described by POSIX.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11466 e03df62e-2008-0410-955e-edbf42e46eb7
2009-08-02 22:36:45 +00:00
peavey
1a9b84820c No forget using windows' broken inet_pton and inet_ntop, they are not POSIX compliant and just causes more compile errors. We use our own, period.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11460 e03df62e-2008-0410-955e-edbf42e46eb7
2009-08-02 18:08:49 +00:00
peavey
2f1466ee94 Since Windows SDK6.0a inet_pton and inet_ntop is defined if (NTDDI_VERSION >= NTDDI_LONGHORN). I found a similar fix in pythons socketcode and thus think this is fine.
Fixes the breakage Brain mentions in r11407.

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11459 e03df62e-2008-0410-955e-edbf42e46eb7
2009-08-02 17:42:31 +00:00
brain
2bb40c5b23 more fixes. inet_pton is now in error, this is because the windows 6.0 sdk defines it, we need some kind of ifdef or something around this to not define our own if we have the 6.0 SDK. Again i will check this if i have chance, otherwise... :p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11407 e03df62e-2008-0410-955e-edbf42e46eb7
2009-06-12 16:34:23 +00:00
danieldg
85a787b92b usleep() is no longer needed, and should not be needed in the future
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11252 e03df62e-2008-0410-955e-edbf42e46eb7
2009-03-23 18:48:58 +00:00
psychon
b6dbd6caab Update all wiki links to point to the new wiki. This was done automatically with the following command, only .Makefile.inc got some indent fixups by hand.
for file in $(find -type f -and -not -path '*/.svn/*' -and -not -name '*.so') ; do sed -e 's#http://www.inspircd.org/wiki#http://wiki.inspircd.org#' -e 's#http://wiki.inspircd.org/index.php/#http://wiki.inspircd.org/#' -i $file ; done


git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11223 e03df62e-2008-0410-955e-edbf42e46eb7
2009-03-15 12:42:35 +00:00
w00t
56d0bc899d Fix win32 build issue.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11204 e03df62e-2008-0410-955e-edbf42e46eb7
2009-03-10 23:49:55 +00:00
w00t
43847ec9c7 Update copyrights for 2009.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10932 e03df62e-2008-0410-955e-edbf42e46eb7
2009-01-02 18:16:05 +00:00
w00t
97cc4bf672 Place CRT debug defines in win32wrapper.h, so they are defined everywhere. This was also incorrectly inside an ifndef WINDOWS, and hadbeen for a while. (oops.)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10917 e03df62e-2008-0410-955e-edbf42e46eb7
2008-12-27 03:18:51 +00:00