summaryrefslogtreecommitdiff
path: root/win/inspircd_win32wrapper.cpp
AgeCommit message (Collapse)Author
2021-03-05Update copyright headers.InspIRCd Robot
2021-03-03Fix not being able to colour format output to stderr on Windows.Sadie Powell
2020-01-11Update copyright headers.InspIRCd Robot
2019-12-08Replace our Windows getopt_long wrapper with ya_getopt.Peter Powell
Closes #546.
2019-06-10Add a method for getting a list of files in a directory.Peter Powell
2017-08-06Purge code for Windows XP and MSVC pre-2015.Peter Powell
2014-10-27Merge insp20Attila Molnar
2014-10-22Check the return value of getnameinfo() on Windows in insp_inet_ntop() and ↵Attila Molnar
return NULL if it fails
2014-07-25Merge insp20Attila Molnar
2014-04-12Filter out newlines from error messages on WindowsAttila Molnar
2013-08-30Merge insp20attilamolnar
2013-08-30Don't CoreExport reference, fixes m_dnsbl on Windowsattilamolnar
The explicit instantiations of reference are now useless; remove
2013-06-06Merge insp20attilamolnar
2013-06-04Fix inet_pton on Windows with IPv6 addressesattilamolnar
Code from Anope win32/socket.cpp by @Adam-
2013-04-12Tidy up source files:Peter Powell
- Use #pragma once instead of include guards. - Move header files in src/modules to include/modules. - Fixed various spacing issues.
2013-03-25Win32: Rewrite the service wrapperChrisTX
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
2012-10-14Replace printf(_c) with iostreamChrisTX
2012-10-12Windows: In-depth cleanup (see details)ChrisTX
-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-04Merge pull request #314 from ChrisTX/insp20+DnsQueryConfigAdam
Windows: Replace the old DNS server find mechanism with the proper one, the appropriate API
2012-10-04Windows: Use the WinAPI for DNS server retrievalChrisTX
2012-10-04Windows: Replace the unused function hack with explicit instantiationChrisTX
2012-09-28Fixed issue #303 - fixed Windows buildAdam
2012-07-17Fixed Windows buildAdam
2012-04-19Replace copyright headers with headers granting specific authors copyrightRobby-
2011-06-18Fix extras compilation under WindowsAdam
2011-05-21Fix timers never being ticked on windowsAdam
2011-04-10Fixed Windows build on VS 2010Adam
2010-01-18Remove excessive gettimeofday system callsdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12293 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-21Fix for memory leak when gui is attached, submitted and fixed by ↵brain
GreenReaper, thanks! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11936 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-17Text fix.peavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11893 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-17Fix up finding dns server to use for windows to match latest configreader ↵peavey
changes. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11892 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-12Define DISABLE_WRITEV and use the IOHook single-copy method for Windows send()danieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11848 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-103rd time lucky? Fix again for setsockopt.peavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11825 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-10Slight tweak to setsockopt fix.peavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11824 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-10* Fix inspsocket to not include uio.h on windows.peavey
* 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-09-26Remove InspIRCd* parameters and fieldsdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11763 e03df62e-2008-0410-955e-edbf42e46eb7
2009-08-12Fixes for config readerdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11504 e03df62e-2008-0410-955e-edbf42e46eb7
2009-08-02Fix our getops implementation on windows. Have optind available, and make ↵peavey
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-02Forget to remove a #endifpeavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11461 e03df62e-2008-0410-955e-edbf42e46eb7
2009-08-02No forget using windows' broken inet_pton and inet_ntop, they are not POSIX ↵peavey
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-02Since Windows SDK6.0a inet_pton and inet_ntop is defined if (NTDDI_VERSION ↵peavey
>= 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-03-23usleep() is no longer needed, and should not be needed in the futuredanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11252 e03df62e-2008-0410-955e-edbf42e46eb7
2009-03-20This is a nicer fix, and we are seen to be explicitly freeing the BSTR ↵brain
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-20Remove an old class member here that is no longer used and has been ↵brain
commented out for months git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11238 e03df62e-2008-0410-955e-edbf42e46eb7
2009-03-20This needs a test compile, i do not have my laptop to hand to do this. May ↵brain
break win32 build. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11237 e03df62e-2008-0410-955e-edbf42e46eb7
2009-03-15Update all wiki links to point to the new wiki. This was done automatically ↵psychon
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-01-02Update copyrights for 2009.w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10932 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-14Patch by dz to remove the one usage of strdup/strtok_r, which is very un-C++ ↵special
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-05sql api and m_mysql compile fixes for windowsbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10393 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-20fix memory leak in new wmi stuff and comment it. Lots of kittens are killed ↵brain
by use of this code. :( git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10183 e03df62e-2008-0410-955e-edbf42e46eb7