diff options
author | dgp <dgp@users.sourceforge.net> | 2017-05-08 16:34:24 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2017-05-08 16:34:24 (GMT) |
commit | 7c7bb81e989e191289210c04fd3f682fb9f32e51 (patch) | |
tree | 810ecbe78b476946e7b6a6bbff5a4fd709c86712 /unix | |
parent | bb6d12cfe6741d267b116270e811c51ecc67bdc8 (diff) | |
parent | 2d743e82dce913a91521214f3a3eade89bf14e86 (diff) | |
download | tcl-7c7bb81e989e191289210c04fd3f682fb9f32e51.zip tcl-7c7bb81e989e191289210c04fd3f682fb9f32e51.tar.gz tcl-7c7bb81e989e191289210c04fd3f682fb9f32e51.tar.bz2 |
merge novem
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tclUnixInit.c | 12 | ||||
-rw-r--r-- | unix/tclUnixSock.c | 2 |
2 files changed, 5 insertions, 9 deletions
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c index e788631..feeffa6 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -14,11 +14,11 @@ #ifdef HAVE_LANGINFO # include <langinfo.h> # ifdef __APPLE__ -# if defined(HAVE_WEAK_IMPORT) && MAC_OS_X_VERSION_MIN_REQUIRED < 1030 +# if defined(HAVE_WEAK_IMPORT) && MAC_OS_X_VERSION_MIN_REQUIRED < 1030 /* Support for weakly importing nl_langinfo on Darwin. */ # define WEAK_IMPORT_NL_LANGINFO extern char *nl_langinfo(nl_item) WEAK_IMPORT_ATTRIBUTE; -# endif +# endif # endif #endif #include <sys/resource.h> @@ -34,7 +34,7 @@ #ifdef __CYGWIN__ DLLIMPORT extern __stdcall unsigned char GetVersionExW(void *); -DLLIMPORT extern __stdcall void *LoadLibraryW(const void *); +DLLIMPORT extern __stdcall void *GetModuleHandleW(const void *); DLLIMPORT extern __stdcall void FreeLibrary(void *); DLLIMPORT extern __stdcall void *GetProcAddress(void *, const char *); DLLIMPORT extern __stdcall void GetSystemInfo(void *); @@ -878,16 +878,13 @@ TclpSetVariables( #ifdef __CYGWIN__ unameOK = 1; if (!osInfoInitialized) { - HANDLE handle = LoadLibraryW(L"NTDLL"); + HANDLE handle = GetModuleHandleW(L"NTDLL"); int(__stdcall *getversion)(void *) = (int(__stdcall *)(void *))GetProcAddress(handle, "RtlGetVersion"); osInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW); if (!getversion || getversion(&osInfo)) { GetVersionExW(&osInfo); } - if (handle) { - FreeLibrary(handle); - } osInfoInitialized = 1; } @@ -1045,7 +1042,6 @@ TclpFindVariable( return result; } - /* *---------------------------------------------------------------------- * diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c index 7a5497d..2353f94 100644 --- a/unix/tclUnixSock.c +++ b/unix/tclUnixSock.c @@ -743,7 +743,7 @@ IPv6AddressNeedsNumericRendering( * at least some versions of OSX. */ -#pragma GCC diagnostic push +#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstrict-aliasing" if (!IN6_IS_ADDR_V4MAPPED(&addr)) { #pragma GCC diagnostic pop |