mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
Underscore fixes.
* Replace _declspec with __declspec. * Replace __wgetmainargs_ with __wgetmainargs_t and __wgetmainargs with wgetmainargs because identifiers with leading underscores are reserved for the compiler. Patch-from: lvqcl <lvqcl.mail@gmail.com>
This commit is contained in:
@@ -61,9 +61,9 @@
|
|||||||
|
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
#ifdef FLACPP_API_EXPORTS
|
#ifdef FLACPP_API_EXPORTS
|
||||||
#define FLACPP_API _declspec(dllexport)
|
#define FLACPP_API __declspec(dllexport)
|
||||||
#else
|
#else
|
||||||
#define FLACPP_API _declspec(dllimport)
|
#define FLACPP_API __declspec(dllimport)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined(FLAC__USE_VISIBILITY_ATTR)
|
#elif defined(FLAC__USE_VISIBILITY_ATTR)
|
||||||
|
|||||||
@@ -61,9 +61,9 @@
|
|||||||
|
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
#ifdef FLAC_API_EXPORTS
|
#ifdef FLAC_API_EXPORTS
|
||||||
#define FLAC_API _declspec(dllexport)
|
#define FLAC_API __declspec(dllexport)
|
||||||
#else
|
#else
|
||||||
#define FLAC_API _declspec(dllimport)
|
#define FLAC_API __declspec(dllimport)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif defined(FLAC__USE_VISIBILITY_ATTR)
|
#elif defined(FLAC__USE_VISIBILITY_ATTR)
|
||||||
|
|||||||
@@ -89,8 +89,8 @@ wchar_t *wchar_from_utf8(const char *str)
|
|||||||
/* retrieve WCHAR commandline, expand wildcards and convert everything to UTF-8 */
|
/* retrieve WCHAR commandline, expand wildcards and convert everything to UTF-8 */
|
||||||
int get_utf8_argv(int *argc, char ***argv)
|
int get_utf8_argv(int *argc, char ***argv)
|
||||||
{
|
{
|
||||||
typedef int (__cdecl *__wgetmainargs_)(int*, wchar_t***, wchar_t***, int, int*);
|
typedef int (__cdecl *wgetmainargs_t)(int*, wchar_t***, wchar_t***, int, int*);
|
||||||
__wgetmainargs_ __wgetmainargs;
|
wgetmainargs_t wgetmainargs;
|
||||||
HMODULE handle;
|
HMODULE handle;
|
||||||
int wargc;
|
int wargc;
|
||||||
wchar_t **wargv;
|
wchar_t **wargv;
|
||||||
@@ -99,9 +99,9 @@ int get_utf8_argv(int *argc, char ***argv)
|
|||||||
int ret, i;
|
int ret, i;
|
||||||
|
|
||||||
if ((handle = LoadLibrary("msvcrt.dll")) == NULL) return 1;
|
if ((handle = LoadLibrary("msvcrt.dll")) == NULL) return 1;
|
||||||
if ((__wgetmainargs = (__wgetmainargs_)GetProcAddress(handle, "__wgetmainargs")) == NULL) return 1;
|
if ((wgetmainargs = (wgetmainargs_t)GetProcAddress(handle, "__wgetmainargs")) == NULL) return 1;
|
||||||
i = 0;
|
i = 0;
|
||||||
if (__wgetmainargs(&wargc, &wargv, &wenv, 1, &i) != 0) return 1;
|
if (wgetmainargs(&wargc, &wargv, &wenv, 1, &i) != 0) return 1;
|
||||||
if ((utf8argv = (char **)malloc(wargc*sizeof(char*))) == NULL) return 1;
|
if ((utf8argv = (char **)malloc(wargc*sizeof(char*))) == NULL) return 1;
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user