diff options
author | dsainty <dsainty@pkgsrc.org> | 2007-10-24 14:28:14 +0000 |
---|---|---|
committer | dsainty <dsainty@pkgsrc.org> | 2007-10-24 14:28:14 +0000 |
commit | c953b732ac9b45f3ed8550631da834cc64cb92a7 (patch) | |
tree | ac811537e3a665d0b7598011d75f97083ecd33fe /emulators | |
parent | 7927f37a67cb1d6bdbe201cc84163d98bf9ca7cc (diff) | |
download | pkgsrc-c953b732ac9b45f3ed8550631da834cc64cb92a7.tar.gz |
Fix the build of the Palm OS Emulator with GCC 4.1.2.
patch-ar was sourced from http://www.freebsd.org/cgi/cvsweb.cgi/ports/palm/pose/files/patch-SrcShared-EmPalmStructs.h
Changes to patch-ap were determined by getting gcc 3.4 and gcc 4.1.2 to
fight until the bug was forced to reveal itself!
Don't need to bump the revision. Either it built under gcc 3 and worked, or
didn't build at all under gcc 4.
Addresses PR pkg/37188.
Diffstat (limited to 'emulators')
-rw-r--r-- | emulators/palmosemulator/distinfo | 5 | ||||
-rw-r--r-- | emulators/palmosemulator/patches/patch-ap | 28 | ||||
-rw-r--r-- | emulators/palmosemulator/patches/patch-ar | 32 |
3 files changed, 58 insertions, 7 deletions
diff --git a/emulators/palmosemulator/distinfo b/emulators/palmosemulator/distinfo index 010f16e5446..16ae1721187 100644 --- a/emulators/palmosemulator/distinfo +++ b/emulators/palmosemulator/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.7 2006/06/28 15:56:10 joerg Exp $ +$NetBSD: distinfo,v 1.8 2007/10/24 14:28:14 dsainty Exp $ SHA1 (palmosemulator/emulator_src_3.5.tar.gz) = 2debd7690736397d0af41f7b2d482df65391fc65 RMD160 (palmosemulator/emulator_src_3.5.tar.gz) = fbb6761e4c43ecc9fb20d90d2ae0ec6ccf1c3f27 @@ -21,5 +21,6 @@ SHA1 (patch-al) = 50342df4bb9d020f0b72be608d0656351dae4463 SHA1 (patch-am) = 2790c8b567a94d86bced52d59cf62b4448b62731 SHA1 (patch-an) = 93e326e3ab9f532d5bab1cc987c179e8337a823d SHA1 (patch-ao) = 9ace708f71d33802059db53c9242f0d89a77e4da -SHA1 (patch-ap) = 7cb159b84f8ad0638c49285ea5140aae93623f96 +SHA1 (patch-ap) = 1fe9bf4a1d70230f2abb9375b9e439a3a163b4d7 SHA1 (patch-aq) = f3d3a6bf278f71573fb7d45021305561c3dcc114 +SHA1 (patch-ar) = 50562522b9625e034b858439bd409b177f819f85 diff --git a/emulators/palmosemulator/patches/patch-ap b/emulators/palmosemulator/patches/patch-ap index a6077279dd8..a7157991611 100644 --- a/emulators/palmosemulator/patches/patch-ap +++ b/emulators/palmosemulator/patches/patch-ap @@ -1,8 +1,26 @@ -$NetBSD: patch-ap,v 1.1 2006/04/28 13:52:06 joerg Exp $ +$NetBSD: patch-ap,v 1.2 2007/10/24 14:28:14 dsainty Exp $ ---- SrcShared/Miscellaneous.cpp.orig 2006-04-28 13:19:44.000000000 +0000 -+++ SrcShared/Miscellaneous.cpp -@@ -2687,7 +2687,7 @@ void FormatInteger (char* dest, uint32 i +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 (); @@ -11,7 +29,7 @@ $NetBSD: patch-ap,v 1.1 2006/04/28 13:52:06 joerg Exp $ if (strlen (thousands_sep) == 0) { -@@ -2747,7 +2747,7 @@ string FormatInteger (uint32 integer) +@@ -2747,7 +2747,7 @@ // Get the thousands separator character(s). struct lconv* locale_data = localeconv (); diff --git a/emulators/palmosemulator/patches/patch-ar b/emulators/palmosemulator/patches/patch-ar new file mode 100644 index 00000000000..86d0740f918 --- /dev/null +++ b/emulators/palmosemulator/patches/patch-ar @@ -0,0 +1,32 @@ +$NetBSD: patch-ar,v 1.1 2007/10/24 14:28:14 dsainty Exp $ + +Fix build with gcc41. + +--- SrcShared/EmPalmStructs.h.orig Thu Oct 5 15:19:20 2006 ++++ SrcShared/EmPalmStructs.h Thu Oct 5 15:19:43 2006 +@@ -577,9 +577,9 @@ + template <class A> \ + INLINE_ EmAlias##type<A>& EmAlias##type<A>::operator= (rhs_type val) \ + { \ +- if (sizeof (asType) == 1) A::PutByte (this->GetPtr (), (unsigned char) (asType) val); \ +- else if (sizeof (asType) == 2) A::PutWord (this->GetPtr (), (unsigned short) (asType) val); \ +- else if (sizeof (asType) == 4) A::PutLong (this->GetPtr (), (unsigned long) (asType) val); \ ++ if (sizeof (asType) == 1) A::PutByte (this->GetPtr (), (unsigned char) (asType) (long) val); \ ++ else if (sizeof (asType) == 2) A::PutWord (this->GetPtr (), (unsigned short) (asType) (long) val); \ ++ else if (sizeof (asType) == 4) A::PutLong (this->GetPtr (), (unsigned long) (asType) (long) val); \ + else BadSetter (); \ + \ + return *this; \ +@@ -589,9 +589,9 @@ + \ + INLINE_ EmProxy##type& EmProxy##type::operator= (rhs_type val) \ + { \ +- if (sizeof (asType) == 1) LAS::PutByte (this->GetPtr (), (unsigned char) (asType) val); \ +- else if (sizeof (asType) == 2) LAS::PutWord (this->GetPtr (), (unsigned short) (asType) val); \ +- else if (sizeof (asType) == 4) LAS::PutLong (this->GetPtr (), (unsigned long) (asType) val); \ ++ if (sizeof (asType) == 1) LAS::PutByte (this->GetPtr (), (unsigned char) (asType) (long) val); \ ++ else if (sizeof (asType) == 2) LAS::PutWord (this->GetPtr (), (unsigned short) (asType) (long) val); \ ++ else if (sizeof (asType) == 4) LAS::PutLong (this->GetPtr (), (unsigned long) (asType) (long) val); \ + else BadSetter (); \ + \ + return *this; \ |