diff -NaBbur include/Core/CoreTraps.h //r/palm/sdk-3.5/include/Core/CoreTraps.h
--- include/Core/CoreTraps.h	Thu Feb 24 16:55:28 2000
+++ //r/palm/sdk-3.5/include/Core/CoreTraps.h	Tue Oct  3 17:42:01 2000
@@ -57,7 +57,7 @@
 // Regular traps start here and go up by 1's
 #define	sysTrapBase			0xA000
 
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(_JDK)
 
 #define sysTrapMemInit									0xA000
 #define sysTrapMemInitHeapTable						0xA001
@@ -2542,7 +2542,7 @@
 	// WARNING!! LEAVE THIS AT THE END AND ALWAYS ADD NEW TRAPS TO
 	//  THE END OF THE TRAP TABLE BUT RIGHT BEFORE THIS TRAP!!!!!!!!!
 	sysTrapLastTrapNumber
-	} SysTrapNumber;
+	} _JDK_ENUM(SysTrapNumber);
 
 #endif
 
diff -NaBbur include/Core/Hardware/HAL.h //r/palm/sdk-3.5/include/Core/Hardware/HAL.h
--- include/Core/Hardware/HAL.h	Thu Feb 24 16:55:28 2000
+++ //r/palm/sdk-3.5/include/Core/Hardware/HAL.h	Fri Aug 11 11:53:15 2000
@@ -52,7 +52,7 @@
 	halBootDrvReadChar,								// 16
 	
 	halBootLastSelector
-	} halBootSelector;
+	} _JDK_ENUM(halBootSelector);
 */
 
 /************************************************************
diff -NaBbur include/Core/System/AlarmMgr.h //r/palm/sdk-3.5/include/Core/System/AlarmMgr.h
--- include/Core/System/AlarmMgr.h	Thu Feb 24 16:55:30 2000
+++ //r/palm/sdk-3.5/include/Core/System/AlarmMgr.h	Fri Aug 11 11:31:02 2000
@@ -102,7 +102,7 @@
 	
 	// Alarm manager reserves all enums up to almProcCmdCustom
 	almProcCmdCustom = 0x8000
-	} AlmProcCmdEnum;
+	} _JDK_ENUM(AlmProcCmdEnum);
  
 typedef void (*AlmAlarmProcPtr)(UInt16  /* AlmProcCmdEnum*/ almProcCmd, 
 				SysAlarmTriggeredParamType *paramP);
diff -NaBbur include/Core/System/AppLaunchCmd.h //r/palm/sdk-3.5/include/Core/System/AppLaunchCmd.h
--- include/Core/System/AppLaunchCmd.h	Thu Feb 24 16:55:30 2000
+++ //r/palm/sdk-3.5/include/Core/System/AppLaunchCmd.h	Fri Aug 11 11:46:52 2000
@@ -97,7 +97,7 @@
 	addrLookupFieldCount,	// add new fields above this one
 	
 	addrLookupNoField = 0xff
-} AddressLookupFields;
+} _JDK_ENUM(AddressLookupFields);
 
 
 #define addrLookupStringLength 12
@@ -198,7 +198,8 @@
 //-------------------------------------------------------------------
 // Param Block passsed with the sysAppLaunchCmdAddRecord Command
 
-typedef enum { mailPriorityHigh, mailPriorityNormal, mailPriorityLow } MailMsgPriorityType;
+typedef enum { mailPriorityHigh, mailPriorityNormal, mailPriorityLow } _JDK_ENUM(MailMsgPriorityType);
+
 
 typedef struct {
 	Boolean					secret;
diff -NaBbur include/Core/System/Bitmap.h //r/palm/sdk-3.5/include/Core/System/Bitmap.h
--- include/Core/System/Bitmap.h	Thu Feb 24 16:55:30 2000
+++ //r/palm/sdk-3.5/include/Core/System/Bitmap.h	Thu Sep 14 16:49:29 2000
@@ -41,15 +41,16 @@
 	BitmapCompressionTypeRLE,
 	
 	BitmapCompressionTypeNone = 0xFF
-} BitmapCompressionType;
+} _JDK_ENUM(BitmapCompressionType);
 
 typedef struct BitmapFlagsType {
-	UInt16 compressed:1;  			// Data format:  0=raw; 1=compressed
-	UInt16 hasColorTable:1;			// if true, color table stored before bits[]
-	UInt16 hasTransparency:1;		// true if transparency is used
-	UInt16 indirect:1;				// true if bits are stored indirectly
-	UInt16 forScreen:1;				// system use only
-	UInt16 reserved:11;
+	UInt16 _JDK_BF6(
+		compressed:1,  			// Data format:  0=raw; 1=compressed
+		hasColorTable:1,			// if true, color table stored before bits[]
+		hasTransparency:1,		// true if transparency is used
+		indirect:1,				// true if bits are stored indirectly
+		forScreen:1,				// system use only
+		reserved:11);
 } BitmapFlagsType;
 
 // this definition correspond to the 'Tbmp' and 'tAIB' resource types
@@ -130,6 +131,7 @@
 extern ColorTableType *BmpGetColortable(BitmapType *bitmapP)
 							SYS_TRAP(sysTrapBmpGetColortable);
 
+#ifndef _JDK
 extern UInt16 BmpSize(BitmapType *bitmapP)
 							SYS_TRAP(sysTrapBmpSize);
 
@@ -138,7 +140,7 @@
 
 extern UInt16 BmpColortableSize(BitmapType *bitmapP)
 							SYS_TRAP(sysTrapBmpColortableSize);
-
+#endif
 #ifdef __cplusplus 
 }
 #endif
diff -NaBbur include/Core/System/CMCommon.h //r/palm/sdk-3.5/include/Core/System/CMCommon.h
--- include/Core/System/CMCommon.h	Thu Feb 24 16:55:32 2000
+++ //r/palm/sdk-3.5/include/Core/System/CMCommon.h	Fri Aug 11 11:32:28 2000
@@ -61,7 +61,7 @@
 	cmpInit,						// CMP Init packet sent from client to server
 	cmpAbort,					// CMP Abort packet sent from client to server
 	cmpExtended					// For future command extensions
-	} CmpType;
+	} _JDK_ENUM(CmpType);
 
 
 // cmpInit and cmpWakeup packet body structure:
@@ -173,7 +173,7 @@
 	cmpRespErrParam,						// invalid parameter
 	
 	cmpRespErrLast							// *KEEP THIS ENTRY LAST*
-	} CmpRespErrEnum;
+	} _JDK_ENUM(CmpRespErrEnum);
 
 
 //-------------------------------------------------------------------------
@@ -190,7 +190,7 @@
 	cmpCmdHShakeComplete,			// hand-shake completion command
 	
 	cmpCmdLast							// *KEEP THIS ENTRY LAST*
-	} CmpCmdEnum;
+	} _JDK_ENUM(CmpCmdEnum);
 
 
 
diff -NaBbur include/Core/System/CMLConst.h //r/palm/sdk-3.5/include/Core/System/CMLConst.h
--- include/Core/System/CMLConst.h	Thu Feb 24 16:55:32 2000
+++ //r/palm/sdk-3.5/include/Core/System/CMLConst.h	Fri Aug 11 11:33:28 2000
@@ -220,7 +220,7 @@
 	// the lower case letters 'a' - 'z' follow....
 	cmlCharA
 	
-	} CMLCharEnum;
+	} _JDK_ENUM(CMLCharEnum);
 
 // Regular Ascii characters
 #define	cmlAsciiCR			0x0D
@@ -233,29 +233,29 @@
 typedef enum	{ 
 	cmlListTDisc, cmlListTSquare, cmlListTCircle,
 	cmlListT1, cmlListTa, cmlListTA, cmlListTi, cmlListTI 
-	} CmlListEnum;
+	} _JDK_ENUM(CmlListEnum);
 				
 // Align types	 
 typedef enum		{
 	cmlAlignLeft, cmlAlignCenter, cmlAlignRight, cmlAlignNone
-	} CmlAlignEnum;
+	} _JDK_ENUM(CmlAlignEnum);
 	
 typedef enum	{
 	cmlVAlignTop, cmlVAlignCenter, cmlVAlignBottom, cmlVAlignNone
-	} CmlVAlignEnum;
+	} _JDK_ENUM(CmlVAlignEnum);
 
 typedef enum	{
 	cmlIAlignLeft, cmlIAlignCenter, cmlIAlignRight, cmlIAlignTop, 
 	cmlIAlignMiddle, cmlIAlignBottom, cmlIAlignNone
-	} CmlIAlignEnum;
+	} _JDK_ENUM(CmlIAlignEnum);
 					
 typedef enum	{
 	cmlClearLeft, cmlClearAll, cmlClearRight, cmlClearLine
-	} CmlClearEnum;
+	} _JDK_ENUM(CmlClearEnum);
 	
 typedef enum {
 	cmlLinkColor, cmlLinkColorVisited, cmlLinkColorActive
-	} CmlLinkColorEnum; 
+	} _JDK_ENUM(CmlLinkColorEnum);
 
 #endif   //__CMLCONST_H__
 
diff -NaBbur include/Core/System/CTP.h //r/palm/sdk-3.5/include/Core/System/CTP.h
--- include/Core/System/CTP.h	Thu Feb 24 16:55:34 2000
+++ //r/palm/sdk-3.5/include/Core/System/CTP.h	Fri Aug 11 11:37:00 2000
@@ -29,7 +29,7 @@
 	ctpCmdEcho = 2,
 	ctpCmdMsgGen = 3,
 	ctpCmdDiscard = 4
-	} CTPCmdEnum;
+	} _JDK_ENUM(CTPCmdEnum);
 
 
 //##########################################################
@@ -47,7 +47,7 @@
 									//   When this is specified, then the response
 									//   will include the ctpRspExtContentType
 									//   and ctpRspExtContentEncoding extensions
-	} CTPConvEnum;
+	} _JDK_ENUM(CTPConvEnum);
 
 
 // default CTP header request values
@@ -106,7 +106,7 @@
 									// Extension must not be sent if Local =
 									// ( cUnitedStates, lEnglish, charEncodingPalmLatin )
 
-	} CTPReqExtEnum;
+	} _JDK_ENUM(CTPReqExtEnum);
 
 
 
@@ -146,7 +146,7 @@
 									//	and 2 byte desired version number of content
 
 
-	} CTPRspExtURLEnum;
+	} _JDK_ENUM(CTPRspExtURLEnum);
 
 
 
@@ -165,7 +165,7 @@
 typedef enum {
 	ctpNetIDMobitex = 0,
 	ctpNetIDUnknown = 0xFFFF
-	} CTPNetIDEnum;
+	} _JDK_ENUM(CTPNetIDEnum);
 
 
 //##########################################################
