$NetBSD: patch-ap,v 1.2 2007/10/24 14:28:14 dsainty Exp $ The buffer "buffer" has to be aligned on a 2 byte boundary. On an odd byte boundary we get the error at startup: Hardware exception #3 occurred while the emulator was calling the Palm OS function "DlkDispatchRequest". The emulator is now in an unstable state and will reset. An odd byte boundary (and the above error) is typical with gcc 4.1.2 on x86. --- SrcShared/Miscellaneous.cpp.orig 2002-03-30 01:11:15.000000000 +1200 +++ SrcShared/Miscellaneous.cpp 2007-10-25 02:41:24.000000000 +1300 @@ -1370,7 +1370,7 @@ char buffer[ sizeof (DlpReqHeaderType) + sizeof (DlpTinyArgWrapperType) + sizeof (DlpWriteUserInfoReqHdrType) + - dlpMaxUserNameSize]; + dlpMaxUserNameSize] __attribute__((__aligned__(2))); // Get handy pointers to all of the above. DlpReqHeaderType* reqHdr = (DlpReqHeaderType*) buffer; @@ -2687,7 +2687,7 @@ // Get the thousands separator character(s). struct lconv* locale_data = localeconv (); - char* thousands_sep = locale_data->thousands_sep; + const char* thousands_sep = locale_data->thousands_sep; if (strlen (thousands_sep) == 0) { @@ -2747,7 +2747,7 @@ // Get the thousands separator character(s). struct lconv* locale_data = localeconv (); - char* thousands_sep = locale_data->thousands_sep; + const char* thousands_sep = locale_data->thousands_sep; if (strlen (thousands_sep) == 0) {