diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/configure.cpp | 2 | ||||
-rw-r--r-- | win/inspircd_win32wrapper.h | 54 |
2 files changed, 31 insertions, 25 deletions
diff --git a/win/configure.cpp b/win/configure.cpp index 94547faee..91ffe76f2 100644 --- a/win/configure.cpp +++ b/win/configure.cpp @@ -1,3 +1,5 @@ +#define _CRT_SECURE_NO_DEPRECATE
+
#include <windows.h>
#include <stdio.h>
#include <string>
diff --git a/win/inspircd_win32wrapper.h b/win/inspircd_win32wrapper.h index a876b86ba..6ce3c6888 100644 --- a/win/inspircd_win32wrapper.h +++ b/win/inspircd_win32wrapper.h @@ -1,14 +1,14 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ - * - * InspIRCd: (C) 2002-2007 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits - * - * This program is free but copyrighted software; see - * the file COPYING for details. - * - * --------------------------------------------------- +/* +------------------------------------+
+ * | Inspire Internet Relay Chat Daemon |
+ * +------------------------------------+
+ *
+ * InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * See: http://www.inspircd.org/wiki/index.php/Credits
+ *
+ * This program is free but copyrighted software; see
+ * the file COPYING for details.
+ *
+ * ---------------------------------------------------
*/
/* Windows Port
@@ -32,6 +32,9 @@ #define DllExport __declspec(dllimport)
#endif
+/* Disable the deprecation warnings.. it spams :P */
+#define _CRT_SECURE_NO_DEPRECATE
+
/* Say we're building on windows 2000. Anyone running something older than this
* reeeeeeeally needs to upgrade! */
@@ -52,9 +55,9 @@ #define strcasecmp stricmp
/* Error macros need to be redirected to winsock error codes */
-#define ETIMEDOUT WSAETIMEDOUT -#define ECONNREFUSED WSAECONNREFUSED -#define EADDRINUSE WSAEADDRINUSE +#define ETIMEDOUT WSAETIMEDOUT
+#define ECONNREFUSED WSAECONNREFUSED
+#define EADDRINUSE WSAEADDRINUSE
#define EINPROGRESS WSAEWOULDBLOCK
/* Remember file descriptors are treated differently on windows ;) */
@@ -86,22 +89,22 @@ CoreExport int geteuid(); CoreExport int printf_c(const char * format, ...);
/* getopt() wrapper */
-# define no_argument 0 -# define required_argument 1 +# define no_argument 0
+# define required_argument 1
# define optional_argument 2
-struct option -{ - char *name; - int has_arg; - int *flag; - int val; -}; +struct option
+{
+ char *name;
+ int has_arg;
+ int *flag;
+ int val;
+};
extern char optarg[514];
int getopt_long_only (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind);
/* Accept Handlers */
-int CoreExport __accept_socket(SOCKET s, sockaddr * addr, int * addrlen, void * acceptevent);
-int CoreExport __getsockname(SOCKET s, sockaddr * name, int * namelen, void * acceptevent);
+CoreExport int __accept_socket(SOCKET s, sockaddr * addr, int * addrlen, void * acceptevent);
+CoreExport int __getsockname(SOCKET s, sockaddr * name, int * namelen, void * acceptevent);
/* Module Loading */
#define dlopen(path, state) (void*)LoadLibrary(path)
@@ -139,6 +142,7 @@ CoreExport void closedir(DIR * handle); #pragma warning(disable:4311) // warning C4311: 'type cast' : pointer truncation from 'accept_overlap *' to 'int'
#pragma warning(disable:4312) // warning C4312: 'type cast' : conversion from 'int' to 'HANDLE' of greater size
#pragma warning(disable:4355) // warning C4355: 'this' : used in base member initializer list
+#pragma warning(disable:4996) // warning C4996: 'std::_Traits_helper::move_s' was declared deprecated
/* Mehhhh... typedefs. */
|