@@ -178,7 +178,7 @@
 	ctpSchemeHTTPS = 1,			// https://
 	ctpSchemeFTP = 2,				// ftp://
 	ctpSchemeEmpty = 7
-	} CTPSchemeEnum;
+	} _JDK_ENUM(CTPSchemeEnum);
 
 
 
@@ -226,7 +226,7 @@
 										//	  Char		errMsg[]
 										//
 	ctpWarnTruncated = 0x8000			// response is truncated
-	} CTPErrEnum;
+	} _JDK_ENUM(CTPErrEnum);
 
 
 // NOTE:
diff -NaBbur include/Core/System/DLCommon.h //r/palm/sdk-3.5/include/Core/System/DLCommon.h
--- include/Core/System/DLCommon.h	Thu Feb 24 16:55:34 2000
+++ //r/palm/sdk-3.5/include/Core/System/DLCommon.h	Fri Aug 11 11:39:33 2000
@@ -135,7 +135,7 @@
 	
 	dlpLastFunc						// ***ALWAYS KEEP LAST***
 
-	} DlpFuncID;
+	} _JDK_ENUM(DlpFuncID);
 
 #define	dlpLastPilotV10FuncID	dlpReadRecordIDList
 
@@ -170,7 +170,7 @@
 	
 	dlpRespErrLastReserved = 127		// last error code reserved for Palm
 												// *KEEP THIS ENTRY LAST*
-	} DlpRespErrorCode;
+	} _JDK_ENUM(DlpRespErrorCode);
 
 
 // Database flags
@@ -998,7 +998,7 @@
 	dlpCloseDBAllReqArgID,								// close all databases
 	dlpCloseDBExReqArgID									// close a specific db and update backup
 																// and/or modification dates (PalmOS v3.0)
-	} DlpCloseDBReqArgID;
+	} _JDK_ENUM(DlpCloseDBReqArgID);
 
 // Argument structure to close a specific database(dlpCloseDBDBIDReqArgID):
 //
@@ -1318,7 +1318,7 @@
 typedef enum {
 	dlpReadRecordIdArgID = dlpFirstArgID,
 	dlpReadRecordIndexArgID
-	} DlpReadRecordReqArgID;
+	} _JDK_ENUM(DlpReadRecordReqArgID);
 
 // dlpReadRecordIdArgID request argument structure:
 //
@@ -1532,7 +1532,7 @@
 typedef enum {
 	dlpReadResourceIndexArgID = dlpFirstArgID,
 	dlpReadResourceTypeArgID
-	} DlpReadResourceReqArgID;
+	} _JDK_ENUM(DlpReadResourceReqArgID);
 
 // dlpReadResourceIndexArgID request argument structure:
 //
@@ -1927,7 +1927,7 @@
 	dlpTermCodeUserCan,					// user cancelled from desktop
 	dlpTermCodeOther,						// catch-all abnormal termination code
 	dlpTermCodeIncompatibleProducts	// incompatibility between desktop and handheld hotsync products
-	} DlpSyncTermCode;
+	} _JDK_ENUM(DlpSyncTermCode);
 	
 	
 typedef struct DlpEndOfSyncReqType {
diff -NaBbur include/Core/System/DLServer.h //r/palm/sdk-3.5/include/Core/System/DLServer.h
--- include/Core/System/DLServer.h	Thu Feb 24 16:55:36 2000
+++ //r/palm/sdk-3.5/include/Core/System/DLServer.h	Fri Aug 11 11:40:28 2000
@@ -72,7 +72,7 @@
 	dlkSyncStateIncompatibleProducts	// sync ended because desktop HotSync product
 												// is incompatible with this version
 												// of the handheld HotSync
-	} DlkSyncStateType;
+	} _JDK_ENUM(DlkSyncStateType);
 
 #define dlkUserInfoPrefVersion	0x0102	// current user info pref version: 1.2
 
@@ -158,7 +158,7 @@
 	dlkEventSystemResetRequested			// system reset was requested by the desktop client
 													// (the normal action is to delay the reset until
 													// end of sync) -- paramP is null
-	} DlkEventType;
+	} _JDK_ENUM(DlkEventType);
 
 // Prototype for the event notification callback
 typedef Int16 (*DlkEventProcPtr)(UInt32 eventRef, DlkEventType dlkEvent,
@@ -330,7 +330,7 @@
 	
 	dlkCtlLAST						// *KEEP THIS ENTRY LAST*
 	
-} DlkCtlEnum;
+} _JDK_ENUM(DlkCtlEnum);
 
 
 //
diff -NaBbur include/Core/System/DateTime.h //r/palm/sdk-3.5/include/Core/System/DateTime.h
--- include/Core/System/DateTime.h	Thu Feb 24 16:55:34 2000
+++ //r/palm/sdk-3.5/include/Core/System/DateTime.h	Fri Aug 11 11:37:33 2000
@@ -31,7 +31,7 @@
 	tfHoursAMPM,			// 1 pm
 	tfHours24h,				// 13
 	tfComma24h				// 13,00
-	} TimeFormatType;
+	} _JDK_ENUM(TimeFormatType);
 
 
 typedef enum {
@@ -45,7 +45,7 @@
 	dsRumania,				// Rumanian Daylight Savings Time
 	dsTurkey,				// Turkish Daylight Savings Time
 	dsAustraliaShifted	// Australian Daylight Savings Time with shift in 1986
-	} DaylightSavingsTypes;
+	} _JDK_ENUM(DaylightSavingsTypes);
 
 
 // pass a TimeFormatType	
@@ -72,7 +72,7 @@
 
 	dfMYMed,					//	Dec '95
 	dfMYMedNoPost			//	Dec 95		(added for French 2.0 ROM)
-	} DateFormatType;
+	} _JDK_ENUM(DateFormatType);
 
 typedef struct {
 	Int16 second;
@@ -183,7 +183,7 @@
 	dom4thSun, dom4thMon, dom4thTue, dom4thWen, dom4thThu, dom4thFri, dom4thSat,
 	domLastSun, domLastMon, domLastTue, domLastWen, domLastThu, domLastFri, 
 	domLastSat
-	} DayOfWeekType;
+	} _JDK_ENUM(DayOfWeekType);
 
 // Values used by DateTemplateToAscii routine.
 #define dateTemplateChar					chrCircumflexAccent
diff -NaBbur include/Core/System/DebugMgr.h //r/palm/sdk-3.5/include/Core/System/DebugMgr.h
--- include/Core/System/DebugMgr.h	Thu Feb 24 16:55:34 2000
+++ //r/palm/sdk-3.5/include/Core/System/DebugMgr.h	Tue Oct  3 17:37:59 2000
@@ -90,7 +90,7 @@
 	};
 
 
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(_JDK)
  #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
 	#define _DEBUGGER_TRAP  __attribute__ ((__callseq__ ("trap #8")))
  #else
diff -NaBbur include/Core/System/EmuStubs.h //r/palm/sdk-3.5/include/Core/System/EmuStubs.h
--- include/Core/System/EmuStubs.h	Thu Feb 24 16:55:36 2000
+++ //r/palm/sdk-3.5/include/Core/System/EmuStubs.h	Fri Aug 11 11:40:40 2000
@@ -33,7 +33,7 @@
 	emuSendNoEvent,
 	emuSendNilEvent,
 	emuSendPenOrKeyEvent
-	} StubNilEventIsPendingResults;
+	} _JDK_ENUM(StubNilEventIsPendingResults);
 
 /************************************************************
  * Prototypes
diff -NaBbur include/Core/System/ErrorBase.h //r/palm/sdk-3.5/include/Core/System/ErrorBase.h
--- include/Core/System/ErrorBase.h	Thu Feb 24 16:55:36 2000
+++ //r/palm/sdk-3.5/include/Core/System/ErrorBase.h	Tue Sep 26 13:38:04 2000
@@ -175,8 +175,12 @@
 #if EMULATION_LEVEL != EMULATION_NONE
 	#define	ErrJumpBuf	jmp_buf
 #else
+#ifdef _JDK
+	typedef long* ErrJumpBuf[64];			//access any kind of processor
+#else
 	typedef long* ErrJumpBuf[12];			// D3-D7,PC,A2-A7
 #endif
+#endif
 	
 // Structure used to store Try state.
 typedef struct ErrExceptionType {
@@ -229,12 +233,14 @@
 	#define	ErrLongJump(buf,res) 	longjmp(buf,res)
 
 #else
+#ifndef _JDK
 	Int16	ErrSetJump(ErrJumpBuf buf)
 								SYS_TRAP(sysTrapErrSetJump);
 								
 	void	ErrLongJump(ErrJumpBuf buf, Int16 result)
 								SYS_TRAP(sysTrapErrLongJump);
 #endif
+#endif
 						
 MemPtr*	ErrExceptionList(void)
 							SYS_TRAP(sysTrapErrExceptionList);	
diff -NaBbur include/Core/System/ExgLib.h //r/palm/sdk-3.5/include/Core/System/ExgLib.h
--- include/Core/System/ExgLib.h	Thu Feb 24 16:55:36 2000
+++ //r/palm/sdk-3.5/include/Core/System/ExgLib.h	Tue Oct  3 17:38:21 2000
@@ -38,7 +38,7 @@
 //  table in and Exchange library!!!
 //-----------------------------------------------------------------------------
 
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(_JDK)
 
 #define exgLibTrapHandleEvent		(sysLibTrapCustom)
 #define exgLibTrapConnect			(sysLibTrapCustom+1)
@@ -67,7 +67,7 @@
 	exgLibTrapControl,
 	exgLibReserved1,
 	exgLibTrapLast
-	} ExgLibTrapNumberEnum;
+	} _JDK_ENUM(ExgLibTrapNumberEnum);
 
 #endif
 
diff -NaBbur include/Core/System/ExgMgr.h //r/palm/sdk-3.5/include/Core/System/ExgMgr.h
--- include/Core/System/ExgMgr.h	Thu Feb 24 16:55:38 2000
+++ //r/palm/sdk-3.5/include/Core/System/ExgMgr.h	Fri Aug 11 11:41:09 2000
@@ -76,7 +76,7 @@
 
 // structures used for sysAppLaunchCmdExgAskUser launch code parameter
 // default is exgAskDialog (ask user with dialog...
-typedef enum { exgAskDialog,exgAskOk,exgAskCancel } ExgAskResultType;
+typedef enum { exgAskDialog,exgAskOk,exgAskCancel } _JDK_ENUM(ExgAskResultType);
 
 typedef struct {
 	ExgSocketPtr		socketP;
diff -NaBbur include/Core/System/FileStream.h //r/palm/sdk-3.5/include/Core/System/FileStream.h
--- include/Core/System/FileStream.h	Thu Feb 24 16:55:38 2000
+++ //r/palm/sdk-3.5/include/Core/System/FileStream.h	Fri Aug 11 12:05:14 2000
@@ -94,20 +94,20 @@
 /************************************************************
  * Origin passed to FileSetPos
  *************************************************************/
