AIX fixes
authorSteven R. Loomis <srloomis@us.ibm.com>
Fri, 11 Dec 2015 18:21:27 +0000 (10:21 -0800)
committerSteven R. Loomis <srloomis@us.ibm.com>
Sun, 13 Dec 2015 01:44:44 +0000 (17:44 -0800)
- use '-w' instead of '\<...\>' for check-header-guards
  grep manpage says these are the same

- put '-q' first in the grep options

- move VAR into hb-private.hh

- hb-font-private.hh - use [VAR] instead of [] for variable array

src/check-header-guards.sh
src/hb-font-private.hh
src/hb-open-type-private.hh
src/hb-private.hh

index 9a3302c..09c5ea8 100755 (executable)
@@ -9,13 +9,12 @@ stat=0
 test "x$HBHEADERS" = x && HBHEADERS=`cd "$srcdir"; find . -maxdepth 1 -name 'hb*.h'`
 test "x$HBSOURCES" = x && HBSOURCES=`cd "$srcdir"; find . -maxdepth 1 -name 'hb-*.cc' -or -name 'hb-*.hh'`
 
-
 for x in $HBHEADERS $HBSOURCES; do
        test -f "$srcdir/$x" && x="$srcdir/$x"
-       echo "$x" | grep '[^h]$' -q && continue;
+       echo "$x" | grep -q '[^h]$' && continue;
        xx=`echo "$x" | sed 's@.*/@@'`
        tag=`echo "$xx" | tr 'a-z.-' 'A-Z_'`
-       lines=`grep "\<$tag\>" "$x" | wc -l | sed 's/[  ]*//g'`
+       lines=`grep -w "$tag" "$x" | wc -l | sed 's/[   ]*//g'`
        if test "x$lines" != x3; then
                echo "Ouch, header file $x does not have correct preprocessor guards"
                stat=1
index 4c12e13..9138c23 100644 (file)
@@ -82,7 +82,7 @@ struct hb_font_funcs_t {
       HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
 #undef HB_FONT_FUNC_IMPLEMENT
     } f;
-    void (*array[]) (void);
+    void (*array[VAR]) (void);
   } get;
 };
 
index 5ad850b..1e40378 100644 (file)
@@ -103,9 +103,6 @@ static inline Type& StructAfter(TObject &X)
   static const unsigned int static_size = (size); \
   static const unsigned int min_size = (size)
 
-/* Size signifying variable-sized array */
-#define VAR 1
-
 #define DEFINE_SIZE_UNION(size, _member) \
   DEFINE_INSTANCE_ASSERTION (this->u._member.static_size == (size)); \
   static const unsigned int min_size = (size)
index 5de1a2b..7afb258 100644 (file)
@@ -1005,5 +1005,7 @@ hb_options (void)
   return _hb_options.opts;
 }
 
+/* Size signifying variable-sized array */
+#define VAR 1
 
 #endif /* HB_PRIVATE_HH */