diff options
author | Peter Powell <petpow@saberuk.com> | 2019-12-08 19:39:02 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-12-08 19:59:34 +0000 |
commit | a47e2df0ce833e06fa3e4034e64ec084a2bbb2d3 (patch) | |
tree | 51b20e031c52f135d927bc23643cbd831a0fddd4 /win/inspircd_win32wrapper.h | |
parent | 914d8140d98dd0adc54f739dfe550765cc466bac (diff) |
Replace our Windows getopt_long wrapper with ya_getopt.
Closes #546.
Diffstat (limited to 'win/inspircd_win32wrapper.h')
-rw-r--r-- | win/inspircd_win32wrapper.h | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/win/inspircd_win32wrapper.h b/win/inspircd_win32wrapper.h index 964d3925d..e92339abf 100644 --- a/win/inspircd_win32wrapper.h +++ b/win/inspircd_win32wrapper.h @@ -60,6 +60,9 @@ #define _CRT_SECURE_NO_DEPRECATE #define _WINSOCK_DEPRECATED_NO_WARNINGS +// Windows doesn't support getopt_long so we use ya_getopt instead. +#include "ya_getopt.h" + /* Normal windows (platform-specific) includes */ #include <winsock2.h> #pragma comment(lib, "Ws2_32.lib") @@ -91,21 +94,6 @@ typedef SSIZE_T ssize_t; #define popen _popen #define pclose _pclose -/* getopt() wrapper */ -#define no_argument 0 -#define required_argument 1 -#define optional_argument 2 -struct option -{ - char *name; - int has_arg; - int *flag; - int val; -}; -extern int optind; -extern char optarg[514]; -int getopt_long(int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind); - // warning: 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2' // Normally, this is a huge problem, but due to our new/delete remap, we can ignore it. #pragma warning(disable:4251) |