-typedef enum FileOriginEnum {
+typedef enum _JDK_REN(FileOriginEnum) {
 
 	fileOriginBeginning	= 1,			// from the beginning (first data byte of file)
 	fileOriginCurrent,					// from the current position
 	fileOriginEnd							// from the end of file (one position beyond last data byte)
 
-	} FileOriginEnum;
+	} _JDK_ENUM(FileOriginEnum);
 
 
 
 /************************************************************
  * Operation passed to FileControl
  *************************************************************/
-typedef enum FileOpEnum {
+typedef enum _JDK_REN(FileOpEnum) {
 	fileOpNone = 0,						// no-op
 
 	fileOpDestructiveReadMode,			// switch to destructive read mode (there is no turning back);
@@ -201,7 +201,7 @@
 	fileOpLAST								// ***ADD NEW OPERATIONS BEFORE THIS ENTRY***
 												// ***  AND ALWAYS AFTER EXISTING ENTRIES ***
 												// ***     FOR BACKWARD COMPATIBILITY     ***
-	} FileOpEnum;
+	} _JDK_ENUM(FileOpEnum);
 
 
 /************************************************************
diff -NaBbur include/Core/System/FloatMgr.h //r/palm/sdk-3.5/include/Core/System/FloatMgr.h
--- include/Core/System/FloatMgr.h	Thu Feb 24 16:55:38 2000
+++ //r/palm/sdk-3.5/include/Core/System/FloatMgr.h	Tue Oct  3 17:44:19 2000
@@ -35,6 +35,8 @@
 #ifndef _DONT_USE_FP_TRAPS_
 #if EMULATION_LEVEL != EMULATION_NONE 
 #define _DONT_USE_FP_TRAPS_	1		// always direct link to FP for emulator builds
+#else
+#define _DONT_USE_FP_TRAPS_	0
 #endif
 #endif
 
@@ -219,7 +221,7 @@
  * New Floating point manager selectors
  *************************************************************/
 
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(_JDK)
 
 // The order of these #defines *MUST* match the
 // sysFloatSelector table in NewFloatDispatch.c
@@ -245,7 +247,7 @@
 	sysFloatVersion,			// 5
 
 	flpMaxFloatSelector = sysFloatVersion	// used by NewFloatDispatch.c
-} sysFloatSelector;
+} _JDK_ENUM(sysFloatSelector);
 
 #endif
 
@@ -386,7 +388,7 @@
 	sysFloatEm_d_mul,			// 52
 	sysFloatEm_d_sub,			// 53
 	sysFloatEm_d_div			// 54
-} sysFloatEmSelector;
+} _JDK_ENUM(sysFloatEmSelector);
 
 #endif
 
diff -NaBbur include/Core/System/Font.h //r/palm/sdk-3.5/include/Core/System/Font.h
--- include/Core/System/Font.h	Thu Feb 24 16:55:38 2000
+++ //r/palm/sdk-3.5/include/Core/System/Font.h	Fri Aug 11 11:42:24 2000
@@ -66,7 +66,7 @@
 	fntAppFontCustomBase = 0x80	// First available application-defined font ID
 };
 
-typedef enum fontID FontID;
+typedef enum fontID _JDK_ENUM(FontID);
 
 #define checkboxFont symbol11Font
 
diff -NaBbur include/Core/System/HostControl.h //r/palm/sdk-3.5/include/Core/System/HostControl.h
--- include/Core/System/HostControl.h	Thu Feb 24 16:55:38 2000
+++ //r/palm/sdk-3.5/include/Core/System/HostControl.h	Tue Oct  3 17:38:51 2000
@@ -42,7 +42,7 @@
 
 #define hostSelectorBase	0x0100
 
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(_JDK)
 
 	// Host information selectors
 
@@ -202,7 +202,7 @@
 	hostSelectorSetLogFileSize,
 
 	hostSelectorLastTrapNumber
-} HostControlTrapNumber;
+} _JDK_ENUM(HostControlTrapNumber);
 
 #endif
 
diff -NaBbur include/Core/System/IntlMgr.h //r/palm/sdk-3.5/include/Core/System/IntlMgr.h
--- include/Core/System/IntlMgr.h	Thu Feb 24 16:55:40 2000
+++ //r/palm/sdk-3.5/include/Core/System/IntlMgr.h	Tue Oct  3 17:39:03 2000
@@ -57,7 +57,7 @@
 // Selectors for routines found in the international manager. The order
 // of these selectors MUST match the jump table in IntlDispatch.c.
 
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(_JDK)
 
 #define intlIntlInit						0
 #define intlTxtByteAttr					1
@@ -124,7 +124,7 @@
 	
 	intlMaxSelector = intlTxtParamString,
 	intlBigSelector = 0x7FFF	// Force IntlSelector to be 16 bits.
-} IntlSelector;
+} _JDK_ENUM(IntlSelector);
 
 #endif
 
diff -NaBbur include/Core/System/IrLib.h //r/palm/sdk-3.5/include/Core/System/IrLib.h
--- include/Core/System/IrLib.h	Thu Feb 24 16:55:40 2000
+++ //r/palm/sdk-3.5/include/Core/System/IrLib.h	Tue Oct  3 17:39:15 2000
@@ -86,7 +86,7 @@
 // Ir library call ID's. 
 //-----------------------------------------------------------------------------
 
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(_JDK)
 
 // these start after the ObxLib interface...
 #define irLibTrapBind					(exgLibTrapLast)
@@ -146,7 +146,7 @@
 	irLibTrapWaitForEvent,
 	
 	irLibTrapLast
-	} IrLibTrapNumberEnum;
+	} _JDK_ENUM(IrLibTrapNumberEnum);
 
 #endif
 
diff -NaBbur include/Core/System/Localize.h //r/palm/sdk-3.5/include/Core/System/Localize.h
--- include/Core/System/Localize.h	Thu Feb 24 16:55:40 2000
+++ //r/palm/sdk-3.5/include/Core/System/Localize.h	Fri Aug 11 11:43:37 2000
@@ -29,7 +29,7 @@
 	nfSpaceComma,
 	nfApostrophePeriod,
 	nfApostropheComma
-	} NumberFormatType;
+	} _JDK_ENUM(NumberFormatType);
 
 	
 
diff -NaBbur include/Core/System/MemoryMgr.h //r/palm/sdk-3.5/include/Core/System/MemoryMgr.h
--- include/Core/System/MemoryMgr.h	Thu Feb 24 16:55:40 2000
+++ //r/palm/sdk-3.5/include/Core/System/MemoryMgr.h	Thu Sep  7 17:28:18 2000
@@ -27,7 +27,7 @@
 /************************************************************
  * Memory Manager Types
  *************************************************************/
