summaryrefslogtreecommitdiff
path: root/win/inspircd_win32wrapper.h
AgeCommit message (Collapse)Author
2015-08-09Fix compilation with Microsoft Visual C++ 14.Peter Powell
2014-04-13Change Windows libraries to be dynamically linkedAdam
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-04Windows: Use the WinAPI for DNS server retrievalChrisTX
2012-07-09Fixed Windows build, int32_t is already defined in stdint.h.Adam
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-04-19Replace copyright headers with headers granting specific authors copyrightRobby-
2011-06-18Fix extras compilation under 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-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-11Include psapi.h to fix stats.cpp compiling.peavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11840 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-15win: vs2010 requires this to link in process memory retrieval stuffw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11521 e03df62e-2008-0410-955e-edbf42e46eb7
2009-08-15win: don't define error constants on VS2009, they're defined for us (finally)w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11520 e03df62e-2008-0410-955e-edbf42e46eb7
2009-08-03Fix types on Windows. Hooray for not supporting stdint.h. Thanks to Special.w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11471 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-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-06-12more fixes. inet_pton is now in error, this is because the windows 6.0 sdk ↵brain
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-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-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-03-10Fix win32 build issue.w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11204 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-12-27Place CRT debug defines in win32wrapper.h, so they are defined everywhere. ↵w00t
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-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-24Properly give the service specific exit code on failure to start. Now we ↵brain
just need to find out how to retrieve this git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10240 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-24work in progressbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10238 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-21add support for windows service. This now is part of inspircd itself being ↵brain
as we have native build. It doesnt quite work yet in all the ways it should. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10193 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-20properly coreexport the getcpu() function etcbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10184 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-20WMI calls for getting cpu percentage of current process. This code was a ↵brain
biatch and a half. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10179 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-06fix compile errors under debug profile in windows.brain
fix some warnings too. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10108 e03df62e-2008-0410-955e-edbf42e46eb7
2008-06-15Base stuff for named pipe IPCbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9910 e03df62e-2008-0410-955e-edbf42e46eb7
2008-05-15Make FD_SETSIZE larger. We wont ever have this many users via select() on ↵brain
windows, this is to test out some stuff mainly. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9726 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-12Mapping for mkdir() to _mkdir() for windowsbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9473 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-26Why the fuck are standard functions all prefixed with a _ on windows???brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9046 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-26#define _popen popenbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9036 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-10Fix here too, to allow FD_SETSIZE > 64. If this doesnt work it will need to ↵brain
be set with /D on the commandline, but it looks like this is the best place to put it in an include (earliest possible place) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8890 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-10Header update: 2007 -> 2008w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8694 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-20Fix here toobrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8237 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-14Remove crashdump stuffbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8192 e03df62e-2008-0410-955e-edbf42e46eb7
2007-09-04* Fixed some incorrect declarations in IOCPEngineburlex
* Fixed the virtual socket wrapper functions in IOCPEngine {these should really be inlined on unix} * Fixed several compilation issues under Win32 * Fixed calls to close() which should've been changed to SE->Close() + Added a crashdump saving system to Win32 builds. Dumps are saved in the format of dump-<exename>-<year>-<month>-<day>-<hour>-<minute>-<second>.dmp in the working directory. Enabled by default, undefine ENABLE_CRASHDUMPS to disable. + Added m_operflood, this is a module I've had lying around for some time but some users may like it as it allows unreal-like behaviour without increasing flood limits for non-opers. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8015 e03df62e-2008-0410-955e-edbf42e46eb7
2007-08-23Move the close() wrapper out of the win32wrapper.h, and into its new proper ↵brain
place at SocketEngine::Close() git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7812 e03df62e-2008-0410-955e-edbf42e46eb7
2007-08-23Craquity craq De-craq!brain
This is probably broken on windows, do not attempt to use there yet unless you like broken stuff. Cant say for sure as i havent even tried to build yet and most likely wont tonight. --- Abstract most of the berkely socket API out into SocketEngine derived classes. SocketEngine base class implements standard berkely sockets that 'real mens systems' like linux and freebsd have. For socketengine_iocp we implement the windows specific nonesense like the special things needed for udp and accept (ick). All this to eliminate a bunch of ifdefs. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7810 e03df62e-2008-0410-955e-edbf42e46eb7