diff options
Diffstat (limited to 'src/backend/utils/adt')
-rw-r--r-- | src/backend/utils/adt/pg_locale.c | 23 | ||||
-rw-r--r-- | src/backend/utils/adt/selfuncs.c | 13 |
2 files changed, 2 insertions, 34 deletions
diff --git a/src/backend/utils/adt/pg_locale.c b/src/backend/utils/adt/pg_locale.c index b2f08ead454..2a076a3dfd1 100644 --- a/src/backend/utils/adt/pg_locale.c +++ b/src/backend/utils/adt/pg_locale.c @@ -973,7 +973,7 @@ cache_locale_time(void) static char * IsoLocaleName(const char *winlocname) { -#if (_MSC_VER >= 1400) /* VC8.0 or later */ +#ifdef _MSC_VER static char iso_lc_messages[32]; _locale_t loct = NULL; @@ -987,7 +987,6 @@ IsoLocaleName(const char *winlocname) loct = _create_locale(LC_CTYPE, winlocname); if (loct != NULL) { -#if (_MSC_VER >= 1700) /* Visual Studio 2012 or later */ size_t rc; char *hyphen; @@ -1014,28 +1013,10 @@ IsoLocaleName(const char *winlocname) hyphen = strchr(iso_lc_messages, '-'); if (hyphen) *hyphen = '_'; -#else - char isolang[32], - isocrty[32]; - LCID lcid; - - lcid = loct->locinfo->lc_handle[LC_CTYPE]; - if (lcid == 0) - lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT); - _free_locale(loct); - - if (!GetLocaleInfoA(lcid, LOCALE_SISO639LANGNAME, isolang, sizeof(isolang))) - return NULL; - if (!GetLocaleInfoA(lcid, LOCALE_SISO3166CTRYNAME, isocrty, sizeof(isocrty))) - return NULL; - snprintf(iso_lc_messages, sizeof(iso_lc_messages) - 1, "%s_%s", isolang, isocrty); -#endif return iso_lc_messages; } - return NULL; -#else +#endif /* _MSC_VER */ return NULL; /* Not supported on this version of msvc/mingw */ -#endif /* _MSC_VER >= 1400 */ } #endif /* WIN32 && LC_MESSAGES */ diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c index 17101298fb0..35a8995f623 100644 --- a/src/backend/utils/adt/selfuncs.c +++ b/src/backend/utils/adt/selfuncs.c @@ -4092,20 +4092,7 @@ convert_string_datum(Datum value, Oid typid, Oid collid, bool *failure) * crashes since it will only give an estimation error and nothing * fatal. */ -#if _MSC_VER == 1400 /* VS.Net 2005 */ - - /* - * - * http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=99694 - */ - { - char x[1]; - - xfrmlen = strxfrm(x, val, 0); - } -#else xfrmlen = strxfrm(NULL, val, 0); -#endif #ifdef WIN32 /* |