Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -20,14 +20,11 @@ CPP="$OBJCPP" CPPFLAGS="$CPPFLAGS $OBJCPPFLAGS" OBJCFLAGS="$OBJCFLAGS -Wall -fexceptions -fobjc-exceptions" OBJCFLAGS="$OBJCFLAGS -fconstant-string-class=OFConstantString" -AX_CHECK_COMPILER_FLAGS(-std=gnu99, [ - OBJCFLAGS="$OBJCFLAGS -std=gnu99" - AC_SUBST(GNU99, "-std=gnu99") -]) +AX_CHECK_COMPILER_FLAGS(-std=gnu99, [OBJCFLAGS="$OBJCFLAGS -std=gnu99"]) AX_CHECK_COMPILER_FLAGS([-fgnu89-inline -Werror], [OBJCFLAGS="$OBJCFLAGS -fgnu89-inline"]) AX_CHECK_COMPILER_FLAGS(-pipe, [OBJCFLAGS="$OBJCFLAGS -pipe"]) AX_CHECK_COMPILER_FLAGS(-fno-common, [OBJCFLAGS="$OBJCFLAGS -fno-common"]) AX_CHECK_COMPILER_FLAGS(-fno-constant-cfstrings, [ Index: src/OFString.h ================================================================== --- src/OFString.h +++ src/OFString.h @@ -18,10 +18,12 @@ #include #include #import "OFObject.h" #import "OFSerialization.h" + +#import "macros.h" @class OFConstantString; typedef uint32_t of_unichar_t; Index: src/macros.h ================================================================== --- src/macros.h +++ src/macros.h @@ -39,10 +39,16 @@ # define OF_INLINE inline # define OF_LIKELY(cond) cond # define OF_UNLIKELY(cond) cond # define OF_CONST_FUNC #endif + +#if defined(__GNUC__) +# define restrict __restrict__ +#elif __STDC_VERSION__ < 199901L +# define restrict +#endif /* Required to build universal binaries on OS X */ #if __BIG_ENDIAN__ || __LITTLE_ENDIAN__ # if __BIG_ENDIAN__ && __LITTLE_ENDIAN__ # error __BIG_ENDIAN__ and __LITTLE_ENDIAN__ defined! Index: utils/objfw-config.in ================================================================== --- utils/objfw-config.in +++ utils/objfw-config.in @@ -20,11 +20,11 @@ libdir="@libdir@" CFLAGS="" CPPFLAGS="-I@includedir@" CXXFLAGS="" OBJC="@OBJC@" -OBJCFLAGS="@GNU99@ @GNU_RUNTIME@ -fexceptions -fobjc-exceptions" +OBJCFLAGS="@GNU_RUNTIME@ -fexceptions -fobjc-exceptions" OBJCFLAGS="$OBJCFLAGS -fconstant-string-class=OFConstantString" OBJCFLAGS="$OBJCFLAGS @NO_CONST_CFSTRINGS@ @BLOCKS_FLAGS@ @NO_WARN_UNUSED@" LIB_CFLAGS="@LIB_CFLAGS@" LIB_LDFLAGS="@LIB_LDFLAGS@" LIB_PREFIX="@LIB_PREFIX@"