Mercurial > hg > xemacs-beta
diff src/intl-encap-win32.c @ 4903:70089046adef
fix compile problems in intl-encap* under VS6
-------------------- ChangeLog entries follow: --------------------
lib-src/ChangeLog addition:
2010-01-30 Ben Wing <ben@xemacs.org>
* make-mswin-unicode.pl:
Make it possible to specify an overridden prototype in cases where
either Cygwin or Visual Studio has errors in their headers that
can be corrected by falling back to a less qualified type (typically
without const).
src/ChangeLog addition:
2010-01-30 Ben Wing <ben@xemacs.org>
* intl-auto-encap-win32.c:
* intl-auto-encap-win32.c (qxeExtractAssociatedIcon):
* intl-auto-encap-win32.c (qxeExtractIconEx):
* intl-auto-encap-win32.c (qxeCreateMDIWindow):
* intl-auto-encap-win32.c (qxeCreateWindowStation):
* intl-auto-encap-win32.c (qxeDdeCreateStringHandle):
* intl-auto-encap-win32.c (qxeAbortSystemShutdown):
* intl-auto-encap-win32.c (qxeRegConnectRegistry):
* intl-auto-encap-win32.c (qxeGetICMProfile):
* intl-auto-encap-win32.h:
Rebuild.
* intl-encap-win32.c:
* intl-encap-win32.c (qxeUpdateICMRegKey):
Delete manual definitions of functions with former errors in
Cygwin headers but no longer. Use "override" with some functions
where Cygwin or VS6 accidentally omits a const declaration or
includes an extra one. Use "no" on SendMessageTimeout, which
has an error in the VS6 prototype (you could manually fix this
with an ifdef to split the Cygwin vs. VS6 calls, if we ever
actually used this function).
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Sat, 30 Jan 2010 20:34:23 -0600 |
parents | 49de55c09f18 |
children | 7eec2a1f3412 |
line wrap: on
line diff
--- a/src/intl-encap-win32.c Sat Jan 30 18:47:17 2010 -0600 +++ b/src/intl-encap-win32.c Sat Jan 30 20:34:23 2010 -0600 @@ -312,7 +312,7 @@ no CreateDesktop split-sized LPDEVMODE yes OpenDesktop split EnumDesktops DESKTOPENUMPROC // callback fun differs only in string pointer type -yes CreateWindowStation +override HWINSTA CreateWindowStationW(LPWSTR,DWORD,DWORD,LPSECURITY_ATTRIBUTES); error arg 1, VS6 prototype, missing const yes OpenWindowStation split EnumWindowStations WINSTAENUMPROC // callback fun differs only in string pointer type yes GetUserObjectInformation @@ -322,7 +322,7 @@ yes DispatchMessage yes PeekMessage skip SendMessage split messages and structures -yes SendMessageTimeout +no SendMessageTimeout VS6 has erroneous seventh parameter DWORD_PTR instead of PDWORD_PTR yes SendNotifyMessage yes SendMessageCallback no BroadcastSystemMessage win95 version not split; NT 4.0+ only @@ -429,7 +429,7 @@ yes DlgDirSelectComboBoxEx yes DefFrameProc no DefMDIChildProc return value is conditionalized on _MAC, messes up parser -yes CreateMDIWindow +override HWND CreateMDIWindowW(LPWSTR,LPCWSTR,DWORD,int,int,int,int,HWND,HINSTANCE,LPARAM); error arg 1, VS6 prototype, missing const yes WinHelp no ChangeDisplaySettings split-sized LPDEVMODE no ChangeDisplaySettingsEx split-sized LPDEVMODE; NT 5.0/Win98+ only @@ -516,7 +516,7 @@ // split-simple function pointer ICMENUMPROC no GetLogColorSpace split-sized LPLOGCOLORSPACE; NT 4.0+ only no CreateColorSpace split-sized LPLOGCOLORSPACE; NT 4.0+ only -skip GetICMProfile NT 4.0+ only, error in Cygwin prototype +yes GetICMProfile NT 4.0+ only, former error in Cygwin prototype but no more (Cygwin 1.7, 1-30-10) yes SetICMProfile NT 4.0+ only split EnumICMProfiles ICMENUMPROC NT 4.0+ only skip UpdateICMRegKey NT 4.0+ only, error in Cygwin prototype @@ -602,14 +602,14 @@ yes FindExecutable no CommandLineToArgv Unicode-only yes ShellAbout -yes ExtractAssociatedIcon +override HICON ExtractAssociatedIconW(HINSTANCE, LPWSTR, LPWORD); error arg2, Cygwin prototype, extra const yes ExtractIcon // split-simple DRAGINFO, used ??? (docs say "Not currently supported") begin-bracket !defined (CYGWIN_HEADERS) yes DoEnvironmentSubst NT 4.0+ only end-bracket no FindEnvironmentString causes link error; NT 4.0+ only -skip ExtractIconEx NT 4.0+ only, error in Cygwin prototype +yes ExtractIconEx NT 4.0+ only, former error in Cygwin prototype but no more (Cygwin 1.7, 1-30-10) // split-simple SHFILEOPSTRUCT, used in SHFileOperation // split-simple SHNAMEMAPPING, used in SHFileOperation split SHFileOperation LPSHFILEOPSTRUCT NT 4.0+ only @@ -853,7 +853,7 @@ file DDEML.H yes DdeInitialize -skip DdeCreateStringHandle error in Cygwin prototype +yes DdeCreateStringHandle former error in Cygwin prototype, but no more (Cygwin 1.7, 1-30-10) yes DdeQueryString // #### split-sized (or split-simple??? not completely obvious) structure MONHSZSTRUCT, used when DDE event MF_HSZ_INFO is sent as part of the XTYP_MONITOR transaction sent to a DDE callback; not yet handled @@ -1055,7 +1055,7 @@ file WINREG.H -skip RegConnectRegistry error in Cygwin prototype +yes RegConnectRegistry former error in Cygwin prototype, but no more (Cygwin 1.7, 1-30-10) yes RegCreateKey yes RegCreateKeyEx yes RegDeleteKey @@ -1077,7 +1077,7 @@ yes RegSetValueEx yes RegUnLoadKey yes InitiateSystemShutdown -yes AbortSystemShutdown +override BOOL AbortSystemShutdownW(LPWSTR); error arg 1, Cygwin prototype, extra const review RegDeleteKeyEx file EXCPT.H @@ -1241,59 +1241,10 @@ /* would be encapsulatable but for Cygwin problems */ /************************************************************************/ -LONG -qxeRegConnectRegistry (const Extbyte * lpMachineName, HKEY hKey, PHKEY phkResult) -{ - /* Cygwin mistakenly omits const in first argument. */ - if (XEUNICODE_P) - return RegConnectRegistryW ((LPWSTR) lpMachineName, hKey, phkResult); - else - return RegConnectRegistryA ((LPSTR) lpMachineName, hKey, phkResult); -} - -HSZ -qxeDdeCreateStringHandle (DWORD idInst, const Extbyte * psz, int iCodePage) -{ - /* Cygwin mistakenly omits const in second argument. */ - if (XEUNICODE_P) - return DdeCreateStringHandleW (idInst, (LPWSTR) psz, iCodePage); - else - return DdeCreateStringHandleA (idInst, (LPSTR) psz, iCodePage); -} - -/* NOTE: NT 4.0+ only */ -UINT -qxeExtractIconEx (const Extbyte * lpszFile, int nIconIndex, HICON FAR * phiconLarge, HICON FAR * phiconSmall, UINT nIcons) -{ - /* Cygwin mistakenly declares the return type as HICON. */ - if (XEUNICODE_P) - return (UINT) ExtractIconExW ((LPCWSTR) lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons); - else - return (UINT) ExtractIconExA ((LPCSTR) lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons); -} - #ifdef HAVE_MS_WINDOWS /* NOTE: NT 4.0+ only */ BOOL -qxeGetICMProfile (HDC arg1, LPDWORD arg2, Extbyte * arg3) -{ -#if 0 /* defined (CYGWIN_HEADERS) */ /* fixed at some point <= GCC 3.4.4 */ - /* Cygwin mistakenly declares the second argument as DWORD. */ - if (XEUNICODE_P) - return GetICMProfileW (arg1, (DWORD) arg2, (LPWSTR) arg3); - else - return GetICMProfileA (arg1, (DWORD) arg2, (LPSTR) arg3); -#else - if (XEUNICODE_P) - return GetICMProfileW (arg1, arg2, (LPWSTR) arg3); - else - return GetICMProfileA (arg1, arg2, (LPSTR) arg3); -#endif /* CYGWIN_HEADERS */ -} - -/* NOTE: NT 4.0+ only */ -BOOL qxeUpdateICMRegKey (DWORD arg1, Extbyte * arg2, Extbyte * arg3, UINT arg4) { #ifdef CYGWIN_HEADERS