From db1619d4f36801d6178ccf45d32a4f58008eba3c Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Sat, 28 Jun 2014 09:17:26 +1000 Subject: [PATCH] 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 --- include/FLAC++/export.h | 4 ++-- include/FLAC/export.h | 4 ++-- src/share/win_utf8_io/win_utf8_io.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/FLAC++/export.h b/include/FLAC++/export.h index 11c09e62..7621f647 100644 --- a/include/FLAC++/export.h +++ b/include/FLAC++/export.h @@ -61,9 +61,9 @@ #elif defined(_MSC_VER) #ifdef FLACPP_API_EXPORTS -#define FLACPP_API _declspec(dllexport) +#define FLACPP_API __declspec(dllexport) #else -#define FLACPP_API _declspec(dllimport) +#define FLACPP_API __declspec(dllimport) #endif #elif defined(FLAC__USE_VISIBILITY_ATTR) diff --git a/include/FLAC/export.h b/include/FLAC/export.h index 2232b410..ed8091d3 100644 --- a/include/FLAC/export.h +++ b/include/FLAC/export.h @@ -61,9 +61,9 @@ #elif defined(_MSC_VER) #ifdef FLAC_API_EXPORTS -#define FLAC_API _declspec(dllexport) +#define FLAC_API __declspec(dllexport) #else -#define FLAC_API _declspec(dllimport) +#define FLAC_API __declspec(dllimport) #endif #elif defined(FLAC__USE_VISIBILITY_ATTR) diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c index 4e507a03..d062bcdd 100644 --- a/src/share/win_utf8_io/win_utf8_io.c +++ b/src/share/win_utf8_io/win_utf8_io.c @@ -89,8 +89,8 @@ wchar_t *wchar_from_utf8(const char *str) /* retrieve WCHAR commandline, expand wildcards and convert everything to UTF-8 */ int get_utf8_argv(int *argc, char ***argv) { - typedef int (__cdecl *__wgetmainargs_)(int*, wchar_t***, wchar_t***, int, int*); - __wgetmainargs_ __wgetmainargs; + typedef int (__cdecl *wgetmainargs_t)(int*, wchar_t***, wchar_t***, int, int*); + wgetmainargs_t wgetmainargs; HMODULE handle; int wargc; wchar_t **wargv; @@ -99,9 +99,9 @@ int get_utf8_argv(int *argc, char ***argv) int ret, i; 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; - 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; ret = 0;