ObjFW  Check-in [953895c116]

Overview
Comment:Add OF_ATOMIC_OPS define to work around missing atomic ops if needed.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 953895c1169bb1d9efb85804a0d8ecb722490acf75914d591d741bea119c07e7
User & Date: js on 2010-01-29 19:31:56
Other Links: manifest | tags
Context
2010-01-30
00:45
Define OF_ATOMIC_OPS if we don't have threads.
Without threads, we just don't care about atomicity.
check-in: 1823d543f3 user: js tags: trunk
2010-01-29
19:31
Add OF_ATOMIC_OPS define to work around missing atomic ops if needed. check-in: 953895c116 user: js tags: trunk
19:29
Introduce OF_HAVE_PTHREADS define instead of #ifndef _WIN32. check-in: d08376bc1f user: js tags: trunk
Changes

Modified configure.ac from [5314e34ab4] to [a3adc0bcd8].

205
206
207
208
209
210
211

212
213

214
215
216
217
218
219
220
			have_libkern_osatomic_h="yes"
			AC_DEFINE(OF_HAVE_LIBKERN_OSATOMIC_H, 1,
				[Whether we have libkern/OSAtomic.h])])
	fi

	AC_MSG_CHECKING(for atomic operations)
	if test x"$have_gcc_atomic_ops" = x"yes"; then

		AC_MSG_RESULT(gcc builtins)
	elif test x"$have_libkern_osatomic_h" = x"yes"; then

		AC_MSG_RESULT(libkern/OSAtomic.h)
	else
		AC_MSG_RESULT(none)
		AC_MSG_ERROR(No atomic operations found! Try --disable-threads.)
	fi
fi








>


>







205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
			have_libkern_osatomic_h="yes"
			AC_DEFINE(OF_HAVE_LIBKERN_OSATOMIC_H, 1,
				[Whether we have libkern/OSAtomic.h])])
	fi

	AC_MSG_CHECKING(for atomic operations)
	if test x"$have_gcc_atomic_ops" = x"yes"; then
		AC_DEFINE(OF_ATOMIC_OPS, 1, [Whether we have atomic operations])
		AC_MSG_RESULT(gcc builtins)
	elif test x"$have_libkern_osatomic_h" = x"yes"; then
		AC_DEFINE(OF_ATOMIC_OPS, 1, [Whether we have atomic operations])
		AC_MSG_RESULT(libkern/OSAtomic.h)
	else
		AC_MSG_RESULT(none)
		AC_MSG_ERROR(No atomic operations found! Try --disable-threads.)
	fi
fi

Modified src/objfw-defs.h.in from [0ee2aeff28] to [59fa4d3305].

1

2
3
4
5
6
7
8
9
10
#undef OF_APPLE_RUNTIME

#undef OF_BIG_ENDIAN
#undef OF_GNU_RUNTIME
#undef OF_HAVE_ASPRINTF
#undef OF_HAVE_GCC_ATOMIC_OPS
#undef OF_HAVE_LIBKERN_OSATOMIC_H
#undef OF_HAVE_PTHREADS
#undef OF_PLUGINS
#undef OF_THREADS
#undef SIZE_MAX

>









1
2
3
4
5
6
7
8
9
10
11
#undef OF_APPLE_RUNTIME
#undef OF_ATOMIC_OPS
#undef OF_BIG_ENDIAN
#undef OF_GNU_RUNTIME
#undef OF_HAVE_ASPRINTF
#undef OF_HAVE_GCC_ATOMIC_OPS
#undef OF_HAVE_LIBKERN_OSATOMIC_H
#undef OF_HAVE_PTHREADS
#undef OF_PLUGINS
#undef OF_THREADS
#undef SIZE_MAX