-typedef enum {	memIDPtr, memIDHandle } LocalIDKind;
+typedef enum {	memIDPtr, memIDHandle } _JDK_ENUM(LocalIDKind);
 
 
 /************************************************************
@@ -160,10 +160,10 @@
 							
 Err				MemHeapInit(UInt16 heapID, Int16 numHandles, Boolean initContents)
 							SYS_TRAP(sysTrapMemHeapInit);
-							
+#ifndef _JDK
 Err				MemHeapFreeByOwnerID(UInt16 heapID, UInt16 ownerID)
 							SYS_TRAP(sysTrapMemHeapFreeByOwnerID);
-
+#endif
 
 //-------------------------------------------------------------------
 // Low Level Allocation
@@ -194,10 +194,10 @@
 
 UInt32			MemPtrSize(MemPtr p)
 							SYS_TRAP(sysTrapMemPtrSize);
-							
+#ifndef _JDK
 UInt16			MemPtrOwner(MemPtr p)
 							SYS_TRAP(sysTrapMemPtrOwner);
-							
+#endif				
 UInt16			MemPtrHeapID(MemPtr p)
 							SYS_TRAP(sysTrapMemPtrHeapID);
 							
@@ -211,9 +211,10 @@
 							SYS_TRAP(sysTrapMemPtrToLocalID);
 
 // Setting Attributes
+#ifndef _JDK
 Err				MemPtrSetOwner(MemPtr p, UInt16 owner)
 							SYS_TRAP(sysTrapMemPtrSetOwner);
-							
+#endif
 Err				MemPtrResize(MemPtr p, UInt32 newSize)
 							SYS_TRAP(sysTrapMemPtrResize);
 							
@@ -240,9 +241,10 @@
 UInt32			MemHandleSize(MemHandle h) 
 							SYS_TRAP(sysTrapMemHandleSize);
 
+#ifndef _JDK
 UInt16			MemHandleOwner(MemHandle h) 
 							SYS_TRAP(sysTrapMemHandleOwner);
-
+#endif
 UInt16			MemHandleLockCount(MemHandle h)
 							SYS_TRAP(sysTrapMemHandleLockCount);
 							
@@ -260,9 +262,10 @@
 
 
 // Setting Attributes
+#ifndef _JDK
 Err				MemHandleSetOwner( MemHandle h,  UInt16 owner) 
 							SYS_TRAP(sysTrapMemHandleSetOwner);
-						
+#endif
 Err				MemHandleResize(MemHandle h,  UInt32 newSize) 
 							SYS_TRAP(sysTrapMemHandleResize);
 						
diff -NaBbur include/Core/System/ModemMgr.h //r/palm/sdk-3.5/include/Core/System/ModemMgr.h
--- include/Core/System/ModemMgr.h	Thu Feb 24 16:55:42 2000
+++ //r/palm/sdk-3.5/include/Core/System/ModemMgr.h	Fri Aug 11 11:44:06 2000
@@ -58,7 +58,7 @@
 	mdmStageDialing,						// dialing the modem
 	mdmStageWaitingForCarrier,			// waiting for carrier detect
 	mdmStageHangingUp						// hanging up the modem
-	} MdmStageEnum;
+	} _JDK_ENUM(MdmStageEnum);
 
 /************************************************************
  * Modem Manager data structures
diff -NaBbur include/Core/System/NetMgr.h //r/palm/sdk-3.5/include/Core/System/NetMgr.h
--- include/Core/System/NetMgr.h	Thu Feb 24 16:55:42 2000
+++ //r/palm/sdk-3.5/include/Core/System/NetMgr.h	Tue Oct  3 17:39:25 2000
@@ -153,7 +153,7 @@
 	netSocketOptSockMultiPktAddr = 0x2002		// for SOCK_RDM (RMP) sockets. This is the 
 															// fixed IP addr (i.e. Mobitex MAN #) to use
 															//  for multiple packet requests.
-	} NetSocketOptEnum;
+	} _JDK_ENUM(NetSocketOptEnum);
 
 
 
@@ -163,7 +163,7 @@
 	netSocketOptLevelIP = 0,					// IP level options (IPPROTO_IP)
 	netSocketOptLevelTCP = 6,					// TCP level options (IPPROTO_TCP)
 	netSocketOptLevelSocket = 0xFFFF			// Socket level options (SOL_SOCKET)
-	} NetSocketOptLevelEnum;
+	} _JDK_ENUM(NetSocketOptLevelEnum);
 
 
 // Structure used for manipulating the linger option
@@ -178,7 +178,7 @@
 typedef enum {
 	netSocketAddrRaw=0,									// (AF_UNSPEC, AF_RAW)
 	netSocketAddrINET=2									// (AF_INET)
-	} NetSocketAddrEnum;
+	} _JDK_ENUM(NetSocketAddrEnum);
 
 typedef enum {
 	netSocketTypeStream=1,								// (SOCK_STREAM)
@@ -186,7 +186,7 @@
 	netSocketTypeRaw=3,									// (SOCK_RAW)
 	netSocketTypeReliableMsg=4,						// (SOCK_RDM)
 	netSocketTypeLicensee=8								// Socket entry reserved for licensees.  
-	} NetSocketTypeEnum;
+	} _JDK_ENUM(NetSocketTypeEnum);
 
 // Protocols, passed in the protocol parameter to NetLibSocketOpen
 #define	netSocketProtoIPICMP  1						// IPPROTO_ICMP
@@ -202,7 +202,7 @@
 	netSocketDirInput=0,
 	netSocketDirOutput=1,
 	netSocketDirBoth=2
-	} NetSocketDirEnum;
+	} _JDK_ENUM(NetSocketDirEnum);
 
 
 //-----------------------------------------------------------------------------
@@ -437,7 +437,7 @@
 	// This call used to read the trace buffer.
 	netMasterTraceEventGet					// get trace event by index
 
-	} NetMasterEnum;
+	} _JDK_ENUM(NetMasterEnum);
 	
 	
 typedef struct NetMasterPBType {
@@ -643,7 +643,7 @@
 	netSettingConfigTable					// used internally by NetLib - NOT FOR USE BY
 													//  APPLICATIONS!!
 
-	} NetSettingEnum;
+	} _JDK_ENUM(NetSettingEnum);
 
 
 //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@@ -805,7 +805,7 @@
 	//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 	netIFSettingCustom = 0x8000
 	
-	} NetIFSettingEnum;
+	} _JDK_ENUM(NetIFSettingEnum);
 
 
 
@@ -820,7 +820,7 @@
 	netRadioStateOnNotConnected,			// scanning
 	netRadioStateOnConnected,				// have channel
 	netRadioStateOffConnected
-	} NetRadioStateEnum; 
+	} _JDK_ENUM(NetRadioStateEnum); 
 
 
 
@@ -1002,7 +1002,7 @@
 //  table in NetDispatch.c!!!
 //-----------------------------------------------------------------------------
 
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(_JDK)
 
 #define netLibTrapAddrINToA					(sysLibTrapCustom)
 #define netLibTrapAddrAToIN					(sysLibTrapCustom+1)
@@ -1175,7 +1175,7 @@
 	netLibTrapScriptExecute,
 	
 	netLibTrapLast
-	} NetLibTrapNumberEnum;
+	} _JDK_ENUM(NetLibTrapNumberEnum);
 
 #endif
 
diff -NaBbur include/Core/System/OverlayMgr.h //r/palm/sdk-3.5/include/Core/System/OverlayMgr.h
--- include/Core/System/OverlayMgr.h	Thu Feb 24 16:55:42 2000
+++ //r/palm/sdk-3.5/include/Core/System/OverlayMgr.h	Tue Oct  3 17:39:37 2000
@@ -97,7 +97,7 @@
 // Selectors used for getting to the right Overlay Manager routine via
 // the OmDispatch trap.
 
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(_JDK)
 
 #define omInit							0
 #define omOpenOverlayDatabase		1
@@ -128,7 +128,7 @@
 	
 	omMaxSelector = omGetRoutineAddress,
 	omBigSelector = 0x7FFF	// Force OmSelector to be 16 bits.
-} OmSelector;
+} _JDK_ENUM(OmSelector);
 
 #endif
 
diff -NaBbur include/Core/System/Preferences.h //r/palm/sdk-3.5/include/Core/System/Preferences.h
--- include/Core/System/Preferences.h	Thu Feb 24 16:55:44 2000
+++ //r/palm/sdk-3.5/include/Core/System/Preferences.h	Fri Aug 11 10:18:26 2000
@@ -126,7 +126,7 @@
 	// Always add new countries at the end!
 	// Always update OverlayMgr.cp!
 	
-	} CountryType;
+	} _JDK_ENUM(CountryType);
 	
 #define countryFirst		cAustralia
 #define countryLast		cTaiwan
@@ -150,7 +150,7 @@
 	// Always update OverlayMgr.cp!
 	
 	languageLast = lDutch
-	} LanguageType;
+	} _JDK_ENUM(LanguageType);
 	
 #define languageCount		(languageLast - languageFirst + 1)
 
@@ -158,7 +158,7 @@
 	{
 	unitsEnglish = 0,		// Feet, yards, miles, gallons, pounds, slugs, etc.
 	unitsMetric				//	Meters, liters, grams, newtons, etc.
-	} MeasurementSystemType;
+	} _JDK_ENUM(MeasurementSystemType);
 
 
 //	These sound levels must corrospond to positions in the popup lists
@@ -167,7 +167,7 @@
 typedef enum {
 	slOn = 0,
 	slOff = 1
-	} SoundLevelTypeV20;
+	} _JDK_ENUM(SoundLevelTypeV20);
 	
 
 #define countryNameLength		20
@@ -204,7 +204,7 @@
 	alEventsOnly,							// Show an animation for an event
 	alEventsAndRandom,					// Also show random animation
 	alEventsAndMoreRandom				// Show random animations more frequently
-	} AnimationLevelType;
+	} _JDK_ENUM(AnimationLevelType);
 
 
 typedef enum 
@@ -263,7 +263,7 @@
 	prefShowPrivateRecords,				// returns privateRecordViewEnum
 	prefAutoOffDurationSecs				// auto-off duration in seconds
 
-	} SystemPreferencesChoice;
+	} _JDK_ENUM(SystemPreferencesChoice);
 	
 	
 typedef struct {
diff -NaBbur include/Core/System/Rect.h //r/palm/sdk-3.5/include/Core/System/Rect.h
--- include/Core/System/Rect.h	Thu Feb 24 16:55:44 2000
+++ //r/palm/sdk-3.5/include/Core/System/Rect.h	Thu Sep  7 17:46:08 2000
@@ -68,10 +68,11 @@
 extern Boolean RctPtInRectangle (Coord x, Coord y, const RectangleType *rP)
 							SYS_TRAP(sysTrapRctPtInRectangle);
 
+#ifndef _JDK
 extern void RctGetIntersection (const RectangleType *r1P, const RectangleType *r2P, 
 	RectangleType *r3P)
 							SYS_TRAP(sysTrapRctGetIntersection);
-
+#endif
 
 #ifdef __cplusplus
 }
diff -NaBbur include/Core/System/ScriptPlugin.h //r/palm/sdk-3.5/include/Core/System/ScriptPlugin.h
--- include/Core/System/ScriptPlugin.h	Thu Feb 24 16:55:44 2000
+++ //r/palm/sdk-3.5/include/Core/System/ScriptPlugin.h	Fri Aug 11 11:47:12 2000
@@ -33,7 +33,7 @@
 	scptLaunchCmdDoNothing = sysAppLaunchCmdCustomBase, 
 	scptLaunchCmdListCmds,
 	scptLaunchCmdExecuteCmd
-} ScriptPluginLaunchCodesEnum;
+} _JDK_ENUM(ScriptPluginLaunchCodesEnum);
 
 // Commands for the callback selector function
 //
diff -NaBbur include/Core/System/SerialDrvr.h //r/palm/sdk-3.5/include/Core/System/SerialDrvr.h
--- include/Core/System/SerialDrvr.h	Thu Feb 24 16:55:44 2000
+++ //r/palm/sdk-3.5/include/Core/System/SerialDrvr.h	Fri Aug 11 12:05:14 2000
@@ -50,7 +50,7 @@
 
 // ********** Structs
 
-typedef enum DrvrIRQEnum {
+typedef enum _JDK_REN(DrvrIRQEnum) {
 	drvrIRQNone = 0x00,
 	drvrIRQ1 = 0x01,
 	drvrIRQ2 = 0x02,
@@ -59,7 +59,7 @@
 	drvrIRQ5 = 0x10,
 	drvrIRQ6 = 0x20,
 	drvrIRQOther = 0x40
-} DrvrIRQEnum;
+} _JDK_ENUM(DrvrIRQEnum);
 	
 
 // ***** Info about this particular port
@@ -78,13 +78,13 @@
 typedef DrvrInfoType *DrvrInfoPtr;
 
 
-typedef enum DrvrEntryOpCodeEnum {			// OpCodes for the entry function.
+typedef enum _JDK_REN(DrvrEntryOpCodeEnum) {			// OpCodes for the entry function.
 	drvrEntryGetUartFeatures,
 	drvrEntryGetDrvrFuncts
-} DrvrEntryOpCodeEnum;
+} _JDK_ENUM(DrvrEntryOpCodeEnum);
 
 
-typedef enum DrvrStatusEnum {
+typedef enum _JDK_REN(DrvrStatusEnum) {
 	drvrStatusCtsOn			= 0x0001,
 	drvrStatusRtsOn			= 0x0002,
 	drvrStatusDsrOn 			= 0x0004,
@@ -93,7 +93,7 @@
 	drvrStatusBreakAsserted	= 0x0020,
 	drvrStatusDataReady		= 0x0040,		// For polling mode debugger only at this time.
 	drvrStatusLineErr			= 0x0080			// For polling mode debugger only at this time.
-} DrvrStatusEnum;	
+} _JDK_ENUM(DrvrStatusEnum);	
 
 
 // ********** Entry Point Function type
diff -NaBbur include/Core/System/SerialMgr.h //r/palm/sdk-3.5/include/Core/System/SerialMgr.h
--- include/Core/System/SerialMgr.h	Thu Feb 24 16:55:46 2000
+++ //r/palm/sdk-3.5/include/Core/System/SerialMgr.h	Tue Oct  3 17:39:50 2000
@@ -164,7 +164,7 @@
 typedef SrmCallbackEntryType*	SrmCallbackEntryPtr;
 
 
-typedef enum SrmCtlEnum {
+typedef enum _JDK_REN(SrmCtlEnum) {
 	srmCtlFirstReserved = 0,		// RESERVE 0
 	
 	srmCtlSetBaudRate,				// Sets the current baud rate for the HW.
@@ -233,7 +233,7 @@
 	
 	srmCtlLAST							// ***** ADD NEW ENTRIES BEFORE THIS ONE
 	
-} SrmCtlEnum;
+} _JDK_ENUM(SrmCtlEnum);
 
 
 
@@ -254,7 +254,7 @@
 // * New Serial Manager trap selectors
 // *****************************************************************
 
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(_JDK)
 
 // The numbering of these #defines *MUST* match the sysSerialSelector in SerialMgr.c
 #define sysSerialInstall				0
@@ -314,7 +314,7 @@
 	sysSerialPrimeWakeupHandler,
 	
 	maxSerialSelector = sysSerialPrimeWakeupHandler		// Used by SerialMgrDispatch.c
-} sysSerialSelector;
+} _JDK_ENUM(sysSerialSelector);
 
 #endif
 
diff -NaBbur include/Core/System/SerialMgrOld.h //r/palm/sdk-3.5/include/Core/System/SerialMgrOld.h
--- include/Core/System/SerialMgrOld.h	Thu Feb 24 16:55:46 2000
+++ //r/palm/sdk-3.5/include/Core/System/SerialMgrOld.h	Fri Aug 11 11:48:46 2000
@@ -190,7 +190,7 @@
 	serCtlRxDisable,					// disable receiver ( for IrDA )
 
 	serCtlLAST							// ADD NEW ENTRIES BEFORE THIS ONE
-	} SerCtlEnum;
+	} _JDK_ENUM(SerCtlEnum);
 
 
 // Start of a custom op code range for licensees that wrote old serial 
diff -NaBbur include/Core/System/SerialSdrv.h //r/palm/sdk-3.5/include/Core/System/SerialSdrv.h
--- include/Core/System/SerialSdrv.h	Thu Feb 24 16:55:46 2000
+++ //r/palm/sdk-3.5/include/Core/System/SerialSdrv.h	Fri Aug 11 12:05:14 2000
@@ -31,7 +31,7 @@
 
 //  Typdefs
 
-typedef enum SdrvCtlOpCodeEnum {				// Control function opCodes
+typedef enum _JDK_REN(SdrvCtlOpCodeEnum) {				// Control function opCodes
 	sdrvOpCodeNoOp = 0, 
 	sdrvOpCodeSetBaudRate = 0x1000,			// Set baud rate
 	sdrvOpCodeSetSettingsFlags,				// Set port send/rcv settings.
@@ -62,12 +62,12 @@
 	
 	// --- Insert new control code above this line
 	sdrvOpCodeUserDef = 0x2000
-} SdrvCtlOpCodeEnum;
+} _JDK_ENUM(SdrvCtlOpCodeEnum);
 
 
 typedef void *SdrvDataPtr;
 
-#if EMULATION_LEVEL == EMULATION_NONE && !defined(__GNUC__)
+#if EMULATION_LEVEL == EMULATION_NONE && !defined(__GNUC__) && !defined(_JDK)
 
 typedef void (*SerialMgrISPProcPtr)(void *portP:__A0);
 
diff -NaBbur include/Core/System/SerialVdrv.h //r/palm/sdk-3.5/include/Core/System/SerialVdrv.h
--- include/Core/System/SerialVdrv.h	Thu Feb 24 16:55:46 2000
+++ //r/palm/sdk-3.5/include/Core/System/SerialVdrv.h	Fri Aug 11 12:05:14 2000
@@ -28,7 +28,7 @@
 
 // ********** Typedefs
 
-typedef enum VdrvCtlOpCodeEnum {				// Control function opCodes
+typedef enum _JDK_REN(VdrvCtlOpCodeEnum) {				// Control function opCodes
 	vdrvOpCodeNoOp = 0, 
 	vdrvOpCodeSetBaudRate = 0x1000,			// Set the port's baud rate.
 	vdrvOpCodeSetSettingsFlags,				// Set the ports send/rvc settings
@@ -54,7 +54,7 @@
 	
 	// --- Insert new control code above this line
 	vdrvOpCodeUserDef = 0x2000
-} VdrvCtlOpCodeEnum;
+} _JDK_ENUM(VdrvCtlOpCodeEnum);
 
 typedef void *VdrvDataPtr;
 
diff -NaBbur include/Core/System/SoundMgr.h //r/palm/sdk-3.5/include/Core/System/SoundMgr.h
--- include/Core/System/SoundMgr.h	Thu Feb 24 16:55:46 2000
+++ //r/palm/sdk-3.5/include/Core/System/SoundMgr.h	Fri Aug 11 12:05:14 2000
@@ -45,7 +45,7 @@
 //
 // Command numbers for SndCommandType's cmd field
 //
-typedef enum SndCmdIDType {
+typedef enum _JDK_REN(SndCmdIDType) {
 									
 	sndCmdFreqDurationAmp = 1,		// play a sound, blocking for the entire duration (except for zero amplitude)
 											// param1 = frequency in Hz
@@ -81,7 +81,7 @@
 											// param2 = 0
 											// param3 = 0
 
-	} SndCmdIDType;
+	} _JDK_ENUM(SndCmdIDType);
 
 
 	
@@ -105,7 +105,7 @@
 // Beep numbers used by SndSysBeep()
 //
 
-typedef enum SndSysBeepType {
+typedef enum _JDK_REN(SndSysBeepType) {
 	sndInfo = 1,
 	sndWarning,
 	sndError,
@@ -113,7 +113,7 @@
 	sndAlarm,
 	sndConfirmation,
 	sndClick
-	} SndSysBeepType;
+	} _JDK_ENUM(SndSysBeepType);
 
 
 /************************************************************
@@ -157,10 +157,10 @@
 
 
 // Commands for SndPlaySmf
-typedef enum SndSmfCmdEnum {
+typedef enum _JDK_REN(SndSmfCmdEnum) {
 	sndSmfCmdPlay = 1,					// play the selection
 	sndSmfCmdDuration						// get the duration in milliseconds of the entire track
-	} SndSmfCmdEnum;
+	} _JDK_ENUM(SndSmfCmdEnum);
 
 typedef void SndComplFuncType(void *chanP, UInt32 dwUserData);
 typedef SndComplFuncType *SndComplFuncPtr;
diff -NaBbur include/Core/System/SysEvent.h //r/palm/sdk-3.5/include/Core/System/SysEvent.h
--- include/Core/System/SysEvent.h	Thu Feb 24 16:55:48 2000
+++ //r/palm/sdk-3.5/include/Core/System/SysEvent.h	Fri Aug 11 11:50:13 2000
@@ -59,7 +59,7 @@
 	// <chg 10/9/98 SCL> Changed firstUserEvent from 32767 (0x7FFF) to 0x6000
 	// Enums are signed ints, so 32767 technically only allowed for ONE event.
 	sysEventFirstUserEvent = 0x6000
-} SysEventsEnum;
+} _JDK_ENUM(SysEventsEnum);
 
 
 
diff -NaBbur include/Core/System/SysEvtMgr.h //r/palm/sdk-3.5/include/Core/System/SysEvtMgr.h
--- include/Core/System/SysEvtMgr.h	Thu Feb 24 16:55:48 2000
+++ //r/palm/sdk-3.5/include/Core/System/SysEvtMgr.h	Thu Sep  7 17:46:11 2000
@@ -39,7 +39,7 @@
 	SetDefault,		// change default auto-off timeout to xxx seconds
 	ResetTimer		// reset the timer to the default auto-off timeout
 	
-} EvtSetAutoOffCmd;
+} _JDK_ENUM(EvtSetAutoOffCmd);
 
 
 /************************************************************
@@ -105,9 +105,10 @@
 //  and return a key event. Otherwise, it will return a simple pen down or pen
 //  up event, or put the processor to sleep for a max time of 'timeout' if 
 // no events are available. 
+#ifndef _JDK
 void				EvtGetSysEvent(SysEventType *eventP, Int32 timeout)
 						SYS_TRAP(sysTrapEvtGetSysEvent);
-
+#endif
 
 // Return true if there is a low level system event (pen or key) available
 Boolean			EvtSysEventAvail(Boolean ignorePenUps)
diff -NaBbur include/Core/System/SystemMgr.h //r/palm/sdk-3.5/include/Core/System/SystemMgr.h
--- include/Core/System/SystemMgr.h	Thu Feb 24 16:55:48 2000
+++ //r/palm/sdk-3.5/include/Core/System/SystemMgr.h	Fri Aug 11 11:51:08 2000
@@ -356,7 +356,7 @@
 //		myAppCmdDoSomethingElse,
 //		myAppCmdEtcetera
 //
-//		} MyAppCustomActionCodes;
+//		} _JDK_ENUM(MyAppCustomActionCodes);
 
 
 
@@ -794,7 +794,7 @@
 	sysBatteryKindNiMH,
 	sysBatteryKindLiIon1400,
 	sysBatteryKindLast=0xFF   // insert new battery types BEFORE this one
-	} SysBatteryKind;
+	} _JDK_ENUM(SysBatteryKind);
 	
 // Different battery states (output of hwrBattery)
 typedef enum {
@@ -802,7 +802,7 @@
 	sysBatteryStateLowBattery,
 	sysBatteryStateCritBattery,
 	sysBatteryStateShutdown
-	} SysBatteryState;
+	} _JDK_ENUM(SysBatteryState);
 
 
 // SysCreateDataBaseList can generate a list of database.
diff -NaBbur include/Core/System/TextMgr.h //r/palm/sdk-3.5/include/Core/System/TextMgr.h
--- include/Core/System/TextMgr.h	Thu Feb 24 16:55:50 2000
+++ //r/palm/sdk-3.5/include/Core/System/TextMgr.h	Fri Aug 11 11:51:22 2000
@@ -56,7 +56,7 @@
 	charEncodingUTF8,				// Encoding for Unicode
 	charEncodingCP1252,			// Windows variant of 8859-1
 	charEncodingCP932				// Windows variant of ShiftJIS
-} CharEncodingType;
+} _JDK_ENUM(CharEncodingType);
 
 // Transliteration operations for the TxtTransliterate call. We don't use
 // an enum, since each character encoding contains its own set of special
diff -NaBbur include/Core/System/TextServicesMgr.h //r/palm/sdk-3.5/include/Core/System/TextServicesMgr.h
--- include/Core/System/TextServicesMgr.h	Thu Feb 24 16:55:50 2000
+++ //r/palm/sdk-3.5/include/Core/System/TextServicesMgr.h	Tue Oct  3 17:40:26 2000
@@ -45,7 +45,7 @@
 // Selectors for routines found in the Text Services manager. The order
 // of these selectors MUST match the jump table in TextServicesMgr.c.
 
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(_JDK)
 
 #define tsmGetFepMode	0
 #define tsmSetFepMode	1
@@ -64,7 +64,7 @@
 	
 	tsmMaxSelector = tsmHandleEvent,
 	tsmBigSelector = 0x7FFF	// Force TsmSelector to be 16 bits.
-} TsmSelector;
+} _JDK_ENUM(TsmSelector);
 
 #endif
 
@@ -78,7 +78,7 @@
 	tsmFepModeCustom = 128,	// FEP-specific modes start here.
 	
 	tsmFepModeBig = 0x7fff	// Force TsmFepModeType to be 16 bits.
-} TsmFepModeType;
+} _JDK_ENUM(TsmFepModeType);
 
 
 /***********************************************************************
diff -NaBbur include/Core/System/Window.h //r/palm/sdk-3.5/include/Core/System/Window.h
--- include/Core/System/Window.h	Thu Feb 24 16:55:56 2000
+++ //r/palm/sdk-3.5/include/Core/System/Window.h	Wed Aug 30 18:00:48 2000
@@ -35,15 +35,15 @@
 #endif
 
 // enum for WinScrollRectangle
-typedef enum { winUp = 0, winDown, winLeft, winRight } WinDirectionType;
+typedef enum { winUp = 0, winDown, winLeft, winRight } _JDK_ENUM(WinDirectionType);
 
 
 // enum for WinCreateOffscreenWindow
-typedef enum { screenFormat = 0, genericFormat } WindowFormatType;
+typedef enum { screenFormat = 0, genericFormat } _JDK_ENUM(WindowFormatType);
 
 
 // enum for WinLockScreen
-typedef enum {winLockCopy, winLockErase, winLockDontCare} WinLockInitType;
+typedef enum {winLockCopy, winLockErase, winLockDontCare} _JDK_ENUM(WinLockInitType);
 
 
 // operations for the WinScreenMode function
@@ -54,7 +54,7 @@
 	winScreenModeSet,
 	winScreenModeGetSupportedDepths,
 	winScreenModeGetSupportsColor
-} WinScreenModeOperation;
+} _JDK_ENUM(WinScreenModeOperation);
 
 // Operations for the WinPalette function
 #define winPaletteGet 				0
@@ -62,10 +62,10 @@
 #define winPaletteSetToDefault	2
 
 // transfer modes for color drawing
-typedef enum {winPaint, winErase, winMask, winInvert, winOverlay, winPaintInverse, winSwap} WinDrawOperation;
+typedef enum {winPaint, winErase, winMask, winInvert, winOverlay, winPaintInverse, winSwap} _JDK_ENUM(WinDrawOperation);
 
 
-typedef enum { blackPattern, whitePattern, grayPattern, customPattern } PatternType;
+typedef enum { blackPattern, whitePattern, grayPattern, customPattern } _JDK_ENUM(PatternType);
 #define noPattern						blackPattern
 #define grayHLinePattern			0xAA
 #define grayHLinePatternOdd		0x55
@@ -74,7 +74,7 @@
 // grayUnderline means dotted current foreground color
 // solidUnderline means solid current foreground color
 // colorUnderline redundant, use solidUnderline instead
-typedef enum { noUnderline, grayUnderline, solidUnderline, colorUnderline } UnderlineModeType;
+typedef enum { noUnderline, grayUnderline, solidUnderline, colorUnderline } _JDK_ENUM(UnderlineModeType);
 
 #define WinMaxSupportedDepth	8
 #define WinNumSupportedColors 4
@@ -116,11 +116,12 @@
 
 typedef union FrameBitsType {
 	struct {
-		UInt16 cornerDiam		: 8;				// corner diameter, max 38
-		UInt16 reserved_3		: 3; 
-		UInt16 threeD			: 1;				// Draw 3D button    
-		UInt16 shadowWidth	: 2;				// Width of shadow
-		UInt16 width			: 2;				// Width frame
+		UInt16 _JDK_BF5(
+			cornerDiam	: 8,				// corner diameter, max 38
+			reserved_3	: 3, 
+			threeD		: 1,				// Draw 3D button    
+			shadowWidth	: 2,				// Width of shadow
+			width		: 2);				// Width frame
 	} bits;
 	UInt16 word;									// IMPORTANT: INITIALIZE word to zero before setting bits!
 } FrameBitsType;
@@ -142,15 +143,16 @@
 #define winDefaultDepthFlag		0xFF
 
 typedef struct WindowFlagsType {
-	UInt16 format:1;      // window format:  0=screen mode; 1=generic mode
-	UInt16 offscreen:1;   // offscreen flag: 0=onscreen ; 1=offscreen
-	UInt16 modal:1;       // modal flag:     0=modeless window; 1=modal window
-	UInt16 focusable:1;   // focusable flag: 0=non-focusable; 1=focusable
-	UInt16 enabled:1;     // enabled flag:   0=disabled; 1=enabled
-	UInt16 visible:1;     // visible flag:   0-invisible; 1=visible
-	UInt16 dialog:1;      // dialog flag:    0=non-dialog; 1=dialog
-	UInt16 freeBitmap:1;	 // free bitmap w/window: 0=don't free, 1=free
-	UInt16 reserved :8;
+	UInt16 _JDK_BF9(
+		format:1,      // window format:  0=screen mode; 1=generic mode
+		offscreen:1,   // offscreen flag: 0=onscreen ; 1=offscreen
+		modal:1,       // modal flag:     0=modeless window; 1=modal window
+		focusable:1,   // focusable flag: 0=non-focusable; 1=focusable
+		enabled:1,     // enabled flag:   0=disabled; 1=enabled
+		visible:1,     // visible flag:   0-invisible; 1=visible
+		dialog:1,      // dialog flag:    0=non-dialog; 1=dialog
+		freeBitmap:1,	 // free bitmap w/window: 0=don't free, 1=free
+		reserved :8);
 } WindowFlagsType;
 
 typedef struct WindowType {
diff -NaBbur include/Core/UI/Clipboard.h //r/palm/sdk-3.5/include/Core/UI/Clipboard.h
--- include/Core/UI/Clipboard.h	Thu Feb 24 16:55:56 2000
+++ //r/palm/sdk-3.5/include/Core/UI/Clipboard.h	Fri Aug 11 11:14:11 2000
@@ -27,7 +27,7 @@
 // Clipboard standard formats
 enum clipboardFormats { clipboardText, clipboardInk, clipboardBitmap };
 
-typedef enum clipboardFormats ClipboardFormatType;
+typedef enum clipboardFormats _JDK_ENUM(ClipboardFormatType);
 
 typedef struct {
 	MemHandle		item;
diff -NaBbur include/Core/UI/Control.h //r/palm/sdk-3.5/include/Core/UI/Control.h
--- include/Core/UI/Control.h	Thu Feb 24 16:55:58 2000
+++ //r/palm/sdk-3.5/include/Core/UI/Control.h	Fri Sep 15 18:03:14 2000
@@ -26,29 +26,30 @@
 #include <Event.h>
 
 typedef struct {
-	UInt8 usable				:1;	// set if part of ui 
-	UInt8 enabled				:1;	// set if interactable (not grayed out)
-	UInt8 visible				:1;	// set if drawn (set internally)
-	UInt8 on						:1;	// set if on (checked)
-	UInt8 leftAnchor			:1;	// set if bounds expand to the right
+	UInt16 _JDK_BF10(
+		usable			:1,	// set if part of ui 
+		enabled			:1,	// set if interactable (not grayed out)
+		visible			:1,	// set if drawn (set internally)
+		on				:1,	// set if on (checked)
+		leftAnchor		:1,	// set if bounds expand to the right
 	                        		// clear if bounds expand to the left
-   UInt8 frame					:3;
-	UInt8 drawnAsSelected	:1;	// support for old-style graphic controls
+		frame			:3,
+		drawnAsSelected	:1,	// support for old-style graphic controls
 											// where control overlaps a bitmap
-	UInt8 graphical			:1;	// set if images are used instead of text
-	UInt8 vertical				:1;	// true for vertical sliders
-	UInt8 reserved				:5;
+		graphical		:1,	// set if images are used instead of text
+		vertical		:1,	// true for vertical sliders
+		reserved		:5);
 } ControlAttrType;
 
 
 enum controlStyles {buttonCtl, pushButtonCtl, checkboxCtl, popupTriggerCtl,
 						  selectorTriggerCtl, repeatingButtonCtl, sliderCtl,
 						  feedbackSliderCtl };
-typedef enum controlStyles ControlStyleType;
+typedef enum controlStyles _JDK_ENUM(ControlStyleType);
 
 enum buttonFrames {noButtonFrame, standardButtonFrame, boldButtonFrame,
 						 rectangleButtonFrame};
-typedef enum buttonFrames ButtonFrameType;
+typedef enum buttonFrames _JDK_ENUM(ButtonFrameType);
 
 
 typedef struct ControlType {
@@ -162,12 +163,13 @@
 extern Boolean CtlValidatePointer (const ControlType *controlP)
 							SYS_TRAP(sysTrapCtlValidatePointer);
 
+#ifndef _JDK
 extern ControlType *CtlNewControl (void **formPP, UInt16 ID, 
  	ControlStyleType style, const Char *textP, 
 	Coord x, Coord y, Coord width, Coord height, 
 	FontID font, UInt8 group, Boolean leftAnchor)
 							SYS_TRAP(sysTrapCtlNewControl);
-
+#endif
 extern GraphicControlType *CtlNewGraphicControl (void **formPP, UInt16 ID, 
    ControlStyleType style, DmResID bitmapID, DmResID selectedBitmapID, 
    Coord x, Coord y, Coord width, Coord height, 
diff -NaBbur include/Core/UI/Day.h //r/palm/sdk-3.5/include/Core/UI/Day.h
--- include/Core/UI/Day.h	Thu Feb 24 16:55:58 2000
+++ //r/palm/sdk-3.5/include/Core/UI/Day.h	Fri Aug 11 11:14:52 2000
@@ -28,7 +28,7 @@
 	selectDayByDay,		// return d/m/y
 	selectDayByWeek,		// return d/m/y with d as same day of the week
 	selectDayByMonth		// return d/m/y with d as same day of the month
-	} SelectDayType;
+	} _JDK_ENUM(SelectDayType);
 
 typedef struct DaySelectorType
 	{
diff -NaBbur include/Core/UI/Event.h //r/palm/sdk-3.5/include/Core/UI/Event.h
--- include/Core/UI/Event.h	Thu Feb 24 16:55:58 2000
+++ //r/palm/sdk-3.5/include/Core/UI/Event.h	Thu Sep  7 17:46:12 2000
@@ -83,7 +83,7 @@
 	// <chg 10/9/98 SCL> Changed firstUserEvent from 32767 (0x7FFF) to 0x6000
 	// Enums are signed ints, so 32767 technically only allowed for ONE event.
 	firstUserEvent = 0x6000
-} eventsEnum;
+} _JDK_ENUM(eventsEnum);
 
 
 // The event record.
@@ -310,10 +310,10 @@
 
 void     EvtCopyEvent (const EventType *source, EventType *dest)
                      SYS_TRAP(sysTrapEvtCopyEvent);
-
+#ifndef _JDK
 void     EvtGetEvent (EventType *event, Int32 timeout)
                      SYS_TRAP(sysTrapEvtGetEvent);
-
+#endif
 Boolean  EvtEventAvail (void)
                      SYS_TRAP(sysTrapEvtEventAvail);
 
diff -NaBbur include/Core/UI/Field.h //r/palm/sdk-3.5/include/Core/UI/Field.h
--- include/Core/UI/Field.h	Thu Feb 24 16:55:58 2000
+++ //r/palm/sdk-3.5/include/Core/UI/Field.h	Fri Aug 11 11:15:41 2000
@@ -30,13 +30,13 @@
 
 // kind alignment values
 enum justifications {leftAlign, centerAlign, rightAlign};
-typedef enum justifications JustificationType;
+typedef enum justifications _JDK_ENUM(JustificationType);
 
 
 #define undoBufferSize 100
 
 typedef enum { undoNone, undoTyping, undoBackspace, undoDelete,
-					undoPaste, undoCut, undoInput } UndoMode;
+					undoPaste, undoCut, undoInput } _JDK_ENUM(UndoMode);
 
 typedef struct {
 	UndoMode		mode;
diff -NaBbur include/Core/UI/Form.h //r/palm/sdk-3.5/include/Core/UI/Form.h
--- include/Core/UI/Form.h	Thu Feb 24 16:56:00 2000
+++ //r/palm/sdk-3.5/include/Core/UI/Form.h	Wed Sep 13 16:19:47 2000
@@ -45,7 +45,7 @@
 	confirmationAlert,
 	warningAlert,
 	errorAlert };
-typedef enum alertTypes AlertType;
+typedef enum alertTypes _JDK_ENUM(AlertType);
 
 typedef struct {
 	UInt16		alertType;
@@ -71,12 +71,13 @@
 	frmGraffitiStateObj,
 	frmGadgetObj,
 	frmScrollBarObj };
-typedef enum formObjects FormObjectKind;
+typedef enum formObjects _JDK_ENUM(FormObjectKind);
 
 
 typedef struct {
-	UInt16 usable			:1;	// Set if part of ui 
-	UInt16 reserved		:15;	// pad it out
+	UInt16 _JDK_BF2(
+		usable			:1,	// Set if part of ui 
+		reserved		:15);	// pad it out
 } FormObjAttrType;
 
 
@@ -88,10 +89,11 @@
 
 
 typedef struct {
-	UInt16 usable			:1;	// Set if part of ui - "should be drawn"
-	UInt16 extended		:1;	// Set if the structure is an "Extended" gadget (i.e., the 'handler' field is present)
-	UInt16 visible			:1;	// Set if drawn - "has been drawn" or "must do work to erase"
-	UInt16 reserved		:13;	// pad it out
+	UInt16 _JDK_BF4(
+		usable			:1,	// Set if part of ui - "should be drawn"
+		extended		:1,	// Set if the structure is an "Extended" gadget (i.e., the 'handler' field is present)
+		visible			:1,	// Set if drawn - "has been drawn" or "must do work to erase"
+		reserved		:13);	// pad it out
 } FormGadgetAttrType;
 
 struct FormType; // forward reference to FormType so we can declare the handler type:
@@ -195,17 +197,18 @@
 
 
 typedef struct {
-	UInt16 usable			:1;	// Set if part of ui 
-	UInt16 enabled			:1;	// Set if interactable (not grayed out)
-	UInt16 visible			:1;	// Set if drawn, used internally
-	UInt16 dirty			:1;	// Set if dialog has been modified
-	UInt16 saveBehind		:1;	// Set if bits behind form are save when form ids drawn
-	UInt16 graffitiShift	:1;   // Set if graffiti shift indicator is supported
-	UInt16 globalsAvailable:1; // Set by Palm OS if globals are available for the
+	UInt16 _JDK_BF10(
+		usable			:1,	// Set if part of ui 
+		enabled			:1,	// Set if interactable (not grayed out)
+		visible			:1,	// Set if drawn, used internally
+		dirty			:1,	// Set if dialog has been modified
+		saveBehind		:1,	// Set if bits behind form are save when form ids drawn
+		graffitiShift	:1,   // Set if graffiti shift indicator is supported
+		globalsAvailable:1, // Set by Palm OS if globals are available for the
 										// form event handler
-	UInt16 doingDialog	:1;	// FrmDoDialog is using for nested event loop
-	UInt16 exitDialog		:1;	// tells FrmDoDialog to bail out and stop using this form
-	UInt16 reserved		:7;	// pad to 16
+		doingDialog	:1,	// FrmDoDialog is using for nested event loop
+		exitDialog		:1,	// tells FrmDoDialog to bail out and stop using this form
+		reserved		:7);	// pad to 16
 	UInt16 reserved2;				// FormAttrType now explicitly 32-bits wide.
 } FormAttrType;
 
diff -NaBbur include/Core/UI/GraffitiReference.h //r/palm/sdk-3.5/include/Core/UI/GraffitiReference.h
--- include/Core/UI/GraffitiReference.h	Thu Feb 24 16:56:00 2000
+++ //r/palm/sdk-3.5/include/Core/UI/GraffitiReference.h	Fri Aug 11 11:17:03 2000
@@ -25,7 +25,7 @@
 typedef enum 
 	{
 	referenceDefault = 0xff		// based on graffiti mode
-	} ReferenceType;
+	} _JDK_ENUM(ReferenceType);
 
 /************************************************************
  * Graffiti Reference procedures
diff -NaBbur include/Core/UI/GraffitiShift.h //r/palm/sdk-3.5/include/Core/UI/GraffitiShift.h
--- include/Core/UI/GraffitiShift.h	Thu Feb 24 16:56:00 2000
+++ //r/palm/sdk-3.5/include/Core/UI/GraffitiShift.h	Fri Aug 11 11:17:13 2000
@@ -32,7 +32,7 @@
 					gsiShiftExtended,			// extented punctuation shift
 					gsiShiftUpper,				// alpha upper case shift
 					gsiShiftLower	 			// alpha lower case
-				 } GsiShiftState;
+				 } _JDK_ENUM(GsiShiftState);
 
 
 #ifdef __cplusplus
diff -NaBbur include/Core/UI/Keyboard.h //r/palm/sdk-3.5/include/Core/UI/Keyboard.h
--- include/Core/UI/Keyboard.h	Thu Feb 24 16:56:00 2000
+++ //r/palm/sdk-3.5/include/Core/UI/Keyboard.h	Fri Aug 11 11:17:37 2000
@@ -34,7 +34,7 @@
 	kbdNumbersAndPunc = 1, 
 	kbdAccent = 2,
 	kbdDefault = 0xff		// based on graffiti mode (usually alphaKeyboard)
-	} KeyboardType;
+	} _JDK_ENUM(KeyboardType);
 
 
 /************************************************************
diff -NaBbur include/Core/UI/Menu.h //r/palm/sdk-3.5/include/Core/UI/Menu.h
--- include/Core/UI/Menu.h	Thu Feb 24 16:56:02 2000
+++ //r/palm/sdk-3.5/include/Core/UI/Menu.h	Thu Sep  7 17:45:58 2000
@@ -42,7 +42,7 @@
 	menuCmdBarResultChar,			// char to send (with commandKeyMask bit set)
 	menuCmdBarResultMenuItem,		// id of the menu item
 	menuCmdBarResultNotify			// Nofication Manager notification type
-} MenuCmdBarResultType;
+} _JDK_ENUM(MenuCmdBarResultType);
 	
 // maximum length of the prompt string to display in the command bar
 #define menuCmdBarMaxTextLength 20
@@ -89,8 +89,8 @@
 typedef struct {
 	UInt16					id;				// id of the menu item
 	Char						command;			// command key
-	UInt8						hidden: 1;		// true if menu item is hidden
-	UInt8 					reserved: 7;   
+	UInt8 _JDK_BF2(			hidden: 1,		// true if menu item is hidden
+		 					reserved: 7);   
 	Char *					itemStr;			// string to be displayed
 } MenuItemType;
 
@@ -101,18 +101,20 @@
 	WinHandle				bitsBehind;		// saving bits behind pull-down menu
 	RectangleType			titleBounds;	// bounds of the title in menu bar
 	Char *					title;			// menu title displayed in menu bar
-	UInt16					hidden: 1;		// true if pulldown is hidden
-	UInt16					numItems: 15;	// number of items in the menu
+	UInt16 _JDK_BF2(		hidden: 1,		// true if pulldown is hidden
+							numItems: 15);	// number of items in the menu
 	MenuItemType *			items;			// array of menu items
 } MenuPullDownType;
 
 typedef MenuPullDownType *MenuPullDownPtr;
 
 typedef struct {
-	UInt16 visible			:1;			// Set if menu bar is drawn
-	UInt16 commandPending	:1;			// Set if next key is a command
-	UInt16 insPtEnabled	:1;			// Set if insPt was on when menu was drawn
-	UInt16 needsRecalc :1;				// if set then recalc menu dimensions
+	UInt16 _JDK_BF5(
+		visible			:1,			// Set if menu bar is drawn
+		commandPending	:1,			// Set if next key is a command
+		insPtEnabled	:1,			// Set if insPt was on when menu was drawn
+		needsRecalc 	:1,
+		reserved		:12);				// if set then recalc menu dimensions
 } MenuBarAttrType;
 
 typedef struct {
@@ -159,11 +161,11 @@
 
 extern void MenuSetActiveMenuRscID (UInt16 resourceId)
 							SYS_TRAP(sysTrapMenuSetActiveMenuRscID);
-							
+#ifndef _JDK
 extern Err MenuCmdBarAddButton(UInt8 where, UInt16 bitmapId,
 						MenuCmdBarResultType resultType, UInt32 result, Char *nameP)
 							SYS_TRAP(sysTrapMenuCmdBarAddButton);
-
+#endif
 extern Boolean MenuCmdBarGetButtonData(Int16 buttonIndex, UInt16 *bitmapIdP, 
 						MenuCmdBarResultType *resultTypeP, UInt32 *resultP, Char *nameP)
 							SYS_TRAP(sysTrapMenuCmdBarGetButtonData);
diff -NaBbur include/Core/UI/PrivateRecords.h //r/palm/sdk-3.5/include/Core/UI/PrivateRecords.h
--- include/Core/UI/PrivateRecords.h	Thu Feb 24 16:56:02 2000
+++ //r/palm/sdk-3.5/include/Core/UI/PrivateRecords.h	Fri Aug 11 12:07:03 2000
@@ -19,11 +19,11 @@
 #include <CoreTraps.h>
 
 // Defines needed for hidden record visual determination.
-typedef enum privateRecordViewEnum {
+typedef enum _JDK_REN(privateRecordViewEnum) {
 showPrivateRecords = 0x00,
 maskPrivateRecords,
 hidePrivateRecords
-} privateRecordViewEnum;
+} _JDK_ENUM(privateRecordViewEnum);
 
 //-----------------------------------------------------------------------
 // Prototypes
diff -NaBbur include/Core/UI/ScrollBar.h //r/palm/sdk-3.5/include/Core/UI/ScrollBar.h
--- include/Core/UI/ScrollBar.h	Thu Feb 24 16:56:02 2000
+++ //r/palm/sdk-3.5/include/Core/UI/ScrollBar.h	Wed Sep 13 16:29:30 2000
@@ -23,15 +23,16 @@
 #include <Event.h>
 
 typedef enum { sclUpArrow, sclDownArrow, sclUpPage, sclDownPage, sclCar } 
-	ScrollBarRegionType;
+	_JDK_ENUM(ScrollBarRegionType);
 
 
 typedef struct {
-	UInt16 usable			:1;		// Set if part of ui 
-	UInt16 visible			:1;		// Set if drawn, used internally
-	UInt16 hilighted		:1;		// Set if region is hilighted
-	UInt16 shown			:1;		// Set if drawn and maxValue > minValue
-	UInt16 activeRegion	:4;		// ScrollBarRegionType
+	UInt16 _JDK_BF5(
+		usable			:1,		// Set if part of ui 
+		visible			:1,		// Set if drawn, used internally
+		hilighted		:1,		// Set if region is hilighted
+		shown			:1,		// Set if drawn and maxValue > minValue
+		activeRegion	:4);	// ScrollBarRegionType
 } ScrollBarAttrType;
 
 
diff -NaBbur include/Core/UI/Table.h //r/palm/sdk-3.5/include/Core/UI/Table.h
--- include/Core/UI/Table.h	Thu Feb 24 16:56:04 2000
+++ //r/palm/sdk-3.5/include/Core/UI/Table.h	Fri Aug 11 11:29:44 2000
@@ -45,7 +45,7 @@
                        timeTableItem,
                        narrowTextTableItem
                        };
-typedef enum tableItemStyles TableItemStyleType;
+typedef enum tableItemStyles _JDK_ENUM(TableItemStyleType);
 
 
 typedef struct {
diff -NaBbur include/Core/UI/UIColor.h //r/palm/sdk-3.5/include/Core/UI/UIColor.h
--- include/Core/UI/UIColor.h	Thu Feb 24 16:56:04 2000
+++ //r/palm/sdk-3.5/include/Core/UI/UIColor.h	Fri Aug 11 12:07:03 2000
@@ -25,7 +25,7 @@
 
 #include <Window.h>
 
-typedef enum UIColorTableEntries {
+typedef enum _JDK_REN(UIColorTableEntries) {
 	UIObjectFrame = 0,
 	UIObjectFill,
 	UIObjectForeground,
@@ -64,7 +64,7 @@
 	UIWarning,
 
 	UILastColorTableEntry
-} UIColorTableEntries;
+} _JDK_ENUM(UIColorTableEntries);
 
 
 
diff -NaBbur include/Libraries/INet/INetMgr.h //r/palm/sdk-3.5/include/Libraries/INet/INetMgr.h
--- include/Libraries/INet/INetMgr.h	Thu Feb 24 16:56:08 2000
+++ //r/palm/sdk-3.5/include/Libraries/INet/INetMgr.h	Tue Oct  3 17:41:01 2000
@@ -277,7 +277,7 @@
 	
 	inetSchemeFirst = inetSchemeHTTP,		// first one
 	inetSchemeLast	= inetSchemeMail			// last one
-	} INetSchemeEnum;
+	} _JDK_ENUM(INetSchemeEnum);
 
 
 /********************************************************************
@@ -352,13 +352,13 @@
 	inetContentTypeApplicationCML,
 	inetContentTypeImagePalmOS,
 	inetContentTypeOther
-	} INetContentTypeEnum;
+	} _JDK_ENUM(INetContentTypeEnum);
 	
 typedef enum {
 	inetCompressionTypeNone = 0,
 	inetCompressionTypeBitPacked,
 	inetCompressionTypeLZ77
-	} INetCompressionTypeEnum;
+	} _JDK_ENUM(INetCompressionTypeEnum);
 
 /********************************************************************
  * Proxy Types
@@ -366,7 +366,7 @@
 typedef enum {
 	inetProxyNone = 0,							// no proxy
 	inetProxyCTP = 1								// CTP (Jerry) proxy
-	} INetProxyEnum;
+	} _JDK_ENUM(INetProxyEnum);
 
 
 
@@ -400,7 +400,7 @@
 	inetSettingUserName,
 
 	inetSettingLast
-	} INetSettingEnum;
+	} _JDK_ENUM(INetSettingEnum);
 
 
 /********************************************************************
@@ -430,7 +430,7 @@
 	inetSockSettingContentVersion,			// (R) UInt32, version number for content
 
 	inetSockSettingLast
-	} INetSockSettingEnum;
+	} _JDK_ENUM(INetSockSettingEnum);
 
 
 
@@ -455,7 +455,7 @@
 	inetStatusPrvInvalid = 30					// internal value, not
 													// returned by INetMgr. Should
 													// be last.
-	} INetStatusEnum;
+	} _JDK_ENUM(INetStatusEnum);
 
 
 
@@ -540,7 +540,7 @@
 	inetHTTPAttrReqSize							// (R) UInt32 size of request sent
 	
 	
-	} INetHTTPAttrEnum;
+	} _JDK_ENUM(INetHTTPAttrEnum);
 
 
 
@@ -595,13 +595,13 @@
 	wiCmdEnabled,
 	wiCmdSetLocation,
 	wiCmdErase
-} WiCmdEnum;
+} _JDK_ENUM(WiCmdEnum);
 
 /********************************************************************
  * INet Library functions. 
  ********************************************************************/
 
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(_JDK)
 
 #define inetLibTrapSettingGet					(sysLibTrapCustom)
 #define inetLibTrapSettingSet					(sysLibTrapCustom+1)
