85 Commits

Author SHA1 Message Date
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
InspIRCd Robot
aa692dc103 Update copyright headers. 2020-01-11 22:14:43 +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
Peter Powell
f2da7dd588 Purge code for Windows XP and MSVC pre-2015. 2017-08-06 21:05:50 +01:00
Attila Molnar
3a3ff94967 Merge insp20 2014-10-27 15:26:20 +01:00
Attila Molnar
8a3b2f8091 Check the return value of getnameinfo() on Windows in insp_inet_ntop() and return NULL if it fails 2014-10-22 19:21:04 +02:00
Attila Molnar
f62654a685 Merge insp20 2014-07-25 12:05:40 +02:00
Attila Molnar
c17463bcae Filter out newlines from error messages on Windows 2014-04-12 22:51:10 +02:00
attilamolnar
1031f33333 Merge insp20 2013-08-30 13:01:10 +02:00
attilamolnar
d54eec6dd8 Don't CoreExport reference, fixes m_dnsbl on Windows
The explicit instantiations of reference are now useless; remove
2013-08-30 12:10:01 +02:00
attilamolnar
d9d99cd02d Merge insp20 2013-06-06 01:07:22 +02:00
attilamolnar
fc198fffe1 Fix inet_pton on Windows with IPv6 addresses
Code from Anope win32/socket.cpp by @Adam-
2013-06-04 21:43:29 +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
Adam
73977e660f Merge pull request #314 from ChrisTX/insp20+DnsQueryConfig
Windows: Replace the old DNS server find mechanism with the proper one, the appropriate API
2012-10-04 14:12:30 -07:00
ChrisTX
84b187eace Windows: Use the WinAPI for DNS server retrieval 2012-10-04 13:49:34 +02:00
ChrisTX
b6fccd1052 Windows: Replace the unused function hack with explicit instantiation 2012-10-04 08:31:38 +02:00
Adam
83e90c4baa Fixed issue #303 - fixed Windows build 2012-09-28 21:27:38 -04:00
Adam
3f5c635c38 Fixed Windows build 2012-07-17 22:10:49 -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
f5409f04cd Fix timers never being ticked on windows 2011-05-21 16:49:26 -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
brain
6ff7e3bae0 Fix for memory leak when gui is attached, submitted and fixed by GreenReaper, thanks!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11936 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-21 22:35:56 +00:00
peavey
bf269e3cc7 Text fix.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11893 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-17 20:51:20 +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
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
danieldg
0036e3a70c Fixes for config reader
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11504 e03df62e-2008-0410-955e-edbf42e46eb7
2009-08-12 18:03:52 +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
fdcdf7c1c0 Forget to remove a #endif
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11461 e03df62e-2008-0410-955e-edbf42e46eb7
2009-08-02 18:13:08 +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
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
brain
87a4eb739f This is a nicer fix, and we are seen to be explicitly freeing the BSTR values, which explicitly shows any reader of the code that this is a leak prevention measure
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11239 e03df62e-2008-0410-955e-edbf42e46eb7
2009-03-20 00:40:24 +00:00
brain
e0856f1221 Remove an old class member here that is no longer used and has been commented out for months
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11238 e03df62e-2008-0410-955e-edbf42e46eb7
2009-03-20 00:30:25 +00:00
brain
c70c31c7b7 This needs a test compile, i do not have my laptop to hand to do this. May break win32 build.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11237 e03df62e-2008-0410-955e-edbf42e46eb7
2009-03-20 00:06:21 +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
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
special
1b290edc9c Patch by dz to remove the one usage of strdup/strtok_r, which is very un-C++ behavior (and silly, since we have sepstream)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10543 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-14 03:30:39 +00:00
brain
d27af79ee0 sql api and m_mysql compile fixes for windows
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10393 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-05 08:42:41 +00:00
brain
696e90acdb fix memory leak in new wmi stuff and comment it. Lots of kittens are killed by use of this code. :(
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10183 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-20 11:21:43 +00:00