vlmcsd-1103-2016-11-05-Hotbird64

This commit is contained in:
Wind4
2016-11-16 12:12:36 +08:00
parent fcbbc40d60
commit b8fdaf9a6b
40 changed files with 169 additions and 28 deletions

View File

@ -62,7 +62,7 @@ DNS_PARSER ?= OS
# You should supply your own version string here
VLMCSD_VERSION ?= $(shell test -d ../.svn && echo svn`svnversion`)
VLMCSD_VERSION ?= $(shell test -d ../.git && git describe)
FEATURES ?= full
VERBOSE ?= NO

View File

@ -3,6 +3,10 @@
#endif // CONFIG
#include CONFIG
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#endif

View File

@ -1432,4 +1432,26 @@ static void CreateRequestBase(REQUEST *Request)
# endif // NO_VERBOSE_LOG
}
#if _MSC_VER && !defined(_DEBUG)&& !MULTI_CALL_BINARY
int __stdcall WinStartUp(void)
{
WCHAR **szArgList;
int argc;
szArgList = CommandLineToArgvW(GetCommandLineW(), &argc);
int i;
char **argv = (char**)vlmcsd_malloc(sizeof(char*)*argc);
for (i = 0; i < argc; i++)
{
int size = WideCharToMultiByte(CP_UTF8, 0, szArgList[i], -1, argv[i], 0, NULL, NULL);
argv[i] = (char*)vlmcsd_malloc(size);
WideCharToMultiByte(CP_UTF8, 0, szArgList[i], -1, argv[i], size, NULL, NULL);
}
exit(client_main(argc, argv));
}
#endif // _MSC_VER && !defined(_DEBUG)&& !MULTI_CALL_BINARY
#endif // IS_LIBRARY

View File

@ -1867,3 +1867,25 @@ int newmain()
return rc;
}
#if _MSC_VER && !defined(_DEBUG)&& !MULTI_CALL_BINARY
int __stdcall WinStartUp(void)
{
WCHAR **szArgList;
int argc;
szArgList = CommandLineToArgvW(GetCommandLineW(), &argc);
int i;
char **argv = (char**)vlmcsd_malloc(sizeof(char*)*argc);
for (i = 0; i < argc; i++)
{
int size = WideCharToMultiByte(CP_UTF8, 0, szArgList[i], -1, argv[i], 0, NULL, NULL);
argv[i] = (char*)vlmcsd_malloc(size);
WideCharToMultiByte(CP_UTF8, 0, szArgList[i], -1, argv[i], size, NULL, NULL);
}
exit(server_main(argc, argv));
}
#endif // _MSC_VER && !defined(_DEBUG)&& !MULTI_CALL_BINARY

View File

@ -97,3 +97,25 @@ int main(int argc, CARGV argv)
return VLMCSD_EINVAL;
}
#if _MSC_VER && !defined(_DEBUG)
int __stdcall WinStartUp(void)
{
WCHAR **szArgList;
int argc;
szArgList = CommandLineToArgvW(GetCommandLineW(), &argc);
int i;
char **argv = (char**)vlmcsd_malloc(sizeof(char*)*argc);
for (i = 0; i < argc; i++)
{
int size = WideCharToMultiByte(CP_UTF8, 0, szArgList[i], -1, argv[i], 0, NULL, NULL);
argv[i] = (char*)vlmcsd_malloc(size);
WideCharToMultiByte(CP_UTF8, 0, szArgList[i], -1, argv[i], size, NULL, NULL);
}
exit(main(argc, argv));
}
#endif // _MSC_VER && !defined(_DEBUG)&& !MULTI_CALL_BINARY