@@ -728,7 +728,7 @@
 	inetLibTrapCheckAntennaState,
 
 	inetLibTrapLast
-	} INetLibTrapNumberEnum;
+	} _JDK_ENUM(INetLibTrapNumberEnum);
 
 #endif
 
diff -NaBbur include/Libraries/LibTraps.h //r/palm/sdk-3.5/include/Libraries/LibTraps.h
--- include/Libraries/LibTraps.h	Thu Feb 24 16:56:08 2000
+++ //r/palm/sdk-3.5/include/Libraries/LibTraps.h	Tue Oct  3 17:40:45 2000
@@ -30,7 +30,7 @@
 // Library traps start here and go up by 1's
 #define	sysLibTrapBase		0xA800
 
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(_JDK)
 
 #define sysLibTrapName		0xA800
 #define sysLibTrapOpen		0xA801
@@ -48,7 +48,7 @@
 	sysLibTrapSleep,
 	sysLibTrapWake,
 	sysLibTrapCustom
-	} SysLibTrapNumber;
+	} _JDK_ENUM(SysLibTrapNumber);
 
 #endif
 
diff -NaBbur include/Libraries/PalmOSGlue/FntGlue.h //r/palm/sdk-3.5/include/Libraries/PalmOSGlue/FntGlue.h
--- include/Libraries/PalmOSGlue/FntGlue.h	Thu Feb 24 16:56:08 2000
+++ //r/palm/sdk-3.5/include/Libraries/PalmOSGlue/FntGlue.h	Fri Aug 11 11:53:59 2000
@@ -26,7 +26,7 @@
 	defaultBoldFont,
 	defaultSystemFont
 };
