Author: akhaldi Date: Wed Dec 2 11:08:51 2015 New Revision: 70232
URL: http://svn.reactos.org/svn/reactos?rev=70232&view=rev Log: [WIN-ICONV] Update to git commit 8765259.
Modified: trunk/reactos/lib/3rdparty/libwin-iconv/readme.txt trunk/reactos/lib/3rdparty/libwin-iconv/win_iconv.c trunk/reactos/media/doc/3rd Party Files.txt
Modified: trunk/reactos/lib/3rdparty/libwin-iconv/readme.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/libwin-iconv/r... ============================================================================== --- trunk/reactos/lib/3rdparty/libwin-iconv/readme.txt [iso-8859-1] (original) +++ trunk/reactos/lib/3rdparty/libwin-iconv/readme.txt [iso-8859-1] Wed Dec 2 11:08:51 2015 @@ -13,8 +13,8 @@ (only available when USE_LIBICONV_DLL is defined at compile time)
Win32 API does not support strict encoding conversion for some codepage. -And MLang function drop or replace invalid bytes and does not return -useful error status as iconv. This implementation cannot be used for +And MLang function drops or replaces invalid bytes and does not return +useful error status as iconv does. This implementation cannot be used for encoding validation purpose.
Yukihiro Nakadaira yukihiro.nakadaira@gmail.com
Modified: trunk/reactos/lib/3rdparty/libwin-iconv/win_iconv.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/3rdparty/libwin-iconv/w... ============================================================================== --- trunk/reactos/lib/3rdparty/libwin-iconv/win_iconv.c [iso-8859-1] (original) +++ trunk/reactos/lib/3rdparty/libwin-iconv/win_iconv.c [iso-8859-1] Wed Dec 2 11:08:51 2015 @@ -129,7 +129,7 @@ #if defined(USE_LIBICONV_DLL) static int libiconv_iconv_open(rec_iconv_t *cd, const char *tocode, const char *fromcode); static PVOID MyImageDirectoryEntryToData(LPVOID Base, BOOLEAN MappedAsImage, USHORT DirectoryEntry, PULONG Size); -static HMODULE find_imported_module_by_funcname(HMODULE hModule, const char *funcname); +static FARPROC find_imported_function(HMODULE hModule, const char *funcname);
static HMODULE hwiniconv; #endif @@ -1093,7 +1093,7 @@ /* * Check if codepage is one those for which the lpUsedDefaultChar * parameter to WideCharToMultiByte() must be NULL. The docs in - * Platform SDK for for Windows Server 2003 R2 claims that this is the + * Platform SDK for Windows Server 2003 R2 claims that this is the * list below, while the MSDN docs for MSVS2008 claim that it is only * for 65000 (UTF-7) and 65001 (UTF-8). This time the earlier Platform * SDK seems to be correct, at least for XP. @@ -1147,7 +1147,6 @@ libiconv_iconv_open(rec_iconv_t *cd, const char *tocode, const char *fromcode) { HMODULE hlibiconv = NULL; - HMODULE hmsvcrt = NULL; char *dllname; const char *p; const char *e; @@ -1189,10 +1188,6 @@ if (hlibiconv == NULL) goto failed;
- hmsvcrt = find_imported_module_by_funcname(hlibiconv, "_errno"); - if (hmsvcrt == NULL) - goto failed; - _iconv_open = (f_iconv_open)GetProcAddressA(hlibiconv, "libiconv_open"); if (_iconv_open == NULL) _iconv_open = (f_iconv_open)GetProcAddressA(hlibiconv, "iconv_open"); @@ -1202,7 +1197,7 @@ cd->iconv = (f_iconv)GetProcAddressA(hlibiconv, "libiconv"); if (cd->iconv == NULL) cd->iconv = (f_iconv)GetProcAddressA(hlibiconv, "iconv"); - cd->_errno = (f_errno)GetProcAddressA(hmsvcrt, "_errno"); + cd->_errno = (f_errno)find_imported_function(hlibiconv, "_errno"); if (_iconv_open == NULL || cd->iconv_close == NULL || cd->iconv == NULL || cd->_errno == NULL) goto failed; @@ -1217,7 +1212,6 @@ failed: if (hlibiconv != NULL) FreeLibrary(hlibiconv); - /* do not free hmsvcrt which is obtained by GetModuleHandle() */ return FALSE; }
@@ -1247,12 +1241,13 @@ return (PVOID)((LPBYTE)Base + p->VirtualAddress); }
-static HMODULE -find_imported_module_by_funcname(HMODULE hModule, const char *funcname) +static FARPROC +find_imported_function(HMODULE hModule, const char *funcname) { DWORD_PTR Base; ULONG Size; PIMAGE_IMPORT_DESCRIPTOR Imp; + PIMAGE_THUNK_DATA Address; /* Import Address Table */ PIMAGE_THUNK_DATA Name; /* Import Name Table */ PIMAGE_IMPORT_BY_NAME ImpName;
@@ -1266,15 +1261,16 @@ return NULL; for ( ; Imp->OriginalFirstThunk != 0; ++Imp) { + Address = (PIMAGE_THUNK_DATA)(Base + Imp->FirstThunk); Name = (PIMAGE_THUNK_DATA)(Base + Imp->OriginalFirstThunk); - for ( ; Name->u1.Ordinal != 0; ++Name) + for ( ; Name->u1.Ordinal != 0; ++Name, ++Address) { if (!IMAGE_SNAP_BY_ORDINAL(Name->u1.Ordinal)) { ImpName = (PIMAGE_IMPORT_BY_NAME) (Base + (DWORD_PTR)Name->u1.AddressOfData); if (strcmp((char *)ImpName->Name, funcname) == 0) - return GetModuleHandleA((char *)(Base + Imp->Name)); + return (FARPROC)Address->u1.Function; } } }
Modified: trunk/reactos/media/doc/3rd Party Files.txt URL: http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/3rd%20Party%20Fil... ============================================================================== --- trunk/reactos/media/doc/3rd Party Files.txt [iso-8859-1] (original) +++ trunk/reactos/media/doc/3rd Party Files.txt [iso-8859-1] Wed Dec 2 11:08:51 2015 @@ -71,8 +71,8 @@ Website: http://stlport.sourceforge.net/
Title: win-iconv -Used Version: r44 -Website: https://code.google.com/p/win-iconv/ +Used Version: git commit 8765259 +Website: https://github.com/win-iconv/win-iconv
Title: libjpeg Used Version: 9a