ObjFW  Check-in [18f1572e35]

Overview
Comment:Don't check for __thread if we have _Thread_local
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 18f1572e357eb922d71125b4f763253297f18f8a3748f46bf75aa876bee8613c
User & Date: js on 2015-11-21 18:02:28
Other Links: manifest | tags
Context
2015-11-21
18:35
Remove OF_NULLABLE / OF_NONNULL (check-in: d526d938d7 user: js tags: trunk)
18:02
Don't check for __thread if we have _Thread_local (check-in: 18f1572e35 user: js tags: trunk)
2015-11-05
23:35
Add lookup-asm-sparc64-elf.S (check-in: a3075d81d4 user: js tags: trunk)
Changes

Modified configure.ac from [9328b3ea2a] to [c6748f56fe].

648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
648
649
650
651
652
653
654

655
656
657
658
659
660
661







-







			], [
				AC_MSG_RESULT(yes)
				AC_DEFINE(OF_HAVE__THREAD_LOCAL, 1,
					[Whether _Thread_local works])
			])
		], [
			AC_MSG_RESULT(no)
		])

		AC_MSG_CHECKING(whether __thread works)
		AC_TRY_LINK([
			/* It seems __thread is buggy with GCC 4.1 */
			#if __GNUC__ == 4 && __GNUC_MINOR__ < 2
			# error buggy
			#endif
671
672
673
674
675
676
677
678


679
680
681
682
683
684
685
686
687
688
689
690
691

692
693
694
695
696
697
698
670
671
672
673
674
675
676

677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699







-
+
+













+







				AC_TRY_COMPILE([
					__thread int x = 0;
				], [
					x++;
				], [
					AC_MSG_RESULT(yes)
					AC_DEFINE(OF_HAVE___THREAD, 1,
						[Whether __thread works])
							[Whether __thread works]
						)
				], [
					AC_MSG_RESULT(no)
				])
				OBJCFLAGS="$old_OBJCFLAGS"
			], [
				AC_MSG_RESULT(yes)
				AC_DEFINE(OF_HAVE___THREAD, 1,
					[Whether __thread works])
			])
		], [
			AC_MSG_RESULT(no)
		])
	])
	])

	atomic_ops="none"

	AC_MSG_CHECKING(whether __sync_* works)
	AC_TRY_LINK([#include <stdint.h>], [
		int32_t i, j;
		if (__sync_add_and_fetch(&i, 1))