-typedef enum fontDefaults FontDefaultType;
+typedef enum fontDefaults _JDK_ENUM(FontDefaultType);
 
 #ifdef __cplusplus
 	extern "C" {
diff -NaBbur include/PalmOS.h //r/palm/sdk-3.5/include/PalmOS.h
--- include/PalmOS.h	Thu Feb 24 16:56:12 2000
+++ //r/palm/sdk-3.5/include/PalmOS.h	Tue Aug 29 12:00:38 2000
@@ -21,6 +21,22 @@
 #ifndef	__PALMOS_H__ 
 #define	__PALMOS_H__ 
 
+#ifdef _JDK
+#error	You shall not include this header directly when compiling with JDK
+#else
+#define _JDK_REN(Type)		Type
+#define _JDK_ENUM(Type)		Type
+#define _JDK_BF2(a1, a2)	a1, a2
+#define _JDK_BF3(a1, a2, a3)	a1, a2, a3
+#define _JDK_BF4(a1, a2, a3, a4)	a1, a2, a3, a4
+#define _JDK_BF5(a1, a2, a3, a4, a5)	a1, a2, a3, a4, a5
+#define _JDK_BF6(a1, a2, a3, a4, a5, a6)	a1, a2, a3, a4, a5, a6
+#define _JDK_BF7(a1, a2, a3, a4, a5, a6, a7)	a1, a2, a3, a4, a5, a6, a7
+#define _JDK_BF8(a1, a2, a3, a4, a5, a6, a7, a8)	a1, a2, a3, a4, a5, a6, a7, a8
+#define _JDK_BF9(a1, a2, a3, a4, a5, a6, a7, a8, a9)	a1, a2, a3, a4, a5, a6, a7, a8, a9
+#define _JDK_BF10(a1, a2, a3, a4, a5, a6, a7, a8, a9, aa)	a1, a2, a3, a4, a5, a6, a7, a8, a9, aa
+#endif
+
 #include <PalmTypes.h>
 #include <SystemPublic.h>
 #include <UIPublic.h>
diff -NaBbur include/PalmTypes.h //r/palm/sdk-3.5/include/PalmTypes.h
--- include/PalmTypes.h	Thu Feb 24 16:56:12 2000
+++ //r/palm/sdk-3.5/include/PalmTypes.h	Tue Oct  3 17:41:25 2000
@@ -38,7 +38,7 @@
 /************************************************************
  * Useful Macros 
  *************************************************************/
-#if defined(__GNUC__) && defined(__UNIX__)		// used to be in <BuildRules.h>
+#if defined(__GNUC__) && !defined(_JDK) && defined(__UNIX__)		// used to be in <BuildRules.h>
 	// Ensure that structure elements are 16-bit aligned
 	// Other [host] development platforms may need this as well...
 	#pragma pack(2)
