Bugs item #1768189, was opened at 2007-08-06 00:48
Message generated for change (Comment added) made by nobody
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=865514&aid=1768189&group_id=173455

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: MinGW32CE (arm-wince-mingw32ce
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: LocalLock and LocalUnlock - winbase.h

Initial Comment:
Compiler: arm-wince-mingw32ce
SVN version: 1039
Compiled from source under Cygwin.

Problem: undefined externals after linking UPP example See 
http://www.ultimatepp.org and 
http://www.ultimatepp.org/forum/index.php?t=msg&goto=10942&#msg_10942 

Possible cause:
LocalLock and LocalUnlock are defined as macros in Microsoft's winbase.h - but 
in cegcc, these macros aren't defined.

I changed winbase.h so the definitions of these functions are:


#ifndef _WIN32_WCE
WINBASEAPI PVOID WINAPI LocalLock(HLOCAL);
WINBASEAPI BOOL WINAPI LocalUnlock(HLOCAL);
WINBASEAPI HLOCAL WINAPI LocalHandle(LPCVOID);
WINBASEAPI UINT WINAPI LocalFlags(HLOCAL); /* Obsolete: Has no effect. */
#else
#define LocalLock(X) ((LPVOID)(X))
#define LocalUnlock(X) (0)
#define LocalHandle(X) ((HLOCAL)(X))
#define LocalFlags(X) (0)
#endif


----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2007-08-06 06:14

Message:
Logged In: NO 

The actual changes I made to the include files are:

Index: wingdi.h
===================================================================
--- wingdi.h    (revision 1039)
+++ wingdi.h    (working copy)
@@ -2797,13 +2797,13 @@
 WINGDIAPI int WINAPI GetBkMode(HDC);
 WINGDIAPI UINT WINAPI GetBoundsRect(HDC,LPRECT,UINT);
 WINGDIAPI BOOL WINAPI GetBrushOrgEx(HDC,LPPOINT);
-WINGDIAPI BOOL WINAPI GetCharABCWidthsA(HDC,UINT,UINT,LPABC);
-WINGDIAPI BOOL WINAPI GetCharABCWidthsW(HDC,UINT,UINT,LPABC);
 WINGDIAPI BOOL WINAPI GetCharABCWidthsFloatA(HDC,UINT,UINT,LPABCFLOAT);
 WINGDIAPI BOOL WINAPI GetCharABCWidthsFloatW(HDC,UINT,UINT,LPABCFLOAT);
 WINGDIAPI DWORD WINAPI
GetCharacterPlacementA(HDC,LPCSTR,int,int,LPGCP_RESULTSA,DWORD);
 WINGDIAPI DWORD WINAPI
GetCharacterPlacementW(HDC,LPCWSTR,int,int,LPGCP_RESULTSW,DWORD);
 #ifndef _WIN32_WCE
+WINGDIAPI BOOL WINAPI GetCharABCWidthsA(HDC,UINT,UINT,LPABC);
+WINGDIAPI BOOL WINAPI GetCharABCWidthsW(HDC,UINT,UINT,LPABC);
 WINGDIAPI BOOL WINAPI GetCharWidth32A(HDC,UINT,UINT,LPINT);
 WINGDIAPI BOOL WINAPI GetCharWidth32W(HDC,UINT,UINT,LPINT);
 WINGDIAPI BOOL WINAPI GetCharWidthA(HDC,UINT,UINT,LPINT);
@@ -2811,6 +2811,7 @@
 WINGDIAPI BOOL WINAPI GetCharWidthFloatA(HDC,UINT,UINT,PFLOAT);
 WINGDIAPI BOOL WINAPI GetCharWidthFloatW(HDC,UINT,UINT,PFLOAT);
 #else
+WINGDIAPI BOOL WINAPI GetCharABCWidths(HDC,UINT,UINT,LPABC);
 WINGDIAPI BOOL WINAPI GetCharWidth32(HDC,UINT,UINT,LPINT);
 #endif
 WINGDIAPI int WINAPI GetClipBox(HDC,LPRECT);
@@ -3099,10 +3100,10 @@
 #define EnumICMProfiles EnumICMProfilesW
 #define ExtTextOut ExtTextOutW
 #define GetCharABCWidthsFloat GetCharABCWidthsFloatW
-#define GetCharABCWidths GetCharABCWidthsW
 #define GetCharacterPlacement GetCharacterPlacementW
 #ifndef _WIN32_WCE
 #define GetCharWidth32 GetCharWidth32W
+#define GetCharABCWidths GetCharABCWidthsW
 #endif
 #define GetCharWidthFloat GetCharWidthFloatW
 #define GetCharWidth GetCharWidthW
Index: winbase.h
===================================================================
--- winbase.h   (revision 1039)
+++ winbase.h   (working copy)
@@ -1660,6 +1660,7 @@
 WINBASEAPI VOID WINAPI GlobalFix(HGLOBAL); /* Obsolete: Has no effect.
*/
 WINBASEAPI UINT WINAPI GlobalGetAtomNameA(ATOM,LPSTR,int);
 WINBASEAPI UINT WINAPI GlobalGetAtomNameW(ATOM,LPWSTR,int);
+
 #ifndef _WIN32_WCE
 WINBASEAPI HGLOBAL WINAPI GlobalAlloc(UINT,DWORD);
 WINBASEAPI HGLOBAL WINAPI GlobalFree(HGLOBAL);
@@ -1679,6 +1680,7 @@
 # define GlobalSize(lp) LocalSize(lp)
 # define GlobalFlags(lp) LocalFlags(lp)
 #endif
+
 WINBASEAPI VOID WINAPI GlobalMemoryStatus(LPMEMORYSTATUS);
 #if (_WIN32_WINNT >= 0x0500)
 WINBASEAPI BOOL WINAPI GlobalMemoryStatusEx(LPMEMORYSTATUSEX);
@@ -1776,16 +1778,26 @@
 WINBASEAPI SIZE_T WINAPI LocalCompact(UINT); /* Obsolete: Has no effect.
*/
 WINBASEAPI HLOCAL LocalDiscard(HLOCAL);
 WINBASEAPI BOOL WINAPI LocalFileTimeToFileTime(CONST FILETIME
*,LPFILETIME);
-WINBASEAPI UINT WINAPI LocalFlags(HLOCAL); /* Obsolete: Has no effect.
*/
 WINBASEAPI HLOCAL WINAPI LocalFree(HLOCAL);
-WINBASEAPI HLOCAL WINAPI LocalHandle(LPCVOID);
-WINBASEAPI PVOID WINAPI LocalLock(HLOCAL);
 WINBASEAPI HLOCAL WINAPI LocalReAlloc(HLOCAL,SIZE_T,UINT);
 WINBASEAPI SIZE_T WINAPI LocalShrink(HLOCAL,UINT);  /* Obsolete: Has no
effect. */
 WINBASEAPI UINT WINAPI LocalSize(HLOCAL);
-WINBASEAPI BOOL WINAPI LocalUnlock(HLOCAL);
 WINBASEAPI BOOL WINAPI LockFile(HANDLE,DWORD,DWORD,DWORD,DWORD);
 WINBASEAPI BOOL WINAPI
LockFileEx(HANDLE,DWORD,DWORD,DWORD,DWORD,LPOVERLAPPED);
+
+#ifndef _WIN32_WCE
+WINBASEAPI PVOID WINAPI LocalLock(HLOCAL);
+WINBASEAPI BOOL WINAPI LocalUnlock(HLOCAL);
+WINBASEAPI HLOCAL WINAPI LocalHandle(LPCVOID);
+WINBASEAPI UINT WINAPI LocalFlags(HLOCAL); /* Obsolete: Has no effect.
*/
+#else
+#define LocalLock(X) ((LPVOID)(X))
+#define LocalUnlock(X) (0)
+#define LocalHandle(X) ((HLOCAL)(X))
+#define LocalFlags(X) (0)
+#endif
+
+
 #ifdef _WIN32_WCE
 #define LockResource(h) ((PVOID)(h))
 #else


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=865514&aid=1768189&group_id=173455

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to