Index: src/system/libroot/os/arch/arm/time.c
===================================================================
--- src/system/libroot/os/arch/arm/time.c	(Revision 0)
+++ src/system/libroot/os/arch/arm/time.c	(Revision 0)
@@ -0,0 +1,42 @@
+/* 
+ * Copyright 2006, Ingo Weinhold <bonefish@cs.tu-berlin.de>.
+ * Distributed under the terms of the MIT License.
+ */
+
+#include <OS.h>
+
+#include <arch_cpu.h>
+#include <libroot_private.h>
+#include <real_time_data.h>
+
+
+static struct arch_real_time_data *sRealTimeData;
+
+void
+__arch_init_time(struct real_time_data *data, bool setDefaults)
+{
+	sRealTimeData = &data->arch_data;
+
+	if (setDefaults) {
+		sRealTimeData->data[0].system_time_offset = 0;
+		sRealTimeData->system_time_conversion_factor = 1000000000LL;
+		sRealTimeData->version = 0;
+	}
+#warning todo system time
+//	__m68k_setup_system_time(&sRealTimeData->system_time_conversion_factor);
+}
+
+
+bigtime_t
+__arch_get_system_time_offset(struct real_time_data *data)
+{
+	int32 version;
+	bigtime_t offset;
+	do {
+		version = sRealTimeData->version;
+		offset = sRealTimeData->data[version % 2].system_time_offset;
+	} while (version != sRealTimeData->version);
+
+	return offset;
+}
+
Index: src/system/libroot/os/arch/arm/byteorder.S
===================================================================
--- src/system/libroot/os/arch/arm/byteorder.S	(Revision 0)
+++ src/system/libroot/os/arch/arm/byteorder.S	(Revision 0)
@@ -0,0 +1,52 @@
+/*
+** Copyright 2003, Axel D�fler, axeld@pinc-software.de. All rights reserved.
+** Distributed under the terms of the OpenBeOS License.
+*/
+
+#include <asm_defs.h>
+
+.text
+
+/* uint16 __swap_int16(uint16 value)
+ */
+FUNCTION(__swap_int16):
+		rev16 r0,r0;
+FUNCTION_END(__swap_int16)
+
+/* uint32 __swap_int32(uint32 value)
+ */
+FUNCTION(__swap_int32):
+		rev r0,r0;
+FUNCTION_END(__swap_int32)
+
+/* uint64 __swap_int64(uint64 value)
+ */
+FUNCTION(__swap_int64):
+		rev r0,r0;
+		rev r1,r1;
+		mov r12,r0;
+		mov r0,r1;
+		mov r1,r12;
+FUNCTION_END(__swap_int64)
+
+/* TODO: The following functions can surely be optimized. A simple optimization
+ * would be to define macros with the contents of the __swap_int{32,64}
+ * functions and use those instead of calling the functions.
+ */
+
+/* float __swap_float(float value)
+ */
+FUNCTION(__swap_float):
+		b		__swap_int32
+		//rts
+FUNCTION_END(__swap_float)
+
+
+/* double __swap_double(double value)
+ */
+FUNCTION(__swap_double):
+		b		__swap_int32
+		//rts
+#warning M68K: XXX:check sizeof(double)
+FUNCTION_END(__swap_double)
+
Index: src/system/libroot/os/arch/arm/stack_frame.c
===================================================================
--- src/system/libroot/os/arch/arm/stack_frame.c	(Revision 0)
+++ src/system/libroot/os/arch/arm/stack_frame.c	(Revision 0)
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de.
+ * Distributed under the terms of the MIT License.
+*/
+
+#include <SupportDefs.h>
+
+#include <libroot_private.h>
+
+
+void*
+get_stack_frame(void)
+{
+	// TODO: Implement!
+	return NULL;
+}
+
+
+void*
+__arch_get_caller(void)
+{
+	// TODO: Implement!
+	return NULL;
+}
Index: src/system/libroot/os/arch/arm/system_time.c
===================================================================
--- src/system/libroot/os/arch/arm/system_time.c	(Revision 0)
+++ src/system/libroot/os/arch/arm/system_time.c	(Revision 0)
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2006, Ingo Weinhold <bonefish@cs.tu-berlin.de>.
+ * All rights reserved. Distributed under the terms of the MIT License.
+ */
+
+#include <OS.h>
+
+#include <arch_cpu.h>
+#include <libroot_private.h>
+#include <real_time_data.h>
+
+
+static vint32 *sConversionFactor;
+
+void
+__m68k_setup_system_time(vint32 *cvFactor)
+{
+	sConversionFactor = cvFactor;
+}
+
+
+//XXX: this is a hack
+// remove me when platform code works
+int64
+__m68k_get_time_base(void)
+{
+	static uint64 time_dilation_field = 0;
+	return time_dilation_field++;
+}
+
+bigtime_t
+system_time(void)
+{
+	uint64 timeBase = __m68k_get_time_base();
+
+	uint32 cv = *sConversionFactor;
+	return (timeBase >> 32) * cv + (((timeBase & 0xffffffff) * cv) >> 32);
+}
Index: src/system/libroot/os/arch/arm/system_time_asm.S
===================================================================
--- src/system/libroot/os/arch/arm/system_time_asm.S	(Revision 0)
+++ src/system/libroot/os/arch/arm/system_time_asm.S	(Revision 0)
@@ -0,0 +1,19 @@
+/*
+** Copyright 2003, Axel D�fler, axeld@pinc-software.de. All rights reserved.
+** Distributed under the terms of the OpenBeOS License.
+*/
+
+#include <asm_defs.h>
+
+.text
+
+/* int64 __m68k_get_time_base(void)
+ */
+#if 0
+FUNCTION(__m68k_get_time_base):
+#warning M68K: implement __m68k_get_time_base()
+		clr.l	%d0
+		clr.l	%d1
+		rts
+FUNCTION_END(__m68k_get_time_base)
+#endif
Index: src/system/libroot/os/arch/arm/tls.c
===================================================================
--- src/system/libroot/os/arch/arm/tls.c	(Revision 0)
+++ src/system/libroot/os/arch/arm/tls.c	(Revision 0)
@@ -0,0 +1,53 @@
+/* 
+** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
+** Distributed under the terms of the OpenBeOS License.
+*/
+
+// ToDo: this is a dummy implementation - I've not yet gained enough knowledge
+//	to decide how this should be done, so it's just broken now (okay for single
+//	threaded apps, though).
+
+// we don't want to have the inline assembly included here
+#ifndef _NO_INLINE_ASM
+#	define _NO_INLINE_ASM 1
+#endif
+
+#include "support/TLS.h"
+#include "tls.h"
+
+
+static int32 gNextSlot = TLS_FIRST_FREE_SLOT;
+static void *gSlots[TLS_MAX_KEYS];
+
+
+int32
+tls_allocate(void)
+{
+	int32 next = atomic_add(&gNextSlot, 1);
+	if (next >= TLS_MAX_KEYS)
+		return B_NO_MEMORY;
+
+	return next;
+}
+
+
+void *
+tls_get(int32 index)
+{
+	return gSlots[index];
+}
+
+
+void **
+tls_address(int32 index)
+{
+	return &gSlots[index];
+}
+
+
+void
+tls_set(int32 index, void *value)
+{
+	gSlots[index] = value;
+}
+
Index: src/system/libroot/os/arch/arm/syscalls.inc
===================================================================
--- src/system/libroot/os/arch/arm/syscalls.inc	(Revision 0)
+++ src/system/libroot/os/arch/arm/syscalls.inc	(Revision 0)
@@ -0,0 +1,94 @@
+/*
+** Copyright 2002, Travis Geiselbrecht. All rights reserved.
+** Distributed under the terms of the NewOS License.
+*/
+
+#define FUNC(name) .align 2 ; .globl name ; .type name,@function ; name:
+
+/* lure the preprocessor to not substitute the syscall as string */
+#define IMM #
+
+#define SYSCALL0(name, n) \
+FUNC(name) \
+	move.l	IMM n,%d0		;  \
+	trap	#0		;  \
+	rts
+
+#define SYSCALL1(name, n) \
+FUNC(name) \
+	move.l	IMM n,%d0		;  \
+	trap	#0		;  \
+	rts
+
+#define SYSCALL2(name, n) \
+FUNC(name) \
+	move.l	IMM n,%d0		;  \
+	trap	#0		;  \
+	rts
+
+#define SYSCALL3(name, n) \
+FUNC(name) \
+	move.l	IMM n,%d0		;  \
+	trap	#0		;  \
+	rts
+
+#define SYSCALL4(name, n) \
+FUNC(name) \
+	move.l	IMM n,%d0		;  \
+	trap	#0		;  \
+	rts
+
+#define SYSCALL5(name, n) \
+FUNC(name) \
+	move.l	IMM n,%d0		;  \
+	trap	#0		;  \
+	rts
+
+#define SYSCALL6(name, n) \
+FUNC(name) \
+	move.l	IMM n,%d0		;  \
+	trap	#0		;  \
+	rts
+
+#define SYSCALL7(name, n) \
+FUNC(name) \
+	move.l	IMM n,%d0		;  \
+	trap	#0		;  \
+	rts
+
+#define SYSCALL8(name, n) \
+FUNC(name) \
+	move.l	IMM n,%d0		;  \
+	trap	#0		;  \
+	rts
+
+#define SYSCALL9(name, n) \
+FUNC(name) \
+	move.l	IMM n,%d0		;  \
+	trap	#0		;  \
+	rts
+
+#define SYSCALL10(name, n) \
+FUNC(name) \
+	move.l	IMM n,%d0		;  \
+	trap	#0		;  \
+	rts
+
+#define SYSCALL11(name, n) \
+FUNC(name) \
+	move.l	IMM n,%d0		;  \
+	trap	#0		;  \
+	rts
+
+#define SYSCALL12(name, n) \
+FUNC(name) \
+	move.l	IMM n,%d0		;  \
+	trap	#0		;  \
+	rts
+
+#define SYSCALL13(name, n) \
+FUNC(name) \
+	move.l	IMM n,%d0		;  \
+	trap	#0		;  \
+	rts
+
Index: src/system/libroot/os/arch/arm/Jamfile
===================================================================
--- src/system/libroot/os/arch/arm/Jamfile	(Revision 0)
+++ src/system/libroot/os/arch/arm/Jamfile	(Revision 0)
@@ -0,0 +1,18 @@
+SubDir HAIKU_TOP src system libroot os arch arm ;
+
+UsePrivateKernelHeaders ;
+UsePrivateSystemHeaders ;
+
+MergeObject os_arch_$(TARGET_ARCH).o :
+	atomic.S
+	byteorder.S
+	compatibility.c	# only here until the places where those functions are used
+					# are fixed
+	stack_frame.c
+#	systeminfo.c
+	system_time.c
+	system_time_asm.S
+	thread.c
+	time.c
+	tls.c
+;
Index: src/system/libroot/os/arch/arm/thread.c
===================================================================
--- src/system/libroot/os/arch/arm/thread.c	(Revision 0)
+++ src/system/libroot/os/arch/arm/thread.c	(Revision 0)
@@ -0,0 +1,9 @@
+#include <OS.h>
+#include "syscalls.h"
+
+
+thread_id
+find_thread(const char *name)
+{
+	return _kern_find_thread(name);
+}
Index: src/system/libroot/os/arch/arm/atomic.S.save
===================================================================
--- src/system/libroot/os/arch/arm/atomic.S.save	(Revision 0)
+++ src/system/libroot/os/arch/arm/atomic.S.save	(Revision 0)
@@ -0,0 +1,200 @@
+/*
+** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
+** Distributed under the terms of the OpenBeOS License.
+*/
+
+#include <asm_defs.h>
+
+
+
+.text
+
+/* int atomic_add(int *value, int increment)
+ */
+FUNCTION(atomic_add):
+		move.l	(4,%a7),%a0
+		move.l	(%a0),%d0
+miss1:	move.l	%d0,%d1
+		add.l	(8,%a7),%d1
+		cas.l	%d0,%d1,(%a0)
+		bne		miss1
+		// d0 = old value
+		rts
+FUNCTION_END(atomic_add)
+
+/* int atomic_and(int *value, int andValue)
+ */
+FUNCTION(atomic_and):
+		move.l	(4,%a7),%a0
+		move.l	(%a0),%d0
+miss2:	move.l	%d0,%d1
+		and.l	(8,%a7),%d1
+		cas.l	%d0,%d1,(%a0)
+		bne		miss2
+		// d0 = old value
+		rts
+FUNCTION_END(atomic_and)
+
+/* int atomic_or(int *value, int orValue)
+ */
+FUNCTION(atomic_or):
+		move.l	(4,%a7),%a0
+		move.l	(%a0),%d0
+miss3:	move.l	%d0,%d1
+		or.l	(8,%a7),%d1
+		cas.l	%d0,%d1,(%a0)
+		bne		miss3
+		rts
+FUNCTION_END(atomic_or)
+
+/* int atomic_set(int *value, int setTo)
+ */
+FUNCTION(atomic_set):
+		move.l	(4,%a7),%a0
+		move.l	(%a0),%d0
+		move.l	(8,%a7),%d1
+miss4:	cas.l	%d0,%d1,(%a0)
+		bne		miss4
+		rts
+FUNCTION_END(atomic_set)
+
+/* int atomic_test_and_set(int *value, int setTo, int testValue) 
+ */
+FUNCTION(atomic_test_and_set):
+		move.l	(4,%a7),%a0
+		move.l	(8,%a7),%d1
+		move.l	(12,%a7),%d0
+		cas.l	%d0,%d1,(%a0)
+		rts
+FUNCTION_END(atomic_test_and_set)
+
+/* int atomic_get(int *value) 
+ */
+FUNCTION(atomic_get):
+		move.l	(4,%a7),%a0
+		move.l	(%a0),%d0
+		move.l	%d0,%d1
+		cas.l	%d0,%d1,(%a0)
+		// we must use cas... so we change to the same value if matching,
+		// else we get the correct one anyway
+		rts
+FUNCTION_END(atomic_get)
+
+/* m68k elf convention is to return structs in (a0)
+ * but use d0/d1 for int64 and small structs.
+ * d0 MSB, d1 LSB
+ */
+#warning M68K: 68060 doesn't have CAS2: use spinlock ??
+/* see http://retropc.net/x68000/software/develop/as/has060/m68k.htm */
+
+/* int64	atomic_add64(vint64 *value, int64 addValue) */
+FUNCTION(atomic_add64):
+		movem.l	%d2-%d3/%a2,-(%a7)
+		move.l	(4,%a7),%a2
+		lea.l	(4,%a2),%a1
+		// addValue
+		move.l	(12,%a7),%d3	/*LSB*/
+		move.l	(8,%a7),%d2		/*MSB*/
+miss5:	// old value
+		move.l	(%a1),%d1		/*LSB*/
+		move.l	(%a2),%d0		/*MSB*/
+		add.l	%d1,%d3
+		addx.l	%d0,%d2
+		cas2.l	%d0:%d1,%d2:%d3,(%a2):(%a1)
+		bne		miss5
+		// return value d0:d1
+		movem.l	(%a7)+,%d2-%d3/%a2
+		rts
+FUNCTION_END(atomic_add64)
+
+/* int64	atomic_and64(vint64 *value, int64 andValue) */
+FUNCTION(atomic_and64):
+		movem.l	%d2-%d3/%a2,-(%a7)
+		move.l	(4,%a7),%a2
+		lea.l	(4,%a2),%a1
+		// addValue
+		move.l	(12,%a7),%d3	/*LSB*/
+		move.l	(8,%a7),%d2		/*MSB*/
+miss6:	// old value
+		move.l	(%a1),%d1		/*LSB*/
+		move.l	(%a2),%d0		/*MSB*/
+		and.l	%d1,%d3
+		and.l	%d0,%d2
+		cas2.l	%d0:%d1,%d2:%d3,(%a2):(%a1)
+		bne		miss6
+		// return value d0:d1
+		movem.l	(%a7)+,%d2-%d3/%a2
+		rts
+FUNCTION_END(atomic_and64)
+
+/* int64	atomic_or64(vint64 *value, int64 orValue) */
+FUNCTION(atomic_or64):
+		movem.l	%d2-%d3/%a2,-(%a7)
+		move.l	(4,%a7),%a2
+		lea.l	(4,%a2),%a1
+		// addValue
+		move.l	(12,%a7),%d3	/*LSB*/
+		move.l	(8,%a7),%d2		/*MSB*/
+miss7:	// old value
+		move.l	(%a1),%d1		/*LSB*/
+		move.l	(%a2),%d0		/*MSB*/
+		or.l	%d1,%d3
+		or.l	%d0,%d2
+		cas2.l	%d0:%d1,%d2:%d3,(%a2):(%a1)
+		bne		miss7
+		// return value d0:d1
+		movem.l	(%a7)+,%d2-%d3/%a2
+		rts
+FUNCTION_END(atomic_or64)
+
+/* int64	atomic_set64(vint64 *value, int64 newValue) */
+FUNCTION(atomic_set64):
+		movem.l	%d2-%d3/%a2,-(%a7)
+		move.l	(4,%a7),%a2
+		lea.l	(4,%a2),%a1
+		// new value
+		move.l	(12,%a7),%d3	/*LSB*/
+		move.l	(8,%a7),%d2		/*MSB*/
+		// old value
+		move.l	(%a1),%d1		/*LSB*/
+		move.l	(%a2),%d0		/*MSB*/
+miss8:	cas2.l	%d0:%d1,%d2:%d3,(%a2):(%a1)
+		bne		miss8
+		// return value d0:d1
+		movem.l	(%a7)+,%d2-%d3/%a2
+		rts
+FUNCTION_END(atomic_set64)
+
+/* int64	atomic_test_and_set64(vint64 *value, int64 newValue, int64 testAgainst) */
+FUNCTION(atomic_test_and_set64):
+		movem.l	%d2-%d3/%a2,-(%a7)
+		move.l	(4,%a7),%a2
+		lea.l	(4,%a2),%a1
+		// new value
+		move.l	(12,%a7),%d3	/*LSB*/
+		move.l	(8,%a7),%d2		/*MSB*/
+		// test against value
+		move.l	(20,%a7),%d1	/*LSB*/
+		move.l	(16,%a7),%d0	/*MSB*/
+		cas2.l	%d0:%d1,%d2:%d3,(%a2):(%a1)
+		// return value d0:d1
+		movem.l	(%a7)+,%d2-%d3/%a2
+		rts
+FUNCTION_END(atomic_test_and_set64)
+
+/* int64	atomic_get64(vint64 *value) */
+FUNCTION(atomic_get64):
+		movem.l	%d2-%d3/%a2,-(%a7)
+		move.l	(4,%a7),%a2
+		lea.l	(4,%a2),%a1
+		move.l	(%a1),%d1	/*LSB*/
+		move.l	(%a2),%d0		/*MSB*/
+		move.l	%d1,%d3
+		move.l	%d0,%d2
+		// we must use cas... so we change to the same value if matching,
+		// else we get the correct one anyway
+		cas2.l	%d0:%d1,%d2:%d3,(%a2):(%a1)
+		// return value
+		movem.l	(%a7)+,%d2-%d3/%a2
+		rts
+FUNCTION_END(atomic_get64)
Index: src/system/libroot/os/arch/arm/compatibility.c
===================================================================
--- src/system/libroot/os/arch/arm/compatibility.c	(Revision 0)
+++ src/system/libroot/os/arch/arm/compatibility.c	(Revision 0)
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
+ * Distributed under the terms of the MIT License.
+ */
+
+// This file includes some known R5 syscalls
+// ToDo: maybe they should indeed do something...
+
+#include <SupportDefs.h>
+
+
+int _kset_mon_limit_(int num);
+int _kset_fd_limit_(int num);
+int _kget_cpu_state_(int cpuNum);
+int _kset_cpu_state_(int cpuNum, int state);
+
+
+int
+_kset_mon_limit_(int num)
+{
+	return B_ERROR;
+}
+
+
+int
+_kset_fd_limit_(int num)
+{
+	return B_ERROR;
+}
+
+
+int
+_kget_cpu_state_(int cpuNum)
+{
+	return 1;
+}
+
+
+int
+_kset_cpu_state_(int cpuNum, int state)
+{
+	return state ? B_OK : B_ERROR;
+}
+
Index: src/system/libroot/os/arch/arm/atomic.S
===================================================================
--- src/system/libroot/os/arch/arm/atomic.S	(Revision 0)
+++ src/system/libroot/os/arch/arm/atomic.S	(Revision 0)
@@ -0,0 +1,166 @@
+#/*
+** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
+** Distributed under the terms of the OpenBeOS License.
+*/
+
+#include <asm_defs.h>
+
+
+.text
+
+/* int atomic_add(int *value, int increment)
+ */
+FUNCTION(atomic_add):
+miss1:	       	ldrex       r12, [r0]
+        	add         r2,  r12, r1
+        	strex       r3,  r2,  [r0]
+        	teq         r3,  #0
+        	bne         miss1
+        	mov         r0,  r12
+        	bx          lr
+FUNCTION_END(atomic_add)
+
+
+
+
+/* int atomic_and(int *value, int andValue)
+ */
+FUNCTION(atomic_and):
+miss2:	       	ldrex       r12, [r0]
+        	and         r2,  r12, r1
+        	strex       r3,  r2,  [r0]
+        	teq         r3,  #0
+        	bne         miss2
+        	mov         r0,  r12
+        	bx          lr
+FUNCTION_END(atomic_and)
+
+/* int atomic_or(int *value, int orValue)
+ */
+FUNCTION(atomic_or):
+miss3:	       	ldrex       r12, [r0]
+        	eor         r2,  r12, r1
+        	strex       r3,  r2,  [r0]
+        	teq         r3,  #0
+        	bne         miss3
+        	mov         r0,  r12
+        	bx          lr
+FUNCTION_END(atomic_or)
+
+/* int atomic_set(int *value, int setTo)
+ */
+FUNCTION(atomic_set):
+miss4:		ldrex   r12, [r0]
+       		strex   r3, r1, [r0]
+       		teq     r3, #0
+       		bne     miss4
+		bx	lr
+FUNCTION_END(atomic_set)
+
+/* int atomic_test_and_set(int *value, int setTo, int testValue) 
+ */
+FUNCTION(atomic_test_and_set):
+miss5:  ldrex       r12, [r0]                       @ load from the address and mark it exclusive
+        cmp         r12, r2                         @ compare the value with the comperand(r2)
+        strexeq     r3,  r1,  [r0]                  @ if they were equal, attempt to store the new value (r1)
+        bne         differ                          @ if they were not equal jump to (differ) which clears the exclusive tag on the address and returns<
+        cmp         r3,  #1                         @ check the status of the store (returned in r3)
+        beq         miss5                           @ go back to the start if it failed (0=success, 1=failure)
+        bne         same                            @ if it succeeded, jump to (same) and return. there is no need to clrex if strex succeeded
+differ: clrex                           	    @ clrex
+same:   mov         r0,  r12
+        mov         pc,  lr
+FUNCTION_END(atomic_test_and_set)
+
+/* int atomic_get(int *value) 
+ */
+/*FUNCTION(atomic_get):
+		move.l	(4,%a7),%a0
+		move.l	(%a0),%d0
+		move.l	%d0,%d1
+		cas.l	%d0,%d1,(%a0)
+		// we must use cas... so we change to the same value if matching,
+		// else we get the correct one anyway
+		rts
+FUNCTION_END(atomic_get)
+*/
+
+/* int64	atomic_add64(vint64 *value, int64 addValue) */
+//FUNCTION(atomic_add64):
+//		movem.l	%d2-%d3/%a2,-(%a7)
+//		move.l	(4,%a7),%a2
+//		lea.l	(4,%a2),%a1
+//		// addValue
+//		move.l	(12,%a7),%d3	/*LSB*/
+//		move.l	(8,%a7),%d2		/*MSB*/
+//miss5:	// old value
+//		move.l	(%a1),%d1		/*LSB*/
+//		move.l	(%a2),%d0		/*MSB*/
+//		add.l	%d1,%d3
+//		addx.l	%d0,%d2
+//		cas2.l	%d0:%d1,%d2:%d3,(%a2):(%a1)
+//		bne		miss5
+//		// return value d0:d1
+//		movem.l	(%a7)+,%d2-%d3/%a2
+//		rts
+//FUNCTION_END(atomic_add64)
+
+/* int64	atomic_and64(vint64 *value, int64 andValue) */
+//FUNCTION(atomic_and64):
+//FUNCTION_END(atomic_and64)
+
+/* int64	atomic_or64(vint64 *value, int64 orValue) */
+//FUNCTION(atomic_or64):
+//FUNCTION_END(atomic_or64)
+
+/* int64	atomic_set64(vint64 *value, int64 newValue) */
+//FUNCTION(atomic_set64):
+//		movem.l	%d2-%d3/%a2,-(%a7)
+//		move.l	(4,%a7),%a2
+//		lea.l	(4,%a2),%a1
+//		// new value
+//		move.l	(12,%a7),%d3	/*LSB*/
+//		move.l	(8,%a7),%d2		/*MSB*/
+//		// old value
+//		move.l	(%a1),%d1		/*LSB*/
+//		move.l	(%a2),%d0		/*MSB*/
+//miss8:	cas2.l	%d0:%d1,%d2:%d3,(%a2):(%a1)
+//		bne		miss8
+//		// return value d0:d1
+//		movem.l	(%a7)+,%d2-%d3/%a2
+//		rts
+//FUNCTION_END(atomic_set64)
+
+/* int64	atomic_test_and_set64(vint64 *value, int64 newValue, int64 testAgainst) */
+//FUNCTION(atomic_test_and_set64):
+//		movem.l	%d2-%d3/%a2,-(%a7)
+//		move.l	(4,%a7),%a2
+//		lea.l	(4,%a2),%a1
+//		// new value
+//		move.l	(12,%a7),%d3	/*LSB*/
+//		move.l	(8,%a7),%d2		/*MSB*/
+//		// test against value
+//		move.l	(20,%a7),%d1	/*LSB*/
+//		move.l	(16,%a7),%d0	/*MSB*/
+//		cas2.l	%d0:%d1,%d2:%d3,(%a2):(%a1)
+//		// return value d0:d1
+//		movem.l	(%a7)+,%d2-%d3/%a2
+//		rts
+//FUNCTION_END(atomic_test_and_set64)
+
+/* int64	atomic_get64(vint64 *value) */
+//FUNCTION(atomic_get64):
+//		movem.l	%d2-%d3/%a2,-(%a7)
+//		move.l	(4,%a7),%a2
+//		lea.l	(4,%a2),%a1
+//		move.l	(%a1),%d1	/*LSB*/
+//		move.l	(%a2),%d0		/*MSB*/
+//		move.l	%d1,%d3
+//		move.l	%d0,%d2
+//		// we must use cas... so we change to the same value if matching,
+//		// else we get the correct one anyway
+//		cas2.l	%d0:%d1,%d2:%d3,(%a2):(%a1)
+//		// return value
+//		movem.l	(%a7)+,%d2-%d3/%a2
+//		rts
+//FUNCTION_END(atomic_get64)
Index: src/system/libroot/posix/stdlib/strtod.c
===================================================================
--- src/system/libroot/posix/stdlib/strtod.c	(Revision 30156)
+++ src/system/libroot/posix/stdlib/strtod.c	(Arbeitskopie)
@@ -115,7 +115,7 @@
 
 #if defined(__i386__) || defined(__ia64__) || defined(__alpha__) || \
     defined(__sparc64__) || defined(__powerpc__) || defined(__POWERPC__) || \
-    defined(__m68k__) || defined(__M68K__)
+    defined(__m68k__) || defined(__M68K__)|| defined(__ARM__)
 #	include <sys/types.h>
 #	if BYTE_ORDER == BIG_ENDIAN
 #		define IEEE_BIG_ENDIAN
