From a13b023dbfd0532e8cd74c356fbbd4453d0ffaa0 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Fri, 11 Dec 2015 10:21:27 -0800 Subject: [PATCH] AIX fixes - 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 | 5 ++--- src/hb-font-private.hh | 2 +- src/hb-open-type-private.hh | 3 --- src/hb-private.hh | 2 ++ 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/check-header-guards.sh b/src/check-header-guards.sh index 9a3302c7f..09c5ea8b2 100755 --- a/src/check-header-guards.sh +++ b/src/check-header-guards.sh @@ -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 diff --git a/src/hb-font-private.hh b/src/hb-font-private.hh index 4c12e130e..9138c236d 100644 --- a/src/hb-font-private.hh +++ b/src/hb-font-private.hh @@ -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; }; diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index 5ad850bd9..1e4037805 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -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) diff --git a/src/hb-private.hh b/src/hb-private.hh index 5de1a2ba6..7afb25803 100644 --- a/src/hb-private.hh +++ b/src/hb-private.hh @@ -1005,5 +1005,7 @@ hb_options (void) return _hb_options.opts; } +/* Size signifying variable-sized array */ +#define VAR 1 #endif /* HB_PRIVATE_HH */