Bug 582189 Fix harfbuzz build issue with Sun Studio r=jfkthame a=joedrew
authorGinn Chen <ginn.chen@sun.com>
Fri, 30 Jul 2010 18:52:55 +0800
changeset 48407 acc0e7366e538acb782c3807463c7422d1ff460b
parent 48406 8832c82d90b9a86a2f1b83dc360ae7f7f8d84cfe
child 48408 a302950274d9f3dc9e6d2b57f6d39f9a87b5a22c
push id14717
push userginn.chen@sun.com
push dateFri, 30 Jul 2010 10:59:00 +0000
treeherdermozilla-central@a302950274d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjfkthame, joedrew
bugs582189
milestone2.0b3pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 582189 Fix harfbuzz build issue with Sun Studio r=jfkthame a=joedrew
gfx/harfbuzz/src/hb-font.cc
gfx/harfbuzz/src/hb-open-type-private.hh
--- a/gfx/harfbuzz/src/hb-font.cc
+++ b/gfx/harfbuzz/src/hb-font.cc
@@ -34,16 +34,18 @@
 
 #include <string.h>
 
 
 /*
  * hb_font_funcs_t
  */
 
+HB_BEGIN_DECLS
+
 static hb_codepoint_t
 hb_font_get_glyph_nil (hb_font_t *font HB_UNUSED,
 		       hb_face_t *face HB_UNUSED,
 		       const void *user_data HB_UNUSED,
 		       hb_codepoint_t unicode HB_UNUSED,
 		       hb_codepoint_t variation_selector HB_UNUSED)
 { return 0; }
 
@@ -68,16 +70,18 @@ hb_font_get_glyph_metrics_nil (hb_font_t
 static hb_position_t
 hb_font_get_kerning_nil (hb_font_t *font HB_UNUSED,
 			 hb_face_t *face HB_UNUSED,
 			 const void *user_data HB_UNUSED,
 			 hb_codepoint_t first_glyph HB_UNUSED,
 			 hb_codepoint_t second_glyph HB_UNUSED)
 { return 0; }
 
+HB_END_DECLS
+
 hb_font_funcs_t _hb_font_funcs_nil = {
   HB_REFERENCE_COUNT_INVALID, /* ref_count */
   TRUE,  /* immutable */
   {
     hb_font_get_glyph_nil,
     hb_font_get_contour_point_nil,
     hb_font_get_glyph_metrics_nil,
     hb_font_get_kerning_nil
--- a/gfx/harfbuzz/src/hb-open-type-private.hh
+++ b/gfx/harfbuzz/src/hb-open-type-private.hh
@@ -364,38 +364,38 @@ struct Sanitizer
 template <typename Type, int Bytes> class BEInt;
 
 /* LONGTERMTODO: On machines allowing unaligned access, we can make the
  * following tighter by using byteswap instructions on ints directly. */
 template <typename Type>
 class BEInt<Type, 2>
 {
   public:
-  inline class BEInt<Type,2>& operator = (Type i) { hb_be_uint16_put (v,i); return *this; }
+  inline BEInt<Type,2>& set (Type i) { hb_be_uint16_put (v,i); return *this; }
   inline operator Type () const { return hb_be_uint16_get (v); }
   inline bool operator == (const BEInt<Type, 2>& o) const { return hb_be_uint16_cmp (v, o.v); }
   inline bool operator != (const BEInt<Type, 2>& o) const { return !(*this == o); }
   private: uint8_t v[2];
 };
 template <typename Type>
 class BEInt<Type, 4>
 {
   public:
-  inline class BEInt<Type,4>& operator = (Type i) { hb_be_uint32_put (v,i); return *this; }
+  inline BEInt<Type,4>& set (Type i) { hb_be_uint32_put (v,i); return *this; }
   inline operator Type () const { return hb_be_uint32_get (v); }
   inline bool operator == (const BEInt<Type, 4>& o) const { return hb_be_uint32_cmp (v, o.v); }
   inline bool operator != (const BEInt<Type, 4>& o) const { return !(*this == o); }
   private: uint8_t v[4];
 };
 
 /* Integer types in big-endian order and no alignment requirement */
 template <typename Type>
 struct IntType
 {
-  inline void set (Type i) { v = i; }
+  inline void set (Type i) { v.set(i); }
   inline operator Type(void) const { return v; }
   inline bool operator == (const IntType<Type> &o) const { return v == o.v; }
   inline bool operator != (const IntType<Type> &o) const { return v != o.v; }
   inline bool sanitize (hb_sanitize_context_t *c) {
     TRACE_SANITIZE ();
     return likely (c->check_struct (this));
   }
   protected: