Remove use of flexible arrays
Also remove wrong ASSERT_SIZE that would trigger only when not using flexible arrays (which was the case on win32, but not with gcc).
This commit is contained in:
parent
1cebfbb063
commit
690b919461
|
@ -11,8 +11,6 @@ AC_PROG_LIBTOOL dnl ([1.4]) Don't remove!
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
|
|
||||||
AC_C_FLEXIBLE_ARRAY_MEMBER
|
|
||||||
|
|
||||||
AC_CHECK_FUNCS(mprotect sysconf getpagesize)
|
AC_CHECK_FUNCS(mprotect sysconf getpagesize)
|
||||||
AC_CHECK_HEADERS(unistd.h sys/mman.h)
|
AC_CHECK_HEADERS(unistd.h sys/mman.h)
|
||||||
|
|
||||||
|
|
|
@ -241,7 +241,6 @@ struct OpenTypeFontFile
|
||||||
TTCHeader ttcHeader[VAR];
|
TTCHeader ttcHeader[VAR];
|
||||||
} u;
|
} u;
|
||||||
};
|
};
|
||||||
ASSERT_SIZE (OpenTypeFontFile, 4);
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* HB_OPEN_FILE_PRIVATE_HH */
|
#endif /* HB_OPEN_FILE_PRIVATE_HH */
|
||||||
|
|
|
@ -82,11 +82,7 @@
|
||||||
#define ASSERT_SIZE(_type, _size) ASSERT_STATIC (sizeof (_type) == (_size))
|
#define ASSERT_SIZE(_type, _size) ASSERT_STATIC (sizeof (_type) == (_size))
|
||||||
|
|
||||||
/* Size signifying variable-sized array */
|
/* Size signifying variable-sized array */
|
||||||
#ifdef FLEXIBLE_ARRAY_MEMBER
|
|
||||||
#define VAR FLEXIBLE_ARRAY_MEMBER
|
|
||||||
#else
|
|
||||||
#define VAR 1
|
#define VAR 1
|
||||||
#endif
|
|
||||||
|
|
||||||
#define VAR0 (VAR+0)
|
#define VAR0 (VAR+0)
|
||||||
#define ASSERT_SIZE_VAR(_type, _size, _var_type) \
|
#define ASSERT_SIZE_VAR(_type, _size, _var_type) \
|
||||||
|
|
Loading…
Reference in New Issue