Changeset 14534


Ignore:
Timestamp:
Jun 1, 2015, 6:52:14 PM (6 years ago)
Author:
mikedld
Message:

#5851: Don't use _configthreadlocale if not provided by CRT (even if declaration is present)

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/CMakeLists.txt

    r14533 r14534  
    398398
    399399set(NEEDED_FUNCTIONS
     400    _configthreadlocale
    400401    canonicalize_file_name
    401402    daemon
  • trunk/cmake/TrMacros.cmake

    r14496 r14534  
    6666    string(TOUPPER "${INPUT}" ID)
    6767    string(REGEX REPLACE "[^A-Z0-9]+" "_" ID "${ID}")
    68     string(REGEX REPLACE "^_+|_+$" "" ID "${ID}")
     68    # string(REGEX REPLACE "^_+|_+$" "" ID "${ID}")
    6969    set(${OVAR} "${ID}" PARENT_SCOPE)
    7070endfunction()
  • trunk/configure.ac

    r14533 r14534  
    108108
    109109AC_CHECK_HEADERS([stdbool.h xlocale.h])
    110 AC_CHECK_FUNCS([iconv_open pread pwrite lrintf strlcpy daemon dirname basename canonicalize_file_name strcasecmp localtime_r fallocate64 posix_fallocate memmem strsep strtold syslog valloc getpagesize posix_memalign statvfs htonll ntohll mkdtemp uselocale])
     110AC_CHECK_FUNCS([iconv_open pread pwrite lrintf strlcpy daemon dirname basename canonicalize_file_name strcasecmp localtime_r fallocate64 posix_fallocate memmem strsep strtold syslog valloc getpagesize posix_memalign statvfs htonll ntohll mkdtemp uselocale _configthreadlocale])
    111111AC_PROG_INSTALL
    112112AC_PROG_MAKE_SET
  • trunk/libtransmission/variant.c

    r14533 r14534  
    5454  locale_t old_locale;
    5555#else
    56 #ifdef _WIN32
    57   int old_thread_config;
     56#if defined (HAVE__CONFIGTHREADLOCALE) && defined (_ENABLE_PER_THREAD_LOCALE)
     57  int      old_thread_config;
    5858#endif
    59   int category;
    60   char old_locale[128];
     59  int      category;
     60  char     old_locale[128];
    6161#endif
    6262};
     
    7373#else
    7474
    75 #ifdef _WIN32
     75#if defined (HAVE__CONFIGTHREADLOCALE) && defined (_ENABLE_PER_THREAD_LOCALE)
    7676  context->old_thread_config = _configthreadlocale (_ENABLE_PER_THREAD_LOCALE);
    7777#endif
     
    9696  setlocale (context->category, context->old_locale);
    9797
    98 #ifdef _WIN32
     98#if defined (HAVE__CONFIGTHREADLOCALE) && defined (_ENABLE_PER_THREAD_LOCALE)
    9999  _configthreadlocale (context->old_thread_config);
    100100#endif
Note: See TracChangeset for help on using the changeset viewer.