ObjFW  Check-in [04fa3f4371]

Overview
Comment:Check if -Wshorten-64-to-32 is available.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 04fa3f4371e8b4c1fdc3c1d3d95016dc4e8a27edfa7e8be2442f0a4e6aa61c60
User & Date: js on 2011-03-23 01:08:51
Other Links: manifest | tags
Context
2011-03-23
01:14
Work around GCC bugs. check-in: 4444a8c246 user: js tags: trunk
01:08
Check if -Wshorten-64-to-32 is available. check-in: 04fa3f4371 user: js tags: trunk
01:06
Make more use of the OFObject protocol. check-in: 23acf38456 user: js tags: trunk
Changes

Modified configure.ac from [cf9accb9d4] to [56be53f0f3].

24
25
26
27
28
29
30

31
32
33
34
35
36
37

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, [
	NO_CONST_CFSTRINGS="-fno-constant-cfstrings"
	OBJCFLAGS="$OBJCFLAGS -fno-constant-cfstrings"
])

AC_SUBST(NO_CONST_CFSTRINGS)

AC_MSG_CHECKING(whether Objective C compiler supports fast enumeration)
AC_TRY_COMPILE([
	@protocol OFFastEnumeration
	- (int)countByEnumeratingWithState: (void*)state
				   objects: (id*)objects







>







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

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, [
	NO_CONST_CFSTRINGS="-fno-constant-cfstrings"
	OBJCFLAGS="$OBJCFLAGS -fno-constant-cfstrings"
])
AX_CHECK_COMPILER_FLAGS(-Wshorten-64-to-32, [OBJCFLAGS="$OBJCFLAGS -pipe"])
AC_SUBST(NO_CONST_CFSTRINGS)

AC_MSG_CHECKING(whether Objective C compiler supports fast enumeration)
AC_TRY_COMPILE([
	@protocol OFFastEnumeration
	- (int)countByEnumeratingWithState: (void*)state
				   objects: (id*)objects
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
AS_IF([test x"$objc_runtime" = x"Apple"], [
	AC_CHECK_HEADER(Foundation/NSObject.h, [
		AC_SUBST(FOUNDATION_COMPAT_M, "foundation-compat.m")
	])
])

AS_IF([test x"$GOBJC" = x"yes"], [
	OBJCFLAGS="$OBJCFLAGS -Wwrite-strings -Wshorten-64-to-32 -Wcast-align"
       	OBJCFLAGS="$OBJCFLAGS -Wpointer-arith -Werror"

	AC_MSG_CHECKING(whether gcc has bug objc/27438)
	AC_TRY_COMPILE([
		@interface OFConstantString
		{
			struct objc_class *isa;
			const char *string;







|
|







474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
AS_IF([test x"$objc_runtime" = x"Apple"], [
	AC_CHECK_HEADER(Foundation/NSObject.h, [
		AC_SUBST(FOUNDATION_COMPAT_M, "foundation-compat.m")
	])
])

AS_IF([test x"$GOBJC" = x"yes"], [
	OBJCFLAGS="$OBJCFLAGS -Wwrite-strings -Wcast-align -Wpointer-arith"
       	OBJCFLAGS="$OBJCFLAGS -Werror"

	AC_MSG_CHECKING(whether gcc has bug objc/27438)
	AC_TRY_COMPILE([
		@interface OFConstantString
		{
			struct objc_class *isa;
			const char *string;