mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
2.7 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/x11/mozilla/hotfix-binutils-gcc.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. #
  18. # --- ROCK-COPYRIGHT-NOTE-END ---
  19. Hotfix needed for new binutils (bug is in gcc)
  20. (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16625)
  21. --- ./content/html/style/src/nsROCSSPrimitiveValue.h.orig 2004-08-13 11:50:44.000000000 +0200
  22. +++ ./content/html/style/src/nsROCSSPrimitiveValue.h 2004-08-13 11:57:20.000000000 +0200
  23. @@ -191,27 +191,37 @@
  24. void Reset(void)
  25. {
  26. - switch (mType) {
  27. - case CSS_IDENT:
  28. + // --- see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16625 ---
  29. + //
  30. + // we can't make a switch statement here because the compiler will create a
  31. + // jump-table in .ro_data for it and cause a link error such as:
  32. + //
  33. + // # .L1035' referenced in section `.rodata' of
  34. + // # ../../dist/lib/libgkconhtmlstyle_s.a(nsROCSSPrimitiveValue.o): defined in
  35. + // # discarded section `.gnu.linkonce.t._ZN21nsROCSSPrimitiveValue5ResetEv' of
  36. + // # ../../dist/lib/libgkconhtmlstyle_s.a(nsROCSSPrimitiveValue.o)
  37. + //
  38. + // - clifford (2004-08-13)
  39. + //
  40. + if (mType == CSS_IDENT) {
  41. NS_ASSERTION(mValue.mAtom, "Null atom should never happen");
  42. NS_RELEASE(mValue.mAtom);
  43. - break;
  44. - case CSS_STRING:
  45. + }
  46. + if (mType == CSS_STRING) {
  47. NS_ASSERTION(mValue.mString, "Null string should never happen");
  48. nsMemory::Free(mValue.mString);
  49. mValue.mString = nsnull;
  50. - break;
  51. - case CSS_URI:
  52. + }
  53. + if (mType == CSS_URI) {
  54. NS_IF_RELEASE(mValue.mURI);
  55. - break;
  56. - case CSS_RECT:
  57. + }
  58. + if (mType == CSS_RECT) {
  59. NS_ASSERTION(mValue.mRect, "Null Rect should never happen");
  60. NS_RELEASE(mValue.mRect);
  61. - break;
  62. - case CSS_RGBCOLOR:
  63. + }
  64. + if (mType == CSS_RGBCOLOR) {
  65. NS_ASSERTION(mValue.mColor, "Null RGBColor should never happen");
  66. NS_RELEASE(mValue.mColor);
  67. - break;
  68. }
  69. }