Hi,

After all, I succeeded compiling ACE. Thanks !!

During compilation, I ran into two seperate issues:

1. Missing parameter/function:

I noticed that STACK_SIZE_PARAM_IS_A_RESERVATION wasn't found in CE gcc. Also CeGetThreadPriority and CeSetThreadPriority couldn't be found.

2. Declaration of functions in kfuncs.h

In my code, I'm using ::GetCurrentProcessId (). In kfuncs.h this function is declared as follows:
  #define GetCurrentProcessId () (....)
Rewriting this function (and some other ones) to

DWORD GetCurrentProcessId()
{
return ((DWORD)(((HANDLE *)(PUserKData+SYSHANDLE_OFFSET))[SH_CURPROC]));
}

solves this compiler error. I've attached my kfuncs.h.

I'm using arm-wince-mingw32ce and Cygwin 1.5.25-15 on Windows Vista.

Is it true that these issues may occur om my system. Is there perhaps a solution for these issues? I managed to create some workarounds but I prefer not to.

Thanks again.

Marcel Smit.
/*
 * The implementation is from the WCE library
 * The description that this is supposed to be "kfuncs.h" is from pages
 * such as :
 *
 * 
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcekernl/html/_wcesdk_win32_exitthread.asp
 * 
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcesdkr/html/_wcesdk_win32_pulseevent.asp
 */
#ifndef _W32API_KFUNCS_H_
#define _W32API_KFUNCS_H_

#ifndef _WIN32_WCE
#error "_WIN32_WCE is not defined."
#endif

#define PUserKData              ((LPBYTE)0xFFFFC800)
#define SYSHANDLE_OFFSET        0x004
#define SYS_HANDLE_BASE         64
#define SH_WIN32                0
#define SH_CURTHREAD            1
#define SH_CURPROC              2

/* Process/Thread ID Methods */
//#define       GetCurrentThread()      ((HANDLE)(SH_CURTHREAD+SYS_HANDLE_BASE))
//#define       GetCurrentProcess()     ((HANDLE)(SH_CURPROC+SYS_HANDLE_BASE))
//#define       GetCurrentThreadId()    ((DWORD)(((HANDLE 
*)(PUserKData+SYSHANDLE_OFFSET))[SH_CURTHREAD]))
//#define       GetCurrentProcessId()   ((DWORD)(((HANDLE 
*)(PUserKData+SYSHANDLE_OFFSET))[SH_CURPROC]))
HANDLE GetCurrentProcess()
{
  return ((HANDLE)(SH_CURPROC+SYS_HANDLE_BASE));

}

HANDLE GetCurrentThread()
{
  return ((HANDLE)(SH_CURTHREAD+SYS_HANDLE_BASE));
}

DWORD GetCurrentThreadId()
{
  return ((DWORD)(((HANDLE *)(PUserKData+SYSHANDLE_OFFSET))[SH_CURTHREAD]));
}

DWORD GetCurrentProcessId()
{
  return ((DWORD)(((HANDLE *)(PUserKData+SYSHANDLE_OFFSET))[SH_CURPROC]));
}

/* EventModify signature hinted on:
   
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcehardware5/html/wce50lrfCeLogImportTable.asp

   Event Constants and EventModify signature in the c# example at:
   
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/PISAPICF.asp
  */
WINBASEAPI BOOL WINAPI EventModify(HANDLE h, DWORD e);

#define EVENT_PULSE     1
#define EVENT_RESET     2
#define EVENT_SET       3
#define PulseEvent(x)   EventModify(x, EVENT_PULSE)
#define ResetEvent(x)   EventModify(x, EVENT_RESET)
#define SetEvent(x)     EventModify(x, EVENT_SET)

/* TLS Constants and Constructs */
#define TLS_FUNCALLOC   0
#define TLS_FUNCFREE    1

WINBASEAPI DWORD WINAPI TlsCall(DWORD func, DWORD val);

//#define TlsAlloc()  (TlsCall(TLS_FUNCALLOC, 0))
//#define TlsFree(x)  (TlsCall(TLS_FUNCFREE, x))

DWORD TlsAlloc (void)
{
  return (TlsCall(TLS_FUNCALLOC, 0));
}

BOOL WINAPI TlsFree(DWORD x);
{
  return (TlsCall(TLS_FUNCFREE, x))
}

#endif
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to