diff -rNup newlib-1.12.0/config.sub newlib-1.12.0_patched/config.sub
--- newlib-1.12.0/config.sub	2003-08-08 15:44:48.000000000 +0530
+++ newlib-1.12.0_patched/config.sub	2006-10-04 00:22:30.000000000 +0530
@@ -214,6 +214,9 @@ case $os in
 	-psos*)
 		os=-psos
 		;;
+	-l4*)
+		os=-l4
+		;;
 	-mint | -mint[0-9]*)
 		basic_machine=m68k-atari
 		os=-mint
@@ -1007,6 +1010,10 @@ case $basic_machine in
 		basic_machine=z8k-unknown
 		os=-sim
 		;;
+	ia32-ertos-l4*)
+	  	basic_machine=i386-pc
+          	os=-l4
+	  	;;
 	none)
 		basic_machine=none-none
 		os=-none
@@ -1248,6 +1255,9 @@ case $os in
 	-kaos*)
 		os=-kaos
 		;;
+	-l4*)
+		os=-l4
+		;;
 	-none)
 		;;
 	*)
@@ -1412,6 +1422,9 @@ case $basic_machine in
 	*-atari*)
 		os=-mint
 		;;
+	ia32-ertos-l4)
+		os=-l4
+		;;
 	*)
 		os=-none
 		;;
diff -rNup newlib-1.12.0/newlib/configure.host newlib-1.12.0_patched/newlib/configure.host
--- newlib-1.12.0/newlib/configure.host	2004-02-02 22:29:51.000000000 +0530
+++ newlib-1.12.0_patched/newlib/configure.host	2006-10-04 13:47:39.000000000 +0530
@@ -129,6 +129,12 @@ case "${host_cpu}" in
 		;;
 	esac
 	;;
+## Added for pistachio
+  i386*)
+	libm_machine_dir=i386
+	machine_dir=i386
+	mach_add_setjmp=true
+        ;; 
   ia64*)
 	;;
   iq2000)
@@ -424,6 +430,9 @@ case "${host}" in
 	;;
   z8k-*-coff)
 	sys_dir=z8ksim
+        ;;
+  i386-ertos-l4)
+	sys_dir=l4
 	;;
 esac
 
@@ -637,6 +646,10 @@ case "${host}" in
   z8k-*-*)
 	syscall_dir=syscalls
 	;;
+  i386-ertos-l4)
+	syscall_dir=syscalls
+	newlib_cflags="${newlib_cflags}"
+	;;
   *)
 	newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES"
 	syscall_dir=
diff -rNup newlib-1.12.0/newlib/libc/reent/close.c newlib-1.12.0_patched/newlib/libc/reent/close.c
--- newlib-1.12.0/newlib/libc/reent/close.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/reent/close.c	2006-10-04 02:19:41.000000000 +0530
@@ -0,0 +1,58 @@
+/* Reentrant version of close system call.  */
+
+#include <reent.h>
+#include <unistd.h>
+#include <_syslist.h>
+
+/* Some targets provides their own versions of this functions.  Those
+   targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS.  */
+
+#ifdef _REENT_ONLY
+#ifndef REENTRANT_SYSCALLS_PROVIDED
+#define REENTRANT_SYSCALLS_PROVIDED
+#endif
+#endif
+
+#ifndef REENTRANT_SYSCALLS_PROVIDED
+
+/* We use the errno variable used by the system dependent layer.  */
+#undef errno
+extern int errno;
+
+/*
+FUNCTION
+	<<_close_r>>---Reentrant version of close
+	
+INDEX
+	_close_r
+
+ANSI_SYNOPSIS
+	#include <reent.h>
+	int _close_r(struct _reent *<[ptr]>, int <[fd]>);
+
+TRAD_SYNOPSIS
+	#include <reent.h>
+	int _close_r(<[ptr]>, <[fd]>)
+	struct _reent *<[ptr]>;
+	int <[fd]>;
+
+DESCRIPTION
+	This is a reentrant version of <<close>>.  It
+	takes a pointer to the global data block, which holds
+	<<errno>>.
+*/
+
+int
+_close_r (ptr, fd)
+     struct _reent *ptr;
+     int fd;
+{
+  int ret;
+
+  errno = 0;
+  if ((ret = _close (fd)) == -1 && errno != 0)
+    ptr->_errno = errno;
+  return ret;
+}
+
+#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
diff -rNup newlib-1.12.0/newlib/libc/reent/exec.c newlib-1.12.0_patched/newlib/libc/reent/exec.c
--- newlib-1.12.0/newlib/libc/reent/exec.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/reent/exec.c	2006-10-04 02:19:48.000000000 +0530
@@ -0,0 +1,145 @@
+/* Reentrant versions of execution system calls.  These
+   implementations just call the usual system calls.  */
+
+#include <reent.h>
+#include <unistd.h>
+#include <sys/wait.h>
+#include <_syslist.h>
+
+/* Some targets provides their own versions of these functions.  Those
+   targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS.  */
+
+#ifdef _REENT_ONLY
+#ifndef REENTRANT_SYSCALLS_PROVIDED
+#define REENTRANT_SYSCALLS_PROVIDED
+#endif
+#endif
+
+/* If NO_EXEC is defined, we don't need these functions.  */
+
+#if defined (REENTRANT_SYSCALLS_PROVIDED) || defined (NO_EXEC)
+
+int _dummy_exec_syscalls = 1;
+
+#else
+
+/* We use the errno variable used by the system dependent layer.  */
+#undef errno
+extern int errno;
+
+/*
+FUNCTION
+	<<_execve_r>>---Reentrant version of execve	
+INDEX
+	_execve_r
+
+ANSI_SYNOPSIS
+	#include <reent.h>
+	int _execve_r(struct _reent *<[ptr]>, char *<[name]>,
+                      char **<[argv]>, char **<[env]>);
+
+TRAD_SYNOPSIS
+	#include <reent.h>
+	int _execve_r(<[ptr]>, <[name]>, <[argv]>, <[env]>)
+	struct _reent *<[ptr]>;
+        char *<[name]>;
+        char **<[argv]>;
+        char **<[env]>;
+
+DESCRIPTION
+	This is a reentrant version of <<execve>>.  It
+	takes a pointer to the global data block, which holds
+	<<errno>>.
+*/
+
+int
+_DEFUN (_execve_r, (ptr, name, argv, env),
+     struct _reent *ptr _AND
+     char *name _AND
+     char **argv _AND
+     char **env)
+{
+  int ret;
+
+  errno = 0;
+  if ((ret = _execve (name, argv, env)) == -1 && errno != 0)
+    ptr->_errno = errno;
+  return ret;
+}
+
+
+/*
+FUNCTION
+	<<_fork_r>>---Reentrant version of fork
+	
+INDEX
+	_fork_r
+
+ANSI_SYNOPSIS
+	#include <reent.h>
+	int _fork_r(struct _reent *<[ptr]>);
+
+TRAD_SYNOPSIS
+	#include <reent.h>
+	int _fork_r(<[ptr]>)
+	struct _reent *<[ptr]>;
+
+DESCRIPTION
+	This is a reentrant version of <<fork>>.  It
+	takes a pointer to the global data block, which holds
+	<<errno>>.
+*/
+
+#ifndef NO_FORK
+
+int
+_DEFUN (_fork_r, (ptr),
+     struct _reent *ptr)
+{
+  int ret;
+
+  errno = 0;
+  if ((ret = _fork ()) == -1 && errno != 0)
+    ptr->_errno = errno;
+  return ret;
+}
+
+#endif
+
+/*
+FUNCTION
+	<<_wait_r>>---Reentrant version of wait
+	
+INDEX
+	_wait_r
+
+ANSI_SYNOPSIS
+	#include <reent.h>
+	int _wait_r(struct _reent *<[ptr]>, int *<[status]>);
+
+TRAD_SYNOPSIS
+	#include <reent.h>
+	int _wait_r(<[ptr]>, <[status]>)
+	struct _reent *<[ptr]>;
+	int *<[status]>;
+
+DESCRIPTION
+	This is a reentrant version of <<wait>>.  It
+	takes a pointer to the global data block, which holds
+	<<errno>>.
+*/
+
+int
+_DEFUN (_wait_r, (ptr, status),
+     struct _reent *ptr _AND
+     int *status)
+{
+  int ret;
+
+  errno = 0;
+  if ((ret = _wait (status)) == -1 && errno != 0)
+    ptr->_errno = errno;
+  return ret;
+}
+
+#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
diff -rNup newlib-1.12.0/newlib/libc/reent/fcntl.c newlib-1.12.0_patched/newlib/libc/reent/fcntl.c
--- newlib-1.12.0/newlib/libc/reent/fcntl.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/reent/fcntl.c	2006-10-04 02:19:56.000000000 +0530
@@ -0,0 +1,65 @@
+/* Reentrant versions of fcntl system call.  This implementation just
+   calls the fcntl system call.  */
+
+#include <reent.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <_syslist.h>
+
+/* Some targets provides their own versions of these functions.  Those
+   targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS.  */
+
+#ifdef _REENT_ONLY
+#ifndef REENTRANT_SYSCALLS_PROVIDED
+#define REENTRANT_SYSCALLS_PROVIDED
+#endif
+#endif
+
+#ifndef REENTRANT_SYSCALLS_PROVIDED
+
+/* We use the errno variable used by the system dependent layer.  */
+#undef errno
+extern int errno;
+
+/*
+FUNCTION
+	<<_fcntl_r>>---Reentrant version of fcntl
+	
+INDEX
+	_fcntl_r
+
+ANSI_SYNOPSIS
+	#include <reent.h>
+	int _fcntl_r(struct _reent *<[ptr]>,
+		     int <[fd]>, int <[cmd]>, <[arg]>);
+
+TRAD_SYNOPSIS
+	#include <reent.h>
+	int _fcntl_r(<[ptr]>, <[fd]>, <[cmd]>, <[arg]>)
+	struct _reent *<[ptr]>;
+	int <[fd]>;
+	int <[cmd]>;
+	int <[arg]>;
+
+DESCRIPTION
+	This is a reentrant version of <<fcntl>>.  It
+	takes a pointer to the global data block, which holds
+	<<errno>>.
+*/
+
+int
+_DEFUN (_fcntl_r, (ptr, fd, cmd, arg),
+     struct _reent *ptr _AND
+     int fd _AND
+     int cmd _AND
+     int arg)
+{
+  int ret;
+
+  errno = 0;
+  if ((ret = _fcntl (fd, cmd, arg)) == -1 && errno != 0)
+    ptr->_errno = errno;
+  return ret;
+}
+
+#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
diff -rNup newlib-1.12.0/newlib/libc/reent/fstat64.c newlib-1.12.0_patched/newlib/libc/reent/fstat64.c
--- newlib-1.12.0/newlib/libc/reent/fstat64.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/reent/fstat64.c	2006-10-04 02:20:07.000000000 +0530
@@ -0,0 +1,72 @@
+/* Reentrant versions of fstat system call.  This implementation just
+   calls the fstat system call.  */
+
+#include <reent.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <_syslist.h>
+
+#ifdef __LARGE64_FILES
+
+/* Some targets provides their own versions of these functions.  Those
+   targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS.  */
+
+#ifdef _REENT_ONLY
+#ifndef REENTRANT_SYSCALLS_PROVIDED
+#define REENTRANT_SYSCALLS_PROVIDED
+#endif
+#endif
+
+#ifdef REENTRANT_SYSCALLS_PROVIDED
+
+int _dummy_fstat_syscalls = 1;
+
+#else
+
+/* We use the errno variable used by the system dependent layer.  */
+#undef errno
+extern int errno;
+
+/*
+FUNCTION
+	<<_fstat64_r>>---Reentrant version of fstat64
+	
+INDEX
+	_fstat64_r
+
+ANSI_SYNOPSIS
+	#include <reent.h>
+	int _fstat64_r(struct _reent *<[ptr]>,
+		       int <[fd]>, struct stat64 *<[pstat]>);
+
+TRAD_SYNOPSIS
+	#include <reent.h>
+	int _fstat64_r(<[ptr]>, <[fd]>, <[pstat]>)
+	struct _reent *<[ptr]>;
+	int <[fd]>;
+	struct stat *<[pstat]>;
+
+DESCRIPTION
+	This is a reentrant version of <<fstat64>>.  It
+	takes a pointer to the global data block, which holds
+	<<errno>>.  This function is only enabled on systems
+	that define __LARGE64_FILES.
+*/
+
+int
+_DEFUN (_fstat64_r, (ptr, fd, pstat),
+     struct _reent *ptr _AND
+     int fd _AND
+     struct stat64 *pstat)
+{
+  int ret;
+
+  errno = 0;
+  if ((ret = _fstat64 (fd, pstat)) == -1 && errno != 0)
+    ptr->_errno = errno;
+  return ret;
+}
+
+#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
+
+#endif /* __LARGE64_FILES */
diff -rNup newlib-1.12.0/newlib/libc/reent/fstat.c newlib-1.12.0_patched/newlib/libc/reent/fstat.c
--- newlib-1.12.0/newlib/libc/reent/fstat.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/reent/fstat.c	2006-10-04 02:20:19.000000000 +0530
@@ -0,0 +1,67 @@
+/* Reentrant versions of fstat system call.  This implementation just
+   calls the fstat system call.  */
+
+#include <reent.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <_syslist.h>
+
+/* Some targets provides their own versions of these functions.  Those
+   targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS.  */
+
+#ifdef _REENT_ONLY
+#ifndef REENTRANT_SYSCALLS_PROVIDED
+#define REENTRANT_SYSCALLS_PROVIDED
+#endif
+#endif
+
+#ifdef REENTRANT_SYSCALLS_PROVIDED
+
+int _dummy_fstat_syscalls = 1;
+
+#else
+
+/* We use the errno variable used by the system dependent layer.  */
+#undef errno
+extern int errno;
+
+/*
+FUNCTION
+	<<_fstat_r>>---Reentrant version of fstat
+	
+INDEX
+	_fstat_r
+
+ANSI_SYNOPSIS
+	#include <reent.h>
+	int _fstat_r(struct _reent *<[ptr]>,
+		     int <[fd]>, struct stat *<[pstat]>);
+
+TRAD_SYNOPSIS
+	#include <reent.h>
+	int _fstat_r(<[ptr]>, <[fd]>, <[pstat]>)
+	struct _reent *<[ptr]>;
+	int <[fd]>;
+	struct stat *<[pstat]>;
+
+DESCRIPTION
+	This is a reentrant version of <<fstat>>.  It
+	takes a pointer to the global data block, which holds
+	<<errno>>.
+*/
+
+int
+_fstat_r (ptr, fd, pstat)
+     struct _reent *ptr;
+     int fd;
+     struct stat *pstat;
+{
+  int ret;
+
+  errno = 0;
+  if ((ret = _fstat (fd, pstat)) == -1 && errno != 0)
+    ptr->_errno = errno;
+  return ret;
+}
+
+#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
diff -rNup newlib-1.12.0/newlib/libc/reent/link.c newlib-1.12.0_patched/newlib/libc/reent/link.c
--- newlib-1.12.0/newlib/libc/reent/link.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/reent/link.c	2006-10-04 02:20:33.000000000 +0530
@@ -0,0 +1,66 @@
+/* Reentrant versions of file system calls.  These implementations
+   just call the usual system calls.  */
+
+#include <reent.h>
+#include <unistd.h>
+#include <_syslist.h>
+
+/* Some targets provides their own versions of these functions.  Those
+   targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS.  */
+
+#ifdef _REENT_ONLY
+#ifndef REENTRANT_SYSCALLS_PROVIDED
+#define REENTRANT_SYSCALLS_PROVIDED
+#endif
+#endif
+
+#ifdef REENTRANT_SYSCALLS_PROVIDED
+
+int _dummy_link_syscalls = 1;
+
+#else
+
+/* We use the errno variable used by the system dependent layer.  */
+#undef errno
+extern int errno;
+
+/*
+FUNCTION
+	<<_link_r>>---Reentrant version of link
+	
+INDEX
+	_link_r
+
+ANSI_SYNOPSIS
+	#include <reent.h>
+	int _link_r(struct _reent *<[ptr]>,
+		    const char *<[old]>, const char *<[new]>);
+
+TRAD_SYNOPSIS
+	#include <reent.h>
+	int _link_r(<[ptr]>, <[old]>, <[new]>)
+	struct _reent *<[ptr]>;
+	char *<[old]>;
+	char *<[new]>;
+
+DESCRIPTION
+	This is a reentrant version of <<link>>.  It
+	takes a pointer to the global data block, which holds
+	<<errno>>.
+*/
+
+int
+_DEFUN (_link_r, (ptr, old, new),
+     struct _reent *ptr _AND
+     _CONST char *old _AND
+     _CONST char *new)
+{
+  int ret;
+
+  errno = 0;
+  if ((ret = _link (old, new)) == -1 && errno != 0)
+    ptr->_errno = errno;
+  return ret;
+}
+
+#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
diff -rNup newlib-1.12.0/newlib/libc/reent/lseek64.c newlib-1.12.0_patched/newlib/libc/reent/lseek64.c
--- newlib-1.12.0/newlib/libc/reent/lseek64.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/reent/lseek64.c	2006-10-04 02:20:43.000000000 +0530
@@ -0,0 +1,68 @@
+/* Reentrant versions of lseek system call. */
+
+#include <reent.h>
+#include <unistd.h>
+#include <_syslist.h>
+
+/* Some targets provides their own versions of this functions.  Those
+   targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS.  */
+
+#ifdef __LARGE64_FILES
+
+#ifdef _REENT_ONLY
+#ifndef REENTRANT_SYSCALLS_PROVIDED
+#define REENTRANT_SYSCALLS_PROVIDED
+#endif
+#endif
+
+#ifndef REENTRANT_SYSCALLS_PROVIDED
+
+/* We use the errno variable used by the system dependent layer.  */
+#undef errno
+extern int errno;
+
+/*
+FUNCTION
+	<<_lseek64_r>>---Reentrant version of lseek
+	
+INDEX
+	_lseek64_r
+
+ANSI_SYNOPSIS
+	#include <reent.h>
+	off64_t _lseek64_r(struct _reent *<[ptr]>,
+		           int <[fd]>, off64_t <[pos]>, int <[whence]>);
+
+TRAD_SYNOPSIS
+	#include <reent.h>
+	off64_t _lseek64_r(<[ptr]>, <[fd]>, <[pos]>, <[whence]>)
+	struct _reent *<[ptr]>;
+	int <[fd]>;
+	off64_t <[pos]>;
+	int <[whence]>;
+
+DESCRIPTION
+	This is a reentrant version of <<lseek64>>.  It
+	takes a pointer to the global data block, which holds
+	<<errno>>.  This function only exists on a system
+        with large file support.
+*/
+
+_off64_t
+_DEFUN (_lseek64_r, (ptr, fd, pos, whence),
+     struct _reent *ptr _AND
+     int fd _AND
+     _off64_t pos _AND
+     int whence)
+{
+  _off64_t ret;
+
+  errno = 0;
+  if ((ret = _lseek64 (fd, pos, whence)) == (_off64_t) -1 && errno != 0)
+    ptr->_errno = errno;
+  return ret;
+}
+
+#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
+
+#endif /* __LARGE64_FILES */
diff -rNup newlib-1.12.0/newlib/libc/reent/lseek.c newlib-1.12.0_patched/newlib/libc/reent/lseek.c
--- newlib-1.12.0/newlib/libc/reent/lseek.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/reent/lseek.c	2006-10-04 02:20:56.000000000 +0530
@@ -0,0 +1,63 @@
+/* Reentrant versions of lseek system call. */
+
+#include <reent.h>
+#include <unistd.h>
+#include <_syslist.h>
+
+/* Some targets provides their own versions of this functions.  Those
+   targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS.  */
+
+#ifdef _REENT_ONLY
+#ifndef REENTRANT_SYSCALLS_PROVIDED
+#define REENTRANT_SYSCALLS_PROVIDED
+#endif
+#endif
+
+#ifndef REENTRANT_SYSCALLS_PROVIDED
+
+/* We use the errno variable used by the system dependent layer.  */
+#undef errno
+extern int errno;
+
+/*
+FUNCTION
+	<<_lseek_r>>---Reentrant version of lseek
+	
+INDEX
+	_lseek_r
+
+ANSI_SYNOPSIS
+	#include <reent.h>
+	off_t _lseek_r(struct _reent *<[ptr]>,
+		       int <[fd]>, off_t <[pos]>, int <[whence]>);
+
+TRAD_SYNOPSIS
+	#include <reent.h>
+	off_t _lseek_r(<[ptr]>, <[fd]>, <[pos]>, <[whence]>)
+	struct _reent *<[ptr]>;
+	int <[fd]>;
+	off_t <[pos]>;
+	int <[whence]>;
+
+DESCRIPTION
+	This is a reentrant version of <<lseek>>.  It
+	takes a pointer to the global data block, which holds
+	<<errno>>.
+*/
+
+_off_t
+_DEFUN (_lseek_r, (ptr, fd, pos, whence),
+     struct _reent *ptr _AND
+     int fd _AND
+     _off_t pos _AND
+     int whence)
+{
+  _off_t ret;
+
+  errno = 0;
+  if ((ret = _lseek (fd, pos, whence)) == (_off_t) -1 && errno != 0)
+    ptr->_errno = errno;
+  return ret;
+}
+
+#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
diff -rNup newlib-1.12.0/newlib/libc/reent/open64.c newlib-1.12.0_patched/newlib/libc/reent/open64.c
--- newlib-1.12.0/newlib/libc/reent/open64.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/reent/open64.c	2006-10-04 02:21:07.000000000 +0530
@@ -0,0 +1,69 @@
+/* Reentrant versions of open system call. */
+
+#include <reent.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <_syslist.h>
+
+#ifdef __LARGE64_FILES
+
+/* Some targets provides their own versions of this functions.  Those
+   targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS.  */
+
+#ifdef _REENT_ONLY
+#ifndef REENTRANT_SYSCALLS_PROVIDED
+#define REENTRANT_SYSCALLS_PROVIDED
+#endif
+#endif
+
+#ifndef REENTRANT_SYSCALLS_PROVIDED
+
+/* We use the errno variable used by the system dependent layer.  */
+#undef errno
+extern int errno;
+
+/*
+FUNCTION
+	<<_open64_r>>---Reentrant version of open64
+	
+INDEX
+	_open64_r
+
+ANSI_SYNOPSIS
+	#include <reent.h>
+	int _open64_r(struct _reent *<[ptr]>,
+  		      const char *<[file]>, int <[flags]>, int <[mode]>);
+
+TRAD_SYNOPSIS
+	#include <reent.h>
+	int _open64_r(<[ptr]>, <[file]>, <[flags]>, <[mode]>)
+	struct _reent *<[ptr]>;
+	char *<[file]>;
+	int <[flags]>;
+	int <[mode]>;
+
+DESCRIPTION
+	This is a reentrant version of <<open64>>.  It
+	takes a pointer to the global data block, which holds
+	<<errno>>.  This function only exists on systems with
+        large file support.
+*/
+
+int
+_open64_r (ptr, file, flags, mode)
+     struct _reent *ptr;
+     _CONST char *file;
+     int flags;
+     int mode;
+{
+  int ret;
+
+  errno = 0;
+  if ((ret = _open64 (file, flags, mode)) == -1 && errno != 0)
+    ptr->_errno = errno;
+  return ret;
+}
+
+#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
+
+#endif /* __LARGE64_FILES */
diff -rNup newlib-1.12.0/newlib/libc/reent/open.c newlib-1.12.0_patched/newlib/libc/reent/open.c
--- newlib-1.12.0/newlib/libc/reent/open.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/reent/open.c	2006-10-04 02:21:13.000000000 +0530
@@ -0,0 +1,65 @@
+/* Reentrant versions of open system call. */
+
+#include <reent.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <_syslist.h>
+
+/* Some targets provides their own versions of this functions.  Those
+   targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS.  */
+
+#ifdef _REENT_ONLY
+#ifndef REENTRANT_SYSCALLS_PROVIDED
+#define REENTRANT_SYSCALLS_PROVIDED
+#endif
+#endif
+
+#ifndef REENTRANT_SYSCALLS_PROVIDED
+
+/* We use the errno variable used by the system dependent layer.  */
+#undef errno
+extern int errno;
+
+/*
+FUNCTION
+	<<_open_r>>---Reentrant version of open
+	
+INDEX
+	_open_r
+
+ANSI_SYNOPSIS
+	#include <reent.h>
+	int _open_r(struct _reent *<[ptr]>,
+		    const char *<[file]>, int <[flags]>, int <[mode]>);
+
+TRAD_SYNOPSIS
+	#include <reent.h>
+	int _open_r(<[ptr]>, <[file]>, <[flags]>, <[mode]>)
+	struct _reent *<[ptr]>;
+	char *<[file]>;
+	int <[flags]>;
+	int <[mode]>;
+
+DESCRIPTION
+	This is a reentrant version of <<open>>.  It
+	takes a pointer to the global data block, which holds
+	<<errno>>.
+*/
+
+int
+_DEFUN (_open_r, (ptr, file, flags, mode),
+     struct _reent *ptr _AND
+     _CONST char *file _AND
+     int flags _AND
+     int mode)
+{
+  int ret;
+
+  errno = 0;
+  if ((ret = _open (file, flags, mode)) == -1 && errno != 0)
+    ptr->_errno = errno;
+  return ret;
+}
+
+
+#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
diff -rNup newlib-1.12.0/newlib/libc/reent/read.c newlib-1.12.0_patched/newlib/libc/reent/read.c
--- newlib-1.12.0/newlib/libc/reent/read.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/reent/read.c	2006-10-04 02:21:24.000000000 +0530
@@ -0,0 +1,63 @@
+/* Reentrant versions of read system call. */
+
+#include <reent.h>
+#include <unistd.h>
+#include <_syslist.h>
+
+/* Some targets provides their own versions of this functions.  Those
+   targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS.  */
+
+#ifdef _REENT_ONLY
+#ifndef REENTRANT_SYSCALLS_PROVIDED
+#define REENTRANT_SYSCALLS_PROVIDED
+#endif
+#endif
+
+#ifndef REENTRANT_SYSCALLS_PROVIDED
+
+/* We use the errno variable used by the system dependent layer.  */
+#undef errno
+extern int errno;
+
+/*
+FUNCTION
+	<<_read_r>>---Reentrant version of read
+	
+INDEX
+	_read_r
+
+ANSI_SYNOPSIS
+	#include <reent.h>
+	_ssize_t _read_r(struct _reent *<[ptr]>,
+		         int <[fd]>, void *<[buf]>, size_t <[cnt]>);
+
+TRAD_SYNOPSIS
+	#include <reent.h>
+	_ssize_t _read_r(<[ptr]>, <[fd]>, <[buf]>, <[cnt]>)
+	struct _reent *<[ptr]>;
+	int <[fd]>;
+	char *<[buf]>;
+	size_t <[cnt]>;
+
+DESCRIPTION
+	This is a reentrant version of <<read>>.  It
+	takes a pointer to the global data block, which holds
+	<<errno>>.
+*/
+
+_ssize_t
+_DEFUN (_read_r, (ptr, fd, buf, cnt),
+     struct _reent *ptr _AND
+     int fd _AND
+     _PTR buf _AND
+     size_t cnt)
+{
+  _ssize_t ret;
+
+  errno = 0;
+  if ((ret = (_ssize_t)_read (fd, buf, cnt)) == -1 && errno != 0)
+    ptr->_errno = errno;
+  return ret;
+}
+
+#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
diff -rNup newlib-1.12.0/newlib/libc/reent/sbrk.c newlib-1.12.0_patched/newlib/libc/reent/sbrk.c
--- newlib-1.12.0/newlib/libc/reent/sbrk.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/reent/sbrk.c	2006-10-04 02:21:30.000000000 +0530
@@ -0,0 +1,65 @@
+/* Reentrant version of sbrk system call. */
+
+#include <reent.h>
+#include <unistd.h>
+#include <_syslist.h>
+
+/* Some targets provides their own versions of these functions.  Those
+   targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS.  */
+
+#ifdef _REENT_ONLY
+#ifndef REENTRANT_SYSCALLS_PROVIDED
+#define REENTRANT_SYSCALLS_PROVIDED
+#endif
+#endif
+
+/* If MALLOC_PROVIDED is defined, we don't need this function.  */
+
+#if defined (REENTRANT_SYSCALLS_PROVIDED) || defined (MALLOC_PROVIDED)
+
+int _dummy_sbrk_syscalls = 1;
+
+#else
+
+/* We use the errno variable used by the system dependent layer.  */
+#undef errno
+extern int errno;
+
+/*
+FUNCTION
+	<<_sbrk_r>>---Reentrant version of sbrk
+	
+INDEX
+	_sbrk_r
+
+ANSI_SYNOPSIS
+	#include <reent.h>
+	void *_sbrk_r(struct _reent *<[ptr]>, ptrdiff_t <[incr]>);
+
+TRAD_SYNOPSIS
+	#include <reent.h>
+	void *_sbrk_r(<[ptr]>, <[incr]>)
+	struct _reent *<[ptr]>;
+	ptrdiff_t <[incr]>;
+
+DESCRIPTION
+	This is a reentrant version of <<sbrk>>.  It
+	takes a pointer to the global data block, which holds
+	<<errno>>.
+*/
+
+void *
+_DEFUN (_sbrk_r, (ptr, incr),
+     struct _reent *ptr _AND
+     ptrdiff_t incr)
+{
+  char *ret;
+  void *_sbrk(ptrdiff_t);
+
+  errno = 0;
+  if ((ret = (char *)(_sbrk (incr))) == (void *) -1 && errno != 0)
+    ptr->_errno = errno;
+  return ret;
+}
+
+#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
diff -rNup newlib-1.12.0/newlib/libc/reent/signal.c newlib-1.12.0_patched/newlib/libc/reent/signal.c
--- newlib-1.12.0/newlib/libc/reent/signal.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/reent/signal.c	2006-10-04 02:21:40.000000000 +0530
@@ -0,0 +1,100 @@
+/* Reentrant versions of syscalls need to support signal/raise.
+   These implementations just call the usual system calls.  */
+
+#include <reent.h>
+#include <signal.h>
+#include <unistd.h>
+#include <_syslist.h>
+
+/* Some targets provides their own versions of these functions.  Those
+   targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS.  */
+
+#ifdef _REENT_ONLY
+#ifndef REENTRANT_SYSCALLS_PROVIDED
+#define REENTRANT_SYSCALLS_PROVIDED
+#endif
+#endif
+
+#ifdef REENTRANT_SYSCALLS_PROVIDED
+
+int _dummy_link_syscalls = 1;
+
+#else
+
+/* We use the errno variable used by the system dependent layer.  */
+#undef errno
+extern int errno;
+
+/*
+FUNCTION
+	<<_kill_r>>---Reentrant version of kill
+	
+INDEX
+	_kill_r
+
+ANSI_SYNOPSIS
+	#include <reent.h>
+	int _kill_r(struct _reent *<[ptr]>, int <[pid]>, int <[sig]>);
+
+TRAD_SYNOPSIS
+	#include <reent.h>
+	int _kill_r(<[ptr]>, <[pid]>, <[sig]>)
+	struct _reent *<[ptr]>;
+	int <[pid]>;
+	int <[sig]>;
+
+DESCRIPTION
+	This is a reentrant version of <<kill>>.  It
+	takes a pointer to the global data block, which holds
+	<<errno>>.
+*/
+
+int
+_DEFUN (_kill_r, (ptr, pid, sig),
+     struct _reent *ptr _AND
+     int pid _AND
+     int sig)
+{
+  int ret;
+
+  errno = 0;
+  if ((ret = _kill (pid, sig)) == -1 && errno != 0)
+    ptr->_errno = errno;
+  return ret;
+}
+
+/*
+FUNCTION
+	<<_getpid_r>>---Reentrant version of getpid
+	
+INDEX
+	_getpid_r
+
+ANSI_SYNOPSIS
+	#include <reent.h>
+	int _getpid_r(struct _reent *<[ptr]>);
+
+TRAD_SYNOPSIS
+	#include <reent.h>
+	int _getpid_r(<[ptr]>)
+	struct _reent *<[ptr]>;
+
+DESCRIPTION
+	This is a reentrant version of <<getpid>>.  It
+	takes a pointer to the global data block, which holds
+	<<errno>>.
+
+	We never need <<errno>>, of course, but for consistency we
+	still must have the reentrant pointer argument.
+*/
+
+int
+_DEFUN (_getpid_r, (ptr),
+     struct _reent *ptr)
+{
+  int ret;
+  ret = _getpid ();
+  return ret;
+}
+
+#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
diff -rNup newlib-1.12.0/newlib/libc/reent/stat.c newlib-1.12.0_patched/newlib/libc/reent/stat.c
--- newlib-1.12.0/newlib/libc/reent/stat.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/reent/stat.c	2006-10-04 02:21:46.000000000 +0530
@@ -0,0 +1,68 @@
+/* Reentrant versions of stat system call.  This implementation just
+   calls the stat system call.  */
+
+#include <reent.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <_syslist.h>
+
+/* Some targets provides their own versions of these functions.  Those
+   targets should define REENTRANT_SYSCALLS_PROVIDED in
+   TARGET_CFLAGS.  */
+
+#ifdef _REENT_ONLY
+#ifndef REENTRANT_SYSCALLS_PROVIDED
+#define REENTRANT_SYSCALLS_PROVIDED
+#endif
+#endif
+
+#ifdef REENTRANT_SYSCALLS_PROVIDED
+
+int _dummy_stat_syscalls = 1;
+
+#else
+
+/* We use the errno variable used by the system dependent layer.  */
+#undef errno
+extern int errno;
+
+/*
+FUNCTION
+	<<_stat_r>>---Reentrant version of stat
+	
+INDEX
+	_stat_r
+
+ANSI_SYNOPSIS
+	#include <reent.h>
+	int _stat_r(struct _reent *<[ptr]>,
+		    const char *<[file]>, struct stat *<[pstat]>);
+
+TRAD_SYNOPSIS
+	#include <reent.h>
+	int _stat_r(<[ptr]>, <[file]>, <[pstat]>)
+	struct _reent *<[ptr]>;
+	char *<[file]>;
+	struct stat *<[pstat]>;
+
+DESCRIPTION
+	This is a reentrant version of <<stat>>.  It
+	takes a pointer to the global data block, which holds
+	<<errno>>.
+*/
+
+int
+_DEFUN (_stat_r, (ptr, file, pstat),
+     struct _reent *ptr _AND
+     _CONST char *file _AND
+     struct stat *pstat)
+{
+  int ret;
+
+  errno = 0;
+  if ((ret = _stat (file, pstat)) == -1 && errno != 0)
+    ptr->_errno = errno;
+  return ret;
+}
+
+#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
diff -rNup newlib-1.12.0/newlib/libc/reent/unlink.c newlib-1.12.0_patched/newlib/libc/reent/unlink.c
--- newlib-1.12.0/newlib/libc/reent/unlink.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/reent/unlink.c	2006-10-04 02:21:53.000000000 +0530
@@ -0,0 +1,59 @@
+/* Reentrant versions of file system calls.  These implementations
+   just call the usual system calls.  */
+
+#include <reent.h>
+#include <unistd.h>
+#include <_syslist.h>
+
+/* Some targets provides their own versions of these functions.  Those
+   targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS.  */
+
+#ifdef _REENT_ONLY
+#ifndef REENTRANT_SYSCALLS_PROVIDED
+#define REENTRANT_SYSCALLS_PROVIDED
+#endif
+#endif
+
+#ifndef REENTRANT_SYSCALLS_PROVIDED
+
+/* We use the errno variable used by the system dependent layer.  */
+#undef errno
+extern int errno;
+
+/*
+FUNCTION
+	<<_unlink_r>>---Reentrant version of unlink
+	
+INDEX
+	_unlink_r
+
+ANSI_SYNOPSIS
+	#include <reent.h>
+	int _unlink_r(struct _reent *<[ptr]>, const char *<[file]>);
+
+TRAD_SYNOPSIS
+	#include <reent.h>
+	int _unlink_r(<[ptr]>, <[file]>)
+	struct _reent *<[ptr]>;
+	char *<[file]>;
+
+DESCRIPTION
+	This is a reentrant version of <<unlink>>.  It
+	takes a pointer to the global data block, which holds
+	<<errno>>.
+*/
+
+int
+_DEFUN (_unlink_r, (ptr, file),
+     struct _reent *ptr _AND
+     _CONST char *file)
+{
+  int ret;
+
+  errno = 0;
+  if ((ret = _unlink (file)) == -1 && errno != 0)
+    ptr->_errno = errno;
+  return ret;
+}
+
+#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
diff -rNup newlib-1.12.0/newlib/libc/reent/write.c newlib-1.12.0_patched/newlib/libc/reent/write.c
--- newlib-1.12.0/newlib/libc/reent/write.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/reent/write.c	2006-10-04 02:22:00.000000000 +0530
@@ -0,0 +1,63 @@
+/* Reentrant versions of write system call. */
+
+#include <reent.h>
+#include <unistd.h>
+#include <_syslist.h>
+
+/* Some targets provides their own versions of this functions.  Those
+   targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS.  */
+
+#ifdef _REENT_ONLY
+#ifndef REENTRANT_SYSCALLS_PROVIDED
+#define REENTRANT_SYSCALLS_PROVIDED
+#endif
+#endif
+
+#ifndef REENTRANT_SYSCALLS_PROVIDED
+
+/* We use the errno variable used by the system dependent layer.  */
+#undef errno
+extern int errno;
+
+/*
+FUNCTION
+	<<_write_r>>---Reentrant version of write
+	
+INDEX
+	_write_r
+
+ANSI_SYNOPSIS
+	#include <reent.h>
+	_ssize_t _write_r(struct _reent *<[ptr]>,
+		          int <[fd]>, const void *<[buf]>, size_t <[cnt]>);
+
+TRAD_SYNOPSIS
+	#include <reent.h>
+	_ssize_t _write_r(<[ptr]>, <[fd]>, <[buf]>, <[cnt]>)
+	struct _reent *<[ptr]>;
+	int <[fd]>;
+	char *<[buf]>;
+	size_t <[cnt]>;
+
+DESCRIPTION
+	This is a reentrant version of <<write>>.  It
+	takes a pointer to the global data block, which holds
+	<<errno>>.
+*/
+
+_ssize_t
+_DEFUN (_write_r, (ptr, fd, buf, cnt),
+     struct _reent *ptr _AND
+     int fd _AND
+     _CONST _PTR buf _AND
+     size_t cnt)
+{
+  _ssize_t ret;
+
+  errno = 0;
+  if ((ret = (_ssize_t)_write (fd, buf, cnt)) == -1 && errno != 0)
+    ptr->_errno = errno;
+  return ret;
+}
+
+#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/aclocal.m4 newlib-1.12.0_patched/newlib/libc/sys/l4/aclocal.m4
--- newlib-1.12.0/newlib/libc/sys/l4/aclocal.m4	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/aclocal.m4	2006-10-04 00:49:07.000000000 +0530
@@ -0,0 +1,831 @@
+dnl aclocal.m4 generated automatically by aclocal 1.4-p6
+
+dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+
+# lib-prefix.m4 serial 4 (gettext-0.14.2)
+dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
+dnl require excessive bracketing.
+ifdef([AC_HELP_STRING],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
+
+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  dnl By default, look in $includedir and $libdir.
+  use_additional=yes
+  AC_LIB_WITH_FINAL_PREFIX([
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+  ])
+  AC_LIB_ARG_WITH([lib-prefix],
+[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+  --without-lib-prefix    don't search for libraries in includedir and libdir],
+[
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+        AC_LIB_WITH_FINAL_PREFIX([
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+        ])
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/lib"
+      fi
+    fi
+])
+  if test $use_additional = yes; then
+    dnl Potentially add $additional_includedir to $CPPFLAGS.
+    dnl But don't add it
+    dnl   1. if it's the standard /usr/include,
+    dnl   2. if it's already present in $CPPFLAGS,
+    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
+    dnl   4. if it doesn't exist as a directory.
+    if test "X$additional_includedir" != "X/usr/include"; then
+      haveit=
+      for x in $CPPFLAGS; do
+        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+        if test "X$x" = "X-I$additional_includedir"; then
+          haveit=yes
+          break
+        fi
+      done
+      if test -z "$haveit"; then
+        if test "X$additional_includedir" = "X/usr/local/include"; then
+          if test -n "$GCC"; then
+            case $host_os in
+              linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+            esac
+          fi
+        fi
+        if test -z "$haveit"; then
+          if test -d "$additional_includedir"; then
+            dnl Really add $additional_includedir to $CPPFLAGS.
+            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+          fi
+        fi
+      fi
+    fi
+    dnl Potentially add $additional_libdir to $LDFLAGS.
+    dnl But don't add it
+    dnl   1. if it's the standard /usr/lib,
+    dnl   2. if it's already present in $LDFLAGS,
+    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
+    dnl   4. if it doesn't exist as a directory.
+    if test "X$additional_libdir" != "X/usr/lib"; then
+      haveit=
+      for x in $LDFLAGS; do
+        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+        if test "X$x" = "X-L$additional_libdir"; then
+          haveit=yes
+          break
+        fi
+      done
+      if test -z "$haveit"; then
+        if test "X$additional_libdir" = "X/usr/local/lib"; then
+          if test -n "$GCC"; then
+            case $host_os in
+              linux*) haveit=yes;;
+            esac
+          fi
+        fi
+        if test -z "$haveit"; then
+          if test -d "$additional_libdir"; then
+            dnl Really add $additional_libdir to $LDFLAGS.
+            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+          fi
+        fi
+      fi
+    fi
+  fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+  dnl Unfortunately, prefix and exec_prefix get only finally determined
+  dnl at the end of configure.
+  if test "X$prefix" = "XNONE"; then
+    acl_final_prefix="$ac_default_prefix"
+  else
+    acl_final_prefix="$prefix"
+  fi
+  if test "X$exec_prefix" = "XNONE"; then
+    acl_final_exec_prefix='${prefix}'
+  else
+    acl_final_exec_prefix="$exec_prefix"
+  fi
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+  prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+  acl_save_prefix="$prefix"
+  prefix="$acl_final_prefix"
+  acl_save_exec_prefix="$exec_prefix"
+  exec_prefix="$acl_final_exec_prefix"
+  $1
+  exec_prefix="$acl_save_exec_prefix"
+  prefix="$acl_save_prefix"
+])
+
+# lib-link.m4 serial 6 (gettext-0.14.3)
+dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_PREREQ(2.50)
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+  define([Name],[translit([$1],[./-], [___])])
+  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+    AC_LIB_LINKFLAGS_BODY([$1], [$2])
+    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+  ])
+  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+  AC_SUBST([LIB]NAME)
+  AC_SUBST([LTLIB]NAME)
+  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+  dnl results of this search when this library appears as a dependency.
+  HAVE_LIB[]NAME=yes
+  undefine([Name])
+  undefine([NAME])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. If found, it
+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+  AC_REQUIRE([AC_LIB_RPATH])
+  define([Name],[translit([$1],[./-], [___])])
+  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+
+  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+  dnl accordingly.
+  AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+  dnl because if the user has installed lib[]Name and not disabled its use
+  dnl via --without-lib[]Name-prefix, he wants to use it.
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+    ac_save_LIBS="$LIBS"
+    LIBS="$LIBS $LIB[]NAME"
+    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
+    LIBS="$ac_save_LIBS"
+  ])
+  if test "$ac_cv_lib[]Name" = yes; then
+    HAVE_LIB[]NAME=yes
+    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
+    AC_MSG_CHECKING([how to link with lib[]$1])
+    AC_MSG_RESULT([$LIB[]NAME])
+  else
+    HAVE_LIB[]NAME=no
+    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+    dnl $INC[]NAME either.
+    CPPFLAGS="$ac_save_CPPFLAGS"
+    LIB[]NAME=
+    LTLIB[]NAME=
+  fi
+  AC_SUBST([HAVE_LIB]NAME)
+  AC_SUBST([LIB]NAME)
+  AC_SUBST([LTLIB]NAME)
+  undefine([Name])
+  undefine([NAME])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
+dnl hardcode_direct, hardcode_minus_L.
+AC_DEFUN([AC_LIB_RPATH],
+[
+  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
+  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
+  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
+  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
+  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
+  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
+    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+    . ./conftest.sh
+    rm -f ./conftest.sh
+    acl_cv_rpath=done
+  ])
+  wl="$acl_cv_wl"
+  libext="$acl_cv_libext"
+  shlibext="$acl_cv_shlibext"
+  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+  hardcode_direct="$acl_cv_hardcode_direct"
+  hardcode_minus_L="$acl_cv_hardcode_minus_L"
+  dnl Determine whether the user wants rpath handling at all.
+  AC_ARG_ENABLE(rpath,
+    [  --disable-rpath         do not hardcode runtime library paths],
+    :, enable_rpath=yes)
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  dnl By default, look in $includedir and $libdir.
+  use_additional=yes
+  AC_LIB_WITH_FINAL_PREFIX([
+    eval additional_includedir=\"$includedir\"
+    eval additional_libdir=\"$libdir\"
+  ])
+  AC_LIB_ARG_WITH([lib$1-prefix],
+[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
+  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
+[
+    if test "X$withval" = "Xno"; then
+      use_additional=no
+    else
+      if test "X$withval" = "X"; then
+        AC_LIB_WITH_FINAL_PREFIX([
+          eval additional_includedir=\"$includedir\"
+          eval additional_libdir=\"$libdir\"
+        ])
+      else
+        additional_includedir="$withval/include"
+        additional_libdir="$withval/lib"
+      fi
+    fi
+])
+  dnl Search the library and its dependencies in $additional_libdir and
+  dnl $LDFLAGS. Using breadth-first-seach.
+  LIB[]NAME=
+  LTLIB[]NAME=
+  INC[]NAME=
+  rpathdirs=
+  ltrpathdirs=
+  names_already_handled=
+  names_next_round='$1 $2'
+  while test -n "$names_next_round"; do
+    names_this_round="$names_next_round"
+    names_next_round=
+    for name in $names_this_round; do
+      already_handled=
+      for n in $names_already_handled; do
+        if test "$n" = "$name"; then
+          already_handled=yes
+          break
+        fi
+      done
+      if test -z "$already_handled"; then
+        names_already_handled="$names_already_handled $name"
+        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+        dnl or AC_LIB_HAVE_LINKFLAGS call.
+        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+        eval value=\"\$HAVE_LIB$uppername\"
+        if test -n "$value"; then
+          if test "$value" = yes; then
+            eval value=\"\$LIB$uppername\"
+            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+            eval value=\"\$LTLIB$uppername\"
+            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+          else
+            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+            dnl that this library doesn't exist. So just drop it.
+            :
+          fi
+        else
+          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+          dnl and the already constructed $LIBNAME/$LTLIBNAME.
+          found_dir=
+          found_la=
+          found_so=
+          found_a=
+          if test $use_additional = yes; then
+            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+              found_dir="$additional_libdir"
+              found_so="$additional_libdir/lib$name.$shlibext"
+              if test -f "$additional_libdir/lib$name.la"; then
+                found_la="$additional_libdir/lib$name.la"
+              fi
+            else
+              if test -f "$additional_libdir/lib$name.$libext"; then
+                found_dir="$additional_libdir"
+                found_a="$additional_libdir/lib$name.$libext"
+                if test -f "$additional_libdir/lib$name.la"; then
+                  found_la="$additional_libdir/lib$name.la"
+                fi
+              fi
+            fi
+          fi
+          if test "X$found_dir" = "X"; then
+            for x in $LDFLAGS $LTLIB[]NAME; do
+              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+              case "$x" in
+                -L*)
+                  dir=`echo "X$x" | sed -e 's/^X-L//'`
+                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+                    found_dir="$dir"
+                    found_so="$dir/lib$name.$shlibext"
+                    if test -f "$dir/lib$name.la"; then
+                      found_la="$dir/lib$name.la"
+                    fi
+                  else
+                    if test -f "$dir/lib$name.$libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/lib$name.$libext"
+                      if test -f "$dir/lib$name.la"; then
+                        found_la="$dir/lib$name.la"
+                      fi
+                    fi
+                  fi
+                  ;;
+              esac
+              if test "X$found_dir" != "X"; then
+                break
+              fi
+            done
+          fi
+          if test "X$found_dir" != "X"; then
+            dnl Found the library.
+            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+            if test "X$found_so" != "X"; then
+              dnl Linking with a shared library. We attempt to hardcode its
+              dnl directory into the executable's runpath, unless it's the
+              dnl standard /usr/lib.
+              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+                dnl No hardcoding is needed.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+              else
+                dnl Use an explicit option to hardcode DIR into the resulting
+                dnl binary.
+                dnl Potentially add DIR to ltrpathdirs.
+                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+                haveit=
+                for x in $ltrpathdirs; do
+                  if test "X$x" = "X$found_dir"; then
+                    haveit=yes
+                    break
+                  fi
+                done
+                if test -z "$haveit"; then
+                  ltrpathdirs="$ltrpathdirs $found_dir"
+                fi
+                dnl The hardcoding into $LIBNAME is system dependent.
+                if test "$hardcode_direct" = yes; then
+                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+                  dnl resulting binary.
+                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                else
+                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+                    dnl Use an explicit option to hardcode DIR into the resulting
+                    dnl binary.
+                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                    dnl Potentially add DIR to rpathdirs.
+                    dnl The rpathdirs will be appended to $LIBNAME at the end.
+                    haveit=
+                    for x in $rpathdirs; do
+                      if test "X$x" = "X$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      rpathdirs="$rpathdirs $found_dir"
+                    fi
+                  else
+                    dnl Rely on "-L$found_dir".
+                    dnl But don't add it if it's already contained in the LDFLAGS
+                    dnl or the already constructed $LIBNAME
+                    haveit=
+                    for x in $LDFLAGS $LIB[]NAME; do
+                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                      if test "X$x" = "X-L$found_dir"; then
+                        haveit=yes
+                        break
+                      fi
+                    done
+                    if test -z "$haveit"; then
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+                    fi
+                    if test "$hardcode_minus_L" != no; then
+                      dnl FIXME: Not sure whether we should use
+                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+                      dnl here.
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+                    else
+                      dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
+                      dnl here, because this doesn't fit in flags passed to the
+                      dnl compiler. So give up. No hardcoding. This affects only
+                      dnl very old systems.
+                      dnl FIXME: Not sure whether we should use
+                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+                      dnl here.
+                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+                    fi
+                  fi
+                fi
+              fi
+            else
+              if test "X$found_a" != "X"; then
+                dnl Linking with a static library.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+              else
+                dnl We shouldn't come here, but anyway it's good to have a
+                dnl fallback.
+                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+              fi
+            fi
+            dnl Assume the include files are nearby.
+            additional_includedir=
+            case "$found_dir" in
+              */lib | */lib/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+                additional_includedir="$basedir/include"
+                ;;
+            esac
+            if test "X$additional_includedir" != "X"; then
+              dnl Potentially add $additional_includedir to $INCNAME.
+              dnl But don't add it
+              dnl   1. if it's the standard /usr/include,
+              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
+              dnl   3. if it's already present in $CPPFLAGS or the already
+              dnl      constructed $INCNAME,
+              dnl   4. if it doesn't exist as a directory.
+              if test "X$additional_includedir" != "X/usr/include"; then
+                haveit=
+                if test "X$additional_includedir" = "X/usr/local/include"; then
+                  if test -n "$GCC"; then
+                    case $host_os in
+                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                    esac
+                  fi
+                fi
+                if test -z "$haveit"; then
+                  for x in $CPPFLAGS $INC[]NAME; do
+                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                    if test "X$x" = "X-I$additional_includedir"; then
+                      haveit=yes
+                      break
+                    fi
+                  done
+                  if test -z "$haveit"; then
+                    if test -d "$additional_includedir"; then
+                      dnl Really add $additional_includedir to $INCNAME.
+                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+                    fi
+                  fi
+                fi
+              fi
+            fi
+            dnl Look for dependencies.
+            if test -n "$found_la"; then
+              dnl Read the .la file. It defines the variables
+              dnl dlname, library_names, old_library, dependency_libs, current,
+              dnl age, revision, installed, dlopen, dlpreopen, libdir.
+              save_libdir="$libdir"
+              case "$found_la" in
+                */* | *\\*) . "$found_la" ;;
+                *) . "./$found_la" ;;
+              esac
+              libdir="$save_libdir"
+              dnl We use only dependency_libs.
+              for dep in $dependency_libs; do
+                case "$dep" in
+                  -L*)
+                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
+                    dnl But don't add it
+                    dnl   1. if it's the standard /usr/lib,
+                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
+                    dnl   3. if it's already present in $LDFLAGS or the already
+                    dnl      constructed $LIBNAME,
+                    dnl   4. if it doesn't exist as a directory.
+                    if test "X$additional_libdir" != "X/usr/lib"; then
+                      haveit=
+                      if test "X$additional_libdir" = "X/usr/local/lib"; then
+                        if test -n "$GCC"; then
+                          case $host_os in
+                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+                          esac
+                        fi
+                      fi
+                      if test -z "$haveit"; then
+                        haveit=
+                        for x in $LDFLAGS $LIB[]NAME; do
+                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                            dnl Really add $additional_libdir to $LIBNAME.
+                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
+                          fi
+                        fi
+                        haveit=
+                        for x in $LDFLAGS $LTLIB[]NAME; do
+                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+                          if test "X$x" = "X-L$additional_libdir"; then
+                            haveit=yes
+                            break
+                          fi
+                        done
+                        if test -z "$haveit"; then
+                          if test -d "$additional_libdir"; then
+                            dnl Really add $additional_libdir to $LTLIBNAME.
+                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
+                          fi
+                        fi
+                      fi
+                    fi
+                    ;;
+                  -R*)
+                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
+                    if test "$enable_rpath" != no; then
+                      dnl Potentially add DIR to rpathdirs.
+                      dnl The rpathdirs will be appended to $LIBNAME at the end.
+                      haveit=
+                      for x in $rpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        rpathdirs="$rpathdirs $dir"
+                      fi
+                      dnl Potentially add DIR to ltrpathdirs.
+                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+                      haveit=
+                      for x in $ltrpathdirs; do
+                        if test "X$x" = "X$dir"; then
+                          haveit=yes
+                          break
+                        fi
+                      done
+                      if test -z "$haveit"; then
+                        ltrpathdirs="$ltrpathdirs $dir"
+                      fi
+                    fi
+                    ;;
+                  -l*)
+                    dnl Handle this in the next round.
+                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+                    ;;
+                  *.la)
+                    dnl Handle this in the next round. Throw away the .la's
+                    dnl directory; it is already contained in a preceding -L
+                    dnl option.
+                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+                    ;;
+                  *)
+                    dnl Most likely an immediate library name.
+                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+                    ;;
+                esac
+              done
+            fi
+          else
+            dnl Didn't find the library; assume it is in the system directories
+            dnl known to the linker and runtime loader. (All the system
+            dnl directories known to the linker should also be known to the
+            dnl runtime loader, otherwise the system is severely misconfigured.)
+            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+          fi
+        fi
+      fi
+    done
+  done
+  if test "X$rpathdirs" != "X"; then
+    if test -n "$hardcode_libdir_separator"; then
+      dnl Weird platform: only the last -rpath option counts, the user must
+      dnl pass all path elements in one option. We can arrange that for a
+      dnl single library, but not when more than one $LIBNAMEs are used.
+      alldirs=
+      for found_dir in $rpathdirs; do
+        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+      done
+      dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
+      acl_save_libdir="$libdir"
+      libdir="$alldirs"
+      eval flag=\"$hardcode_libdir_flag_spec\"
+      libdir="$acl_save_libdir"
+      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+    else
+      dnl The -rpath options are cumulative.
+      for found_dir in $rpathdirs; do
+        acl_save_libdir="$libdir"
+        libdir="$found_dir"
+        eval flag=\"$hardcode_libdir_flag_spec\"
+        libdir="$acl_save_libdir"
+        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+      done
+    fi
+  fi
+  if test "X$ltrpathdirs" != "X"; then
+    dnl When using libtool, the option that works for both libraries and
+    dnl executables is -R. The -R options are cumulative.
+    for found_dir in $ltrpathdirs; do
+      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+    done
+  fi
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+  for element in [$2]; do
+    haveit=
+    for x in $[$1]; do
+      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+      if test "X$x" = "X$element"; then
+        haveit=yes
+        break
+      fi
+    done
+    if test -z "$haveit"; then
+      [$1]="${[$1]}${[$1]:+ }$element"
+    fi
+  done
+])
+
+# lib-ld.m4 serial 3 (gettext-0.13)
+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Subroutines of libtool.m4,
+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
+dnl with libtool.m4.
+
+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  acl_cv_prog_gnu_ld=yes ;;
+*)
+  acl_cv_prog_gnu_ld=no ;;
+esac])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-1.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_ARG_WITH(gnu-ld,
+[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by GCC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]* | [A-Za-z]:[\\/]*)]
+      [re_direlt='/[^/][^/]*/\.\./']
+      # Canonicalize the path of ld
+      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(acl_cv_path_LD,
+[if test -z "$LD"; then
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      acl_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break ;;
+      *)
+	test "$with_gnu_ld" != yes && break ;;
+      esac
+    fi
+  done
+  IFS="$ac_save_ifs"
+else
+  acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])
+
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/autom4te.cache/output.0 newlib-1.12.0_patched/newlib/libc/sys/l4/autom4te.cache/output.0
--- newlib-1.12.0/newlib/libc/sys/l4/autom4te.cache/output.0	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/autom4te.cache/output.0	2006-10-04 00:25:33.000000000 +0530
@@ -0,0 +1,2611 @@
+@%:@! /bin/sh
+@%:@ Guess values for system-dependent variables and create Makefiles.
+@%:@ Generated by GNU Autoconf 2.60.
+@%:@ 
+@%:@ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+@%:@ 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+@%:@ This configure script is free software; the Free Software Foundation
+@%:@ gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+  if (eval ":") 2>/dev/null; then
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+
+  if test $as_have_required = yes && 	 (eval ":
+(as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+  as_lineno_1=\$LINENO
+  as_lineno_2=\$LINENO
+  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+  :
+else
+  as_candidate_shells=
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  case $as_dir in
+	 /*)
+	   for as_base in sh bash ksh sh5; do
+	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+	   done;;
+       esac
+done
+IFS=$as_save_IFS
+
+
+      for as_shell in $as_candidate_shells $SHELL; do
+	 # Try only shells that exist, to save several forks.
+	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		{ ("$as_shell") 2> /dev/null <<\_ASEOF
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+:
+_ASEOF
+}; then
+  CONFIG_SHELL=$as_shell
+	       as_have_required=yes
+	       if { "$as_shell" 2> /dev/null <<\_ASEOF
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+:
+(as_func_return () {
+  (exit $1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+  break
+fi
+
+fi
+
+      done
+
+      if test "x$CONFIG_SHELL" != x; then
+  for as_var in BASH_ENV ENV
+        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+        done
+        export CONFIG_SHELL
+        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+    if test $as_have_required = no; then
+  echo This script requires a shell more modern than all the
+      echo shells that I found on your system.  Please install a
+      echo modern shell, or manually run the script under such a
+      echo shell if you do have one.
+      { (exit 1); exit 1; }
+fi
+
+    
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+  echo No shell found that supports shell functions.
+  echo Please tell autoconf@gnu.org about your system,
+  echo including any error possibly output before this
+  echo message
+}
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s='ln -s'
+  # ... but there are two gotchas:
+  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+  # In both cases, we have to default to `cp -p'.
+  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+    as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+# Find out whether ``test -x'' works.  Don't use a zero-byte file, as
+# systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  as_executable_p="test -x"
+else
+  as_executable_p=:
+fi
+rm -f conf$$.file
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+exec 7<&0 </dev/null 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIB@&t@OBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="crt0.c"
+ac_subst_vars='SHELL
+PATH_SEPARATOR
+PACKAGE_NAME
+PACKAGE_TARNAME
+PACKAGE_VERSION
+PACKAGE_STRING
+PACKAGE_BUGREPORT
+exec_prefix
+prefix
+program_transform_name
+bindir
+sbindir
+libexecdir
+datarootdir
+datadir
+sysconfdir
+sharedstatedir
+localstatedir
+includedir
+oldincludedir
+docdir
+infodir
+htmldir
+dvidir
+pdfdir
+psdir
+libdir
+localedir
+mandir
+DEFS
+ECHO_C
+ECHO_N
+ECHO_T
+LIBS
+build_alias
+host_alias
+target_alias
+LIB@&t@OBJS
+LTLIBOBJS'
+ac_subst_files=''
+      ac_precious_vars='build_alias
+host_alias
+target_alias'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *)	ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval enable_$ac_feature=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval enable_$ac_feature=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    eval with_$ac_package=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    eval with_$ac_package=no ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute directory names.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; }
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  { echo "$as_me: error: Working directory cannot be determined" >&2
+   { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  { echo "$as_me: error: pwd does not report name of working directory" >&2
+   { (exit 1); exit 1; }; }
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$0" ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$0" : 'X\(//\)[^/]' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r "$srcdir/$ac_unique_file"; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+   { (exit 1); exit 1; }; }
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+			  [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+			  [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR          info documentation [DATAROOTDIR/info]
+  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR           man documentation [DATAROOTDIR/man]
+  --docdir=DIR           documentation root @<:@DATAROOTDIR/doc/PACKAGE@:>@
+  --htmldir=DIR          html documentation [DOCDIR]
+  --dvidir=DIR           dvi documentation [DOCDIR]
+  --pdfdir=DIR           pdf documentation [DOCDIR]
+  --psdir=DIR            ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+  cat <<\_ACEOF
+
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" || continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.60
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit
+fi
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.60.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+@%:@@%:@ --------- @%:@@%:@
+@%:@@%:@ Platform. @%:@@%:@
+@%:@@%:@ --------- @%:@@%:@
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+@%:@@%:@ ----------- @%:@@%:@
+@%:@@%:@ Core tests. @%:@@%:@
+@%:@@%:@ ----------- @%:@@%:@
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      ac_configure_args="$ac_configure_args '$ac_arg'"
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+@%:@@%:@ ---------------- @%:@@%:@
+@%:@@%:@ Cache variables. @%:@@%:@
+@%:@@%:@ ---------------- @%:@@%:@
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+	"s/'\''/'\''\\\\'\'''\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    cat <<\_ASBOX
+@%:@@%:@ ----------------- @%:@@%:@
+@%:@@%:@ Output variables. @%:@@%:@
+@%:@@%:@ ----------------- @%:@@%:@
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+@%:@@%:@ ------------------- @%:@@%:@
+@%:@@%:@ File substitutions. @%:@@%:@
+@%:@@%:@ ------------------- @%:@@%:@
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=\$$ac_var
+	case $ac_val in
+	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+@%:@@%:@ ----------- @%:@@%:@
+@%:@@%:@ confdefs.h. @%:@@%:@
+@%:@@%:@ ----------- @%:@@%:@
+_ASBOX
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -n "$CONFIG_SITE"; then
+  set x "$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+  set x "$prefix/share/config.site" "$prefix/etc/config.site"
+else
+  set x "$ac_default_prefix/share/config.site" \
+	"$ac_default_prefix/etc/config.site"
+fi
+shift
+for ac_site_file
+do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+	ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+ac_aux_dir=
+for ac_dir in ../../../.. "$srcdir"/../../../..; do
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ../../../.. \"$srcdir\"/../../../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in ../../../.. \"$srcdir\"/../../../.." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+
+NEWLIB_CONFIGURE(../../..)
+
+ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    test "x$cache_file" != "x/dev/null" &&
+      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
+    cat confcache >$cache_file
+  else
+    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section.  Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+t clear
+:clear
+s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+	g
+	s/^\n//
+	s/\n/ /g
+	p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIB@&t@OBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s='ln -s'
+  # ... but there are two gotchas:
+  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+  # In both cases, we have to default to `cp -p'.
+  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+    as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+# Find out whether ``test -x'' works.  Don't use a zero-byte file, as
+# systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  as_executable_p="test -x"
+else
+  as_executable_p=:
+fi
+rm -f conf$$.file
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+
+# Save the log message, to keep $[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.60.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+# Files that config.status was made for.
+config_files="$ac_config_files"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number, then exit
+  -q, --quiet      do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+		   instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to <bug-autoconf@gnu.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.60,
+  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2006 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    echo "$ac_cs_version"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --he | --h |  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  CONFIG_SHELL=$SHELL
+  export CONFIG_SHELL
+  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX
+@%:@@%:@ Running $as_me. @%:@@%:@
+_ASBOX
+  echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp=
+  trap 'exit_status=$?
+  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+#
+# Set up the sed scripts for CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "$CONFIG_FILES"; then
+
+_ACEOF
+
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  cat >conf$$subs.sed <<_ACEOF
+SHELL!$SHELL$ac_delim
+PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
+PACKAGE_NAME!$PACKAGE_NAME$ac_delim
+PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
+PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
+PACKAGE_STRING!$PACKAGE_STRING$ac_delim
+PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
+exec_prefix!$exec_prefix$ac_delim
+prefix!$prefix$ac_delim
+program_transform_name!$program_transform_name$ac_delim
+bindir!$bindir$ac_delim
+sbindir!$sbindir$ac_delim
+libexecdir!$libexecdir$ac_delim
+datarootdir!$datarootdir$ac_delim
+datadir!$datadir$ac_delim
+sysconfdir!$sysconfdir$ac_delim
+sharedstatedir!$sharedstatedir$ac_delim
+localstatedir!$localstatedir$ac_delim
+includedir!$includedir$ac_delim
+oldincludedir!$oldincludedir$ac_delim
+docdir!$docdir$ac_delim
+infodir!$infodir$ac_delim
+htmldir!$htmldir$ac_delim
+dvidir!$dvidir$ac_delim
+pdfdir!$pdfdir$ac_delim
+psdir!$psdir$ac_delim
+libdir!$libdir$ac_delim
+localedir!$localedir$ac_delim
+mandir!$mandir$ac_delim
+DEFS!$DEFS$ac_delim
+ECHO_C!$ECHO_C$ac_delim
+ECHO_N!$ECHO_N$ac_delim
+ECHO_T!$ECHO_T$ac_delim
+LIBS!$LIBS$ac_delim
+build_alias!$build_alias$ac_delim
+host_alias!$host_alias$ac_delim
+target_alias!$target_alias$ac_delim
+LIB@&t@OBJS!$LIB@&t@OBJS$ac_delim
+LTLIBOBJS!$LTLIBOBJS$ac_delim
+_ACEOF
+
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 39; then
+    break
+  elif $ac_last_try; then
+    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+  ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+:end
+s/|#_!!_#|//g
+CEOF$ac_eof
+_ACEOF
+
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[	 ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+fi # test -n "$CONFIG_FILES"
+
+
+for ac_tag in  :F $CONFIG_FILES      
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
+echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+   { (exit 1); exit 1; }; };;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
+	 # because $ac_f cannot contain `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+   { (exit 1); exit 1; }; };;
+      esac
+      ac_file_inputs="$ac_file_inputs $ac_f"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input="Generated from "`IFS=:
+	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    fi
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$tmp/stdin";;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  { as_dir="$ac_dir"
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+   { (exit 1); exit 1; }; }; }
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+case `sed -n '/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+' $ac_file_inputs` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+    s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s&@configure_input@&$configure_input&;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+$ac_datarootdir_hack
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&5
+echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&2;}
+
+  rm -f "$tmp/stdin"
+  case $ac_file in
+  -) cat "$tmp/out"; rm -f "$tmp/out";;
+  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
+  esac
+ ;;
+  
+  
+  
+  esac
+
+done # for ac_tag
+
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/autom4te.cache/output.1 newlib-1.12.0_patched/newlib/libc/sys/l4/autom4te.cache/output.1
--- newlib-1.12.0/newlib/libc/sys/l4/autom4te.cache/output.1	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/autom4te.cache/output.1	2006-10-04 00:49:28.000000000 +0530
@@ -0,0 +1,2611 @@
+@%:@! /bin/sh
+@%:@ Guess values for system-dependent variables and create Makefiles.
+@%:@ Generated by GNU Autoconf 2.60.
+@%:@ 
+@%:@ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+@%:@ 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+@%:@ This configure script is free software; the Free Software Foundation
+@%:@ gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+  if (eval ":") 2>/dev/null; then
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+
+  if test $as_have_required = yes && 	 (eval ":
+(as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+  as_lineno_1=\$LINENO
+  as_lineno_2=\$LINENO
+  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+  :
+else
+  as_candidate_shells=
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  case $as_dir in
+	 /*)
+	   for as_base in sh bash ksh sh5; do
+	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+	   done;;
+       esac
+done
+IFS=$as_save_IFS
+
+
+      for as_shell in $as_candidate_shells $SHELL; do
+	 # Try only shells that exist, to save several forks.
+	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		{ ("$as_shell") 2> /dev/null <<\_ASEOF
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+:
+_ASEOF
+}; then
+  CONFIG_SHELL=$as_shell
+	       as_have_required=yes
+	       if { "$as_shell" 2> /dev/null <<\_ASEOF
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+:
+(as_func_return () {
+  (exit $1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+  break
+fi
+
+fi
+
+      done
+
+      if test "x$CONFIG_SHELL" != x; then
+  for as_var in BASH_ENV ENV
+        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+        done
+        export CONFIG_SHELL
+        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+    if test $as_have_required = no; then
+  echo This script requires a shell more modern than all the
+      echo shells that I found on your system.  Please install a
+      echo modern shell, or manually run the script under such a
+      echo shell if you do have one.
+      { (exit 1); exit 1; }
+fi
+
+    
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+  echo No shell found that supports shell functions.
+  echo Please tell autoconf@gnu.org about your system,
+  echo including any error possibly output before this
+  echo message
+}
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s='ln -s'
+  # ... but there are two gotchas:
+  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+  # In both cases, we have to default to `cp -p'.
+  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+    as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+# Find out whether ``test -x'' works.  Don't use a zero-byte file, as
+# systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  as_executable_p="test -x"
+else
+  as_executable_p=:
+fi
+rm -f conf$$.file
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+exec 7<&0 </dev/null 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIB@&t@OBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="crt0.c"
+ac_subst_vars='SHELL
+PATH_SEPARATOR
+PACKAGE_NAME
+PACKAGE_TARNAME
+PACKAGE_VERSION
+PACKAGE_STRING
+PACKAGE_BUGREPORT
+exec_prefix
+prefix
+program_transform_name
+bindir
+sbindir
+libexecdir
+datarootdir
+datadir
+sysconfdir
+sharedstatedir
+localstatedir
+includedir
+oldincludedir
+docdir
+infodir
+htmldir
+dvidir
+pdfdir
+psdir
+libdir
+localedir
+mandir
+DEFS
+ECHO_C
+ECHO_N
+ECHO_T
+LIBS
+build_alias
+host_alias
+target_alias
+LIB@&t@OBJS
+LTLIBOBJS'
+ac_subst_files=''
+      ac_precious_vars='build_alias
+host_alias
+target_alias'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *)	ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval enable_$ac_feature=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval enable_$ac_feature=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    eval with_$ac_package=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    eval with_$ac_package=no ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute directory names.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; }
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  { echo "$as_me: error: Working directory cannot be determined" >&2
+   { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  { echo "$as_me: error: pwd does not report name of working directory" >&2
+   { (exit 1); exit 1; }; }
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$0" ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$0" : 'X\(//\)[^/]' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r "$srcdir/$ac_unique_file"; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+   { (exit 1); exit 1; }; }
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+			  [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+			  [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR          info documentation [DATAROOTDIR/info]
+  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR           man documentation [DATAROOTDIR/man]
+  --docdir=DIR           documentation root @<:@DATAROOTDIR/doc/PACKAGE@:>@
+  --htmldir=DIR          html documentation [DOCDIR]
+  --dvidir=DIR           dvi documentation [DOCDIR]
+  --pdfdir=DIR           pdf documentation [DOCDIR]
+  --psdir=DIR            ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+  cat <<\_ACEOF
+
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" || continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.60
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit
+fi
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.60.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+@%:@@%:@ --------- @%:@@%:@
+@%:@@%:@ Platform. @%:@@%:@
+@%:@@%:@ --------- @%:@@%:@
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+@%:@@%:@ ----------- @%:@@%:@
+@%:@@%:@ Core tests. @%:@@%:@
+@%:@@%:@ ----------- @%:@@%:@
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      ac_configure_args="$ac_configure_args '$ac_arg'"
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+@%:@@%:@ ---------------- @%:@@%:@
+@%:@@%:@ Cache variables. @%:@@%:@
+@%:@@%:@ ---------------- @%:@@%:@
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+	"s/'\''/'\''\\\\'\'''\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    cat <<\_ASBOX
+@%:@@%:@ ----------------- @%:@@%:@
+@%:@@%:@ Output variables. @%:@@%:@
+@%:@@%:@ ----------------- @%:@@%:@
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+@%:@@%:@ ------------------- @%:@@%:@
+@%:@@%:@ File substitutions. @%:@@%:@
+@%:@@%:@ ------------------- @%:@@%:@
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=\$$ac_var
+	case $ac_val in
+	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+@%:@@%:@ ----------- @%:@@%:@
+@%:@@%:@ confdefs.h. @%:@@%:@
+@%:@@%:@ ----------- @%:@@%:@
+_ASBOX
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -n "$CONFIG_SITE"; then
+  set x "$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+  set x "$prefix/share/config.site" "$prefix/etc/config.site"
+else
+  set x "$ac_default_prefix/share/config.site" \
+	"$ac_default_prefix/etc/config.site"
+fi
+shift
+for ac_site_file
+do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+	ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+ac_aux_dir=
+for ac_dir in ../../../.. "$srcdir"/../../../..; do
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ../../../.. \"$srcdir\"/../../../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in ../../../.. \"$srcdir\"/../../../.." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+
+NEWLIB_CONFIGURE(../../..)
+
+ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    test "x$cache_file" != "x/dev/null" &&
+      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
+    cat confcache >$cache_file
+  else
+    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section.  Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+t clear
+:clear
+s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+	g
+	s/^\n//
+	s/\n/ /g
+	p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIB@&t@OBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s='ln -s'
+  # ... but there are two gotchas:
+  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+  # In both cases, we have to default to `cp -p'.
+  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+    as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+# Find out whether ``test -x'' works.  Don't use a zero-byte file, as
+# systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  as_executable_p="test -x"
+else
+  as_executable_p=:
+fi
+rm -f conf$$.file
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+
+# Save the log message, to keep $[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.60.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+# Files that config.status was made for.
+config_files="$ac_config_files"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number, then exit
+  -q, --quiet      do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+		   instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to <bug-autoconf@gnu.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.60,
+  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2006 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    echo "$ac_cs_version"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --he | --h |  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  CONFIG_SHELL=$SHELL
+  export CONFIG_SHELL
+  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX
+@%:@@%:@ Running $as_me. @%:@@%:@
+_ASBOX
+  echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp=
+  trap 'exit_status=$?
+  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+#
+# Set up the sed scripts for CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "$CONFIG_FILES"; then
+
+_ACEOF
+
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  cat >conf$$subs.sed <<_ACEOF
+SHELL!$SHELL$ac_delim
+PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
+PACKAGE_NAME!$PACKAGE_NAME$ac_delim
+PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
+PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
+PACKAGE_STRING!$PACKAGE_STRING$ac_delim
+PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
+exec_prefix!$exec_prefix$ac_delim
+prefix!$prefix$ac_delim
+program_transform_name!$program_transform_name$ac_delim
+bindir!$bindir$ac_delim
+sbindir!$sbindir$ac_delim
+libexecdir!$libexecdir$ac_delim
+datarootdir!$datarootdir$ac_delim
+datadir!$datadir$ac_delim
+sysconfdir!$sysconfdir$ac_delim
+sharedstatedir!$sharedstatedir$ac_delim
+localstatedir!$localstatedir$ac_delim
+includedir!$includedir$ac_delim
+oldincludedir!$oldincludedir$ac_delim
+docdir!$docdir$ac_delim
+infodir!$infodir$ac_delim
+htmldir!$htmldir$ac_delim
+dvidir!$dvidir$ac_delim
+pdfdir!$pdfdir$ac_delim
+psdir!$psdir$ac_delim
+libdir!$libdir$ac_delim
+localedir!$localedir$ac_delim
+mandir!$mandir$ac_delim
+DEFS!$DEFS$ac_delim
+ECHO_C!$ECHO_C$ac_delim
+ECHO_N!$ECHO_N$ac_delim
+ECHO_T!$ECHO_T$ac_delim
+LIBS!$LIBS$ac_delim
+build_alias!$build_alias$ac_delim
+host_alias!$host_alias$ac_delim
+target_alias!$target_alias$ac_delim
+LIB@&t@OBJS!$LIB@&t@OBJS$ac_delim
+LTLIBOBJS!$LTLIBOBJS$ac_delim
+_ACEOF
+
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 39; then
+    break
+  elif $ac_last_try; then
+    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+  ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+:end
+s/|#_!!_#|//g
+CEOF$ac_eof
+_ACEOF
+
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[	 ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+fi # test -n "$CONFIG_FILES"
+
+
+for ac_tag in  :F $CONFIG_FILES      
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
+echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+   { (exit 1); exit 1; }; };;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
+	 # because $ac_f cannot contain `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+   { (exit 1); exit 1; }; };;
+      esac
+      ac_file_inputs="$ac_file_inputs $ac_f"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input="Generated from "`IFS=:
+	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    fi
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$tmp/stdin";;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  { as_dir="$ac_dir"
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+   { (exit 1); exit 1; }; }; }
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+case `sed -n '/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+' $ac_file_inputs` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+    s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s&@configure_input@&$configure_input&;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+$ac_datarootdir_hack
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&5
+echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&2;}
+
+  rm -f "$tmp/stdin"
+  case $ac_file in
+  -) cat "$tmp/out"; rm -f "$tmp/out";;
+  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
+  esac
+ ;;
+  
+  
+  
+  esac
+
+done # for ac_tag
+
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/autom4te.cache/requests newlib-1.12.0_patched/newlib/libc/sys/l4/autom4te.cache/requests
--- newlib-1.12.0/newlib/libc/sys/l4/autom4te.cache/requests	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/autom4te.cache/requests	2006-10-04 14:06:28.000000000 +0530
@@ -0,0 +1,252 @@
+# This file was generated by Autom4te Wed Jul 12 17:49:25 UTC 2006.
+# It contains the lists of macros which have been traced.
+# It can be safely removed.
+
+@request = (
+             bless( [
+                      '0',
+                      1,
+                      [
+                        '/usr/share/autoconf'
+                      ],
+                      [
+                        '/usr/share/autoconf/autoconf/autoconf.m4f',
+                        'configure.in'
+                      ],
+                      {
+                        'AM_PROG_F77_C_O' => 1,
+                        '_LT_AC_TAGCONFIG' => 1,
+                        'm4_pattern_forbid' => 1,
+                        'AC_CANONICAL_TARGET' => 1,
+                        'AC_CONFIG_LIBOBJ_DIR' => 1,
+                        'AC_C_VOLATILE' => 1,
+                        'AC_TYPE_OFF_T' => 1,
+                        'AC_FUNC_CLOSEDIR_VOID' => 1,
+                        'AC_REPLACE_FNMATCH' => 1,
+                        'AC_PROG_LIBTOOL' => 1,
+                        'AC_FUNC_STAT' => 1,
+                        'AC_FUNC_WAIT3' => 1,
+                        'AC_HEADER_TIME' => 1,
+                        'AC_FUNC_LSTAT' => 1,
+                        'AC_STRUCT_TM' => 1,
+                        'AM_AUTOMAKE_VERSION' => 1,
+                        'AC_FUNC_GETMNTENT' => 1,
+                        'AC_TYPE_MODE_T' => 1,
+                        'AC_CHECK_HEADERS' => 1,
+                        'AC_FUNC_STRTOD' => 1,
+                        'LT_CONFIG_LTDL_DIR' => 1,
+                        'AC_FUNC_STRNLEN' => 1,
+                        'm4_sinclude' => 1,
+                        'AC_PROG_CXX' => 1,
+                        'AC_PATH_X' => 1,
+                        'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
+                        'AC_PROG_AWK' => 1,
+                        '_m4_warn' => 1,
+                        'AC_HEADER_STDC' => 1,
+                        'AC_HEADER_MAJOR' => 1,
+                        'AM_PROG_CXX_C_O' => 1,
+                        'LT_INIT' => 1,
+                        'AC_FUNC_ERROR_AT_LINE' => 1,
+                        'AC_PROG_GCC_TRADITIONAL' => 1,
+                        'AC_LIBSOURCE' => 1,
+                        'AC_FUNC_MBRTOWC' => 1,
+                        'AC_STRUCT_ST_BLOCKS' => 1,
+                        'AC_TYPE_SIGNAL' => 1,
+                        'AC_CANONICAL_BUILD' => 1,
+                        'AM_PROG_FC_C_O' => 1,
+                        'AC_TYPE_UID_T' => 1,
+                        'AC_PROG_MAKE_SET' => 1,
+                        'AC_CONFIG_AUX_DIR' => 1,
+                        '_AM_SUBST_NOTMAKE' => 1,
+                        'm4_pattern_allow' => 1,
+                        'sinclude' => 1,
+                        'AC_DEFINE_TRACE_LITERAL' => 1,
+                        'AC_FUNC_STRERROR_R' => 1,
+                        'AC_PROG_CC' => 1,
+                        'AC_FUNC_FORK' => 1,
+                        'AC_DECL_SYS_SIGLIST' => 1,
+                        'AC_FUNC_STRCOLL' => 1,
+                        'AC_FUNC_VPRINTF' => 1,
+                        'AC_PROG_YACC' => 1,
+                        'AC_SUBST_TRACE' => 1,
+                        'AC_INIT' => 1,
+                        'AC_STRUCT_TIMEZONE' => 1,
+                        'AC_FUNC_CHOWN' => 1,
+                        'AC_SUBST' => 1,
+                        'AC_FUNC_ALLOCA' => 1,
+                        'AC_FC_SRCEXT' => 1,
+                        'AC_CANONICAL_HOST' => 1,
+                        'AC_FUNC_GETPGRP' => 1,
+                        'AC_PROG_RANLIB' => 1,
+                        'AC_FUNC_SETPGRP' => 1,
+                        'AM_INIT_AUTOMAKE' => 1,
+                        'AC_CONFIG_SUBDIRS' => 1,
+                        'AC_FUNC_MMAP' => 1,
+                        'AC_FUNC_REALLOC' => 1,
+                        'AC_TYPE_SIZE_T' => 1,
+                        'AC_CHECK_TYPES' => 1,
+                        'AC_CONFIG_LINKS' => 1,
+                        'AC_REQUIRE_AUX_FILE' => 1,
+                        'LT_SUPPORTED_TAG' => 1,
+                        'AC_CHECK_MEMBERS' => 1,
+                        'AM_MAINTAINER_MODE' => 1,
+                        'AC_FUNC_UTIME_NULL' => 1,
+                        'AC_FUNC_SELECT_ARGTYPES' => 1,
+                        'AC_HEADER_STAT' => 1,
+                        'AC_FUNC_STRFTIME' => 1,
+                        'AC_PROG_CPP' => 1,
+                        'AC_C_INLINE' => 1,
+                        'AC_PROG_LEX' => 1,
+                        'AC_C_CONST' => 1,
+                        'AC_TYPE_PID_T' => 1,
+                        'AC_CONFIG_FILES' => 1,
+                        'include' => 1,
+                        'AC_FUNC_SETVBUF_REVERSED' => 1,
+                        'AC_PROG_INSTALL' => 1,
+                        'AM_GNU_GETTEXT' => 1,
+                        'AC_FUNC_OBSTACK' => 1,
+                        'AC_CHECK_LIB' => 1,
+                        'AC_FUNC_MALLOC' => 1,
+                        'AC_FUNC_GETGROUPS' => 1,
+                        'AC_FUNC_GETLOADAVG' => 1,
+                        'AC_FC_FREEFORM' => 1,
+                        'AH_OUTPUT' => 1,
+                        'AC_FUNC_FSEEKO' => 1,
+                        'AM_PROG_CC_C_O' => 1,
+                        'AC_FUNC_MKTIME' => 1,
+                        'AC_CANONICAL_SYSTEM' => 1,
+                        'AM_CONDITIONAL' => 1,
+                        'AC_CONFIG_HEADERS' => 1,
+                        'AC_HEADER_SYS_WAIT' => 1,
+                        'AC_PROG_LN_S' => 1,
+                        'AC_FUNC_MEMCMP' => 1,
+                        'm4_include' => 1,
+                        'AC_HEADER_DIRENT' => 1,
+                        'AC_CHECK_FUNCS' => 1
+                      }
+                    ], 'Autom4te::Request' ),
+             bless( [
+                      '1',
+                      1,
+                      [
+                        '/usr/share/autoconf'
+                      ],
+                      [
+                        '/usr/share/autoconf/autoconf/autoconf.m4f',
+                        'aclocal.m4',
+                        'configure.in'
+                      ],
+                      {
+                        'AM_PROG_F77_C_O' => 1,
+                        '_LT_AC_TAGCONFIG' => 1,
+                        'm4_pattern_forbid' => 1,
+                        'AC_CANONICAL_TARGET' => 1,
+                        'AC_CONFIG_LIBOBJ_DIR' => 1,
+                        'AC_C_VOLATILE' => 1,
+                        'AC_TYPE_OFF_T' => 1,
+                        'AC_FUNC_CLOSEDIR_VOID' => 1,
+                        'AC_REPLACE_FNMATCH' => 1,
+                        'AC_PROG_LIBTOOL' => 1,
+                        'AC_FUNC_STAT' => 1,
+                        'AC_FUNC_WAIT3' => 1,
+                        'AC_HEADER_TIME' => 1,
+                        'AC_FUNC_LSTAT' => 1,
+                        'AC_STRUCT_TM' => 1,
+                        'AM_AUTOMAKE_VERSION' => 1,
+                        'AC_FUNC_GETMNTENT' => 1,
+                        'AC_TYPE_MODE_T' => 1,
+                        'AC_CHECK_HEADERS' => 1,
+                        'AC_FUNC_STRTOD' => 1,
+                        'LT_CONFIG_LTDL_DIR' => 1,
+                        'AC_FUNC_STRNLEN' => 1,
+                        'm4_sinclude' => 1,
+                        'AC_PROG_CXX' => 1,
+                        'AC_PATH_X' => 1,
+                        'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
+                        'AC_PROG_AWK' => 1,
+                        '_m4_warn' => 1,
+                        'AC_HEADER_STDC' => 1,
+                        'AC_HEADER_MAJOR' => 1,
+                        'AM_PROG_CXX_C_O' => 1,
+                        'LT_INIT' => 1,
+                        'AC_FUNC_ERROR_AT_LINE' => 1,
+                        'AC_PROG_GCC_TRADITIONAL' => 1,
+                        'AC_LIBSOURCE' => 1,
+                        'AC_FUNC_MBRTOWC' => 1,
+                        'AC_STRUCT_ST_BLOCKS' => 1,
+                        'AC_TYPE_SIGNAL' => 1,
+                        'AC_CANONICAL_BUILD' => 1,
+                        'AM_PROG_FC_C_O' => 1,
+                        'AC_TYPE_UID_T' => 1,
+                        'AC_PROG_MAKE_SET' => 1,
+                        'AC_CONFIG_AUX_DIR' => 1,
+                        '_AM_SUBST_NOTMAKE' => 1,
+                        'm4_pattern_allow' => 1,
+                        'sinclude' => 1,
+                        'AC_DEFINE_TRACE_LITERAL' => 1,
+                        'AC_FUNC_STRERROR_R' => 1,
+                        'AC_PROG_CC' => 1,
+                        'AC_DECL_SYS_SIGLIST' => 1,
+                        'AC_FUNC_FORK' => 1,
+                        'AC_FUNC_STRCOLL' => 1,
+                        'AC_FUNC_VPRINTF' => 1,
+                        'AC_PROG_YACC' => 1,
+                        'AC_SUBST_TRACE' => 1,
+                        'AC_INIT' => 1,
+                        'AC_STRUCT_TIMEZONE' => 1,
+                        'AC_FUNC_CHOWN' => 1,
+                        'AC_SUBST' => 1,
+                        'AC_FUNC_ALLOCA' => 1,
+                        'AC_FC_SRCEXT' => 1,
+                        'AC_CANONICAL_HOST' => 1,
+                        'AC_FUNC_GETPGRP' => 1,
+                        'AC_PROG_RANLIB' => 1,
+                        'AC_FUNC_SETPGRP' => 1,
+                        'AM_INIT_AUTOMAKE' => 1,
+                        'AC_CONFIG_SUBDIRS' => 1,
+                        'AC_FUNC_MMAP' => 1,
+                        'AC_FUNC_REALLOC' => 1,
+                        'AC_TYPE_SIZE_T' => 1,
+                        'AC_CHECK_TYPES' => 1,
+                        'AC_CONFIG_LINKS' => 1,
+                        'AC_REQUIRE_AUX_FILE' => 1,
+                        'LT_SUPPORTED_TAG' => 1,
+                        'AC_CHECK_MEMBERS' => 1,
+                        'AM_MAINTAINER_MODE' => 1,
+                        'AC_FUNC_UTIME_NULL' => 1,
+                        'AC_FUNC_SELECT_ARGTYPES' => 1,
+                        'AC_HEADER_STAT' => 1,
+                        'AC_FUNC_STRFTIME' => 1,
+                        'AC_PROG_CPP' => 1,
+                        'AC_C_INLINE' => 1,
+                        'AC_PROG_LEX' => 1,
+                        'AC_C_CONST' => 1,
+                        'AC_TYPE_PID_T' => 1,
+                        'AC_CONFIG_FILES' => 1,
+                        'include' => 1,
+                        'AC_FUNC_SETVBUF_REVERSED' => 1,
+                        'AC_PROG_INSTALL' => 1,
+                        'AM_GNU_GETTEXT' => 1,
+                        'AC_CHECK_LIB' => 1,
+                        'AC_FUNC_OBSTACK' => 1,
+                        'AC_FUNC_MALLOC' => 1,
+                        'AC_FUNC_GETGROUPS' => 1,
+                        'AC_FUNC_GETLOADAVG' => 1,
+                        'AC_FC_FREEFORM' => 1,
+                        'AH_OUTPUT' => 1,
+                        'AC_FUNC_FSEEKO' => 1,
+                        'AM_PROG_CC_C_O' => 1,
+                        'AC_FUNC_MKTIME' => 1,
+                        'AC_CANONICAL_SYSTEM' => 1,
+                        'AM_CONDITIONAL' => 1,
+                        'AC_CONFIG_HEADERS' => 1,
+                        'AC_HEADER_SYS_WAIT' => 1,
+                        'AC_PROG_LN_S' => 1,
+                        'AC_FUNC_MEMCMP' => 1,
+                        'm4_include' => 1,
+                        'AC_HEADER_DIRENT' => 1,
+                        'AC_CHECK_FUNCS' => 1
+                      }
+                    ], 'Autom4te::Request' )
+           );
+
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/autom4te.cache/traces.0 newlib-1.12.0_patched/newlib/libc/sys/l4/autom4te.cache/traces.0
--- newlib-1.12.0/newlib/libc/sys/l4/autom4te.cache/traces.0	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/autom4te.cache/traces.0	2006-10-04 00:25:33.000000000 +0530
@@ -0,0 +1,159 @@
+m4trace:configure.in:5: -1- AC_INIT([crt0.c])
+m4trace:configure.in:5: -1- m4_pattern_forbid([^_?A[CHUM]_])
+m4trace:configure.in:5: -1- m4_pattern_forbid([_AC_])
+m4trace:configure.in:5: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
+m4trace:configure.in:5: -1- m4_pattern_allow([^AS_FLAGS$])
+m4trace:configure.in:5: -1- m4_pattern_forbid([^_?m4_])
+m4trace:configure.in:5: -1- m4_pattern_forbid([^dnl$])
+m4trace:configure.in:5: -1- m4_pattern_forbid([^_?AS_])
+m4trace:configure.in:5: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([SHELL])
+m4trace:configure.in:5: -1- m4_pattern_allow([^SHELL$])
+m4trace:configure.in:5: -1- AC_SUBST([PATH_SEPARATOR])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([PATH_SEPARATOR])
+m4trace:configure.in:5: -1- m4_pattern_allow([^PATH_SEPARATOR$])
+m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME],      ['AC_PACKAGE_NAME'])])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([PACKAGE_NAME])
+m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_NAME$])
+m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME],   ['AC_PACKAGE_TARNAME'])])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([PACKAGE_TARNAME])
+m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
+m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION],   ['AC_PACKAGE_VERSION'])])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([PACKAGE_VERSION])
+m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_VERSION$])
+m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING],    ['AC_PACKAGE_STRING'])])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([PACKAGE_STRING])
+m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_STRING$])
+m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT])
+m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
+m4trace:configure.in:5: -1- AC_SUBST([exec_prefix], [NONE])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([exec_prefix])
+m4trace:configure.in:5: -1- m4_pattern_allow([^exec_prefix$])
+m4trace:configure.in:5: -1- AC_SUBST([prefix], [NONE])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([prefix])
+m4trace:configure.in:5: -1- m4_pattern_allow([^prefix$])
+m4trace:configure.in:5: -1- AC_SUBST([program_transform_name], [s,x,x,])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([program_transform_name])
+m4trace:configure.in:5: -1- m4_pattern_allow([^program_transform_name$])
+m4trace:configure.in:5: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([bindir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^bindir$])
+m4trace:configure.in:5: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([sbindir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^sbindir$])
+m4trace:configure.in:5: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([libexecdir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^libexecdir$])
+m4trace:configure.in:5: -1- AC_SUBST([datarootdir], ['${prefix}/share'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([datarootdir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^datarootdir$])
+m4trace:configure.in:5: -1- AC_SUBST([datadir], ['${datarootdir}'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([datadir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^datadir$])
+m4trace:configure.in:5: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([sysconfdir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^sysconfdir$])
+m4trace:configure.in:5: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([sharedstatedir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^sharedstatedir$])
+m4trace:configure.in:5: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([localstatedir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^localstatedir$])
+m4trace:configure.in:5: -1- AC_SUBST([includedir], ['${prefix}/include'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([includedir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^includedir$])
+m4trace:configure.in:5: -1- AC_SUBST([oldincludedir], ['/usr/include'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([oldincludedir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^oldincludedir$])
+m4trace:configure.in:5: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
+				     ['${datarootdir}/doc/${PACKAGE_TARNAME}'],
+				     ['${datarootdir}/doc/${PACKAGE}'])])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([docdir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^docdir$])
+m4trace:configure.in:5: -1- AC_SUBST([infodir], ['${datarootdir}/info'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([infodir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^infodir$])
+m4trace:configure.in:5: -1- AC_SUBST([htmldir], ['${docdir}'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([htmldir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^htmldir$])
+m4trace:configure.in:5: -1- AC_SUBST([dvidir], ['${docdir}'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([dvidir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^dvidir$])
+m4trace:configure.in:5: -1- AC_SUBST([pdfdir], ['${docdir}'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([pdfdir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^pdfdir$])
+m4trace:configure.in:5: -1- AC_SUBST([psdir], ['${docdir}'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([psdir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^psdir$])
+m4trace:configure.in:5: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([libdir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^libdir$])
+m4trace:configure.in:5: -1- AC_SUBST([localedir], ['${datarootdir}/locale'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([localedir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^localedir$])
+m4trace:configure.in:5: -1- AC_SUBST([mandir], ['${datarootdir}/man'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([mandir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^mandir$])
+m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
+m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_NAME$])
+m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
+#undef PACKAGE_NAME])
+m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
+m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
+m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME])
+m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
+m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_VERSION$])
+m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
+#undef PACKAGE_VERSION])
+m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
+m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_STRING$])
+m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING])
+m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
+m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
+m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT])
+m4trace:configure.in:5: -1- AC_SUBST([DEFS])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([DEFS])
+m4trace:configure.in:5: -1- m4_pattern_allow([^DEFS$])
+m4trace:configure.in:5: -1- AC_SUBST([ECHO_C])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([ECHO_C])
+m4trace:configure.in:5: -1- m4_pattern_allow([^ECHO_C$])
+m4trace:configure.in:5: -1- AC_SUBST([ECHO_N])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([ECHO_N])
+m4trace:configure.in:5: -1- m4_pattern_allow([^ECHO_N$])
+m4trace:configure.in:5: -1- AC_SUBST([ECHO_T])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([ECHO_T])
+m4trace:configure.in:5: -1- m4_pattern_allow([^ECHO_T$])
+m4trace:configure.in:5: -1- AC_SUBST([LIBS])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([LIBS])
+m4trace:configure.in:5: -1- m4_pattern_allow([^LIBS$])
+m4trace:configure.in:5: -1- AC_SUBST([build_alias])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([build_alias])
+m4trace:configure.in:5: -1- m4_pattern_allow([^build_alias$])
+m4trace:configure.in:5: -1- AC_SUBST([host_alias])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([host_alias])
+m4trace:configure.in:5: -1- m4_pattern_allow([^host_alias$])
+m4trace:configure.in:5: -1- AC_SUBST([target_alias])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([target_alias])
+m4trace:configure.in:5: -1- m4_pattern_allow([^target_alias$])
+m4trace:configure.in:8: -1- AC_CONFIG_AUX_DIR([../../../..])
+m4trace:configure.in:12: -1- AC_CONFIG_FILES([Makefile])
+m4trace:configure.in:12: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments.
+You should run autoupdate.], [])
+m4trace:configure.in:12: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
+m4trace:configure.in:12: -1- m4_pattern_allow([^LIB@&t@OBJS$])
+m4trace:configure.in:12: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([LTLIBOBJS])
+m4trace:configure.in:12: -1- m4_pattern_allow([^LTLIBOBJS$])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([top_builddir])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([srcdir])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([abs_srcdir])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([top_srcdir])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([abs_top_srcdir])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([builddir])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([abs_builddir])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([abs_top_builddir])
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/autom4te.cache/traces.1 newlib-1.12.0_patched/newlib/libc/sys/l4/autom4te.cache/traces.1
--- newlib-1.12.0/newlib/libc/sys/l4/autom4te.cache/traces.1	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/autom4te.cache/traces.1	2006-10-04 00:49:28.000000000 +0530
@@ -0,0 +1,159 @@
+m4trace:configure.in:5: -1- AC_INIT([crt0.c])
+m4trace:configure.in:5: -1- m4_pattern_forbid([^_?A[CHUM]_])
+m4trace:configure.in:5: -1- m4_pattern_forbid([_AC_])
+m4trace:configure.in:5: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
+m4trace:configure.in:5: -1- m4_pattern_allow([^AS_FLAGS$])
+m4trace:configure.in:5: -1- m4_pattern_forbid([^_?m4_])
+m4trace:configure.in:5: -1- m4_pattern_forbid([^dnl$])
+m4trace:configure.in:5: -1- m4_pattern_forbid([^_?AS_])
+m4trace:configure.in:5: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([SHELL])
+m4trace:configure.in:5: -1- m4_pattern_allow([^SHELL$])
+m4trace:configure.in:5: -1- AC_SUBST([PATH_SEPARATOR])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([PATH_SEPARATOR])
+m4trace:configure.in:5: -1- m4_pattern_allow([^PATH_SEPARATOR$])
+m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME],      ['AC_PACKAGE_NAME'])])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([PACKAGE_NAME])
+m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_NAME$])
+m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME],   ['AC_PACKAGE_TARNAME'])])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([PACKAGE_TARNAME])
+m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
+m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION],   ['AC_PACKAGE_VERSION'])])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([PACKAGE_VERSION])
+m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_VERSION$])
+m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING],    ['AC_PACKAGE_STRING'])])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([PACKAGE_STRING])
+m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_STRING$])
+m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT])
+m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
+m4trace:configure.in:5: -1- AC_SUBST([exec_prefix], [NONE])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([exec_prefix])
+m4trace:configure.in:5: -1- m4_pattern_allow([^exec_prefix$])
+m4trace:configure.in:5: -1- AC_SUBST([prefix], [NONE])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([prefix])
+m4trace:configure.in:5: -1- m4_pattern_allow([^prefix$])
+m4trace:configure.in:5: -1- AC_SUBST([program_transform_name], [s,x,x,])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([program_transform_name])
+m4trace:configure.in:5: -1- m4_pattern_allow([^program_transform_name$])
+m4trace:configure.in:5: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([bindir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^bindir$])
+m4trace:configure.in:5: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([sbindir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^sbindir$])
+m4trace:configure.in:5: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([libexecdir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^libexecdir$])
+m4trace:configure.in:5: -1- AC_SUBST([datarootdir], ['${prefix}/share'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([datarootdir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^datarootdir$])
+m4trace:configure.in:5: -1- AC_SUBST([datadir], ['${datarootdir}'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([datadir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^datadir$])
+m4trace:configure.in:5: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([sysconfdir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^sysconfdir$])
+m4trace:configure.in:5: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([sharedstatedir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^sharedstatedir$])
+m4trace:configure.in:5: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([localstatedir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^localstatedir$])
+m4trace:configure.in:5: -1- AC_SUBST([includedir], ['${prefix}/include'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([includedir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^includedir$])
+m4trace:configure.in:5: -1- AC_SUBST([oldincludedir], ['/usr/include'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([oldincludedir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^oldincludedir$])
+m4trace:configure.in:5: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
+				     ['${datarootdir}/doc/${PACKAGE_TARNAME}'],
+				     ['${datarootdir}/doc/${PACKAGE}'])])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([docdir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^docdir$])
+m4trace:configure.in:5: -1- AC_SUBST([infodir], ['${datarootdir}/info'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([infodir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^infodir$])
+m4trace:configure.in:5: -1- AC_SUBST([htmldir], ['${docdir}'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([htmldir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^htmldir$])
+m4trace:configure.in:5: -1- AC_SUBST([dvidir], ['${docdir}'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([dvidir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^dvidir$])
+m4trace:configure.in:5: -1- AC_SUBST([pdfdir], ['${docdir}'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([pdfdir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^pdfdir$])
+m4trace:configure.in:5: -1- AC_SUBST([psdir], ['${docdir}'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([psdir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^psdir$])
+m4trace:configure.in:5: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([libdir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^libdir$])
+m4trace:configure.in:5: -1- AC_SUBST([localedir], ['${datarootdir}/locale'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([localedir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^localedir$])
+m4trace:configure.in:5: -1- AC_SUBST([mandir], ['${datarootdir}/man'])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([mandir])
+m4trace:configure.in:5: -1- m4_pattern_allow([^mandir$])
+m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
+m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_NAME$])
+m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
+#undef PACKAGE_NAME])
+m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
+m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
+m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME])
+m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
+m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_VERSION$])
+m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
+#undef PACKAGE_VERSION])
+m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
+m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_STRING$])
+m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING])
+m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
+m4trace:configure.in:5: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
+m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT])
+m4trace:configure.in:5: -1- AC_SUBST([DEFS])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([DEFS])
+m4trace:configure.in:5: -1- m4_pattern_allow([^DEFS$])
+m4trace:configure.in:5: -1- AC_SUBST([ECHO_C])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([ECHO_C])
+m4trace:configure.in:5: -1- m4_pattern_allow([^ECHO_C$])
+m4trace:configure.in:5: -1- AC_SUBST([ECHO_N])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([ECHO_N])
+m4trace:configure.in:5: -1- m4_pattern_allow([^ECHO_N$])
+m4trace:configure.in:5: -1- AC_SUBST([ECHO_T])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([ECHO_T])
+m4trace:configure.in:5: -1- m4_pattern_allow([^ECHO_T$])
+m4trace:configure.in:5: -1- AC_SUBST([LIBS])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([LIBS])
+m4trace:configure.in:5: -1- m4_pattern_allow([^LIBS$])
+m4trace:configure.in:5: -1- AC_SUBST([build_alias])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([build_alias])
+m4trace:configure.in:5: -1- m4_pattern_allow([^build_alias$])
+m4trace:configure.in:5: -1- AC_SUBST([host_alias])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([host_alias])
+m4trace:configure.in:5: -1- m4_pattern_allow([^host_alias$])
+m4trace:configure.in:5: -1- AC_SUBST([target_alias])
+m4trace:configure.in:5: -1- AC_SUBST_TRACE([target_alias])
+m4trace:configure.in:5: -1- m4_pattern_allow([^target_alias$])
+m4trace:configure.in:8: -1- AC_CONFIG_AUX_DIR([../../../..])
+m4trace:configure.in:12: -1- AC_CONFIG_FILES([Makefile])
+m4trace:configure.in:12: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments.
+You should run autoupdate.], [])
+m4trace:configure.in:12: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
+m4trace:configure.in:12: -1- m4_pattern_allow([^LIB@&t@OBJS$])
+m4trace:configure.in:12: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([LTLIBOBJS])
+m4trace:configure.in:12: -1- m4_pattern_allow([^LTLIBOBJS$])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([top_builddir])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([srcdir])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([abs_srcdir])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([top_srcdir])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([abs_top_srcdir])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([builddir])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([abs_builddir])
+m4trace:configure.in:12: -1- AC_SUBST_TRACE([abs_top_builddir])
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/configure newlib-1.12.0_patched/newlib/libc/sys/l4/configure
--- newlib-1.12.0/newlib/libc/sys/l4/configure	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/configure	2006-10-04 00:51:29.000000000 +0530
@@ -0,0 +1,2608 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.60.
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+  if (eval ":") 2>/dev/null; then
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+
+  if test $as_have_required = yes && 	 (eval ":
+(as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+  as_lineno_1=\$LINENO
+  as_lineno_2=\$LINENO
+  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+  :
+else
+  as_candidate_shells=
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  case $as_dir in
+	 /*)
+	   for as_base in sh bash ksh sh5; do
+	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+	   done;;
+       esac
+done
+IFS=$as_save_IFS
+
+
+      for as_shell in $as_candidate_shells $SHELL; do
+	 # Try only shells that exist, to save several forks.
+	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		{ ("$as_shell") 2> /dev/null <<\_ASEOF
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+:
+_ASEOF
+}; then
+  CONFIG_SHELL=$as_shell
+	       as_have_required=yes
+	       if { "$as_shell" 2> /dev/null <<\_ASEOF
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+:
+(as_func_return () {
+  (exit $1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+  break
+fi
+
+fi
+
+      done
+
+      if test "x$CONFIG_SHELL" != x; then
+  for as_var in BASH_ENV ENV
+        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+        done
+        export CONFIG_SHELL
+        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+    if test $as_have_required = no; then
+  echo This script requires a shell more modern than all the
+      echo shells that I found on your system.  Please install a
+      echo modern shell, or manually run the script under such a
+      echo shell if you do have one.
+      { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+  echo No shell found that supports shell functions.
+  echo Please tell autoconf@gnu.org about your system,
+  echo including any error possibly output before this
+  echo message
+}
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s='ln -s'
+  # ... but there are two gotchas:
+  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+  # In both cases, we have to default to `cp -p'.
+  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+    as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+# Find out whether ``test -x'' works.  Don't use a zero-byte file, as
+# systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  as_executable_p="test -x"
+else
+  as_executable_p=:
+fi
+rm -f conf$$.file
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+exec 7<&0 </dev/null 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="crt0.c"
+ac_subst_vars='SHELL
+PATH_SEPARATOR
+PACKAGE_NAME
+PACKAGE_TARNAME
+PACKAGE_VERSION
+PACKAGE_STRING
+PACKAGE_BUGREPORT
+exec_prefix
+prefix
+program_transform_name
+bindir
+sbindir
+libexecdir
+datarootdir
+datadir
+sysconfdir
+sharedstatedir
+localstatedir
+includedir
+oldincludedir
+docdir
+infodir
+htmldir
+dvidir
+pdfdir
+psdir
+libdir
+localedir
+mandir
+DEFS
+ECHO_C
+ECHO_N
+ECHO_T
+LIBS
+build_alias
+host_alias
+target_alias
+LIBOBJS
+LTLIBOBJS'
+ac_subst_files=''
+      ac_precious_vars='build_alias
+host_alias
+target_alias'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *)	ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval enable_$ac_feature=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval enable_$ac_feature=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    eval with_$ac_package=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    eval with_$ac_package=no ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute directory names.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; }
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  { echo "$as_me: error: Working directory cannot be determined" >&2
+   { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  { echo "$as_me: error: pwd does not report name of working directory" >&2
+   { (exit 1); exit 1; }; }
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$0" ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$0" : 'X\(//\)[^/]' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r "$srcdir/$ac_unique_file"; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+   { (exit 1); exit 1; }; }
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+			  [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+			  [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR          info documentation [DATAROOTDIR/info]
+  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR           man documentation [DATAROOTDIR/man]
+  --docdir=DIR           documentation root [DATAROOTDIR/doc/PACKAGE]
+  --htmldir=DIR          html documentation [DOCDIR]
+  --dvidir=DIR           dvi documentation [DOCDIR]
+  --pdfdir=DIR           pdf documentation [DOCDIR]
+  --psdir=DIR            ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+  cat <<\_ACEOF
+
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" || continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.60
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit
+fi
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.60.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      ac_configure_args="$ac_configure_args '$ac_arg'"
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+	"s/'\''/'\''\\\\'\'''\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=\$$ac_var
+	case $ac_val in
+	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -n "$CONFIG_SITE"; then
+  set x "$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+  set x "$prefix/share/config.site" "$prefix/etc/config.site"
+else
+  set x "$ac_default_prefix/share/config.site" \
+	"$ac_default_prefix/etc/config.site"
+fi
+shift
+for ac_site_file
+do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+	ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+ac_aux_dir=
+for ac_dir in ../../../.. "$srcdir"/../../../..; do
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ../../../.. \"$srcdir\"/../../../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in ../../../.. \"$srcdir\"/../../../.." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+ac_config_files="$ac_config_files Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    test "x$cache_file" != "x/dev/null" &&
+      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
+    cat confcache >$cache_file
+  else
+    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then branch to the quote section.  Otherwise,
+# look for a macro that doesn't take arguments.
+ac_script='
+t clear
+:clear
+s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
+t quote
+s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
+t quote
+b any
+:quote
+s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
+s/\[/\\&/g
+s/\]/\\&/g
+s/\$/$$/g
+H
+:any
+${
+	g
+	s/^\n//
+	s/\n/ /g
+	p
+}
+'
+DEFS=`sed -n "$ac_script" confdefs.h`
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s='ln -s'
+  # ... but there are two gotchas:
+  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+  # In both cases, we have to default to `cp -p'.
+  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+    as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+# Find out whether ``test -x'' works.  Don't use a zero-byte file, as
+# systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  as_executable_p="test -x"
+else
+  as_executable_p=:
+fi
+rm -f conf$$.file
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+
+# Save the log message, to keep $[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.60.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+# Files that config.status was made for.
+config_files="$ac_config_files"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number, then exit
+  -q, --quiet      do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+		   instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to <bug-autoconf@gnu.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.60,
+  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2006 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    echo "$ac_cs_version"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --he | --h |  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  CONFIG_SHELL=$SHELL
+  export CONFIG_SHELL
+  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp=
+  trap 'exit_status=$?
+  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+#
+# Set up the sed scripts for CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "$CONFIG_FILES"; then
+
+_ACEOF
+
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  cat >conf$$subs.sed <<_ACEOF
+SHELL!$SHELL$ac_delim
+PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
+PACKAGE_NAME!$PACKAGE_NAME$ac_delim
+PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
+PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
+PACKAGE_STRING!$PACKAGE_STRING$ac_delim
+PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
+exec_prefix!$exec_prefix$ac_delim
+prefix!$prefix$ac_delim
+program_transform_name!$program_transform_name$ac_delim
+bindir!$bindir$ac_delim
+sbindir!$sbindir$ac_delim
+libexecdir!$libexecdir$ac_delim
+datarootdir!$datarootdir$ac_delim
+datadir!$datadir$ac_delim
+sysconfdir!$sysconfdir$ac_delim
+sharedstatedir!$sharedstatedir$ac_delim
+localstatedir!$localstatedir$ac_delim
+includedir!$includedir$ac_delim
+oldincludedir!$oldincludedir$ac_delim
+docdir!$docdir$ac_delim
+infodir!$infodir$ac_delim
+htmldir!$htmldir$ac_delim
+dvidir!$dvidir$ac_delim
+pdfdir!$pdfdir$ac_delim
+psdir!$psdir$ac_delim
+libdir!$libdir$ac_delim
+localedir!$localedir$ac_delim
+mandir!$mandir$ac_delim
+DEFS!$DEFS$ac_delim
+ECHO_C!$ECHO_C$ac_delim
+ECHO_N!$ECHO_N$ac_delim
+ECHO_T!$ECHO_T$ac_delim
+LIBS!$LIBS$ac_delim
+build_alias!$build_alias$ac_delim
+host_alias!$host_alias$ac_delim
+target_alias!$target_alias$ac_delim
+LIBOBJS!$LIBOBJS$ac_delim
+LTLIBOBJS!$LTLIBOBJS$ac_delim
+_ACEOF
+
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 39; then
+    break
+  elif $ac_last_try; then
+    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+  ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+:end
+s/|#_!!_#|//g
+CEOF$ac_eof
+_ACEOF
+
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[	 ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+fi # test -n "$CONFIG_FILES"
+
+
+for ac_tag in  :F $CONFIG_FILES
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
+echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+   { (exit 1); exit 1; }; };;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
+	 # because $ac_f cannot contain `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+   { (exit 1); exit 1; }; };;
+      esac
+      ac_file_inputs="$ac_file_inputs $ac_f"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input="Generated from "`IFS=:
+	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    fi
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$tmp/stdin";;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  { as_dir="$ac_dir"
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
+   { (exit 1); exit 1; }; }; }
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+case `sed -n '/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+' $ac_file_inputs` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+    s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s&@configure_input@&$configure_input&;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+$ac_datarootdir_hack
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&5
+echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&2;}
+
+  rm -f "$tmp/stdin"
+  case $ac_file in
+  -) cat "$tmp/out"; rm -f "$tmp/out";;
+  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
+  esac
+ ;;
+
+
+
+  esac
+
+done # for ac_tag
+
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/configure.in newlib-1.12.0_patched/newlib/libc/sys/l4/configure.in
--- newlib-1.12.0/newlib/libc/sys/l4/configure.in	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/configure.in	2006-10-03 22:21:30.000000000 +0530
@@ -0,0 +1,12 @@
+dnl This is the newlib/libc/sys/l4 configure.in file.
+dnl Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.5)
+AC_INIT(crt0.c)
+
+dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake.
+AC_CONFIG_AUX_DIR(../../../..)
+
+NEWLIB_CONFIGURE(../../..)
+
+AC_OUTPUT(Makefile)
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/crt0.c newlib-1.12.0_patched/newlib/libc/sys/l4/crt0.c
--- newlib-1.12.0/newlib/libc/sys/l4/crt0.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/crt0.c	2006-10-04 00:27:03.000000000 +0530
@@ -0,0 +1,18 @@
+/* crt0 stub for MMIXware.
+
+   Copyright (C) 2001 Hans-Peter Nilsson
+
+   Permission to use, copy, modify, and distribute this software is
+   freely granted, provided that the above copyright notice, this notice
+   and the following disclaimer are preserved with no changes.
+
+   THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+   PURPOSE.  */
+
+/* At present this is just a placeholder, to be filled in, if the need
+   arises.  The main init contents is in gcc/config/mmix/crti.asm.
+
+   I think this file is not allowed to be empty.  So here goes:  */
+extern int _Dummy;
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/crt0.S newlib-1.12.0_patched/newlib/libc/sys/l4/crt0.S
--- newlib-1.12.0/newlib/libc/sys/l4/crt0.S	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/crt0.S	2006-10-03 22:52:22.000000000 +0530
@@ -0,0 +1,79 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 1999-2004,  Karlsruhe University
+ *                
+ * File path:     crt0-ia32.S
+ * Description:   Startup code for x86 family processors.
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: crt0-ia32.S,v 1.4 2004/04/14 18:43:29 skoglund Exp $
+ *                
+ ********************************************************************/
+
+	.text
+	.global _start
+_start:
+
+        /* We assume we are multibooted. Save the multiboot info
+           structure pointer (ebx) and the flags (eax) to global
+           variables. */
+        movl    %ebx, grub_mbi_ptr
+        movl    %eax, grub_mbi_flags
+        movl    %eax, %esi
+        movl    %ebx, %edi
+	cli     /* disable int's */
+	cld     /* clear direction flag */
+	mov     %ds, %ax
+	mov     %ax, %es
+	mov     %ax, %fs
+	mov     %ax, %gs
+	mov     %ax, %ss
+
+	/* load temporary stack pointer */
+	lea     _mini_stack, %esp
+
+	/* no need for further initialization, just call loader */
+        call    main
+        
+        /* We should never return from the loader */
+1:      jmp     1b
+
+        .align  16
+	.space	8192
+_mini_stack:
+
+
+        .section .mbh
+
+        jmp     _start
+        .ascii  "KICKSTART"
+	.align 16, 0x90
+__mb_header:
+	.long   0x1BADB002;
+	.long   0x00010000;
+	.long   - 0x00010000 - 0x1BADB002;
+	.long   __mb_header;
+	.long   _start;
+	.long   _edata;
+	.long   _end;
+	.long   _start;
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/asm.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/asm.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/asm.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/asm.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.84
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/=id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/=id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/=id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/=id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:55:30 2004 7611.0
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/kdebug.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/kdebug.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/kdebug.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/kdebug.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.85
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/pal.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/pal.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/pal.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/pal.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.86
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/runconv.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/runconv.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/runconv.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/runconv.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.87
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/specials.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/specials.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/specials.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/specials.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.88
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/syscalls.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/syscalls.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/syscalls.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/syscalls.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.89
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/types.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/types.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/types.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/types.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.90
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/vregs.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/vregs.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/vregs.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/.arch-ids/vregs.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.91
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/asm.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/asm.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/asm.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/asm.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,46 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002,  University of New South Wales
+ *                
+ * File path:     arch/alpha/asm.h
+ * Created:       23/07/2002 17:48:20 by Simon Winwood (sjw)
+ * Description:   Assembler macros etc. 
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: asm.h,v 1.2 2003/09/24 19:06:21 skoglund Exp $
+ *                
+ ********************************************************************/
+
+#ifndef __L4__ALPHA__ASM_H__
+#define __L4__ALPHA__ASM_H__
+
+#define BEGIN_PROC(name)			\
+    .global name;				\
+    .align 3;					\
+    .ent name;					\
+name:
+
+#define END_PROC(name)				\
+    .end name
+
+#endif /* __L4__ALPHA__ASM_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/kdebug.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/kdebug.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/kdebug.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/kdebug.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,87 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002,   University of New South Wales
+ *                
+ * File path:     l4/alpha/kdebug.h
+ * Description:   Alpha kernel debugger interface
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: kdebug.h,v 1.3 2003/09/24 19:06:21 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__ALPHA__KDEBUG_H__
+#define __L4__ALPHA__KDEBUG_H__
+
+#include <l4/types.h>
+#include <l4/alpha/pal.h>
+
+#define  __L4_TRAP_KPUTC  0
+#define  __L4_TRAP_KGETC  1
+#define  __L4_TRAP_ENTER  2
+
+#define L4_KDB_Enter(str...)					\
+do {								\
+    register L4_Word_t r16 asm("$16") = __L4_TRAP_ENTER;	\
+    __asm__ __volatile__ (					\
+	"lda        $17, 1f\n\t"				\
+	"call_pal %0       \n\t"				\
+	".data		    \n\t"				\
+	"1:	.string \"KD# " str "\"	    \n\t"		\
+	".previous	    \n\t"				\
+	: : "i" (PAL_gentrap), "r" (r16) : "memory");		\
+} while (0)
+
+#define __L4_KDB_Op_Arg(op, name, argtype)		\
+L4_INLINE void L4_KDB_##name (argtype arg)		\
+{							\
+       register L4_Word_t r16 asm("$16") = op;		\
+       register char r17 asm("$17") = arg;		\
+       __asm__ __volatile__ (				\
+	"call_pal %0       \n\t"			\
+	: : "i" (PAL_gentrap), "r" (r16), "r" (r17)	\
+       );						\
+}
+
+#define __L4_KDB_Op_Ret(op, name, rettype)		\
+L4_INLINE rettype L4_KDB_##name (void)			\
+{							\
+    register L4_Word_t r16 asm("$16") = op;		\
+    register char ret asm("$0");			\
+    __asm__ __volatile__ (				\
+ 	"call_pal %1       \n\t"			\
+	: "=r" (ret) : "i" (PAL_gentrap), "r" (r16)	\
+							\
+    );							\
+    return ret;						\
+}
+
+__L4_KDB_Op_Ret( __L4_TRAP_KGETC, ReadChar_Blocked, char );
+__L4_KDB_Op_Arg( __L4_TRAP_KPUTC, PrintChar, char );
+
+L4_INLINE void
+L4_KDB_SetThreadName(L4_ThreadId_t tid, const char *name)
+{
+        /* XXX: implement me -- alexw 2005-05-23 */
+}
+
+#endif /* !__L4__ALPHA__KDEBUG_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/pal.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/pal.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/pal.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/pal.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,103 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002,  University of New South Wales
+ *                
+ * File path:     arch/alpha/pal.h
+ * Created:       23/07/2002 18:08:44 by Simon Winwood (sjw)
+ * Description:   PAL definitions (for asm and C) 
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: pal.h,v 1.2 2003/09/24 19:06:21 skoglund Exp $
+ *                
+ ********************************************************************/
+
+#ifndef __ARCH__ALPHA__PAL_H__
+#define __ARCH__ALPHA__PAL_H__
+
+/* Interrupt types */
+#define PAL_INT_IPI      0
+#define PAL_INT_CLOCK    1
+#define PAL_INT_ERR      2
+#define PAL_INT_MCHK     2
+#define PAL_INT_DEV      3
+#define PAL_INT_PERF     4
+
+/* entIF reasons */
+#define PAL_IF_BPT       0
+#define PAL_IF_BUGCHK    1
+#define PAL_IF_GENTRAP   2
+#define PAL_IF_FEN       3
+#define PAL_IF_OPDEC     4
+
+#define PAL_swppal       10
+
+/* PAL calls, unprivileged */
+#define PAL_bpt          128  /* Breakpoint trap: Kernel and user */
+#define PAL_bugchk       129  /* Bugcheck trap: Kernel and user */
+#define PAL_callsys      131  /* System call: User */
+/* #define PAL_clrfen = ?         Clear floating-point enable: User */
+#define PAL_gentrap      170  /* Generate trap: Kernel and user */
+#define PAL_imb          134  /* I-stream memory barrier: Kernel and user */
+#define PAL_rdunique     158  /* Read unique: Kernel and user */
+#define PAL_urti         146  /* Return from user mode trap: User mode */
+#define PAL_wrunique     159  /* Write Unique: Kernel and user */    
+
+
+/* PAL calls, privileged */
+#define PAL_cflush       1  /* Cache flush */ 
+#define PAL_cserve       9  /* Console Service */
+#define PAL_draina       2  /* Drain aborts */
+#define PAL_halt         0  /* Halt the processor */
+/* PAL_jtopal = 46 */
+/* PAL_nphalt = 190 */
+#define PAL_rdmces       16  /* Read machine check error summary register */
+#define PAL_rdps         54  /* Read processor status */       
+#define PAL_rdusp        58  /* Read user stack pointer */
+#define PAL_rdval        50  /* Read system value */         
+#define PAL_retsys       61  /* Return from syscall */
+#define PAL_rti          63  /* Return from trap, fault, or interrupt */
+#define PAL_swpctx       48  /* Swap process context */
+#define PAL_swpipl       53  /* Swap IPL */
+#define PAL_tbi          51  /* TB invalidate */
+#define PAL_whami        60  /* Who am I */
+#define PAL_wrent        52  /* Write system entry address */
+#define PAL_wrfen        43  /* Write floating point enable */
+#define PAL_wripir       13  /* Write interprocessor interrupt request */
+#define PAL_wrkgp        55  /* Write kernel global pointer */
+#define PAL_wrmces       17  /* Write machine check error summary register */
+#define PAL_wrperfmon    57  /* Performance monitoring function */
+#define PAL_wrusp        56  /* Write user stack pointer */
+#define PAL_wrval        49  /* Write system value */
+#define PAL_wrvptptr     45     /* Write virtual page table pointer */
+/* PAL_wtint = ?          Wait for interrupt */
+
+/* MMCSR values */
+#define PAL_MMCSR_INVALID 0
+#define PAL_MMCSR_ACCESS  1
+#define PAL_MMCSR_FOR     2
+#define PAL_MMCSR_FOE     3
+#define PAL_MMCSR_FOW     4
+
+#define PAL_PS_USER       (1 << 3)
+
+#endif /* __ARCH__ALPHA__PAL_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/runconv.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/runconv.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/runconv.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/runconv.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,46 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002,   University of New South Wales
+ *                
+ * File path:     l4/alpha/runconv.h
+ * Description:   Alpha runtime convention definitions
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: runconv.h,v 1.3 2003/09/24 19:06:21 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__IA64__RUNCONV_H__
+#define __L4__IA64__RUNCONV_H__
+
+
+#define __L4_CALLER_SAVED_REGS					\
+    "$0", "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8",      	\
+    "$16", "$17", "$18", "$19", "$20", "$21",			\
+    "$22", "$23", "$24", "$25",	"$26",				\
+    "$27", "$28"
+    
+
+#define __L4_CALLEE_SAVED_REGS \
+    "$9", "$10", "$11", "$12", "$13", "$14", "$15"
+
+#endif /* !__L4__IA64__RUNCONV_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/specials.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/specials.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/specials.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/specials.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,55 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002,   University of New South Wales
+ *                
+ * File path:     l4/alpha/specials.h
+ * Description:   Alpha specific functions and defines
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: specials.h,v 1.3 2003/09/24 19:06:21 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__ALPHA__SPECIALS_H__
+#define __L4__ALPHA__SPECIALS_H__
+
+/*
+ * Architecture specific helper functions.
+ */
+
+L4_INLINE int __L4_Msb (L4_Word_t w) __attribute__ ((const));
+
+L4_INLINE int __L4_Msb (L4_Word_t w)
+{
+    int bitnum;
+
+    if (w == 0)
+	return 64;
+
+    for (bitnum = 0, w >>= 1; w != 0; bitnum++)
+	w >>= 1;
+
+    return bitnum;
+}
+
+
+#endif /* !__L4__ALPHA__SPECIALS_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/syscalls.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/syscalls.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/syscalls.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/syscalls.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,358 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002-2004,   University of New South Wales
+ *                
+ * File path:     l4/alpha/syscalls.h
+ * Description:   Alpha system call ABI
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: syscalls.h,v 1.7 2004/08/23 18:43:10 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__ALPHA__SYSCALLS_H__
+#define __L4__ALPHA__SYSCALLS_H__
+
+#include <l4/types.h>
+#include <l4/message.h>
+
+#include <l4/alpha/vregs.h>
+#include <l4/alpha/runconv.h>
+#include <l4/alpha/pal.h>
+#include <l4/alpha/kdebug.h>
+
+#define MAGIC_KIP_REQUEST          (0x4c34754b4b495034)
+
+
+L4_INLINE void * L4_KernelInterface (L4_Word_t *ApiVersion,
+				     L4_Word_t *ApiFlags,
+				     L4_Word_t *KernelId)
+{
+    register void * base_address	asm ("$0");
+    register L4_Word_t api_version	asm ("$16") = MAGIC_KIP_REQUEST;
+    register L4_Word_t api_flags	asm ("$17");
+    register L4_Word_t kernel_id	asm ("$18");
+
+    __asm__ __volatile__ (
+	"call_pal %4"
+	: /* outputs */
+	"=r" (base_address),
+	"+r" (api_version),
+	"=r" (api_flags),
+	"=r" (kernel_id)
+	: "i" (PAL_cserve));
+
+    if( ApiVersion ) *ApiVersion = api_version;
+    if( ApiFlags ) *ApiFlags = api_flags;
+    if( KernelId ) *KernelId = kernel_id;
+
+    return base_address;
+}
+
+#define DO_SYSCALL(name) 						\
+	"       lda     $27, __L4_"#name "                      \n"	\
+	"       ldq     $27, 0($27)                             \n"	\
+	"	jsr	$26, ($27)                              \n"
+
+
+
+typedef L4_ThreadId_t (*__L4_Ipc_t)(L4_ThreadId_t to, L4_ThreadId_t FromSpecifier, L4_Word_t Timeouts);
+extern __L4_Ipc_t __L4_Ipc;
+
+
+/* Implemented in exregs.S */
+typedef L4_ThreadId_t (*__L4_ExchangeRegisters_t)(L4_ThreadId_t dest,
+						  L4_Word_t control,
+						  L4_Word_t sp,
+						  L4_Word_t ip,
+						  L4_Word_t flags,
+						  L4_Word_t UserDefHandle,
+						  L4_ThreadId_t pager);
+extern __L4_ExchangeRegisters_t __L4_ExchangeRegisters;
+
+#ifdef __l4_cplusplus
+extern "C"
+#endif
+L4_ThreadId_t __alpha_L4_ExchangeRegisters (L4_ThreadId_t dest,
+					    L4_Word_t control,
+					    L4_Word_t sp,
+					    L4_Word_t ip,
+					    L4_Word_t flags,
+					    L4_Word_t UserDefHandle,
+					    L4_ThreadId_t pager,
+					    L4_Word_t *old_control,
+					    L4_Word_t *old_sp,
+					    L4_Word_t *old_ip,
+					    L4_Word_t *old_flags,
+					    L4_Word_t *old_UserDefHandle,
+					    L4_ThreadId_t *old_pager);
+
+
+L4_INLINE
+L4_ThreadId_t L4_ExchangeRegisters (L4_ThreadId_t dest,
+					      L4_Word_t control,
+					      L4_Word_t sp,
+					      L4_Word_t ip,
+					      L4_Word_t flags,
+					      L4_Word_t UserDefHandle,
+					      L4_ThreadId_t pager,
+					      L4_Word_t *old_control,
+					      L4_Word_t *old_sp,
+					      L4_Word_t *old_ip,
+					      L4_Word_t *old_flags,
+					      L4_Word_t *old_UserDefHandle,
+				    L4_ThreadId_t *old_pager)
+{
+    return __alpha_L4_ExchangeRegisters(dest,
+					control,
+					sp,
+					ip,
+					flags,
+					UserDefHandle,
+					pager,
+					old_control,
+					old_sp,
+					old_ip,
+					old_flags,
+					old_UserDefHandle,
+					old_pager);
+}
+
+
+typedef L4_Word_t (*__L4_ThreadControl_t)(L4_ThreadId_t, L4_ThreadId_t, L4_ThreadId_t, L4_ThreadId_t, L4_ThreadId_t, L4_ThreadId_t, void *);
+extern __L4_ThreadControl_t __L4_ThreadControl;
+
+L4_INLINE L4_Word_t L4_ThreadControl (L4_ThreadId_t dest,
+				      L4_ThreadId_t SpaceSpecifier,
+				      L4_ThreadId_t Scheduler,
+				      L4_ThreadId_t Pager,
+				      L4_ThreadId_t SendRedirector,
+				      L4_ThreadId_t RecvRedirector,
+				      void *utcb)
+{
+    return __L4_ThreadControl(dest, SpaceSpecifier, Scheduler, Pager, SendRedirector, RecvRedirector, utcb);
+}
+
+typedef L4_Word_t (*__L4_ThreadSwitch_t)(L4_ThreadId_t);
+extern __L4_ThreadSwitch_t __L4_ThreadSwitch;
+
+L4_INLINE L4_Word_t L4_ThreadSwitch (L4_ThreadId_t dest)
+{
+    return __L4_ThreadSwitch(dest);
+}
+
+typedef L4_Word_t (*__L4_Schedule_t)(L4_ThreadId_t dest, L4_Word_t TimeControl, 
+				      L4_Word_t ProcessorControl, L4_Word_t prio, L4_Word_t PreemptionControl); 
+extern __L4_Schedule_t __L4_Schedule;
+
+L4_INLINE L4_Word_t  L4_Schedule (L4_ThreadId_t dest,
+				  L4_Word_t TimeControl,
+				  L4_Word_t ProcessorControl,
+				  L4_Word_t prio,
+				  L4_Word_t PreemptionControl,
+				  L4_Word_t * old_TimeControl)
+{
+    register L4_Word_t r_result          asm ("$0");
+    register L4_ThreadId_t r_dest        asm ("$16") = dest; /* in and out old_TimeControl */
+    register L4_Word_t r_time            asm ("$17") = TimeControl; 
+    register L4_Word_t r_processor       asm ("$18") = ProcessorControl;
+    register L4_Word_t r_prio	         asm ("$19") = prio;
+    register L4_Word_t r_preemption 	 asm ("$20") = PreemptionControl;
+
+    asm __volatile__ (
+	DO_SYSCALL(Schedule)
+	: "=r" (r_result), "+r" (r_dest) 
+	: "r" (r_time), "r" (r_processor), "r" (r_prio), "r" (r_preemption)
+	: "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", "$21",
+	  "$22", "$23", "$24", "$25", "$26", "$27", "$28");
+    
+    if(old_TimeControl)
+	*old_TimeControl = r_dest.raw;
+
+    return r_result;
+}
+
+L4_INLINE L4_MsgTag_t L4_Ipc (L4_ThreadId_t to,
+			      L4_ThreadId_t FromSpecifier,
+			      L4_Word_t Timeouts,
+			      L4_ThreadId_t * from)
+{
+    L4_MsgTag_t mr0;
+    L4_ThreadId_t result;
+
+    result = __L4_Ipc(to, FromSpecifier, Timeouts);
+   
+    if( !L4_IsNilThread(FromSpecifier) ) {
+	*from = result;
+    }
+
+    /* Return MR0 */
+    L4_StoreMR(0, (L4_Word_t *) &mr0);
+    return mr0;
+}
+
+L4_INLINE L4_MsgTag_t L4_AsynchIpc (L4_ThreadId_t to, L4_Word_t mask)
+{
+    register L4_ThreadId_t r_dest asm("$16") = to;
+    register L4_Word_t r_mr0      asm("$15") = L4_Asynchtag.raw;
+    register L4_Word_t r_mr1      asm("$7") = mask;
+
+    __asm__ __volatile__ (
+        DO_SYSCALL(Ipc)
+        : "+r" (r_dest), "+r" (r_mr0), "+r" (r_mr1)
+        :
+        : "$1", "$2", "$3", "$4", "$5", "$6", "$8", "$17",
+          "$18", "$19", "$20", "$21", "$22", "$23", "$24",
+          "$25", "$26", "$27", "$28", "memory"
+        );
+
+    {
+	L4_MsgTag_t tag;
+
+	tag.raw = r_mr0;
+	return tag;
+    }
+}
+
+L4_INLINE L4_MsgTag_t L4_WaitAsynch (L4_Word_t * mask, L4_ThreadId_t * from)
+{
+    register L4_ThreadId_t r_dest   asm ("$16") = L4_nilthread;
+    register L4_ThreadId_t r_from   asm ("$17") = L4_anythread;
+    register L4_Word_t r_timeout    asm ("$18") = 0;
+    register L4_Word_t r_mr0	    asm ("$15") = L4_Asynchtag.raw;
+    register L4_Word_t r_mr1	    asm ("$7")  = *mask;
+
+    __asm__ __volatile__ (
+        DO_SYSCALL(Ipc)
+        : "+r" (r_dest), "+r" (r_from), "+r" (r_timeout), 
+          "+r" (r_mr0), "+r" (r_mr1)
+        :
+        : "$1", "$2", "$3", "$4", "$5", "$6", "$8", "$19",
+          "$20", "$21", "$22", "$23", "$24", "$25", "$26",
+          "$27", "$28", "memory"
+        );
+
+    *mask = r_mr1;
+    *from = r_dest;
+
+    {
+	L4_MsgTag_t tag;
+
+	tag.raw = r_mr0;
+	return tag;
+    }
+}
+
+typedef L4_ThreadId_t (*__L4_Lipc_t)(L4_ThreadId_t to, L4_ThreadId_t FromSpecifier, L4_Word_t Timeouts);
+extern __L4_Lipc_t __L4_Lipc;
+
+L4_INLINE L4_MsgTag_t L4_Lipc (L4_ThreadId_t to,
+			       L4_ThreadId_t FromSpecifier,
+			       L4_Word_t Timeouts,
+			       L4_ThreadId_t * from)
+{
+    L4_MsgTag_t mr0;
+    L4_ThreadId_t result;
+
+    /* sjw (30/04/2003): Not LIPC as this isn't implemented on Alpha */
+    result = __L4_Ipc(to, FromSpecifier, Timeouts);
+   
+    if( !L4_IsNilThread(FromSpecifier) ) {
+	*from = result;
+    }
+
+    /* Return MR0 */
+    L4_StoreMR(0, (L4_Word_t *) &mr0);
+    return mr0;
+}
+
+
+typedef void (*__L4_Unmap_t)(L4_Word_t);
+extern __L4_Unmap_t __L4_Unmap;
+
+L4_INLINE void L4_Unmap (L4_Word_t control)
+{
+    __L4_Unmap(control);
+}
+
+typedef void (*__L4_SpaceControl_t)(L4_ThreadId_t SpaceSpecifier,
+				     L4_Word_t control,
+				     L4_Fpage_t KernelInterfacePageArea,
+				     L4_Fpage_t UtcbArea);
+extern __L4_SpaceControl_t __L4_SpaceControl;
+
+L4_INLINE L4_Word_t L4_SpaceControl (L4_ThreadId_t SpaceSpecifier,
+				     L4_Word_t control,
+				     L4_Fpage_t KernelInterfacePageArea,
+				     L4_Fpage_t UtcbArea,
+				     L4_Word_t *old_control)
+{
+    register L4_Word_t r_result         asm ("$0");
+    register L4_ThreadId_t r_space	asm ("$16") = SpaceSpecifier; /* and old_control */
+    register L4_Word_t r_control	asm ("$17") = control;        
+    register L4_Fpage_t r_kiparea	asm ("$18") = KernelInterfacePageArea;
+    register L4_Fpage_t r_utcbarea	asm ("$19") = UtcbArea;
+
+    __asm__ __volatile__ (
+	DO_SYSCALL(SpaceControl)
+	: /* outputs */
+	"=r" (r_result),
+	"+r" (r_space)
+	: /* inputs */
+	"r" (r_control),
+	"r" (r_kiparea),
+	"r" (r_utcbarea)
+	: "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", "$20",
+          "$21", "$22", "$23", "$24", "$25", "$26", "$27", "$28");
+
+    if(old_control)
+	*old_control = r_space.raw;
+
+    return r_result;
+}
+
+
+typedef L4_Word_t (*__L4_ProcessorControl_t)(L4_Word_t ProcessorNo,
+					  L4_Word_t InternalFrequency,
+					  L4_Word_t ExternalFrequency,
+					  L4_Word_t voltage);
+extern __L4_ProcessorControl_t __L4_ProcessorControl;
+    
+L4_INLINE L4_Word_t L4_ProcessorControl (L4_Word_t ProcessorNo,
+					 L4_Word_t InternalFrequency,
+					 L4_Word_t ExternalFrequency,
+					 L4_Word_t voltage)
+{
+    return __L4_ProcessorControl(ProcessorNo, InternalFrequency, ExternalFrequency, voltage);
+}
+
+typedef L4_Word_t (*__L4_MemoryControl_t)(L4_Word_t control,
+				     L4_Word_t attr0, L4_Word_t attr1, L4_Word_t attr2, L4_Word_t attr3);
+extern __L4_MemoryControl_t __L4_MemoryControl;
+
+L4_INLINE L4_Word_t L4_MemoryControl (L4_Word_t control,
+				 const L4_Word_t * attributes)
+{
+    return __L4_MemoryControl(control, attributes[0], attributes[1], attributes[2], attributes[3]);
+}
+
+#endif /* !__L4__ALPHA__SYSCALLS_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/types.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/types.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/types.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/types.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,47 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002, 2003,   University of New South Wales
+ *                
+ * File path:     l4/alpha/types.h
+ * Description:   Alpha specific type declararions
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: types.h,v 1.4 2003/09/24 19:06:22 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__ALPHA__TYPES_H__
+#define __L4__ALPHA__TYPES_H__
+
+#undef  L4_32BIT
+#define L4_64BIT
+#define L4_LITTLE_ENDIAN
+
+typedef unsigned long		L4_Word64_t;
+typedef unsigned int		L4_Word32_t;
+typedef unsigned short		L4_Word16_t;
+typedef unsigned char		L4_Word8_t;
+
+typedef unsigned long 		L4_Word_t;
+typedef unsigned long           L4_Size_t;
+
+#endif /* !__L4__ALPHA__TYPES_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/vregs.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/vregs.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/alpha/vregs.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/alpha/vregs.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,256 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002-2003,   University of New South Wales
+ *                
+ * File path:     l4/alpha/vregs.h
+ * Description:   
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: vregs.h,v 1.5 2004/04/29 01:31:03 cvansch Exp $
+ *                
+ ********************************************************************/
+
+#ifndef __L4__ALPHA__VREGS_H__
+#define __L4__ALPHA__VREGS_H__
+
+#include <l4/alpha/pal.h>
+
+L4_INLINE L4_Word_t *__L4_Alpha_Utcb( void ) __attribute__ ((const));
+L4_INLINE L4_Word_t *__L4_Alpha_Utcb( void )
+{    
+    /* sjw (02/09/2002): FIXME */
+    register L4_Word_t  *_L4_Utcb asm("$0");
+    
+    asm __volatile__ ("call_pal %1" : "=r" (_L4_Utcb) : "i" (PAL_rdunique));
+    
+    return _L4_Utcb;
+}
+
+#define __L4_NUM_MRS	64
+
+/*
+ * Location of TCRs within UTCB.
+ */
+
+#define __L4_TCR_MR_OFFSET		        (16)
+#define __L4_TCR_THREAD_WORD1    		(15)
+#define __L4_TCR_THREAD_WORD0    		(14)
+#define __L4_TCR_NOTIFY_BITS                    (13)
+#define __L4_TCR_PREEMPTED_IP			(12)
+#define __L4_TCR_PREEMPT_CALLBACK_IP		(11)
+#define __L4_TCR_VIRTUAL_ACTUAL_SENDER		(10)
+#define __L4_TCR_INTENDED_RECEIVER		(9)
+#define __L4_TCR_ERROR_CODE			(8)
+#define __L4_TCR_NOTIFY_MASK			(7)
+#define __L4_TCR_ACCEPTOR			(6)
+#define __L4_TCR_COP_FLAGS			(5)
+#define __L4_TCR_PREEMPT_FLAGS			(5)
+#define __L4_TCR_EXCEPTION_HANDLER		(4)
+#define __L4_TCR_PAGER				(3)
+#define __L4_TCR_USER_DEFINED_HANDLE		(2)
+#define __L4_TCR_PROCESSOR_NO			(1)
+#define __L4_TCR_MY_GLOBAL_ID			(0)
+
+/*
+ * Thread Control Registers.
+ */
+
+L4_INLINE L4_Word_t __L4_TCR_MyGlobalId( void )
+{
+    return (__L4_Alpha_Utcb())[ __L4_TCR_MY_GLOBAL_ID ];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ProcessorNo( void )
+{
+    return (__L4_Alpha_Utcb())[ __L4_TCR_PROCESSOR_NO ];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_UserDefinedHandle( void )
+{
+    return (__L4_Alpha_Utcb())[ __L4_TCR_USER_DEFINED_HANDLE ];
+}
+
+L4_INLINE void __L4_TCR_Set_UserDefinedHandle( L4_Word_t w )
+{
+    (__L4_Alpha_Utcb())[ __L4_TCR_USER_DEFINED_HANDLE ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_Pager( void )
+{
+    return (__L4_Alpha_Utcb())[ __L4_TCR_PAGER ];
+}
+
+L4_INLINE void __L4_TCR_Set_Pager( L4_Word_t w )
+{
+    (__L4_Alpha_Utcb())[ __L4_TCR_PAGER ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ExceptionHandler( void )
+{
+    return (__L4_Alpha_Utcb())[ __L4_TCR_EXCEPTION_HANDLER ];
+}
+
+L4_INLINE void __L4_TCR_Set_ExceptionHandler( L4_Word_t w )
+{
+    (__L4_Alpha_Utcb())[ __L4_TCR_EXCEPTION_HANDLER ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_Acceptor( void )
+{
+    return (__L4_Alpha_Utcb())[ __L4_TCR_ACCEPTOR ];
+}
+
+L4_INLINE void __L4_TCR_Set_Acceptor( L4_Word_t w )
+{
+    (__L4_Alpha_Utcb())[ __L4_TCR_ACCEPTOR ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_NotifyMask( void )
+{
+    return (__L4_Alpha_Utcb())[ __L4_TCR_NOTIFY_MASK ];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_NotifyBits( void )
+{
+    return (__L4_Alpha_Utcb())[ __L4_TCR_NOTIFY_BITS ];
+}
+
+L4_INLINE void __L4_TCR_Set_NotifyMask( L4_Word_t w )
+{
+    (__L4_Alpha_Utcb())[ __L4_TCR_NOTIFY_MASK ] = w;
+}
+
+L4_INLINE void __L4_TCR_Set_NotifyBits( L4_Word_t w )
+{
+    (__L4_Alpha_Utcb())[ __L4_TCR_NOTIFY_BITS ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ErrorCode( void )
+{
+    return (__L4_Alpha_Utcb())[ __L4_TCR_ERROR_CODE ];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_IntendedReceiver( void )
+{
+    return (__L4_Alpha_Utcb())[ __L4_TCR_INTENDED_RECEIVER ];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ActualSender( void )
+{
+    return (__L4_Alpha_Utcb())[ __L4_TCR_VIRTUAL_ACTUAL_SENDER ];
+}
+
+L4_INLINE void __L4_TCR_Set_VirtualSender( L4_Word_t w )
+{
+    (__L4_Alpha_Utcb())[ __L4_TCR_VIRTUAL_ACTUAL_SENDER ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ThreadWord (L4_Word_t n)
+{
+    return (__L4_Alpha_Utcb ())[__L4_TCR_THREAD_WORD0 + (int) n];
+}
+
+L4_INLINE void __L4_TCR_Set_ThreadWord (L4_Word_t n, L4_Word_t w)
+{
+    (__L4_Alpha_Utcb ())[__L4_TCR_THREAD_WORD0 + (int) n] = w;
+}
+
+L4_INLINE void L4_Set_CopFlag( L4_Word_t n )
+{
+    (__L4_Alpha_Utcb())[ __L4_TCR_COP_FLAGS ] |= (1 << n);
+}
+
+L4_INLINE void L4_Clr_CopFlag( L4_Word_t n )
+{
+    (__L4_Alpha_Utcb())[ __L4_TCR_COP_FLAGS ] &= ~(1 << n);
+}
+
+L4_INLINE L4_Bool_t L4_EnablePreemptionFaultException( void )
+{
+    L4_Bool_t old = ((__L4_Alpha_Utcb())[ __L4_TCR_PREEMPT_FLAGS ] >> 5) & 1;
+    (__L4_Alpha_Utcb())[ __L4_TCR_PREEMPT_FLAGS ] |= (1 << 5);
+    return old;
+}
+
+L4_INLINE L4_Bool_t L4_DisablePreemptionFaultException( void )
+{
+    L4_Bool_t old = ((__L4_Alpha_Utcb())[ __L4_TCR_PREEMPT_FLAGS ] >> 5) & 1;
+    (__L4_Alpha_Utcb())[ __L4_TCR_PREEMPT_FLAGS ] &= ~(1 << 5);
+    return old;
+}
+
+L4_INLINE L4_Bool_t L4_EnablePreemption( void )
+{
+    L4_Bool_t old = ((__L4_Alpha_Utcb())[ __L4_TCR_PREEMPT_FLAGS ] >> 6) & 1;
+    (__L4_Alpha_Utcb())[ __L4_TCR_PREEMPT_FLAGS ] |= (1 << 6);
+    return old;
+}
+
+L4_INLINE L4_Bool_t L4_DisablePreemption( void )
+{
+    L4_Bool_t old = ((__L4_Alpha_Utcb())[ __L4_TCR_PREEMPT_FLAGS ] >> 6) & 1;
+    (__L4_Alpha_Utcb())[ __L4_TCR_PREEMPT_FLAGS ] &= ~(1 << 6);
+    return old;
+}
+
+L4_INLINE L4_Bool_t L4_PreemptionPending( void )
+{
+    L4_Bool_t retval = (((__L4_Alpha_Utcb())[ __L4_TCR_PREEMPT_FLAGS ]) >> 7) & 1;
+    return retval;
+}
+
+
+
+/*
+ * Message Registers.
+ */
+
+L4_INLINE void L4_StoreMR( int i, L4_Word_t * w )
+{
+    *w = (__L4_Alpha_Utcb())[__L4_TCR_MR_OFFSET +  i ];
+}
+
+L4_INLINE void L4_LoadMR( int i, L4_Word_t w )
+{
+    (__L4_Alpha_Utcb())[__L4_TCR_MR_OFFSET + i ] = w;
+}
+
+L4_INLINE void L4_StoreMRs( int i, int k, L4_Word_t * w )
+{
+    L4_Word_t * mr = &(__L4_Alpha_Utcb())[__L4_TCR_MR_OFFSET + i];
+
+    while( k-- > 0 )
+	*w++ = *mr++;
+}
+
+L4_INLINE void L4_LoadMRs( int i, int k, L4_Word_t * w )
+{
+    L4_Word_t * mr = &(__L4_Alpha_Utcb())[__L4_TCR_MR_OFFSET + i];
+
+    while( k-- > 0 )
+	*mr++ = *w++;
+}
+
+
+#endif	/* __L4__ALPHA__VREGS_H__ */
+
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/amd64/.arch-ids/=id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/amd64/.arch-ids/=id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/amd64/.arch-ids/=id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/amd64/.arch-ids/=id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:55:27 2004 7610.0
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/amd64/.arch-ids/kdebug.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/amd64/.arch-ids/kdebug.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/amd64/.arch-ids/kdebug.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/amd64/.arch-ids/kdebug.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.92
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/amd64/.arch-ids/specials.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/amd64/.arch-ids/specials.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/amd64/.arch-ids/specials.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/amd64/.arch-ids/specials.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.93
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/amd64/.arch-ids/syscalls.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/amd64/.arch-ids/syscalls.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/amd64/.arch-ids/syscalls.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/amd64/.arch-ids/syscalls.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.94
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/amd64/.arch-ids/types.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/amd64/.arch-ids/types.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/amd64/.arch-ids/types.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/amd64/.arch-ids/types.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.95
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/amd64/.arch-ids/vregs.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/amd64/.arch-ids/vregs.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/amd64/.arch-ids/vregs.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/amd64/.arch-ids/vregs.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.96
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/amd64/kdebug.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/amd64/kdebug.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/amd64/kdebug.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/amd64/kdebug.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,92 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002, 2003,  Karlsruhe University
+ *                
+ * File path:     l4/amd64/kdebug.h
+ * Description:   L4 Kdebug interface for AMD64
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: kdebug.h,v 1.3 2003/09/24 19:06:22 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__AMD64__KDEBUG_H__
+#define __L4__AMD64__KDEBUG_H__
+
+#define L4_KDB_Enter(str...)			\
+do {						\
+    __asm__ __volatile__ (			\
+	"/* L4_KDB_Enter() */		\n"	\
+	"	int	$3		\n"	\
+	"	jmp	2f		\n"	\
+	"	movq	$1f, %rax	\n"	\
+	".section .rodata		\n"	\
+	"1:	.ascii \"" str "\"	\n"	\
+	"	.byte 0			\n"	\
+	".previous			\n"	\
+	"2:				\n");	\
+} while (0)
+
+#define __L4_KDB_Op(op, name)			\
+L4_INLINE void L4_KDB_##name (void)		\
+{						\
+    __asm__ __volatile__ (			\
+	"/* L4_KDB_"#name"() */		\n"	\
+	"	int	$3		\n"	\
+	"	cmpb	%0, %%al	\n"	\
+	:					\
+	: "i" (op));				\
+}
+
+#define __L4_KDB_Op_Arg(op, name, argtype)	\
+L4_INLINE void L4_KDB_##name (argtype arg)	\
+{						\
+    __asm__ __volatile__ (			\
+	"/* L4_KDB_"#name"() */		\n"	\
+	"	int	$3		\n"	\
+	"	cmpb	%1, %%al	\n"	\
+	:					\
+	: "a" (arg), "i" (op));			\
+}
+
+#define __L4_KDB_Op_Ret(op, name, rettype)	\
+L4_INLINE rettype L4_KDB_##name (void)		\
+{						\
+    rettype ret;				\
+    __asm__ __volatile__ (			\
+	"/* L4_KDB_"#name"() */		\n"	\
+	"	int	$3		\n"	\
+	"	cmpb	%1, %%al	\n"	\
+	: "=a" (ret)				\
+	: "i" (op));				\
+    return ret;					\
+}
+
+
+__L4_KDB_Op_Arg (0x00, PrintChar, char);
+__L4_KDB_Op_Arg (0x01, PrintString, char *);
+__L4_KDB_Op     (0x02, ClearPage);
+__L4_KDB_Op_Ret (0x08, ReadChar, char);
+__L4_KDB_Op_Ret (0x0d, ReadChar_Blocked, char);
+
+
+#endif /* !__L4__AMD64__KDEBUG_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/amd64/specials.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/amd64/specials.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/amd64/specials.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/amd64/specials.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,113 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002, 2003,  Karlsruhe University
+ *                
+ * File path:     l4/amd64/specials.h
+ * Description:   amd64 specific functions and defines
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: 
+ *                
+ ********************************************************************/
+#ifndef __L4__AMD64__SPECIALS_H__
+#define __L4__AMD64__SPECIALS_H__
+
+/*
+ * Architecture specific helper functions.
+ */
+
+
+L4_INLINE int __L4_Msb (L4_Word_t w) __attribute__ ((const));
+
+L4_INLINE int __L4_Msb (L4_Word_t w)
+{
+    L4_Word_t bitnum;
+
+    __asm__ (
+	"/* l4_msb()		*/			\n"
+	"bsrq	%1, %0					\n"
+	: /* outputs */
+	"=r" (bitnum)
+	: /* inputs */
+	"rm" (w)
+	);
+
+    return bitnum;
+}
+
+
+
+
+/*
+ * IO fpages.
+ */
+typedef union {
+    L4_Word_t	raw;
+    struct {
+	unsigned	rwx:4;
+	unsigned	__two:6;
+	unsigned	s:6;
+	unsigned	p:16;
+    } X;
+} L4_IoFpage_t;
+
+#if defined(__l4_cplusplus)
+L4_INLINE L4_Fpage_t L4_Fpage (L4_Fpage_t f)
+{
+    L4_Fpage_t out;
+    out.raw = f.raw;
+    return out;
+}
+
+L4_INLINE L4_IoFpage_t L4_IoFpage (L4_IoFpage_t f)
+{
+    L4_IoFpage_t out;
+    out.raw = f.raw;
+    return out;
+}
+
+L4_INLINE L4_IoFpage_t L4_IoFpage (L4_Word_t BaseAddress, int FpageSize)
+{
+    L4_IoFpage_t fp;
+    fp.raw = BaseAddress;
+    fp.X.__two = 2;
+    fp.X.s = __L4_Msb (FpageSize) - 10;
+    fp.X.rwx = L4_NoAccess;
+    return fp;
+}
+
+L4_INLINE L4_IoFpage_t L4_IoFpageLog2 (L4_Word_t BaseAddress, int FpageSize)
+{
+    L4_IoFpage_t fp;
+    fp.raw = BaseAddress;
+    fp.X.__two = 2;
+    fp.X.s = FpageSize;
+    fp.X.rwx = L4_NoAccess;
+    return fp;
+}
+#endif
+
+
+
+
+#endif /* !__L4__AMD64__SPECIALS_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/amd64/syscalls.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/amd64/syscalls.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/amd64/syscalls.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/amd64/syscalls.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,536 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2001, 2002, 2003-2004,  Karlsruhe University
+ *                
+ * File path:     l4/amd64/syscalls.h
+ * Description:   amd64 syscall implementations
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: 
+ *                
+ ********************************************************************/
+
+
+#ifndef __L4__AMD64__SYSCALLS_H__
+#define __L4__AMD64__SYSCALLS_H__
+
+#include __L4_INC_ARCH(vregs.h)
+#include __L4_INC_ARCH(specials.h)
+#include <l4/message.h>
+#include __L4_INC_ARCH(kdebug.h)
+
+
+typedef struct {
+    L4_Word_t rax;
+    L4_Word_t rdx;
+} __L4_Return_t;
+
+
+L4_INLINE void * L4_KernelInterface (L4_Word_t *ApiVersion,
+				     L4_Word_t *ApiFlags,
+				     L4_Word_t *KernelId)
+{
+    void * base_address;
+
+    __asm__ __volatile__ (
+	"/* L4_KernelInterface() */ 			\n"
+	"	lock; nop				\n"
+
+	: /* outputs */
+	"=a" (base_address),
+	"=c" (*ApiVersion),
+	"=d" (*ApiFlags),
+	"=S" (*KernelId)
+
+	/* no inputs */
+	/* no clobbers */
+	);
+
+    return base_address;
+}
+typedef void (*__L4_Nop_t)(void);
+
+typedef L4_Word_t (*__L4_ExchangeRegisters_t)( L4_Word_t, L4_Word_t, L4_Word_t,
+	L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t );
+
+extern __L4_ExchangeRegisters_t __L4_ExchangeRegisters;
+
+L4_INLINE L4_ThreadId_t L4_ExchangeRegisters (L4_ThreadId_t dest,
+					      L4_Word_t control,
+					      L4_Word_t sp,
+					      L4_Word_t ip,
+					      L4_Word_t flags,
+					      L4_Word_t UserDefHandle,
+					      L4_ThreadId_t pager,
+					      L4_Word_t *old_control,
+					      L4_Word_t *old_sp,
+					      L4_Word_t *old_ip,
+					      L4_Word_t *old_flags,
+					      L4_Word_t *old_UserDefhandle,
+					      L4_ThreadId_t *old_pager)
+{
+    L4_ThreadId_t       result;
+    
+    L4_Word_t       dummy;
+    struct {
+	L4_Word_t       r8;
+	L4_Word_t       r9;
+	L4_Word_t       r10;
+    } args;
+
+    args.r8 = ip;
+    args.r9 = flags;
+    args.r10 = UserDefHandle;
+    
+    __asm__ __volatile__ (
+	"/* L4_ExchangeRegisters */		\n"
+	"movq (%[args]), %%r8			\n"
+	"movq 8(%[args]), %%r9			\n"
+	"movq 16(%[args]), %%r10		\n"
+	"pushq %%rbp				\n"
+	"pushq %[args]				\n"
+	"callq *__L4_ExchangeRegisters		\n"
+	"popq %[args]				\n"
+	"popq %%rbp				\n"
+	"movq %%r8,   (%[args])	 		\n"
+	"movq %%r9,   8(%[args])	        \n"
+	"movq %%r10, 16(%[args])		\n"
+	: /* outputs */
+	"=a" (result),				/* %0 RAX */
+	"=c" (dummy),				/* %1 RCX <- R8, R9, R10 */	
+	"=d" (*old_sp),				/* %2 RDX */
+	"=S" (*old_control),			/* %3 RSI */
+	"=D" (*old_pager)			/* %4 RDI */
+	: /* inputs */
+	[dest]		"0" (dest),		/* %5  RAX */
+	[args]		"1" (&args),		/* %6  RCX -> R8, R9, R10 */
+	[sp]		"2" (sp),		/* %7  RDX */
+	[control]	"3" (control),		/* %8  RSI */	
+	[pager]		"4" (pager)		/* %9  RDI */
+	: /* clobbers */
+	"memory", "rbx", "r8", "r9", "r10",  "r11", "r12", "r13", "r14", "r15"
+	);
+    
+  *old_ip = args.r8;
+  *old_flags = args.r9;    
+  *old_UserDefhandle = args.r10;
+  
+  return result;
+}
+
+typedef L4_Word_t (*__L4_ThreadControl_t)( L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t );
+extern __L4_ThreadControl_t __L4_ThreadControl;
+
+L4_INLINE L4_Word_t L4_ThreadControl (L4_ThreadId_t dest,
+				      L4_ThreadId_t SpaceSpecifier,
+				      L4_ThreadId_t Scheduler,
+				      L4_ThreadId_t Pager,
+				      void * UtcbLocation)
+{
+
+    L4_Word_t result = 0;
+    L4_Word_t dummy = 0;
+    
+    __asm__ __volatile__ (
+	"/* L4_ThreadControl */			\n"
+	"movq %%rax, %%r8			\n"
+	"movq %%rcx, %%r9			\n"
+	"pushq %%rbp				\n"
+	"callq *__L4_ThreadControl		\n"
+	"popq %%rbp				\n"
+	: /* outputs */
+	"=a" (result),				/* %0 RAX */
+	"=c" (dummy),				/* %1 RCX */	
+	"=d" (dummy),				/* %2 RDX */
+	"=S" (dummy),				/* %3 RSI */
+	"=D" (dummy)				/* %4 RDI */
+	: /* inputs */
+	[spacespec]	"0" (SpaceSpecifier),	/* %5  RAX <- R8 */
+	[utcblocation]	"1" (UtcbLocation),	/* %6  RCX <- R9 */
+	[scheduler]	"2" (Scheduler),	/* %7  RDX */
+	[pager]		"3" (Pager),		/* %8  RSI */	
+	[dest]		"4" (dest)		/* %9  RDI */
+	: /* clobbers */
+	"memory", "rbx", "r8", "r9", "r11", "r12", "r13", "r14", "r15"
+	);
+  
+  return result;
+}
+
+
+
+typedef L4_Word_t (*__L4_ThreadSwitch_t)( L4_Word_t );
+extern __L4_ThreadSwitch_t __L4_ThreadSwitch;
+
+L4_INLINE void L4_ThreadSwitch (L4_ThreadId_t dest)
+{
+    L4_Word_t dummy;
+    __asm__ __volatile__ (
+	"/* L4_ThreadSwitch */			\n"
+	"pushq %%rbp				\n"
+	"callq *__L4_ThreadSwitch		\n"
+	"popq %%rbp				\n"
+	: /* outputs */
+	"=D" (dummy)				/* %0 RDI */
+	: /* inputs */
+	[dest]		"0" (dest)		/* %1  RDI */
+	: /* clobbers */
+	"memory", "rax", "rbx", "rcx",  "rdx", "rsi", 
+	"r8", "r9", "r10",  "r11", "r12", "r13", "r14", "r15"
+	);
+
+}
+
+
+
+typedef __L4_Return_t (*__L4_Schedule_t)( L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t );
+extern __L4_Schedule_t __L4_Schedule;
+
+L4_INLINE L4_Word_t  L4_Schedule (L4_ThreadId_t dest,
+				  L4_Word_t TimeControl,
+				  L4_Word_t ProcessorControl,
+				  L4_Word_t prio,
+				  L4_Word_t PreemptionControl,
+				  L4_Word_t * old_TimeControl)
+{
+    L4_Word_t result = 0;
+    L4_Word_t dummy = 0;
+    
+    __asm__ __volatile__ (
+	"/* L4_Schedule */			\n"
+	"movq %%rax, %%r8			\n"
+	"movq %%rcx, %%r9			\n"
+	"pushq %%rbp				\n"
+	"callq *__L4_Schedule			\n"
+	"popq %%rbp				\n"
+	: /* outputs */
+	"=a" (*old_TimeControl),		/* %0 RAX -> R8 */
+	"=c" (dummy),				/* %1 RCX -> R9*/	
+	"=d" (dummy),				/* %2 RDX */
+	"=S" (dummy),				/* %3 RSI */
+	"=D" (dummy)				/* %4 RDI */
+	: /* inputs */
+	[procontrol]	"0" (ProcessorControl),	/* %5  RAX <- R8 */
+	[precontrol]	"1" (PreemptionControl),/* %6  RCX <- R9 */
+	[tcontrol]	"2" (TimeControl),	/* %7  RDX */
+	[prio]		"3" (prio),		/* %8  RSI */	
+	[dest]		"4" (dest)		/* %9  RDI */
+	: /* clobbers */
+	"memory", "rbx","r8", "r9", "r10",  "r11", "r12", "r13", "r14", "r15"
+	);
+  
+  return result;
+}
+
+
+typedef L4_Word_t (*__L4_Ipc_t)( L4_Word_t, L4_Word_t, L4_Word_t );
+extern __L4_Ipc_t __L4_Ipc;
+
+L4_INLINE L4_MsgTag_t L4_Ipc (L4_ThreadId_t to,
+			      L4_ThreadId_t FromSpecifier,
+			      L4_Word_t Timeouts,
+			      L4_ThreadId_t * from)
+{
+
+    L4_ThreadId_t result;
+    L4_Word_t * utcb = __L4_X86_Utcb ();
+    
+    L4_Word_t dummy;
+
+    
+    __asm__ __volatile__ (
+	"/* L4_Ipc() */				\n"
+	"movq	%[timeouts], %%r8		\n"
+	"movq	%%rcx, %%r9			\n"
+	"movq	 8(%[utcb]), %%rax		\n" 
+	"movq	16(%[utcb]), %%rbx		\n" 
+	"movq	24(%[utcb]), %%r10		\n" 
+	"movq	32(%[utcb]), %%r12		\n" 
+	"movq	40(%[utcb]), %%r13		\n" 
+	"movq	48(%[utcb]), %%r14		\n" 
+	"movq	56(%[utcb]), %%r15		\n" 
+	"pushq	%%rbp				\n"
+	"callq	*__L4_Ipc			\n"
+	"popq	%%rbp				\n"
+	"movq	%%r10, 24(%[utcb]) 		\n" 
+	"movq	%%r12, 32(%[utcb]) 		\n" 
+	"movq	%%r13, 40(%[utcb]) 		\n" 
+	"movq	%%r14, 48(%[utcb]) 		\n" 
+	"movq	%%r15, 56(%[utcb]) 		\n" 
+	"movq	%%r9, %%rcx			\n"
+	: /* outputs */
+	"=a" (utcb[1]),				/* %0 RAX */
+	"=b" (utcb[2]),				/* %1 RBX */			
+	"=c" (utcb[0]),				/* %2 RCX <- R09*/	
+	"=d" (dummy),				/* %3 RDX */
+	"=S" (result)				/* %4 RSI */
+	
+	: /* inputs */
+	[to]		"4" (to),		/* %5  RSI */
+	[utcb]		"D" (utcb),		/* %6  RDI */
+	[from]		"3" (FromSpecifier),	/* %7  RDX */
+	[utcb0]		"2" (utcb[0]),		/* %8  RCX -> R09 */
+	[timeouts]	"r" (Timeouts)		/* %9  REG -> R08 */
+	: /* clobbers */
+	  "memory", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
+	);
+
+    if (! L4_IsNilThread (FromSpecifier)) {
+	*from = result;
+    }
+    
+    return * (L4_MsgTag_t *) (&utcb[0]);
+   
+}
+
+typedef L4_Word_t (*__L4_Lipc_t)( L4_Word_t, L4_Word_t, L4_Word_t );
+extern __L4_Lipc_t __L4_Lipc;
+
+L4_INLINE L4_MsgTag_t L4_Lipc (L4_ThreadId_t to,
+			       L4_ThreadId_t FromSpecifier,
+			       L4_Word_t Timeouts,
+			       L4_ThreadId_t * from)
+{
+    L4_ThreadId_t result;
+    L4_Word_t * utcb = __L4_X86_Utcb ();
+    L4_Word_t dummy;
+
+    
+    __asm__ __volatile__ (
+	"/* L4_Ipc() */				\n"
+	"movq	%[timeouts], %%r8		\n"
+	"movq	%[utcb0], %%r9			\n"
+	"movq	 8(%[utcb]), %%rax		\n" 
+	"movq	16(%[utcb]), %%rbx		\n" 
+	"movq	24(%[utcb]), %%r10		\n" 
+	"movq	32(%[utcb]), %%r12		\n" 
+	"movq	40(%[utcb]), %%r13		\n" 
+	"movq	48(%[utcb]), %%r14		\n" 
+	"movq	56(%[utcb]), %%r15		\n" 
+	"pushq	%%rbp				\n"
+	"callq	*__L4_Ipc			\n"
+	"popq	%%rbp				\n"
+	"movq	%%r9, %[utcb0]			\n"
+	"movq	%%r10, 24(%[utcb]) 		\n" 
+	"movq	%%r12, 32(%[utcb]) 		\n" 
+	"movq	%%r13, 40(%[utcb]) 		\n" 
+	"movq	%%r14, 48(%[utcb]) 		\n" 
+	"movq	%%r15, 56(%[utcb]) 		\n" 
+	: /* outputs */
+	"=a" (utcb[1]),				/* %0 RAX */
+	"=b" (utcb[2]),				/* %1 RBX */			
+	"=c" (utcb[0]),				/* %2 RCX <- R09*/	
+	"=d" (dummy),				/* %3 RDX */
+	"=S" (result)				/* %4 RSI */
+	
+	: /* inputs */
+	[to]		"4" (to),		/* %5  RSI */
+	[utcb]		"D" (utcb),		/* %6  RDI */
+	[from]		"3" (FromSpecifier),	/* %7  RDX */
+	[utcb0]		"2" (utcb[0]),		/* %8  RCX -> R09 */
+	[timeouts]	"r" (Timeouts)		/* %9  REG -> R08 */
+	: /* clobbers */
+	  "memory", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
+	);
+
+    if (! L4_IsNilThread (FromSpecifier)) {
+	*from = result;
+    }
+    
+    return * (L4_MsgTag_t *) (&utcb[0]);
+
+   
+}
+
+
+typedef void (*__L4_Unmap_t)( L4_Word_t );
+extern __L4_Unmap_t __L4_Unmap;
+
+L4_INLINE void L4_Unmap (L4_Word_t control)
+{   
+    
+    L4_Word_t * utcb = __L4_X86_Utcb ();
+    L4_Word_t dummy;
+    
+    __asm__ __volatile__ (
+	"/* L4_Unmap() */			\n"
+	"movq	%[utcb0], %%r9			\n"
+	"movq	24(%[utcb]), %%r10		\n" 
+	"movq	32(%[utcb]), %%r12		\n" 
+	"movq	40(%[utcb]), %%r13		\n" 
+	"movq	48(%[utcb]), %%r14		\n" 
+	"movq	56(%[utcb]), %%r15		\n" 
+	"pushq	%%rbp				\n"
+	"callq	*__L4_Unmap			\n"
+	"popq	%%rbp				\n"
+	"movq	%%r10, 24(%[utcb]) 		\n" 
+	"movq	%%r12, 32(%[utcb]) 		\n" 
+	"movq	%%r13, 40(%[utcb]) 		\n" 
+	"movq	%%r14, 48(%[utcb]) 		\n" 
+	"movq	%%r15, 56(%[utcb]) 		\n" 
+	"movq	%%r9, %[utcb0]			\n"
+	: /* outputs */
+	  "=a" (utcb[1]),				/* %0 RAX */
+	  "=b" (utcb[2]),				/* %1 RBX */			
+	  "=c" (utcb[0]),				/* %2 RCX <- R09*/	
+	  "=d" (dummy),	        			/* %3 RDX */
+	  "=D" (utcb)	        			/* %4 RDI */
+	  
+	: /* inputs */
+	  [utcb1]	"0" (utcb[1]),			/* %5 RAX */
+	  [utcb2]	"1" (utcb[2]),			/* %6 RBX */
+	  [utcb0]	"2" (utcb[0]),			/* %7 RCX -> R09 */
+	  [control]	"3" (control),        		/* %8 RDX */
+	  [utcb]	"4" (utcb)	       		/* %9 RDI */
+	: /* clobbers */
+	  "memory", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
+	);
+
+}
+
+typedef __L4_Return_t (*__L4_SpaceControl_t)( L4_Word_t, L4_Word_t, L4_Word_t,
+	L4_Word_t, L4_Word_t );
+extern __L4_SpaceControl_t __L4_SpaceControl;
+
+L4_INLINE L4_Word_t L4_SpaceControl (L4_ThreadId_t SpaceSpecifier,
+				     L4_Word_t control,
+				     L4_Fpage_t KernelInterfacePageArea,
+				     L4_Fpage_t UtcbArea,
+				     L4_ThreadId_t redirector,
+				     L4_Word_t *old_control)
+{
+    L4_Word_t result = 0;
+    L4_Word_t dummy = 0;
+    
+    __asm__ __volatile__ (
+	"/* L4_SpaceControl */			\n"
+	"movq %%rax, %%r8			\n"
+	"movq %%rcx, %%r9			\n"
+	"pushq %%rbp				\n"
+	"callq *__L4_SpaceControl		\n"
+	"popq %%rbp				\n"
+	: /* outputs */
+	"=a" (result),					/* %0 RAX */
+	"=c" (dummy), 	  	  		  	/* %1 RCX */	
+	"=d" (*old_control),  	  		  	/* %2 RDX */
+	"=S" (dummy), 	  	  		  	/* %3 RSI */
+	"=D" (dummy)  	  	  		  	/* %4 RDI */
+	: /* inputs */
+	[utcbarea]	"0" (UtcbArea),			/* %5  RAX -> R8 */
+	[redirector]	"1" (redirector),		/* %6  RCX -> R9 */
+	[kiparea]	"2" (KernelInterfacePageArea),	/* %7  RDX */
+	[control]	"3" (control),			/* %8  RSI */	
+	[spacespec]	"4" (SpaceSpecifier)		/* %9  RDI */
+	: /* clobbers */
+	"memory", "rbx", "r8", "r9", "r10",  "r11", "r12", "r13", "r14", "r15"
+	);
+  
+  return result;
+}
+
+typedef L4_Word_t (*__L4_ProcessorControl_t)( L4_Word_t,  L4_Word_t,
+	L4_Word_t, L4_Word_t );
+extern __L4_ProcessorControl_t __L4_ProcessorControl;
+
+
+L4_INLINE L4_Word_t L4_ProcessorControl (L4_Word_t ProcessorNo,
+					 L4_Word_t InternalFrequency,
+					 L4_Word_t ExternalFrequency,
+					 L4_Word_t voltage)
+{
+    L4_Word_t result;
+    L4_Word_t dummy;
+    __asm__ __volatile__ (
+	"/* L4_ProcessorControl */		\n"
+	"movq %%rax, %%r8			\n"
+	"pushq %%rbp				\n"
+	"callq *__L4_ProcessorControl		\n"
+	"popq %%rbp				\n"
+	: /* outputs */
+	"=a" (result),				/* %0 RAX  */
+	"=d" (dummy),				/* %1 RDX */
+	"=S" (dummy),				/* %2 RSI */
+	"=D" (dummy)				/* %3 RDI */
+	: /* inputs */
+	[voltage]	"0" (voltage),		/* %4  RAX -> R8 */
+	[exfreq]	"1" (ExternalFrequency),/* %5  RDX */
+	[intfreq]	"2" (InternalFrequency),/* %6  RSI */	
+	[procno]	"3" (ProcessorNo)	/* %7  RDI */
+	: /* clobbers */
+	"memory", "rcx", "rbx", "r8", "r9", "r10",  "r11", "r12", "r13", "r14", "r15"
+	);
+  
+  return result;
+}
+
+typedef L4_Word_t (*__L4_MemoryControl_t)( L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t );
+extern __L4_MemoryControl_t __L4_MemoryControl;
+
+L4_INLINE L4_Word_t L4_MemoryControl (L4_Word_t control,
+				 const L4_Word_t * attributes)
+{
+    L4_Word_t result;
+    L4_Word_t dummy;
+    L4_Word_t * utcb = __L4_X86_Utcb ();
+
+    __asm__ __volatile__ (
+	"/* L4_MemoryControl */			\n"
+	"movq   (%[attributes]), %%rcx		\n"
+	"movq  8(%[attributes]), %%rsi		\n"
+	"movq 16(%[attributes]), %%r8		\n"
+	"movq 24(%[attributes]), %%r11		\n"
+	"movq	%[utcb0], %%r9			\n"
+	"movq	16(%[utcb]), %%rbx		\n" 
+	"movq	24(%[utcb]), %%r10		\n" 
+	"movq	32(%[utcb]), %%r12		\n" 
+	"movq	40(%[utcb]), %%r13		\n" 
+	"movq	48(%[utcb]), %%r14		\n" 
+	"movq	56(%[utcb]), %%r15		\n" 
+	"pushq	%%rbp				\n"
+	"callq	*__L4_MemoryControl		\n"
+	"popq	%%rbp				\n"
+	
+	: /* outputs */
+	  "=a" (utcb[1]),				/* %0 RAX */
+	  "=b" (dummy),					/* %1 RBX */	
+	  "=c" (utcb[0]),				/* %2 RCX <- R09*/	
+	  "=d" (result),	        		/* %3 RDX */
+	  "=D" (utcb)	        			/* %4 RDI */
+	  
+	: /* inputs */
+	  [utcb1]	"0" (utcb[1]),			/* %5 RAX */
+	  [attributes]	"1" (attributes),		/* %6 RBX -> RCX, RSI, R8, R11 */
+	  [utcb0]	"2" (utcb[0]),			/* %7 RCX -> R09 */
+	  [control]	"3" (control),        		/* %8 RDX */
+	  [utcb]	"4" (utcb)	       		/* %9 RDI */
+	: /* clobbers */
+
+	  "memory", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
+	);
+
+    return result;
+}
+
+
+
+#endif /* !__L4__AMD64__SYSCALLS_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/amd64/types.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/amd64/types.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/amd64/types.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/amd64/types.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,67 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2003,  Karlsruhe University
+ *                
+ * File path:     l4/amd64/types.h
+ * Description:   
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: types.h,v 1.2 2003/09/24 19:06:22 skoglund Exp $
+ *                
+ ********************************************************************/
+
+
+#ifndef __L4__AMD64__TYPES_H__
+#define __L4__AMD64__TYPES_H__
+
+#if !defined(ELF_LOADER_32BIT)
+#define L4_64BIT
+#undef  L4_32BIT
+
+typedef unsigned long		L4_Word64_t;
+typedef unsigned int		L4_Word32_t;
+typedef unsigned short		L4_Word16_t;
+typedef unsigned char		L4_Word8_t;
+
+typedef unsigned long		L4_Word_t;
+typedef unsigned long		L4_Size_t;
+
+
+
+#else /*  !ELF_LOADER_32BIT */
+
+#define L4_32BIT
+#undef  L4_64BIT
+
+
+typedef unsigned long long      L4_Word64_t;
+typedef unsigned int		L4_Word32_t;
+typedef unsigned short		L4_Word16_t;
+typedef unsigned char		L4_Word8_t;
+
+typedef unsigned long		L4_Word_t;
+typedef unsigned int		L4_Size_t;
+
+#endif /* !ELF_LOADER_32BIT */
+
+#endif /* !__L4__AMD64__TYPES_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/amd64/vregs.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/amd64/vregs.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/amd64/vregs.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/amd64/vregs.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,309 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2001-2003,  Karlsruhe University
+ *                
+ * File path:     l4/amd64/vregs.h
+ * Description:   amd64 virtual registers
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: vregs.h,v 1.2 2003/09/24 19:06:22 skoglund Exp $
+ *                
+ ********************************************************************/
+
+#ifndef __L4__AMD64__VREGS_H__
+#define __L4__AMD64__VREGS_H__
+
+
+/*
+ * All virtual registers on x86 is located in a user Level Thread
+ * Control Block (UTCB).
+ */
+
+L4_INLINE L4_Word_t * __L4_X86_Utcb (void) __attribute__ ((const));
+
+L4_INLINE L4_Word_t * __L4_X86_Utcb (void)
+{
+    L4_Word_t *utcb;
+
+    __asm__ (
+	"/* __L4_X86_Utcb() */			\n"
+	"	movq %%gs:0, %0			\n"
+
+	: /* outputs */
+	"=r"(utcb)
+
+	/* no inputs */
+	/* no clobbers */
+	);
+
+    return utcb;
+}
+
+
+
+#define __L4_NUM_MRS	64
+#define __L4_NUM_BRS	33
+
+/*
+ * Location of TCRs within UTCB. (Counted in word_t)
+ */
+
+#define __L4_TCR_THREAD_WORD_0			(-4)
+#define __L4_TCR_THREAD_WORD_1			(-5)
+#define __L4_TCR_VIRTUAL_ACTUAL_SENDER		(-6)
+#define __L4_TCR_INTENDED_RECEIVER		(-7)
+#define __L4_TCR_XFER_TIMEOUT			(-8)
+#define __L4_TCR_ERROR_CODE			(-9)
+#define __L4_TCR_PREEMPT_FLAGS			(-10)
+#define __L4_TCR_COP_FLAGS			(-10)
+#define __L4_TCR_EXCEPTION_HANDLER		(-11)
+#define __L4_TCR_PAGER				(-12)
+#define __L4_TCR_USER_DEFINED_HANDLE		(-13)
+#define __L4_TCR_PROCESSOR_NO			(-14)
+#define __L4_TCR_MY_GLOBAL_ID			(-15)
+
+
+
+/*
+ * Thread Control Registers.
+ */
+
+L4_INLINE L4_Word_t __L4_TCR_MyGlobalId (void)
+{
+    return (__L4_X86_Utcb ())[__L4_TCR_MY_GLOBAL_ID];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ProcessorNo (void)
+{
+    return (__L4_X86_Utcb ())[__L4_TCR_PROCESSOR_NO];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_UserDefinedHandle (void)
+{
+    return (__L4_X86_Utcb ())[__L4_TCR_USER_DEFINED_HANDLE];
+}
+
+L4_INLINE void __L4_TCR_Set_UserDefinedHandle (L4_Word_t w)
+{
+    (__L4_X86_Utcb ())[__L4_TCR_USER_DEFINED_HANDLE] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_Pager (void)
+{
+    return (__L4_X86_Utcb ())[__L4_TCR_PAGER];
+}
+
+L4_INLINE void __L4_TCR_Set_Pager (L4_Word_t w)
+{
+    (__L4_X86_Utcb ())[__L4_TCR_PAGER] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ExceptionHandler (void)
+{
+    return (__L4_X86_Utcb ())[__L4_TCR_EXCEPTION_HANDLER];
+}
+
+L4_INLINE void __L4_TCR_Set_ExceptionHandler (L4_Word_t w)
+{
+    (__L4_X86_Utcb ())[__L4_TCR_EXCEPTION_HANDLER] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ErrorCode (void)
+{
+    return (__L4_X86_Utcb ())[__L4_TCR_ERROR_CODE];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_XferTimeout (void)
+{
+    return (__L4_X86_Utcb ())[__L4_TCR_XFER_TIMEOUT];
+}
+
+L4_INLINE void __L4_TCR_Set_XferTimeout (L4_Word_t w)
+{
+    (__L4_X86_Utcb ())[__L4_TCR_XFER_TIMEOUT] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_IntendedReceiver(void)
+{
+    return (__L4_X86_Utcb ())[__L4_TCR_INTENDED_RECEIVER];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ActualSender (void)
+{
+    return (__L4_X86_Utcb ())[__L4_TCR_VIRTUAL_ACTUAL_SENDER];
+}
+
+L4_INLINE void __L4_TCR_Set_VirtualSender (L4_Word_t w)
+{
+    (__L4_X86_Utcb ())[__L4_TCR_VIRTUAL_ACTUAL_SENDER] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ThreadWord (L4_Word_t n)
+{
+    return (__L4_X86_Utcb ())[__L4_TCR_THREAD_WORD_0 - (int) n];
+}
+
+L4_INLINE void __L4_TCR_Set_ThreadWord (L4_Word_t n, L4_Word_t w)
+{
+    (__L4_X86_Utcb ())[__L4_TCR_THREAD_WORD_0 - (int) n] = w;
+}
+
+L4_INLINE void L4_Set_CopFlag (L4_Word_t n)
+{
+    __asm__ ("orq %0, %1"
+	     :
+	     :
+	     "ir" (1 << (8 + n)),
+	     "m" ((__L4_X86_Utcb ())[__L4_TCR_COP_FLAGS]));
+}
+
+L4_INLINE void L4_Clr_CopFlag (L4_Word_t n)
+{
+    __asm__ ("andq %0, %1"
+	     :
+	     :
+	     "ir" (~(1 << (8 + n))),
+	     "m" ((__L4_X86_Utcb ())[__L4_TCR_COP_FLAGS]));
+}
+
+L4_INLINE L4_Bool_t L4_EnablePreemptionFaultException (void)
+{
+     L4_Word8_t retval = 0;
+
+    __asm__ ("bts %1, %2; setc %0"
+	     : "=r" (retval)
+	     : "i" (5), "m" ((__L4_X86_Utcb ())[__L4_TCR_PREEMPT_FLAGS]));
+
+    return (L4_Bool_t)retval;
+}
+
+L4_INLINE L4_Bool_t L4_DisablePreemptionFaultException (void)
+{
+     L4_Word8_t retval = 0;
+
+    __asm__ ("btr %1, %2; setc %0"
+	     : "=r" (retval)
+	     : "i" (5), "m" ((__L4_X86_Utcb ())[__L4_TCR_PREEMPT_FLAGS]));
+
+    return (L4_Bool_t)retval;
+}
+
+L4_INLINE L4_Bool_t L4_EnablePreemption (void)
+{
+     L4_Word8_t retval = 0;
+
+    __asm__ ("bts %1, %2; setc %0"
+	     : "=r" (retval)
+	     : "i" (6), "m" ((__L4_X86_Utcb ())[__L4_TCR_PREEMPT_FLAGS]));
+
+    return (L4_Bool_t)retval;
+}
+
+L4_INLINE L4_Bool_t L4_DisablePreemption (void)
+{
+     L4_Word8_t retval = 0;
+
+    __asm__ ("btr %1, %2; setc %0"
+	     : "=r" (retval)
+	     : "i" (6), "m" ((__L4_X86_Utcb ())[__L4_TCR_PREEMPT_FLAGS]));
+
+    return (L4_Bool_t)retval;
+}
+
+L4_INLINE L4_Bool_t L4_PreemptionPending (void)
+{
+     L4_Word8_t retval = 0;
+
+    __asm__ ("btr %1, %2; setc %0"
+	     : "=r" (retval)
+	     : "i" (7), "m" ((__L4_X86_Utcb ())[__L4_TCR_PREEMPT_FLAGS]));
+
+    return (L4_Bool_t)retval;
+}
+
+
+
+/*
+ * Message Registers.
+ */
+
+L4_INLINE void L4_StoreMR (int i, L4_Word_t * w)
+{
+    *w = (__L4_X86_Utcb ())[i];
+}
+
+L4_INLINE void L4_LoadMR (int i, L4_Word_t w)
+{
+    (__L4_X86_Utcb ())[i] = w;
+}
+
+L4_INLINE void L4_StoreMRs (int i, int k, L4_Word_t * w)
+{
+    L4_Word_t * mr = __L4_X86_Utcb () + i;
+
+    while (k-- > 0)
+	*w++ = *mr++;
+}
+
+L4_INLINE void L4_LoadMRs (int i, int k, L4_Word_t * w)
+{
+    L4_Word_t * mr = __L4_X86_Utcb () + i;
+
+    while (k-- > 0)
+	*mr++ = *w++;
+}
+
+
+
+/*
+ * Buffer Registers.
+ */
+
+L4_INLINE void L4_StoreBR (int i, L4_Word_t * w)
+{
+    *w = (__L4_X86_Utcb ())[-16 - i];
+}
+
+L4_INLINE void L4_LoadBR (int i, L4_Word_t w)
+{
+    (__L4_X86_Utcb ())[-16 - i] = w;
+}
+
+L4_INLINE void L4_StoreBRs (int i, int k, L4_Word_t * w)
+{
+    L4_Word_t * br = (__L4_X86_Utcb ()) - 16 - i;
+
+    while (k-- > 0)
+	*w++ = *br--;
+}
+
+L4_INLINE void L4_LoadBRs (int i, int k, L4_Word_t * w)
+{
+    L4_Word_t * br = (__L4_X86_Utcb ()) - 16 - i;
+
+    while (k-- > 0)
+	*br-- = *w++;
+}
+
+
+#endif /* !__L4__AMD64__VREGS_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/arch.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arch.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/arch.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arch.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,39 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2003,  Karlsruhe University
+ *                
+ * File path:     l4/arch.h
+ * Description:   Architecture specific functionality
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: arch.h,v 1.3 2003/09/24 19:06:21 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__ARCH_H__
+#define __L4__ARCH_H__
+
+#include <l4/types.h>
+#include __L4_INC_ARCH(syscalls.h)
+#include __L4_INC_ARCH(arch.h)
+
+#endif /* !__L4__ARCH_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/arch.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/arch.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/arch.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/arch.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Fri Jul 30 02:51:21 2004 21447.0
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/bootinfo.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/bootinfo.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/bootinfo.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/bootinfo.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Fri Jul 30 02:51:21 2004 21447.1
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/cache.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/cache.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/cache.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/cache.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Carl van Schaik <Carl.vanSchaik@nicta.com.au> Wed Mar 15 14:33:55 2006 31104.0
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/=id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/=id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/=id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/=id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Fri Jul 30 02:51:14 2004 21442.0
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/ipc.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/ipc.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/ipc.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/ipc.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Fri Jul 30 02:51:21 2004 21447.2
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/kcp.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/kcp.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/kcp.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/kcp.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Fri Jul 30 02:51:21 2004 21447.3
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/kdebug.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/kdebug.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/kdebug.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/kdebug.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Fri Jul 30 02:51:21 2004 21447.4
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/kip.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/kip.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/kip.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/kip.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Fri Jul 30 02:51:21 2004 21447.5
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/map.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/map.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/map.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/map.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Carl van Schaik <Carl.vanSchaik@nicta.com.au> Fri Dec 16 13:00:54 2005 29117.0
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/message.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/message.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/message.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/message.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Fri Jul 30 02:51:21 2004 21447.6
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/misc.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/misc.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/misc.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/misc.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Fri Jul 30 02:51:21 2004 21447.7
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/pagefault.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/pagefault.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/pagefault.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/pagefault.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Fri Jul 30 02:51:21 2004 21447.8
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/schedule.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/schedule.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/schedule.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/schedule.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Fri Jul 30 02:51:21 2004 21447.9
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/sigma0.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/sigma0.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/sigma0.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/sigma0.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Fri Jul 30 02:51:21 2004 21447.10
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/space.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/space.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/space.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/space.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Fri Jul 30 02:51:21 2004 21447.11
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/thread.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/thread.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/thread.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/thread.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Fri Jul 30 02:51:21 2004 21447.12
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/time.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/time.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/time.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/time.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Wed Oct  6 15:26:52 2004 3248.0
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/types.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/types.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/.arch-ids/types.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.arch-ids/types.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Fri Jul 30 02:51:21 2004 21447.13
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/.arch-ids/asm.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/.arch-ids/asm.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/.arch-ids/asm.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/.arch-ids/asm.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.98
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/.arch-ids/=id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/.arch-ids/=id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/.arch-ids/=id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/.arch-ids/=id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:55:24 2004 7609.0
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/.arch-ids/kdebug.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/.arch-ids/kdebug.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/.arch-ids/kdebug.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/.arch-ids/kdebug.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.99
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/.arch-ids/specials.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/.arch-ids/specials.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/.arch-ids/specials.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/.arch-ids/specials.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.100
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/.arch-ids/syscalls.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/.arch-ids/syscalls.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/.arch-ids/syscalls.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/.arch-ids/syscalls.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.101
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/.arch-ids/types.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/.arch-ids/types.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/.arch-ids/types.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/.arch-ids/types.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.102
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/.arch-ids/vregs_asm.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/.arch-ids/vregs_asm.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/.arch-ids/vregs_asm.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/.arch-ids/vregs_asm.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Carl van Schaik <Carl.vanSchaik@nicta.com.au> Mon May  2 10:00:32 2005 22318.0
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/.arch-ids/vregs.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/.arch-ids/vregs.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/.arch-ids/vregs.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/.arch-ids/vregs.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.104
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/asm.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/asm.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/asm.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/asm.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,81 @@
+/*********************************************************************
+ *
+ * Copyright (C) 2003-2004,  National ICT Australia (NICTA)
+ *                
+ * File path:     l4/arm/asm.h
+ * Description:   Assembler macros etc. 
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: asm.h,v 1.3 2004/06/04 08:20:12 htuch Exp $
+ *                
+ ********************************************************************/
+
+#ifndef __L4__ARM__ASM_H__
+#define __L4__ARM__ASM_H__
+
+#ifndef __ARMCC_VERSION
+/* GNU tools */
+#define BEGIN_PROC(name)			\
+    .global name; 				\
+    .align;					\
+name:
+
+#define END_PROC(name)				\
+    ;
+
+#define END
+
+#define LABEL(name)				\
+name:
+
+#else
+/* ARM tools */
+	MACRO
+	begin_proc $name
+	EXPORT	$name
+	ALIGN
+$name
+	MEND
+#define BEGIN_PROC(name)			\
+    begin_proc name
+
+#define END_PROC(name)				\
+    ;
+
+/* 
+ * The ADS and RVCT cpps do different things.  ADS puts blank space at the
+ * start of lines, while RVCT puts no space at all! :(
+ */
+#if __ARMCC_VERSION < 200000
+	MACRO
+	label $name
+$name
+	MEND
+#define LABEL(name)		label name
+#else
+#define LABEL(name)		name
+#endif
+
+#endif
+
+#endif /* __L4__ARM__ASM_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/kdebug.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/kdebug.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/kdebug.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/kdebug.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,214 @@
+/*********************************************************************
+ *
+ * Copyright (C) 2003-2004,  National ICT Australia (NICTA)
+ *                
+ * File path:     l4/arm/kdebug.h
+ * Description:   ARM kernel debugger interface
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: kdebug.h,v 1.7 2004/06/04 08:20:12 htuch Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__ARM__KDEBUG_H__
+#define __L4__ARM__KDEBUG_H__
+
+#if defined( __ARMCC_VERSION) && ( __ARMCC_VERSION<210000)
+#define FEATURE_NO_INLINE_SYSCALLS
+#endif
+
+#include <l4/types.h>
+#include <l4/arm/syscalls.h>
+
+#ifdef FEATURE_NO_INLINE_SYSCALLS
+
+/* The functions are defined in assembly file. */
+
+void L4_KDB_Enter(void *str);
+void L4_KDB_PrintChar(char c);
+long L4_KDB_ReadChar(void);
+char L4_KDB_ReadChar_Blocked(void);
+void L4_KDB_SetThreadName(L4_ThreadId_t tid, const char *name);
+
+#else   /* for inlines */
+
+#if defined(__thumb__) || defined(__thumb)
+#define ARM_IMM		"r"
+#else
+#define ARM_IMM		"i"
+#endif
+
+#define L4_KDB_Enter(str...)			\
+do {						\
+    __asm__ __volatile__ (			\
+	"   adr	    r0,	1f	\n"		\
+	"   mov	    ip,	sp	\n"		\
+	"   mov	    sp,	%0	\n"		\
+	"   mov	    lr,	pc	\n"		\
+	"   swi	    0x01	\n" /* 0x01 ignored */		\
+	"   b	    2f		\n"		\
+	"   .align  2		\n"		\
+	"1: .string " #str "	\n"		\
+	"   .align  2		\n"		\
+	"2:			\n"		\
+	:					\
+	: ARM_IMM (L4_TRAP_KDEBUG)		\
+	: "r0", "ip", "lr", "memory");		\
+} while (0)
+
+#define __L4_KDB_Op_Arg(op, name, argtype)	\
+L4_INLINE void L4_KDB_##name (argtype arg)	\
+{						\
+    register argtype param asm("r0") = arg;	\
+    __asm__ __volatile__ (			\
+	"   mov	    ip,	sp	\n"		\
+	"   mov	    sp,	%1	\n"		\
+	"   mov	    lr,	pc	\n"		\
+	"   swi	    0x00	\n" /* 0x00 ignored */		\
+	: "+r" (param)				\
+	: ARM_IMM (op)				\
+	: "ip", "lr", "memory" );		\
+} 
+
+#define __L4_KDB_Op_Ret(op, name, rettype)	\
+L4_INLINE rettype L4_KDB_##name (void)		\
+{						\
+    register L4_Word_t ret asm("r0");		\
+    __asm__ __volatile (			\
+	"   mov	    ip,	sp	\n"		\
+	"   mov	    sp,	%1	\n"		\
+	"   mov	    lr,	pc	\n"		\
+	"   swi	    0x00	\n" /* 0x00 ignored */		\
+	: "=r" (ret)				\
+	: ARM_IMM (op)				\
+	: "ip", "lr", "memory");		\
+    return ret;					\
+}
+
+#define __L4_KDB_Op_Ret_Arg(op, name, argtype, rettype)	\
+L4_INLINE rettype L4_KDB_##name (argtype arg)		\
+{						\
+    register L4_Word_t param asm("r0") = arg;	\
+    __asm__ __volatile (			\
+	"   mov	    ip,	sp	\n"		\
+	"   mov	    sp,	%1	\n"		\
+	"   mov	    lr,	pc	\n"		\
+	"   swi	    0x00	\n" /* 0x00 ignored */		\
+	: "+r" (param)				\
+	: ARM_IMM (op)				\
+	: "lr", "memory");			\
+    return param;				\
+}
+
+__L4_KDB_Op_Ret(L4_TRAP_GETTICK, GetTick, L4_Word_t )
+__L4_KDB_Op_Ret(L4_TRAP_KGETC, ReadChar_Blocked, char )
+__L4_KDB_Op_Ret(L4_TRAP_KGETC_NB, ReadChar, long )
+__L4_KDB_Op_Arg(L4_TRAP_KPUTC, PrintChar, char )
+__L4_KDB_Op_Ret_Arg(L4_TRAP_GETCOUNTER, GetTracepointCount, L4_Word_t, L4_Word_t )
+__L4_KDB_Op_Ret(L4_TRAP_GETNUMTPS, GetNumTracepoints, L4_Word_t)
+__L4_KDB_Op_Arg(L4_TRAP_GETTPNAME, GetTracepointNameIntroMRs, L4_Word_t)
+__L4_KDB_Op_Arg(L4_TRAP_TCCTRL, TCCtrl, L4_Word_t)
+
+__L4_KDB_Op_Arg(L4_TRAP_PMU_RESET, _PMU_Reset, L4_Word_t)
+__L4_KDB_Op_Arg(L4_TRAP_PMU_STOP, _PMU_Stop, L4_Word_t)
+__L4_KDB_Op_Ret_Arg(L4_TRAP_PMU_READ, PMU_Read, L4_Word_t, L4_Word_t)
+__L4_KDB_Op_Arg(L4_TRAP_PMU_CONFIG, _PMU_Config, L4_Word_t)
+
+
+L4_INLINE void
+L4_KDB_PMU_Reset(void)
+{
+    L4_KDB__PMU_Reset(0);
+}
+
+L4_INLINE void
+L4_KDB_PMU_Stop(void)
+{
+    L4_KDB__PMU_Stop(0);
+}
+
+L4_INLINE void
+L4_KDB_PMU_Set(unsigned long event0, unsigned long event1)
+{
+    L4_KDB__PMU_Config((event0 << 12) | (event1 << 20) | (3 << 8));
+}
+
+
+L4_INLINE void
+L4_KDB_TracepointCountStop(void)
+{
+    L4_KDB_TCCtrl(0);
+}
+
+
+L4_INLINE void
+L4_KDB_TracepointCountReset(void)
+{
+    L4_KDB_TCCtrl(1);
+}
+
+L4_INLINE void
+L4_KDB_SetThreadName(L4_ThreadId_t tid, const char *name)
+{
+    L4_Word_t name_p[4], len = 0;
+    char *to = (char*) &name_p;
+
+    while(*name != '\0' && len < sizeof(name_p)) {
+	*to++ = *name++;
+	len++;
+    }
+    if (len < sizeof(name_p))
+	*to = 0;
+
+    {
+	register L4_Word_t	t asm("r0") = tid.raw;
+	register L4_Word_t	w0 asm("r1") = name_p[0];
+	register L4_Word_t	w1 asm("r2") = name_p[1];
+	register L4_Word_t	w2 asm("r3") = name_p[2];
+	register L4_Word_t	w3 asm("r4") = name_p[3];
+
+	__asm__ __volatile__ (
+	    "   mov	    ip,	sp	\n"
+	    "   mov	    sp,	%1	\n"
+	    "   mov	    lr,	pc	\n"
+	    "   swi	    0x02	\n" /* 0x02 ignored */
+	    : "+r" (t)
+	    : ARM_IMM (L4_TRAP_KSET_THRD_NAME),
+	      "r" (w0), "r" (w1), "r" (w2), "r" (w3)
+	    : "ip", "lr", "memory" );
+    }
+}
+
+L4_INLINE void
+L4_KDB_GetTracepointName(L4_Word_t tp, char *dest)
+{
+    char *src = (char *) &(__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET];
+    L4_KDB_GetTracepointNameIntroMRs(tp);
+
+    /* Ewww! Another reimplementation of strcpy! */
+    while(*src)
+	*dest++ = *src++;
+    *dest = '\0';
+}
+#endif  /* for inlines */
+
+#endif /* !__L4__ARM__KDEBUG_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/specials.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/specials.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/specials.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/specials.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,58 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002,  Karlsruhe University
+ *                
+ * File path:     include/l4/arm/specials.h
+ * Description:   ARM specific functions and defines
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: specials.h,v 1.2 2003/09/24 19:06:23 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__ARM__SPECIALS_H__
+#define __L4__ARM__SPECIALS_H__
+
+/*
+ * Architecture specific helper functions.
+ */
+
+#if !( defined(__ARMCC_VERSION) && \
+       ( __ARMCC_VERSION > 210000) )
+L4_INLINE int __L4_Msb (L4_Word_t w) __attribute__ ((const));
+#endif
+
+L4_INLINE int __L4_Msb (L4_Word_t w)
+{
+    int bitnum;
+
+    if (w == 0)
+	return 32;
+
+    for (bitnum = 0, w >>= 1; w != 0; bitnum++)
+	w >>= 1;
+
+    return bitnum;
+}
+
+
+#endif /* !__L4__ARM__SPECIALS_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/syscalls.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/syscalls.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/syscalls.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/syscalls.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,670 @@
+/*********************************************************************
+ *
+ * Copyright (C) 2003-2004,  National ICT Australia (NICTA)
+ *                
+ * File path:     l4/arm/syscalls.h
+ * Description:   ARM system call ABI
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: syscalls.h,v 1.17 2004/09/02 22:39:47 cvansch Exp $
+ *                
+ ********************************************************************/
+
+#ifndef __L4__ARM__SYSCALLS_H__
+#define __L4__ARM__SYSCALLS_H__
+
+#if defined(__ARMCC_VERSION)
+#define FEATURE_NO_INLINE_SYSCALLS
+#endif
+
+#include <l4/types.h>
+#include <l4/message.h>
+#include "vregs.h"
+
+#ifndef FEATURE_NO_INLINE_SYSCALLS
+#ifdef __thumb__
+#define __L4_SYSCALL			\
+	"push	{ r7 }		    \n"	\
+	"blx	r12		    \n" \
+	"pop	{ r7 }		    \n"
+
+#define __L4_SYSCALL_IPC		\
+	"push	{ r7 }		    \n" \
+	"mov	r7,	r2	    \n" \
+	"blx	r12		    \n" \
+	"mov	r2,	r7	    \n" \
+	"pop	{ r7 }		    \n"
+
+#define __L4_SYSCALL_MR		__L4_SYSCALL_IPC
+
+/* Always clobber these regs (not used as input regs) - r7 - gcc save reg */
+#define __L4_ALWAYS_CLOBBER  "r8", "r9", "r10", "r11", "memory"
+#else
+/* gcc broken with fp in clobber list */
+#define __L4_SYSCALL                   \
+	"str	r11,	[sp, #-4]! \n" \
+	"mov	lr,	pc	   \n" \
+	"mov	pc,	r12	   \n" \
+	"ldr	r11,	[sp],	#4 \n"
+
+#define __L4_SYSCALL_IPC    __L4_SYSCALL
+#define __L4_SYSCALL_MR	    __L4_SYSCALL
+/* Always clobber these regs (not used as input regs) - r11 - gcc save reg */
+#define __L4_ALWAYS_CLOBBER  "r7", "r8", "r9", "r10", "memory"
+#endif
+#endif /* FEATURE_NO_INLINE_SYSCALLS */
+
+#ifdef __thumb__
+#define ARM_IMM		"r"
+#else
+#define ARM_IMM		"i"
+#endif
+
+#ifdef FEATURE_NO_INLINE_SYSCALLS
+#undef L4_INLINE
+#define L4_INLINE   /* empty */
+#endif
+
+/* Only the KernelInterface call is implemented here, the others are done via
+ * the info page.
+ */
+L4_INLINE void * L4_KernelInterface (L4_Word_t *ApiVersion,
+				     L4_Word_t *ApiFlags,
+				     L4_Word_t *KernelId)
+#ifdef FEATURE_NO_INLINE_SYSCALLS
+;
+#else
+{
+    register L4_Word_t base_address asm ("r0");
+    register L4_Word_t _ApiVersion  asm ("r1");
+    register L4_Word_t _ApiFlags    asm ("r2");
+    register L4_Word_t _KernelId    asm ("r3");
+
+    __asm__ __volatile__ (
+	    "mov    ip,	    sp		\n"
+	    "mov    sp,	    %[trap_kip]	\n"
+	    "mov    lr,	    pc		\n"
+	    "swi    0x14		\n"	/* 0xl4 ignored */
+            : "=r" (base_address), "=r" (_ApiVersion), "=r" (_ApiFlags),
+              "=r" (_KernelId)
+            : [trap_kip] ARM_IMM (L4_TRAP_KIP)
+            : "ip", "lr", "memory" );
+
+    if (ApiVersion) *ApiVersion = _ApiVersion;
+    if (ApiFlags) *ApiFlags = _ApiFlags;
+    if (KernelId) *KernelId = _KernelId;
+
+    return (void *)base_address;
+}
+#endif
+
+/* Implemented in exregs.S */
+typedef L4_ThreadId_t (*__L4_ExchangeRegisters_t)(L4_ThreadId_t dest,
+						  L4_Word_t control,
+						  L4_Word_t sp,
+						  L4_Word_t ip,
+						  L4_Word_t flags,
+						  L4_Word_t UserDefHandle,
+						  L4_ThreadId_t pager);
+extern __L4_ExchangeRegisters_t __L4_ExchangeRegisters;
+
+L4_INLINE L4_ThreadId_t L4_ExchangeRegisters (L4_ThreadId_t dest,
+					      L4_Word_t control,
+					      L4_Word_t sp,
+					      L4_Word_t ip,
+					      L4_Word_t flags,
+					      L4_Word_t UserDefHandle,
+					      L4_ThreadId_t pager,
+					      L4_Word_t *old_control,
+					      L4_Word_t *old_sp,
+					      L4_Word_t *old_ip,
+					      L4_Word_t *old_flags,
+					      L4_Word_t *old_UserDefHandle,
+					      L4_ThreadId_t *old_pager)
+#ifdef FEATURE_NO_INLINE_SYSCALLS
+;
+#else
+{
+    register L4_ThreadId_t r_dest   asm ("r0") = dest;
+    register L4_Word_t r_control    asm ("r1") = control;
+    register L4_Word_t r_sp	    asm ("r2") = sp;
+    register L4_Word_t r_ip	    asm ("r3") = ip;
+    register L4_Word_t r_flags	    asm ("r4") = flags;
+    register L4_Word_t r_userhandle asm ("r5") = UserDefHandle;
+    register L4_ThreadId_t r_pager  asm ("r6") = pager;
+    register __L4_ExchangeRegisters_t r_syscall asm ("r12") 
+            = __L4_ExchangeRegisters;
+
+    __asm__ __volatile (
+        __L4_SYSCALL
+    : "+r" (r_dest), "+r" (r_control), "+r" (r_sp), "+r" (r_ip),
+      "+r" (r_flags), "+r" (r_userhandle), "+r" (r_pager), "+r" (r_syscall)
+    :: "lr", __L4_ALWAYS_CLOBBER
+    );
+
+    *old_control = r_control;
+    *old_sp = r_sp;
+    *old_ip = r_ip;
+    *old_flags = r_flags;
+    *old_UserDefHandle = r_userhandle;
+    *old_pager = r_pager;
+
+    return r_dest;
+}
+#endif
+
+typedef L4_Word_t (*__L4_ThreadControl_t)(L4_ThreadId_t, L4_ThreadId_t, L4_ThreadId_t, L4_ThreadId_t, void *);
+extern __L4_ThreadControl_t __L4_ThreadControl;
+
+L4_INLINE L4_Word_t L4_ThreadControl (L4_ThreadId_t dest,
+				      L4_ThreadId_t SpaceSpecifier,
+				      L4_ThreadId_t Scheduler,
+				      L4_ThreadId_t Pager,
+				      L4_ThreadId_t SendRedirector,
+				      L4_ThreadId_t RecvRedirector,
+                                      void * UtcbLocation)
+#ifdef FEATURE_NO_INLINE_SYSCALLS
+;
+#else
+{
+    register L4_ThreadId_t r_dest   asm ("r0") = dest;
+    register L4_ThreadId_t r_space  asm ("r1") = SpaceSpecifier;
+    register L4_ThreadId_t r_sched  asm ("r2") = Scheduler;
+    register L4_ThreadId_t r_pager  asm ("r3") = Pager;
+    register L4_ThreadId_t r_sredir asm ("r4") = SendRedirector;
+    register L4_ThreadId_t r_rredir asm ("r5") = RecvRedirector;
+    register void *r_utcb	    asm ("r6") = UtcbLocation;
+    register __L4_ThreadControl_t r_syscall asm ("r12") = __L4_ThreadControl;
+
+    __asm__ __volatile__ (
+        __L4_SYSCALL
+    : "+r" (r_dest), "+r" (r_space), "+r" (r_sched), "+r" (r_pager), 
+      "+r" (r_sredir), "+r" (r_rredir), "+r" (r_utcb), "+r" (r_syscall)
+    :: "lr", __L4_ALWAYS_CLOBBER
+    ); 
+
+    {
+	L4_Word_t result;
+	/* Output result is in r0 (r_dest) */
+	result = r_dest.raw;
+
+	return result;
+    }
+}
+#endif
+
+typedef void (*__L4_ThreadSwitch_t)(L4_ThreadId_t);
+extern __L4_ThreadSwitch_t __L4_ThreadSwitch;
+
+L4_INLINE void L4_ThreadSwitch (L4_ThreadId_t dest)
+#ifdef FEATURE_NO_INLINE_SYSCALLS
+;
+#else
+{
+    register L4_Word_t r_dest	    asm ("r0") = dest.raw;
+    register __L4_ThreadSwitch_t r_syscall asm ("r12") = __L4_ThreadSwitch;
+
+    __asm__ __volatile__ (
+        __L4_SYSCALL
+    : "+r" (r_dest), "+r" (r_syscall)
+    :: "r1", "r2", "r3", "r4", "r5", "r6", "lr", __L4_ALWAYS_CLOBBER
+    );
+
+}
+#endif
+
+typedef L4_Word_t (*__L4_Schedule_t)(L4_ThreadId_t dest, L4_Word_t ts_len,
+	L4_Word_t total_quantum, L4_Word_t ProcessorControl, L4_Word_t prio);
+extern __L4_Schedule_t __L4_Schedule;
+
+L4_INLINE L4_Word_t  L4_Schedule (L4_ThreadId_t dest,
+				  L4_Word_t timeslice,
+				  L4_Word_t total_quantum,
+				  L4_Word_t hw_thread_bitmask,
+				  L4_Word_t ProcessorControl,
+				  L4_Word_t prio,
+				  L4_Word_t *rem_timeslice,
+				  L4_Word_t *rem_total)
+#ifdef FEATURE_NO_INLINE_SYSCALLS
+;
+#else
+{
+    register L4_Word_t r_dest	    asm ("r0") = dest.raw;
+    register L4_Word_t r_tslen	    asm ("r1") = timeslice;
+    register L4_Word_t r_quantum    asm ("r2") = total_quantum;
+    register L4_Word_t r_bitmask    asm ("r3") = hw_thread_bitmask;
+    register L4_Word_t r_proc	    asm ("r4") = ProcessorControl;
+    register L4_Word_t r_prio	    asm ("r5") = prio;
+    register __L4_Schedule_t r_syscall asm ("r12") = __L4_Schedule;
+
+    __asm__ __volatile__ (
+        __L4_SYSCALL
+    : "+r" (r_dest), "+r" (r_proc), "+r" (r_bitmask), "+r" (r_prio), 
+      "+r" (r_tslen), "+r" (r_quantum), "+r" (r_syscall)
+    :: "r6", "lr", __L4_ALWAYS_CLOBBER
+    );
+
+    *rem_timeslice = r_tslen;
+    *rem_total = r_quantum;
+
+    return r_dest;
+}
+#endif
+
+typedef L4_ThreadId_t (*__L4_Ipc_t)(L4_ThreadId_t to, L4_ThreadId_t FromSpecifier, L4_MsgTag_t tag);
+extern __L4_Ipc_t __L4_Ipc;
+
+L4_INLINE L4_MsgTag_t L4_Ipc (L4_ThreadId_t to,
+			      L4_ThreadId_t FromSpecifier,
+			      L4_MsgTag_t tag,
+			      L4_ThreadId_t * from)
+#ifdef FEATURE_NO_INLINE_SYSCALLS
+;
+#else
+{
+    register L4_ThreadId_t r_dest   asm ("r0") = to;
+    register L4_ThreadId_t r_from   asm ("r1") = FromSpecifier;
+    register L4_Word_t r_mr0	    asm ("r3") = tag.raw;
+    register L4_Word_t r_mr1	    asm ("r4");
+    register L4_Word_t r_mr2	    asm ("r5");
+    register L4_Word_t r_mr3	    asm ("r6");
+#ifdef __thumb__
+    register L4_Word_t r_mr4	    asm ("r2");
+#else
+    register L4_Word_t r_mr4	    asm ("r7");
+#endif
+    register L4_Word_t r_mr5	    asm ("r8");
+    register __L4_Ipc_t r_syscall   asm ("r12") = __L4_Ipc;
+
+
+    /* Only load MRs if send phase is included */
+    if (!L4_IsNilThread(to)) {
+	r_mr1 = (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  1];
+	r_mr2 = (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  2];
+	r_mr3 = (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  3];
+	r_mr4 = (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  4];
+	r_mr5 = (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  5];
+
+	/* Tell GCC these are used */
+	__asm__ __volatile (
+		__L4_SYSCALL_IPC
+		: "+r" (r_mr0), "+r" (r_mr1), "+r" (r_mr2),
+		  "+r" (r_mr3), "+r" (r_mr4), "+r" (r_mr5),
+		  "+r" (r_dest), "+r" (r_from), "+r" (r_syscall)
+		:
+#ifdef __thumb__
+		: "lr", "r9", "r10", "r11", "memory"	/* r2  used for gcc save register */
+#else
+		: "r2", "lr", "r9", "r10", "memory"		/* r11 used for gcc save register */
+#endif
+		);
+    }
+    else
+    {
+	__asm__ __volatile (
+	    __L4_SYSCALL_IPC
+	: "+r" (r_mr0), "=r" (r_mr1), "=r" (r_mr2),
+	  "=r" (r_mr3), "=r" (r_mr4), "=r" (r_mr5),
+	  "+r" (r_dest), "+r" (r_from), "+r" (r_syscall)
+	:
+#ifdef __thumb__
+	: "lr", "r9", "r10", "r11", "memory"	/* r2  used for gcc save register */
+#else
+	: "r2", "lr", "r9", "r10", "memory"		/* r11 used for gcc save register */
+#endif
+	);
+    }
+
+    if (!L4_IsNilThread(FromSpecifier)) {
+	*from = r_dest;
+
+ 	(__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  0] = r_mr0;
+	(__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  1] = r_mr1;
+	(__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  2] = r_mr2;
+	(__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  3] = r_mr3;
+	(__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  4] = r_mr4;
+	(__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  5] = r_mr5;
+    }
+    {
+	L4_MsgTag_t tag;
+
+	tag.raw = r_mr0;
+	return tag;
+    }
+}
+#endif
+
+#ifdef FEATURE_NO_INLINE_SYSCALLS
+L4_MsgTag_t L4_Notify (L4_ThreadId_t to, L4_Word_t mask);
+L4_MsgTag_t L4_WaitNotify (L4_Word_t * mask);
+#else
+L4_INLINE L4_MsgTag_t L4_Notify (L4_ThreadId_t to, L4_Word_t mask)
+{
+    register L4_ThreadId_t r_dest   asm ("r0") = to;
+    register L4_ThreadId_t r_from   asm ("r1") = L4_nilthread;
+    register L4_Word_t r_mr0	    asm ("r3") = L4_Notifytag.raw;
+    register L4_Word_t r_mr1	    asm ("r4") = mask;
+    register __L4_Ipc_t r_syscall   asm ("r12") = __L4_Ipc;
+
+    __asm__ __volatile (
+        __L4_SYSCALL
+    : "+r" (r_dest), "+r" (r_from), "+r" (r_mr0), "+r" (r_mr1), "+r" (r_syscall)
+    :: "r2", "r5", "r6", "lr", __L4_ALWAYS_CLOBBER
+    );
+
+    {
+	L4_MsgTag_t tag;
+
+	tag.raw = r_mr0;
+	return tag;
+    }
+}
+
+L4_INLINE L4_MsgTag_t L4_WaitNotify (L4_Word_t * mask)
+{
+    register L4_ThreadId_t r_dest   asm ("r0") = L4_nilthread;
+    register L4_ThreadId_t r_from   asm ("r1") = L4_waitnotify;
+    register L4_Word_t r_mr0	    asm ("r3") = L4_Waittag.raw;
+    register L4_Word_t r_mr1	    asm ("r4");
+    register __L4_Ipc_t r_syscall   asm ("r12") = __L4_Ipc;
+
+    __asm__ __volatile (
+        __L4_SYSCALL
+    : "+r" (r_dest), "+r" (r_from),
+      "+r" (r_mr0), "=r" (r_mr1), "+r" (r_syscall)
+    :: "r2", "r5", "r6", "lr", __L4_ALWAYS_CLOBBER
+    );
+
+    *mask = r_mr1;
+
+    {
+	L4_MsgTag_t tag;
+
+	tag.raw = r_mr0;
+	return tag;
+    }
+}
+#endif
+
+typedef L4_ThreadId_t (*__L4_Lipc_t)(L4_ThreadId_t to, L4_ThreadId_t FromSpecifier, L4_MsgTag_t tag);
+extern __L4_Lipc_t __L4_Lipc;
+
+L4_INLINE L4_MsgTag_t L4_Lipc (L4_ThreadId_t to,
+			       L4_ThreadId_t FromSpecifier,
+			       L4_MsgTag_t tag,
+			       L4_ThreadId_t * from)
+#ifdef FEATURE_NO_INLINE_SYSCALLS
+;
+#else
+{
+    register L4_ThreadId_t r_dest   asm ("r0") = to;
+    register L4_ThreadId_t r_from   asm ("r1") = FromSpecifier;
+    register L4_Word_t r_mr0	    asm ("r3") = tag.raw;
+    register L4_Word_t r_mr1	    asm ("r4");
+    register L4_Word_t r_mr2	    asm ("r5");
+    register L4_Word_t r_mr3	    asm ("r6");
+#ifdef __thumb__
+    register L4_Word_t r_mr4	    asm ("r2");
+#else
+    register L4_Word_t r_mr4	    asm ("r7");
+#endif
+    register L4_Word_t r_mr5	    asm ("r8");
+    register __L4_Ipc_t r_syscall   asm ("r12") = __L4_Lipc;
+
+    /* Only load MRs if send phase is included */
+    if (!L4_IsNilThread(to)) {
+        r_mr1 = (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  1];
+        r_mr2 = (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  2];
+        r_mr3 = (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  3];
+        r_mr4 = (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  4];
+        r_mr5 = (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  5];
+
+	__asm__ __volatile (
+	    __L4_SYSCALL_IPC
+	: "+r" (r_mr0), "+r" (r_mr1), "+r" (r_mr2),
+	  "+r" (r_mr3), "+r" (r_mr4), "+r" (r_mr5),
+	  "+r" (r_dest), "+r" (r_from), "+r" (r_syscall)
+	:
+#ifdef __thumb__
+	: "lr", "r9", "r10", "r11", "memory"	/* r7  used for gcc save register */
+#else
+	: "r2", "lr", "r9", "r10", "memory"	/* r11 used for gcc save register */
+#endif
+	);
+    }
+    else
+    {
+	__asm__ __volatile (
+	    __L4_SYSCALL_IPC
+	: "+r" (r_mr0), "=r" (r_mr1), "=r" (r_mr2),
+	  "=r" (r_mr3), "=r" (r_mr4), "=r" (r_mr5),
+	  "+r" (r_dest), "+r" (r_from), "+r" (r_syscall)
+	:
+#ifdef __thumb__
+	: "lr", "r9", "r10", "r11", "memory"	/* r7  used for gcc save register */
+#else
+	: "r2", "lr", "r9", "r10", "memory"	/* r11 used for gcc save register */
+#endif
+	);
+    }
+
+    if (!L4_IsNilThread(FromSpecifier)) {
+        *from = r_dest;
+
+	(__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  0] = r_mr0;
+        (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  1] = r_mr1;
+        (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  2] = r_mr2;
+        (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  3] = r_mr3;
+        (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  4] = r_mr4;
+        (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  5] = r_mr5;
+    }
+    {
+	L4_MsgTag_t tag;
+
+	tag.raw = r_mr0;
+	return tag;
+    }
+}
+#endif
+
+
+typedef L4_Word_t (*__L4_MapControl_t)(L4_ThreadId_t, L4_Word_t);
+extern __L4_MapControl_t __L4_MapControl;
+
+L4_INLINE L4_Word_t L4_MapControl (L4_ThreadId_t SpaceSpecifier, L4_Word_t control)
+#ifdef FEATURE_NO_INLINE_SYSCALLS
+;
+#else
+{
+    register L4_ThreadId_t r_space  asm ("r0") = SpaceSpecifier;
+    register L4_Word_t r_control    asm ("r1") = control;
+    register L4_Word_t r_mr0	    asm ("r3");
+    register L4_Word_t r_mr1	    asm ("r4");
+    register L4_Word_t r_mr2	    asm ("r5");
+    register L4_Word_t r_mr3	    asm ("r6");
+#ifdef __thumb__
+    register L4_Word_t r_mr4	    asm ("r2");
+#else
+    register L4_Word_t r_mr4	    asm ("r7");
+#endif
+    register L4_Word_t r_mr5	    asm ("r8");
+    register __L4_MapControl_t r_syscall asm ("r12") = __L4_MapControl;
+    L4_Word_t result;
+
+    r_mr0 = (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  0];
+    r_mr1 = (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  1];
+    r_mr2 = (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  2];
+    r_mr3 = (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  3];
+    r_mr4 = (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  4];
+    r_mr5 = (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  5];
+
+    __asm__ __volatile (
+        __L4_SYSCALL_MR
+    : "+r" (r_mr0), "+r" (r_mr1), "+r" (r_mr2),
+      "+r" (r_mr3), "+r" (r_mr4), "+r" (r_mr5),
+      "+r" (r_control), "+r" (r_space), "+r" (r_syscall)
+    :
+#ifdef __thumb__
+    : "lr", "r9", "r10", "r11", "memory"    /* r7  used for gcc save register */
+#else
+    : "r2", "lr", "r9", "r10", "memory"	    /* r11 used for gcc save register */
+#endif
+    );
+
+    result = r_space.raw;
+
+    (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  0] = r_mr0;
+    (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  1] = r_mr1;
+    (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  2] = r_mr2;
+    (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  3] = r_mr3;
+    (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  4] = r_mr4;
+    (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  5] = r_mr5;
+
+    return result;
+}
+#endif
+
+typedef void (*__L4_SpaceControl_t)(L4_ThreadId_t SpaceSpecifier,
+				     L4_Word_t control,
+				     L4_Fpage_t KernelInterfacePageArea,
+				    L4_Fpage_t UtcbArea);
+extern __L4_SpaceControl_t __L4_SpaceControl;
+
+L4_INLINE L4_Word_t L4_SpaceControl (L4_ThreadId_t SpaceSpecifier,
+				     L4_Word_t control,
+				     L4_Fpage_t KernelInterfacePageArea,
+				     L4_Fpage_t UtcbArea,
+				     L4_Word_t *old_control)
+#ifdef FEATURE_NO_INLINE_SYSCALLS
+;
+#else
+{
+    register L4_ThreadId_t r_space  asm ("r0") = SpaceSpecifier;
+    register L4_Word_t r_control    asm ("r1") = control;
+    register L4_Fpage_t r_kip_area  asm ("r2") = KernelInterfacePageArea;
+    register L4_Fpage_t r_utcb_area asm ("r3") = UtcbArea;
+    register __L4_SpaceControl_t r_syscall asm ("r12") = __L4_SpaceControl;
+
+    __asm__ __volatile__ (
+        __L4_SYSCALL
+    : "+r" (r_space), "+r" (r_control), "+r" (r_kip_area), "+r" (r_utcb_area),
+      "+r" (r_syscall)
+    :: "r4", "r5", "r6", "lr", __L4_ALWAYS_CLOBBER
+    );
+
+    if(old_control)
+	*old_control = r_control;
+
+    return r_space.raw;
+}
+#endif
+
+
+typedef L4_Word_t (*__L4_ProcessorControl_t)(L4_Word_t ProcessorNo,
+					  L4_Word_t InternalFrequency,
+					  L4_Word_t ExternalFrequency,
+					  L4_Word_t voltage);
+extern __L4_ProcessorControl_t __L4_ProcessorControl;
+    
+L4_INLINE L4_Word_t L4_ProcessorControl (L4_Word_t ProcessorNo,
+					 L4_Word_t InternalFrequency,
+					 L4_Word_t ExternalFrequency,
+					 L4_Word_t voltage)
+#ifdef FEATURE_NO_INLINE_SYSCALLS
+;
+#else
+{
+    return __L4_ProcessorControl(ProcessorNo, InternalFrequency, 
+            ExternalFrequency, voltage);
+}
+#endif
+
+typedef L4_Word_t (*__L4_CacheControl_t)(L4_ThreadId_t SpaceSpecifier, L4_Word_t control);
+extern __L4_CacheControl_t __L4_CacheControl;
+
+L4_INLINE L4_Word_t L4_CacheControl (L4_ThreadId_t SpaceSpecifier, L4_Word_t control)
+#ifdef FEATURE_NO_INLINE_SYSCALLS
+;
+#else
+{
+    register L4_ThreadId_t r_space  asm ("r0") = SpaceSpecifier;
+    register L4_Word_t r_control    asm ("r1") = control;
+    register L4_Word_t r_mr0	    asm ("r3");
+    register L4_Word_t r_mr1	    asm ("r4");
+    register L4_Word_t r_mr2	    asm ("r5");
+    register L4_Word_t r_mr3	    asm ("r6");
+#ifdef __thumb__
+    register L4_Word_t r_mr4	    asm ("r2");
+#else
+    register L4_Word_t r_mr4	    asm ("r7");
+#endif
+    register L4_Word_t r_mr5	    asm ("r8");
+    register __L4_CacheControl_t r_syscall asm ("r12") = __L4_CacheControl;
+    L4_Word_t result;
+
+    r_mr0 = (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  0];
+    r_mr1 = (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  1];
+    r_mr2 = (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  2];
+    r_mr3 = (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  3];
+    r_mr4 = (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  4];
+    r_mr5 = (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  5];
+
+    __asm__ __volatile (
+        __L4_SYSCALL_MR
+    : "+r" (r_mr0), "+r" (r_mr1), "+r" (r_mr2),
+      "+r" (r_mr3), "+r" (r_mr4), "+r" (r_mr5),
+      "+r" (r_control), "+r" (r_space), "+r" (r_syscall)
+    :
+#ifdef __thumb__
+    : "lr", "r9", "r10", "r11", "memory"    /* r7  used for gcc save register */
+#else
+    : "r2", "lr", "r9", "r10", "memory"	    /* r11 used for gcc save register */
+#endif
+    );
+
+    result = r_space.raw;
+
+    (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  0] = r_mr0;
+    (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  1] = r_mr1;
+    (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  2] = r_mr2;
+    (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  3] = r_mr3;
+    (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  4] = r_mr4;
+    (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  5] = r_mr5;
+
+    return result;
+}
+#endif
+
+
+
+#ifdef FEATURE_NO_INLINE_SYSCALLS
+/* Fix L4_INLINE again */
+#undef L4_INLINE
+#if defined(__ARMCC_VERSION)
+#define L4_INLINE		__inline
+#else
+#define L4_INLINE		static inline
+#endif
+#endif
+
+#endif /* !__L4__ARM__SYSCALLS_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/types.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/types.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/types.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/types.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,53 @@
+/*********************************************************************
+ *
+ * Copyright (C) 2003-2004,  National ICT Australia (NICTA)
+ *                
+ * File path:     l4/arm/types.h
+ * Description:   ARM specific type declararions
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: types.h,v 1.5 2004/06/04 08:20:12 htuch Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__ARM__TYPES_H__
+#define __L4__ARM__TYPES_H__
+
+#define L4_32BIT
+
+#if defined(ENDIAN_BIG)
+#define L4_BIG_ENDIAN
+#elif defined(ENDIAN_LITTLE)
+#define L4_LITTLE_ENDIAN
+#else
+#error No endianness configured
+#endif
+
+typedef unsigned long long      L4_Word64_t;
+typedef unsigned long           L4_Word32_t;
+typedef unsigned short          L4_Word16_t;
+typedef unsigned char           L4_Word8_t;
+
+typedef unsigned long           L4_Word_t;
+typedef unsigned int            L4_Size_t;
+
+#endif /* !__L4__ARM__TYPES_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/vregs_asm.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/vregs_asm.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/vregs_asm.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/vregs_asm.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,30 @@
+//# Location of TCRs within UTCB.
+//# Note: Keep up to date with vregs.h
+
+#define __L4_TCR_USER_NUM			(10)
+#define __L4_TCR_USER_OFFSET			(54)
+#define __L4_TCR_PLATFORM_NUM			(6)
+#define __L4_TCR_PLAT_TLS			(48)	//# Thread local storage
+#define __L4_TCR_PLATFORM_OFFSET		(48)
+
+#define __L4_TCR_MR_OFFSET		        (16)
+
+#define __L4_TCR_KERNEL_RESERVED1		(15)
+#define __L4_TCR_KERNEL_RESERVED0		(14)
+#define __L4_TCR_IDL4_RESTORE_COUNT		(15)
+
+#define __L4_TCR_PREEMPTED_IP			(13)
+#define __L4_TCR_PREEMPT_CALLBACK_IP		(12)
+#define __L4_TCR_VIRTUAL_ACTUAL_SENDER		(11)
+#define __L4_TCR_INTENDED_RECEIVER		(10)
+#define __L4_TCR_ERROR_CODE			(9)
+#define __L4_TCR_PROCESSOR_NO			(8)
+#define __L4_TCR_NOTIFY_BITS			(7)
+#define __L4_TCR_NOTIFY_MASK			(6)
+#define __L4_TCR_ACCEPTOR			(5)
+#define __L4_TCR_COP_FLAGS			(4)	/* Cop flags:	    byte 1  */
+#define __L4_TCR_PREEMPT_FLAGS			(4)	/* Preempt flags:   byte 0  */
+#define __L4_TCR_EXCEPTION_HANDLER		(3)
+#define __L4_TCR_PAGER				(2)
+#define __L4_TCR_USER_DEFINED_HANDLE		(1)
+#define __L4_TCR_MY_GLOBAL_ID			(0)
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/vregs.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/vregs.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/arm/vregs.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/arm/vregs.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,339 @@
+/*
+ * Australian Public Licence B (OZPLB)
+ * 
+ * Version 1-0
+ * 
+ * Copyright (c) 2003-2004 National ICT Australia
+ * 
+ * All rights reserved. 
+ * 
+ * Developed by: Embedded, Real-time and Operating Systems Program (ERTOS)
+ *               National ICT Australia
+ *               http://www.ertos.nicta.com.au
+ * 
+ * Permission is granted by National ICT Australia, free of charge, to
+ * any person obtaining a copy of this software and any associated
+ * documentation files (the "Software") to deal with the Software without
+ * restriction, including (without limitation) the rights to use, copy,
+ * modify, adapt, merge, publish, distribute, communicate to the public,
+ * sublicense, and/or sell, lend or rent out copies of the Software, and
+ * to permit persons to whom the Software is furnished to do so, subject
+ * to the following conditions:
+ * 
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimers.
+ * 
+ *     * Redistributions in binary form must reproduce the above
+ *       copyright notice, this list of conditions and the following
+ *       disclaimers in the documentation and/or other materials provided
+ *       with the distribution.
+ * 
+ *     * Neither the name of National ICT Australia, nor the names of its
+ *       contributors, may be used to endorse or promote products derived
+ *       from this Software without specific prior written permission.
+ * 
+ * EXCEPT AS EXPRESSLY STATED IN THIS LICENCE AND TO THE FULL EXTENT
+ * PERMITTED BY APPLICABLE LAW, THE SOFTWARE IS PROVIDED "AS-IS", AND
+ * NATIONAL ICT AUSTRALIA AND ITS CONTRIBUTORS MAKE NO REPRESENTATIONS,
+ * WARRANTIES OR CONDITIONS OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ * BUT NOT LIMITED TO ANY REPRESENTATIONS, WARRANTIES OR CONDITIONS
+ * REGARDING THE CONTENTS OR ACCURACY OF THE SOFTWARE, OR OF TITLE,
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT,
+ * THE ABSENCE OF LATENT OR OTHER DEFECTS, OR THE PRESENCE OR ABSENCE OF
+ * ERRORS, WHETHER OR NOT DISCOVERABLE.
+ * 
+ * TO THE FULL EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL
+ * NATIONAL ICT AUSTRALIA OR ITS CONTRIBUTORS BE LIABLE ON ANY LEGAL
+ * THEORY (INCLUDING, WITHOUT LIMITATION, IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHERWISE) FOR ANY CLAIM, LOSS, DAMAGES OR OTHER
+ * LIABILITY, INCLUDING (WITHOUT LIMITATION) LOSS OF PRODUCTION OR
+ * OPERATION TIME, LOSS, DAMAGE OR CORRUPTION OF DATA OR RECORDS; OR LOSS
+ * OF ANTICIPATED SAVINGS, OPPORTUNITY, REVENUE, PROFIT OR GOODWILL, OR
+ * OTHER ECONOMIC LOSS; OR ANY SPECIAL, INCIDENTAL, INDIRECT,
+ * CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES, ARISING OUT OF OR IN
+ * CONNECTION WITH THIS LICENCE, THE SOFTWARE OR THE USE OF OR OTHER
+ * DEALINGS WITH THE SOFTWARE, EVEN IF NATIONAL ICT AUSTRALIA OR ITS
+ * CONTRIBUTORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH CLAIM, LOSS,
+ * DAMAGES OR OTHER LIABILITY.
+ * 
+ * If applicable legislation implies representations, warranties, or
+ * conditions, or imposes obligations or liability on National ICT
+ * Australia or one of its contributors in respect of the Software that
+ * cannot be wholly or partly excluded, restricted or modified, the
+ * liability of National ICT Australia or the contributor is limited, to
+ * the full extent permitted by the applicable legislation, at its
+ * option, to:
+ * a.  in the case of goods, any one or more of the following:
+ * i.  the replacement of the goods or the supply of equivalent goods;
+ * ii.  the repair of the goods;
+ * iii. the payment of the cost of replacing the goods or of acquiring
+ *  equivalent goods;
+ * iv.  the payment of the cost of having the goods repaired; or
+ * b.  in the case of services:
+ * i.  the supplying of the services again; or
+ * ii.  the payment of the cost of having the services supplied again.
+ * 
+ * The construction, validity and performance of this licence is governed
+ * by the laws in force in New South Wales, Australia.
+ */
+#ifndef __L4__ARM__VREGS_H__
+#define __L4__ARM__VREGS_H__
+
+#define L4_TRAP_KPUTC		0xffffffa0
+#define L4_TRAP_KGETC		0xffffffa4
+#define L4_TRAP_KGETC_NB	0xffffffa8
+#define L4_TRAP_KDEBUG		0xffffffac
+#define L4_TRAP_GETUTCB		0xffffffb0
+#define L4_TRAP_KIP		0xffffffb4
+#define L4_TRAP_KSET_THRD_NAME	0xffffffb8
+#define L4_TRAP_GETCOUNTER	0xffffffbc
+#define L4_TRAP_GETNUMTPS       0xffffffc0
+#define L4_TRAP_GETTPNAME       0xffffffc4
+#define L4_TRAP_TCCTRL          0xffffffc8
+
+#define L4_TRAP_PMU_RESET       0xffffffcc
+#define L4_TRAP_PMU_STOP        0xffffffd0
+#define L4_TRAP_PMU_READ        0xffffffd4
+#define L4_TRAP_PMU_CONFIG      0xffffffd8
+
+#define L4_TRAP_GETTICK		0xffffffe0
+
+#define USER_UTCB_REF           0xff000ff0
+
+#define __L4_NUM_MRS	32
+
+/*
+ * Location of TCRs within UTCB.
+ * Note: Keep vregs_asm.h up to date with these below
+ */
+
+#define __L4_TCR_USER_NUM			(10)
+#define __L4_TCR_USER_OFFSET			(54)	/* 54..63 */
+#define __L4_TCR_PLATFORM_NUM			(6)
+/* Thread local storage */
+#define __L4_TCR_PLAT_TLS			(__L4_TCR_PLATFORM_OFFSET + 0)
+#define __L4_TCR_PLATFORM_OFFSET		(48)	/* 48..53 */
+
+#define __L4_TCR_MR_OFFSET		        (16)
+
+#define __L4_TCR_IDL4_RESTORE_COUNT		(15)
+#define __L4_TCR_KERNEL_RESERVED1		(15)	/* __L4_TCR_IDL4_RESTORE_COUNT */
+#define __L4_TCR_KERNEL_RESERVED0		(14)
+
+#define __L4_TCR_PREEMPTED_IP			(13)
+#define __L4_TCR_PREEMPT_CALLBACK_IP		(12)
+#define __L4_TCR_VIRTUAL_ACTUAL_SENDER		(11)
+#define __L4_TCR_INTENDED_RECEIVER		(10)
+#define __L4_TCR_ERROR_CODE			(9)
+#define __L4_TCR_PROCESSOR_NO			(8)
+#define __L4_TCR_NOTIFY_BITS			(7)
+#define __L4_TCR_NOTIFY_MASK			(6)
+#define __L4_TCR_ACCEPTOR			(5)
+#define __L4_TCR_COP_FLAGS			(4)	/* Cop flags:	    byte 1  */
+#define __L4_TCR_PREEMPT_FLAGS			(4)	/* Preempt flags:   byte 0  */
+#define __L4_TCR_EXCEPTION_HANDLER		(3)
+#define __L4_TCR_PAGER				(2)
+#define __L4_TCR_USER_DEFINED_HANDLE		(1)
+#define __L4_TCR_MY_GLOBAL_ID			(0)
+
+#if !defined(__ASSEMBLER__)
+ 
+#if !( defined(__ARMCC_VERSION) && \
+       ( __ARMCC_VERSION > 210000) )
+L4_INLINE L4_Word_t *__L4_ARM_Utcb( void ) __attribute__ ((const));
+#endif
+L4_INLINE L4_Word_t *__L4_ARM_Utcb( void )
+{
+    return *(L4_Word_t **)(USER_UTCB_REF);
+}
+
+L4_INLINE L4_Word_t *L4_GetUtcbBase( void ) __attribute__ ((const));
+L4_INLINE L4_Word_t *L4_GetUtcbBase( void )
+{
+    return __L4_ARM_Utcb();
+}
+
+/*
+ * Thread Control Registers.
+ */
+
+L4_INLINE L4_Word_t __L4_TCR_MyGlobalId( void )
+{
+    return (__L4_ARM_Utcb())[ __L4_TCR_MY_GLOBAL_ID ];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ProcessorNo( void )
+{
+    return (__L4_ARM_Utcb())[ __L4_TCR_PROCESSOR_NO ];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_UserDefinedHandle( void )
+{
+    return (__L4_ARM_Utcb())[ __L4_TCR_USER_DEFINED_HANDLE ];
+}
+
+L4_INLINE void __L4_TCR_Set_UserDefinedHandle( L4_Word_t w )
+{
+    (__L4_ARM_Utcb())[ __L4_TCR_USER_DEFINED_HANDLE ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_Pager( void )
+{
+    return (__L4_ARM_Utcb())[ __L4_TCR_PAGER ];
+}
+
+L4_INLINE void __L4_TCR_Set_Pager( L4_Word_t w )
+{
+    (__L4_ARM_Utcb())[ __L4_TCR_PAGER ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ExceptionHandler( void )
+{
+    return (__L4_ARM_Utcb())[ __L4_TCR_EXCEPTION_HANDLER ];
+}
+
+L4_INLINE void __L4_TCR_Set_ExceptionHandler( L4_Word_t w )
+{
+    (__L4_ARM_Utcb())[ __L4_TCR_EXCEPTION_HANDLER ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ErrorCode( void )
+{
+    return (__L4_ARM_Utcb())[ __L4_TCR_ERROR_CODE ];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_IntendedReceiver( void )
+{
+    return (__L4_ARM_Utcb())[ __L4_TCR_INTENDED_RECEIVER ];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_Acceptor( void )
+{
+    return (__L4_ARM_Utcb())[ __L4_TCR_ACCEPTOR ];
+}
+
+L4_INLINE void __L4_TCR_Set_Acceptor( L4_Word_t w )
+{
+    (__L4_ARM_Utcb())[ __L4_TCR_ACCEPTOR ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_NotifyMask( void )
+{
+    return (__L4_ARM_Utcb())[ __L4_TCR_NOTIFY_MASK ];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_NotifyBits( void )
+{
+    return (__L4_ARM_Utcb())[ __L4_TCR_NOTIFY_BITS ];
+}
+
+L4_INLINE void __L4_TCR_Set_NotifyMask( L4_Word_t w )
+{
+    (__L4_ARM_Utcb())[ __L4_TCR_NOTIFY_MASK ] = w;
+}
+
+L4_INLINE void __L4_TCR_Set_NotifyBits( L4_Word_t w )
+{
+    (__L4_ARM_Utcb())[ __L4_TCR_NOTIFY_BITS ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ActualSender( void )
+{
+    return (__L4_ARM_Utcb())[ __L4_TCR_VIRTUAL_ACTUAL_SENDER ];
+}
+
+L4_INLINE void __L4_TCR_Set_VirtualSender( L4_Word_t w )
+{
+    (__L4_ARM_Utcb())[ __L4_TCR_VIRTUAL_ACTUAL_SENDER ] = w;
+}
+
+L4_INLINE void L4_Set_CopFlag( L4_Word_t n )
+{
+    (__L4_ARM_Utcb())[ __L4_TCR_COP_FLAGS ] |= (1 << n);
+}
+
+L4_INLINE void L4_Clr_CopFlag( L4_Word_t n )
+{
+    (__L4_ARM_Utcb())[ __L4_TCR_COP_FLAGS ] &= ~(1 << n);
+}
+
+L4_INLINE L4_Word_t L4_PreemptedIP( void )
+{
+    return (__L4_ARM_Utcb())[ __L4_TCR_PREEMPTED_IP ];
+}
+
+L4_INLINE void L4_Set_PreemptCallbackIP( L4_Word_t ip )
+{
+    (__L4_ARM_Utcb())[ __L4_TCR_PREEMPT_CALLBACK_IP] = ip;
+}
+
+L4_INLINE L4_Bool_t L4_EnablePreemptionCallback( void )
+{
+    L4_Bool_t old = ((__L4_ARM_Utcb())[ __L4_TCR_PREEMPT_FLAGS ] >> 5) & 1;
+    (__L4_ARM_Utcb())[ __L4_TCR_PREEMPT_FLAGS ] |= (1 << 5);
+    return old;
+}
+
+L4_INLINE L4_Bool_t L4_DisablePreemptionCallback( void )
+{
+    L4_Bool_t old = ((__L4_ARM_Utcb())[ __L4_TCR_PREEMPT_FLAGS ] >> 5) & 1;
+    (__L4_ARM_Utcb())[ __L4_TCR_PREEMPT_FLAGS ] &= ~(1 << 5);
+    return old;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ThreadWord (L4_Word_t n)
+{
+    return (__L4_ARM_Utcb ())[__L4_TCR_USER_OFFSET + (int) n];
+}
+
+L4_INLINE void __L4_TCR_Set_ThreadWord (L4_Word_t n, L4_Word_t w)
+{
+    (__L4_ARM_Utcb ())[__L4_TCR_USER_OFFSET + (int) n] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ThreadLocalStorage ( void )
+{
+    return (__L4_ARM_Utcb())[ __L4_TCR_PLAT_TLS ];
+}
+
+L4_INLINE void __L4_TCR_Set_ThreadLocalStorage ( L4_Word_t tls )
+{
+    (__L4_ARM_Utcb())[ __L4_TCR_PLAT_TLS ] = tls;
+}
+
+
+/*
+ * Message Registers.
+ */
+
+L4_INLINE void L4_StoreMR( int i, L4_Word_t * w )
+{
+    *w = (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET +  i ];
+}
+
+L4_INLINE void L4_LoadMR( int i, L4_Word_t w )
+{
+    (__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET + i ] = w;
+}
+
+L4_INLINE void L4_StoreMRs( int i, int k, L4_Word_t * w )
+{
+    L4_Word_t * mr = &(__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET + i];
+
+    while( k-- > 0 ) {
+	*w++ = *mr++;
+    }
+}
+
+L4_INLINE void L4_LoadMRs( int i, int k, L4_Word_t * w )
+{
+    L4_Word_t * mr = &(__L4_ARM_Utcb())[__L4_TCR_MR_OFFSET + i];
+
+    while( k-- > 0 )
+	*mr++ = *w++;
+}
+
+#endif
+
+#endif	/* __L4__ARM__VREGS_H__ */
+
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/bootinfo.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/bootinfo.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/bootinfo.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/bootinfo.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,369 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2004,  Karlsruhe University
+ *                
+ * File path:     l4/bootinfo.h
+ * Description:   The L4 common bootinfo interface
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: bootinfo.h,v 1.7 2004/07/06 10:03:57 benno Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__BOOTINFO_H__
+#define __L4__BOOTINFO_H__
+
+#include <l4/types.h>
+
+
+/*
+ * The L4 bootinfo magic.  The magic also indicates the endianess of
+ * the bootinfo structure.  The word size is defined to be the same as
+ * specified in the kernel interface page.
+ */
+#define L4_BOOTINFO_MAGIC		((L4_Word_t) 0x14b0021d)
+
+
+/*
+ * Current version of the L4 bootinfo structure itself.  Note that
+ * only changes to the bootinfo structure itself warrant an increase
+ * in the version number.  A change in a bootinfo record structure
+ * will only increase the version number of that particular type.
+ */
+#define L4_BOOTINFO_VERSION		1
+
+
+/*
+ * Currently defined bootinfo record types.
+ */
+#define L4_BootInfo_Module			0x0001
+#define L4_BootInfo_SimpleExec			0x0002
+#define L4_BootInfo_SimpleELF			0x0037
+#define L4_BootInfo_EFITables			0x0101
+#define L4_BootInfo_Multiboot			0x0102
+
+
+
+/*
+ * The BootRec class is just the generic part of the the boot record
+ * class.
+ */
+typedef struct {
+    L4_Word_t	type;
+    L4_Word_t	version;
+    L4_Word_t	offset_next;
+} L4_BootRec_t;
+
+L4_INLINE L4_Word_t L4_BootRec_Type (const L4_BootRec_t * r)
+{
+    return r->type;
+}
+
+L4_INLINE L4_BootRec_t * L4_BootRec_Next (const L4_BootRec_t * r)
+{
+    return (L4_BootRec_t *) (((L4_Word_t) r) + r->offset_next);
+}
+
+#if defined(__l4_cplusplus)
+L4_INLINE L4_Word_t L4_Type (const L4_BootRec_t * r)
+{
+    return L4_BootRec_Type (r);
+}
+
+L4_INLINE L4_BootRec_t * L4_Next (const L4_BootRec_t * r)
+{
+    return L4_BootRec_Next (r);
+}
+#endif
+
+
+
+/*
+ * Bootinfo type:	Module
+ * 
+ * A Module describes a binary file inserted into memory by the
+ * bootloader.
+ */
+typedef struct {
+    L4_Word_t	type;			// 0x01
+    L4_Word_t	version;		// 1
+    L4_Word_t	offset_next;
+
+    L4_Word_t	start;
+    L4_Word_t	size;
+    L4_Word_t	cmdline_offset;
+} L4_Boot_Module_t;
+
+L4_INLINE L4_Word_t L4_Module_Start (const L4_BootRec_t * ptr)
+{
+    L4_Boot_Module_t * m = (L4_Boot_Module_t *) ptr;
+    return m->start;
+}
+
+L4_INLINE L4_Word_t L4_Module_Size (const L4_BootRec_t * ptr)
+{
+    L4_Boot_Module_t * m = (L4_Boot_Module_t *) ptr;
+    return m->size;
+}
+
+L4_INLINE char * L4_Module_Cmdline (const L4_BootRec_t * ptr)
+{
+    L4_Boot_Module_t * m = (L4_Boot_Module_t *) ptr;
+    if (m->cmdline_offset)
+	return (char *) ((L4_Word_t) m + m->cmdline_offset);
+    else
+	return (char *) 0;
+}
+
+
+
+/*
+ * Bootinfo type:	SimpleExec
+ * 
+ * A SimpleExec describes an executable binary decoded and relocated
+ * into memory by the bootloader
+ */
+typedef struct {
+    L4_Word_t	type;			// 0x02
+    L4_Word_t	version;		// 1
+    L4_Word_t	offset_next;
+
+    L4_Word_t	text_pstart;
+    L4_Word_t	text_vstart;
+    L4_Word_t	text_size;
+    L4_Word_t	data_pstart;
+    L4_Word_t	data_vstart;
+    L4_Word_t	data_size;
+    L4_Word_t	bss_pstart;
+    L4_Word_t	bss_vstart;
+    L4_Word_t	bss_size;
+    L4_Word_t	initial_ip;
+    L4_Word_t	flags;
+    L4_Word_t	label;
+    L4_Word_t	cmdline_offset;
+} L4_Boot_SimpleExec_t;
+
+L4_INLINE L4_Word_t L4_SimpleExec_TextVstart (const L4_BootRec_t * ptr)
+{
+    L4_Boot_SimpleExec_t * e = (L4_Boot_SimpleExec_t *) ptr;
+    return e->text_vstart;
+}
+
+L4_INLINE L4_Word_t L4_SimpleExec_TextPstart (const L4_BootRec_t * ptr)
+{
+    L4_Boot_SimpleExec_t * e = (L4_Boot_SimpleExec_t *) ptr;
+    return e->text_pstart;
+}
+
+L4_INLINE L4_Word_t L4_SimpleExec_TextSize (const L4_BootRec_t * ptr)
+{
+    L4_Boot_SimpleExec_t * e = (L4_Boot_SimpleExec_t *) ptr;
+    return e->text_size;
+}
+
+L4_INLINE L4_Word_t L4_SimpleExec_DataVstart (const L4_BootRec_t * ptr)
+{
+    L4_Boot_SimpleExec_t * e = (L4_Boot_SimpleExec_t *) ptr;
+    return e->data_vstart;
+}
+
+L4_INLINE L4_Word_t L4_SimpleExec_DataPstart (const L4_BootRec_t * ptr)
+{
+    L4_Boot_SimpleExec_t * e = (L4_Boot_SimpleExec_t *) ptr;
+    return e->data_pstart;
+}
+
+L4_INLINE L4_Word_t L4_SimpleExec_DataSize (const L4_BootRec_t * ptr)
+{
+    L4_Boot_SimpleExec_t * e = (L4_Boot_SimpleExec_t *) ptr;
+    return e->data_size;
+}
+
+L4_INLINE L4_Word_t L4_SimpleExec_BssVstart (const L4_BootRec_t * ptr)
+{
+    L4_Boot_SimpleExec_t * e = (L4_Boot_SimpleExec_t *) ptr;
+    return e->bss_vstart;
+}
+
+L4_INLINE L4_Word_t L4_SimpleExec_BssPstart (const L4_BootRec_t * ptr)
+{
+    L4_Boot_SimpleExec_t * e = (L4_Boot_SimpleExec_t *) ptr;
+    return e->bss_pstart;
+}
+
+L4_INLINE L4_Word_t L4_SimpleExec_BssSize (const L4_BootRec_t * ptr)
+{
+    L4_Boot_SimpleExec_t * e = (L4_Boot_SimpleExec_t *) ptr;
+    return e->bss_size;
+}
+
+L4_INLINE L4_Word_t L4_SimpleExec_InitialIP (const L4_BootRec_t * ptr)
+{
+    L4_Boot_SimpleExec_t * e = (L4_Boot_SimpleExec_t *) ptr;
+    return e->initial_ip;
+}
+
+L4_INLINE L4_Word_t L4_SimpleExec_Flags (const L4_BootRec_t * ptr)
+{
+    L4_Boot_SimpleExec_t * e = (L4_Boot_SimpleExec_t *) ptr;
+    return e->flags;
+}
+
+L4_INLINE void L4_SimpleExec_Set_Flags (const L4_BootRec_t * ptr, L4_Word_t w)
+{
+    L4_Boot_SimpleExec_t * e = (L4_Boot_SimpleExec_t *) ptr;
+    e->flags = w;
+}
+
+L4_INLINE L4_Word_t L4_SimpleExec_Label (const L4_BootRec_t * ptr)
+{
+    L4_Boot_SimpleExec_t * e = (L4_Boot_SimpleExec_t *) ptr;
+    return e->label;
+}
+
+L4_INLINE void L4_SimpleExec_Set_Label (const L4_BootRec_t * ptr, L4_Word_t w)
+{
+    L4_Boot_SimpleExec_t * e = (L4_Boot_SimpleExec_t *) ptr;
+    e->label = w;
+}
+
+L4_INLINE char * L4_SimpleExec_Cmdline (const L4_BootRec_t * ptr)
+{
+    L4_Boot_SimpleExec_t * e = (L4_Boot_SimpleExec_t *) ptr;
+    if (e->cmdline_offset)
+	return (char *) ((L4_Word_t) e + e->cmdline_offset);
+    else
+	return (char *) 0;
+}
+
+
+
+/*
+ * Bootinfo type:	EFI
+ * 
+ * An EFI record describes location and size of tables for the
+ * Extensible Firmware Interface.
+ */
+typedef struct {
+    L4_Word_t	type;			// 0x101
+    L4_Word_t	version;		// 1
+    L4_Word_t	offset_next;
+
+    L4_Word_t	systab;
+    L4_Word_t	memmap;
+    L4_Word_t	memmap_size;
+    L4_Word_t	memdesc_size;
+    L4_Word_t	memdesc_version;
+} L4_Boot_EFI_t;
+
+L4_INLINE L4_Word_t L4_EFI_Systab (const L4_BootRec_t * ptr)
+{
+    L4_Boot_EFI_t * e = (L4_Boot_EFI_t *) ptr;
+    return e->systab;
+}
+
+L4_INLINE L4_Word_t L4_EFI_Memmap (const L4_BootRec_t * ptr)
+{
+    L4_Boot_EFI_t * e = (L4_Boot_EFI_t *) ptr;
+    return e->memmap;
+}
+
+L4_INLINE L4_Word_t L4_EFI_MemmapSize (const L4_BootRec_t * ptr)
+{
+    L4_Boot_EFI_t * e = (L4_Boot_EFI_t *) ptr;
+    return e->memmap_size;
+}
+
+L4_INLINE L4_Word_t L4_EFI_MemdescSize (const L4_BootRec_t * ptr)
+{
+    L4_Boot_EFI_t * e = (L4_Boot_EFI_t *) ptr;
+    return e->memdesc_size;
+}
+
+L4_INLINE L4_Word_t L4_EFI_MemdescVersion (const L4_BootRec_t * ptr)
+{
+    L4_Boot_EFI_t * e = (L4_Boot_EFI_t *) ptr;
+    return e->memdesc_version;
+}
+
+
+
+/*
+ * Bootinfo type:	MBI
+ * 
+ * An MBI record describes location of a multiboot info structure.
+ */
+typedef struct {
+    L4_Word_t	type;			// 0x102
+    L4_Word_t	version;		// 1
+    L4_Word_t	offset_next;
+
+    L4_Word_t	address;
+} L4_Boot_MBI_t;
+
+L4_INLINE L4_Word_t L4_MBI_Address (const L4_BootRec_t * ptr)
+{
+    L4_Boot_MBI_t * m = (L4_Boot_MBI_t *) ptr;
+    return m->address;
+}
+
+
+/*
+ * The L4 bootinfo structure.
+ */
+typedef struct {
+    L4_Word_t	magic;
+    L4_Word_t	version;
+    L4_Word_t	size;
+    L4_Word_t	first_entry;
+    L4_Word_t	num_entries;
+    L4_Word_t	__reserved[3];
+} L4_BootInfo_t;
+
+L4_INLINE L4_Bool_t L4_BootInfo_Valid (const void * ptr)
+{
+    L4_BootInfo_t * b = (L4_BootInfo_t *) ptr;
+    return (b->magic == L4_BOOTINFO_MAGIC) &&
+	(b->version == L4_BOOTINFO_VERSION);
+}
+
+L4_INLINE L4_Word_t L4_BootInfo_Size (const void * ptr)
+{
+    L4_BootInfo_t * b = (L4_BootInfo_t *) ptr;
+    return b->size;
+}
+
+L4_INLINE L4_BootRec_t * L4_BootInfo_FirstEntry (const void * ptr)
+{
+    L4_BootInfo_t * b = (L4_BootInfo_t *) ptr;
+    return (L4_BootRec_t *) (((L4_Word_t) b) + b->first_entry);
+}
+
+L4_INLINE L4_Word_t L4_BootInfo_Entries (const void * ptr)
+{
+    L4_BootInfo_t * b = (L4_BootInfo_t *) ptr;
+    return b->num_entries;
+}
+
+
+
+#endif /* !__L4__BOOTINFO_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/cache.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/cache.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/cache.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/cache.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,133 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2006,  National ICT Australia
+ *                
+ * File path:     l4/cache.h
+ * Description:   Miscelaneous interfaces
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ ********************************************************************/
+/* Creator: Carl van Schaik */
+#ifndef __L4__CACHE_H__
+#define __L4__CACHE_H__
+
+#include <l4/types.h>
+#include __L4_INC_ARCH(syscalls.h)
+
+
+/*
+ * Cache control options
+ */
+
+#define L4_CacheCtl_ArchSpecifc		(0UL << 6)
+#define L4_CacheCtl_FlushRanges		(1UL << 6)
+#define L4_CacheCtl_FlushIcache		(4UL << 6)
+#define L4_CacheCtl_FlushDcache		(5UL << 6)
+#define L4_CacheCtl_FlushCache		(6UL << 6)
+#define L4_CacheCtl_CacheLock		(8UL << 6)
+#define L4_CacheCtl_CacheUnLock		(9UL << 6)
+
+#define L4_CacheCtl_MaskL1		( 1UL << 12)
+#define L4_CacheCtl_MaskL2		( 2UL << 12)
+#define L4_CacheCtl_MaskL3		( 4UL << 12)
+#define L4_CacheCtl_MaskL4		( 8UL << 12)
+#define L4_CacheCtl_MaskL5		(16UL << 12)
+#define L4_CacheCtl_MaskL6		(32UL << 12)
+#define L4_CacheCtl_MaskAllLs		(63UL << 12)
+
+/*
+ * Cache control flush attributes
+ */
+#define L4_CacheFlush_AttrI		(1UL << (L4_BITS_PER_WORD-4))
+#define L4_CacheFlush_AttrD		(1UL << (L4_BITS_PER_WORD-3))
+#define L4_CacheFlush_AttrClean		(1UL << (L4_BITS_PER_WORD-2))
+#define L4_CacheFlush_AttrInvalidate	(1UL << (L4_BITS_PER_WORD-1))
+#define L4_CacheFlush_AttrAll		(L4_CacheFlush_AttrI | L4_CacheFlush_AttrD |    \
+					 L4_CacheFlush_AttrClean | L4_CacheFlush_AttrInvalidate)
+
+L4_INLINE L4_Word_t L4_CacheFlushAll(void)
+{
+    return L4_CacheControl(L4_nilthread, L4_CacheCtl_FlushCache | L4_CacheCtl_MaskAllLs);
+}
+
+/*
+ * Flush cache range (start..end-1)
+ */
+L4_INLINE L4_Word_t L4_CacheFlushRange(L4_ThreadId_t s, L4_Word_t start, L4_Word_t end)
+{
+    L4_Word_t size = (end - start);
+
+    size = size & ((1UL << (L4_BITS_PER_WORD-4)) - 1);
+    size |= L4_CacheFlush_AttrAll;
+    L4_LoadMR (0, start);
+    L4_LoadMR (1, size);
+
+    return L4_CacheControl(s, L4_CacheCtl_FlushRanges | L4_CacheCtl_MaskAllLs | 0);
+}
+
+/*
+ * Flush I-cache range (start..end-1)
+ */
+L4_INLINE L4_Word_t L4_CacheFlushIRange(L4_ThreadId_t s, L4_Word_t start, L4_Word_t end)
+{
+    L4_Word_t size = (end - start);
+
+    size = size & ((1UL << (L4_BITS_PER_WORD-4)) - 1);
+    size |= L4_CacheFlush_AttrI | L4_CacheFlush_AttrClean | L4_CacheFlush_AttrInvalidate;
+    L4_LoadMR (0, start);
+    L4_LoadMR (1, size);
+
+    return L4_CacheControl(s, L4_CacheCtl_FlushRanges | L4_CacheCtl_MaskAllLs | 0);
+}
+
+/*
+ * Flush-clean-invalidate D-cache range (start..end-1)
+ */
+L4_INLINE L4_Word_t L4_CacheFlushDRange(L4_ThreadId_t s, L4_Word_t start, L4_Word_t end)
+{
+    L4_Word_t size = (end - start);
+
+    size = size & ((1UL << (L4_BITS_PER_WORD-4)) - 1);
+    size |= L4_CacheFlush_AttrD | L4_CacheFlush_AttrClean | L4_CacheFlush_AttrInvalidate;
+    L4_LoadMR (0, start);
+    L4_LoadMR (1, size);
+
+    return L4_CacheControl(s, L4_CacheCtl_FlushRanges | L4_CacheCtl_MaskAllLs | 0);
+}
+
+/*
+ * Flush-Invalidate cache range (start..end-1)
+ */
+L4_INLINE L4_Word_t L4_CacheFlushRangeInvalidate(L4_ThreadId_t s, L4_Word_t start, L4_Word_t end)
+{
+    L4_Word_t size = (end - start);
+
+    size = size & ((1UL << (L4_BITS_PER_WORD-4)) - 1);
+    size |= L4_CacheFlush_AttrD | L4_CacheFlush_AttrI | L4_CacheFlush_AttrInvalidate;
+    L4_LoadMR (0, start);
+    L4_LoadMR (1, size);
+
+    return L4_CacheControl(s, L4_CacheCtl_FlushRanges | L4_CacheCtl_MaskAllLs | 0);
+}
+
+#endif /* !__L4__CACHE_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/=id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/=id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/=id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/=id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:55:22 2004 7608.0
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/kdebug.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/kdebug.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/kdebug.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/kdebug.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.106
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/specials.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/specials.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/specials.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/specials.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.107
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/syscalls.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/syscalls.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/syscalls.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/syscalls.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.108
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/tracebuffer.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/tracebuffer.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/tracebuffer.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/tracebuffer.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.109
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/types.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/types.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/types.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/types.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.110
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/vregs_asm.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/vregs_asm.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/vregs_asm.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/vregs_asm.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Carl van Schaik <Carl.vanSchaik@nicta.com.au> Wed Nov 23 12:49:52 2005 15731.0
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/vregs.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/vregs.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/vregs.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/.arch-ids/vregs.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.111
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/kdebug.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/kdebug.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/kdebug.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/kdebug.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,111 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002, 2003,  Karlsruhe University
+ *                
+ * File path:     l4/x86/kdebug.h
+ * Description:   L4 Kdebug interface for ia32
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: kdebug.h,v 1.8 2003/09/24 19:06:23 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__X86__KDEBUG_H__
+#define __L4__X86__KDEBUG_H__
+
+#define L4_KDB_Enter(str...)			\
+do {						\
+    __asm__ __volatile__ (			\
+	"/* L4_KDB_Enter() */		\n"	\
+	"	int	$3		\n"	\
+	"	jmp	2f		\n"	\
+	"	mov	$1f, %eax	\n"	\
+	".section .rodata		\n"	\
+	"1:	.ascii \"" str "\"	\n"	\
+	"	.byte 0			\n"	\
+	".previous			\n"	\
+	"2:				\n");	\
+} while (0)
+
+#define __L4_KDB_Op(op, name)			\
+L4_INLINE void L4_KDB_##name (void)		\
+{						\
+    __asm__ __volatile__ (			\
+	"/* L4_KDB_"#name"() */		\n"	\
+	"	int	$3		\n"	\
+	"	cmpb	%0, %%al	\n"	\
+	:					\
+	: "i" (op));				\
+}
+
+#define __L4_KDB_Op_Arg(op, name, argtype)	\
+L4_INLINE void L4_KDB_##name (argtype arg)	\
+{						\
+    __asm__ __volatile__ (			\
+	"/* L4_KDB_"#name"() */		\n"	\
+	"	int	$3		\n"	\
+	"	cmpb	%1, %%al	\n"	\
+	:					\
+	: "a" (arg), "i" (op));			\
+}
+
+#define __L4_KDB_Op_Ret(op, name, rettype)	\
+L4_INLINE rettype L4_KDB_##name (void)		\
+{						\
+    rettype ret;				\
+    __asm__ __volatile__ (			\
+	"/* L4_KDB_"#name"() */		\n"	\
+	"	int	$3		\n"	\
+	"	cmpb	%1, %%al	\n"	\
+	: "=a" (ret)				\
+	: "i" (op));				\
+    return ret;					\
+}
+
+
+__L4_KDB_Op_Arg (0x00, PrintChar, char)
+__L4_KDB_Op_Arg (0x01, PrintString, char *)
+__L4_KDB_Op     (0x02, ClearPage)
+__L4_KDB_Op_Ret (0x08, ReadChar, char)
+__L4_KDB_Op_Ret (0x0d, ReadChar_Blocked, char)
+
+L4_INLINE void
+L4_KDB_SetThreadName(L4_ThreadId_t tid, const char *name)
+{
+    L4_Word_t *name_p = (L4_Word_t*) name;
+    register L4_Word_t first asm("eax") = name_p[0];
+    register L4_Word_t second asm("esi") = name_p[1];
+    register L4_Word_t third asm("ecx") = name_p[2];
+    register L4_Word_t fourth asm("edx") = name_p[3];
+    register L4_Word_t thrd asm("edi") = tid.raw;
+    __asm__ __volatile__ (                      
+	"	    int	    $3		\n"
+	"	    cmpb    %0, %%al	\n"
+	:
+	: "i" (0x0f),
+	  "r" (thrd), "r" (first), "r" (second), 
+	  "r" (third), "r" (fourth)
+	);
+    return;
+}
+
+#endif /* !__L4__X86__KDEBUG_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/specials.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/specials.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/specials.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/specials.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,130 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002, 2003,  Karlsruhe University
+ *                
+ * File path:     l4/ia32/specials.h
+ * Description:   x86 specific functions and defines
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: specials.h,v 1.9 2003/09/24 19:06:23 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__X86__SPECIALS_H__
+#define __L4__X86__SPECIALS_H__
+
+
+/*
+ * Architecture specific helper functions.
+ */
+
+L4_INLINE int __L4_Msb (L4_Word_t w) __attribute__ ((const));
+
+L4_INLINE int __L4_Msb (L4_Word_t w)
+{
+    int bitnum;
+
+    __asm__ (
+	"/* l4_msb()		*/			\n"
+	"	bsr	%1, %0				\n"
+
+	: /* outputs */
+	"=r" (bitnum)
+	: /* inputs */
+	"rm" (w)
+	);
+
+    return bitnum;
+}
+
+
+
+
+/*
+ * IO fpages.
+ */
+typedef union {
+    L4_Word_t	raw;
+    struct {
+	unsigned	rwx:4;
+	unsigned	__two:6;
+	unsigned	s:6;
+	unsigned	p:16;
+    } X;
+} L4_IoFpage_t;
+
+#if defined(__l4_cplusplus)
+L4_INLINE L4_Fpage_t L4_Fpage (L4_Fpage_t f)
+{
+    L4_Fpage_t out;
+    out.raw = f.raw;
+    return out;
+}
+
+L4_INLINE L4_IoFpage_t L4_IoFpage (L4_IoFpage_t f)
+{
+    L4_IoFpage_t out;
+    out.raw = f.raw;
+    return out;
+}
+
+L4_INLINE L4_IoFpage_t L4_IoFpage (L4_Word_t BaseAddress, int FpageSize)
+{
+    L4_IoFpage_t fp;
+    L4_Word_t msb = __L4_Msb (FpageSize);
+    fp.X.p = BaseAddress;
+    fp.X.__two = 2;
+    fp.X.s = (1UL << msb) < (L4_Word_t) FpageSize ? msb + 1 : msb;
+    fp.X.rwx = L4_NoAccess;
+    return fp;
+}
+
+L4_INLINE L4_IoFpage_t L4_IoFpageLog2 (L4_Word_t BaseAddress, int FpageSize)
+{
+    L4_IoFpage_t fp;
+    fp.X.p = BaseAddress;
+    fp.X.__two = 2;
+    fp.X.s = FpageSize;
+    fp.X.rwx = L4_NoAccess;
+    return fp;
+}
+#endif
+
+
+
+/*
+ * Control parameter for SpaceControl system call.
+ */
+
+#define L4_LargeSpace		0
+
+L4_INLINE L4_Word_t L4_SmallSpace (L4_Word_t location, L4_Word_t size)
+{
+    location >>= 1;
+    size >>= 2;
+    return ((location & ~(size - 1)) | size) & 0xff;
+}
+
+
+
+
+#endif /* !__L4__X86__SPECIALS_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/syscalls.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/syscalls.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/syscalls.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/syscalls.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,608 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2001-2004,  Karlsruhe University
+ *                
+ * File path:     l4/ia32/syscalls.h
+ * Description:   x86 syscall implementations
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: syscalls.h,v 1.31 2004/08/23 18:43:11 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__X86__SYSCALLS_H__
+#define __L4__X86__SYSCALLS_H__
+
+#include __L4_INC_ARCH(vregs.h)
+#include __L4_INC_ARCH(specials.h)
+#include <l4/message.h>
+
+/* FIXME: These are unimplemented, but let wombat compile */
+#define L4_FlushICache		29
+#define L4_FlushDCache		30
+#define L4_FlushCache		31
+
+#if defined(__pic__)
+# define __L4_SAVE_REGS		"	pushl %%ebx; pushl %%ebp\n"
+# define __L4_RESTORE_REGS	"	popl  %%ebp; popl  %%ebx\n"
+# define __L4_CLOBBER_REGS	"cc"
+#else
+# define __L4_SAVE_REGS		"	pushl %%ebp		\n"
+# define __L4_RESTORE_REGS	"	popl  %%ebp		\n"
+# define __L4_CLOBBER_REGS	"ebx", "cc"
+#endif
+
+
+L4_INLINE void * L4_KernelInterface (L4_Word_t *ApiVersion,
+				     L4_Word_t *ApiFlags,
+				     L4_Word_t *KernelId)
+{
+    void * base_address;
+
+    __asm__ __volatile__ (
+	"/* L4_KernelInterface() */ 			\n"
+	"	lock; nop				\n"
+
+	: /* outputs */
+	"=a" (base_address),
+	"=c" (*ApiVersion),
+	"=d" (*ApiFlags),
+	"=S" (*KernelId)
+
+	/* no inputs */
+	/* no clobbers */
+	);
+
+    return base_address;
+}
+
+
+L4_INLINE L4_ThreadId_t L4_ExchangeRegisters (L4_ThreadId_t dest,
+					      L4_Word_t control,
+					      L4_Word_t sp,
+					      L4_Word_t ip,
+					      L4_Word_t flags,
+					      L4_Word_t UserDefHandle,
+					      L4_ThreadId_t pager,
+					      L4_Word_t *old_control,
+					      L4_Word_t *old_sp,
+					      L4_Word_t *old_ip,
+					      L4_Word_t *old_flags,
+					      L4_Word_t *old_UserDefhandle,
+					      L4_ThreadId_t *old_pager)
+{
+    L4_ThreadId_t	result;
+
+    struct {
+	L4_Word_t	ebp;
+	L4_Word_t       edi;
+	L4_Word_t	ebx;
+	L4_Word_t	esi;
+    } in;
+
+    in.ebp = pager.raw;
+    in.ebx = UserDefHandle;
+    in.esi = ip;
+    in.edi = flags;
+
+    __asm__ __volatile__ (
+	"/* L4_ExchangeRegisters() */			\n"
+	__L4_SAVE_REGS
+	"       pushl   %%esi                           \n"
+	"       movl    (%%esi), %%ebp                  \n"
+	"       movl    4(%%esi), %%edi                 \n"
+	"       movl    8(%%esi), %%ebx                 \n"
+	"       movl    12(%%esi), %%esi                \n"
+	"	call	__L4_ExchangeRegisters		\n"
+        "       xchgl   %%esi, (%%esp)                  \n"
+        "       movl    %%edi, 4(%%esi)                 \n"
+        "       movl    %%ebx, 8(%%esi)                 \n"
+        "       movl    %%ebp, (%%esi)                  \n"
+        "       popl    %%esi                           \n"
+	__L4_RESTORE_REGS
+        :
+	"=a" (result), "=c" (*old_control), "=d" (*old_sp), "=S" (*old_ip)
+        :
+	"a" (dest.raw), "c" (control), "d" (sp), "S" (&in)
+        :
+	"edi", "memory", __L4_CLOBBER_REGS);
+
+    old_pager->raw = in.ebp;
+    *old_flags = in.edi;    
+    *old_UserDefhandle = in.ebx;
+    return result;
+}
+
+
+L4_INLINE L4_Word_t L4_ThreadControl (L4_ThreadId_t dest,
+				      L4_ThreadId_t SpaceSpecifier,
+				      L4_ThreadId_t Scheduler,
+				      L4_ThreadId_t Pager,
+				      L4_ThreadId_t SendRedirector,
+				      L4_ThreadId_t RecvRedirector,
+				      void * UtcbLocation)
+{
+    L4_Word_t result;
+    L4_Word_t dummy;
+    
+    struct {
+	L4_Word_t	ebp;
+	L4_Word_t	ebx;
+	L4_Word_t	edi;
+    } in;
+    
+    in.ebp = (L4_Word_t) UtcbLocation;
+    in.ebx = RecvRedirector.raw;
+    in.edi = SendRedirector.raw;
+    
+    __asm__ __volatile__ (
+	"/* L4_ThreadControl() */			\n"
+	__L4_SAVE_REGS
+	"	movl	(%%edi), %%ebp			\n"
+	"	movl	4(%%edi), %%ebx			\n"
+	"	movl	8(%%edi), %%edi			\n"
+	"	call	__L4_ThreadControl		\n"
+	__L4_RESTORE_REGS
+
+	: /* outputs */
+	"=a" (result),
+	"=c" (dummy),
+	"=d" (dummy),
+	"=S" (dummy),
+	"=D" (dummy)
+
+	: /* inputs */
+	"a" (dest),
+	"c" (Pager),
+	"d" (Scheduler),
+	"S" (SpaceSpecifier),
+	"D" (&in)
+	
+	: /* clobbers */
+	__L4_CLOBBER_REGS);
+
+    return result;
+}
+
+
+L4_INLINE void L4_ThreadSwitch (L4_ThreadId_t dest)
+{
+    __asm__ __volatile__ (
+	"/* L4_ThreadSwitch() */			\n"
+	"	call	__L4_ThreadSwitch		\n"
+
+	: /* no outputs */
+
+	: /* inputs */
+	"a" (dest)
+
+	/* no clobbers */
+	);
+}
+
+
+L4_INLINE L4_Word_t  L4_Schedule (L4_ThreadId_t dest,
+				  L4_Word_t timeslice,
+				  L4_Word_t total_quantum,
+				  L4_Word_t hw_thread_bitmask,
+				  L4_Word_t ProcessorControl,
+				  L4_Word_t prio,
+				  L4_Word_t *rem_timeslice,
+				  L4_Word_t *rem_total)
+{
+    L4_Word_t result;
+    L4_Word_t tslen;
+    L4_Word_t quantum;
+    L4_Word_t dummy;
+
+    struct {
+	L4_Word_t	ebx;
+	L4_Word_t	edi;
+    } in;
+    
+    in.ebx = ProcessorControl;
+    in.edi = prio;
+
+    __asm__ __volatile__ (
+	"/* L4_Schedule() */				\n"
+	__L4_SAVE_REGS
+	"	movl	4(%%edi), %%ebx			\n"
+	"	movl	0(%%edi), %%edi			\n"
+	"	call	__L4_Schedule			\n"
+	__L4_RESTORE_REGS
+
+	: /* outputs */
+	"=a" (result),
+	"=c" (tslen),
+	"=d" (quantum),
+	"=S" (dummy),
+	"=D" (dummy)
+
+	: /* inputs */
+	"a" (dest),
+	"c" (timeslice),
+	"d" (total_quantum),
+	"S" (hw_thread_bitmask),
+	"D" (&in)
+
+	: /* clobbers */
+	__L4_CLOBBER_REGS);
+
+    *rem_timeslice = tslen;
+    *rem_total = quantum;
+    return result;
+}
+
+L4_INLINE L4_MsgTag_t L4_Ipc (L4_ThreadId_t to,
+			      L4_ThreadId_t FromSpecifier,
+			      L4_MsgTag_t tag,
+			      L4_ThreadId_t * from)
+{
+    L4_MsgTag_t mr0;
+    L4_Word_t mr1, mr2;
+    L4_ThreadId_t result;
+    L4_Word_t * utcb = __L4_X86_Utcb ();
+#if !defined(__pic__)
+    L4_Word_t dummy;
+#endif
+
+    mr0 = tag;
+    mr1 = utcb[1];
+    mr2 = utcb[2];
+
+#if defined(__pic__)
+    __asm__ __volatile__ (
+	"/* L4_Ipc() */					\n"
+	__L4_SAVE_REGS
+        "	movl	%%ecx, %%ebp			\n"
+	"	call	__L4_Ipc			\n"
+        "	movl	%%ebp, %%ecx			\n"
+	"	movl	%%ebx, %%edx			\n"
+	__L4_RESTORE_REGS
+
+	: /* outputs */
+	"=S" (mr0), "=D" (mr1), "=c" (mr2), "=a" (result), "=d" (utcb)
+        
+	: /* inputs */
+	"S" (mr0), "D" (mr1), "c" (mr2), "a" (to.raw), "d" (FromSpecifier)
+	);
+#else
+    __asm__ __volatile__ (
+	"/* L4_Ipc() */					\n"
+	__L4_SAVE_REGS
+        "	movl	%%ecx, %%ebp			\n"
+	"	call	__L4_Ipc			\n"
+        "	movl	%%ebp, %%ecx			\n"
+	__L4_RESTORE_REGS
+
+	: /* outputs */
+	"=S" (mr0), "=D" (mr1), "=c" (mr2), "=a" (result), "=b" (utcb),
+        "=d" (dummy)
+        
+	: /* inputs */
+	"S" (mr0), "D" (mr1), "c" (mr2), "a" (to.raw), "d" (FromSpecifier)
+	);
+#endif
+
+    utcb[0] = mr0.raw;
+
+    if (! L4_IsNilThread (FromSpecifier)) {
+	*from = result; 
+	utcb[1] = mr1;
+	utcb[2] = mr2;
+    }
+
+    return mr0;
+}
+
+L4_INLINE L4_MsgTag_t L4_Notify (L4_ThreadId_t to, L4_Word_t mask)
+{
+    L4_MsgTag_t mr0;
+    L4_Word_t mr1, mr2;
+    L4_ThreadId_t result;
+    L4_Word_t * utcb;
+
+#if !defined(__pic)
+    L4_Word_t dummy;
+#endif
+
+    mr0 = L4_Notifytag;
+    mr1 = mask;
+
+#if defined(__pic__)
+    __asm__ __volatile__ (
+	"/* L4_Ipc() */					\n"
+	__L4_SAVE_REGS
+	"	call	__L4_Ipc			\n"
+        "	movl	%%ebp, %%ecx			\n"
+	"	movl	%%ebx, %%edx			\n"
+	__L4_RESTORE_REGS
+
+	: /* outputs */
+	"=S" (mr0), "=D" (mr1), "=c" (mr2), "=a" (result), "=d" (utcb)
+        
+	: /* inputs */
+	"S" (mr0), "D" (mr1), "a" (to.raw), "d" (L4_nilthread)
+	);
+#else
+    __asm__ __volatile__ (
+	"/* L4_Ipc() */					\n"
+	__L4_SAVE_REGS
+	"	call	__L4_Ipc			\n"
+	"	movl	%%ebp, %%ecx			\n"
+	__L4_RESTORE_REGS
+
+	: /* outputs */
+	"=S" (mr0), "=D" (mr1), "=c" (mr2), "=a" (result), "=b" (utcb),
+        "=d" (dummy)
+	    
+	: /* inputs */
+	"S" (mr0), "D" (mr1), "a" (to.raw), "d" (L4_nilthread)
+	);
+#endif
+
+    return mr0;
+}
+
+L4_INLINE L4_MsgTag_t L4_WaitNotify (L4_Word_t * mask)
+{
+    L4_MsgTag_t mr0;
+    L4_Word_t mr1, mr2;
+    L4_ThreadId_t result;
+    L4_Word_t * utcb = __L4_X86_Utcb ();
+
+#if !defined(__pic__)
+    L4_Word_t dummy;
+#endif
+
+    mr0 = L4_Waittag;
+
+#if defined(__pic__)
+    __asm__ __volatile__ (
+	"/* L4_Ipc() */					\n"
+	__L4_SAVE_REGS
+	"	call	__L4_Ipc			\n"
+        "	movl	%%ebp, %%ecx			\n"
+	"	movl	%%ebx, %%edx			\n"
+	__L4_RESTORE_REGS
+
+	: /* outputs */
+	"=S" (mr0), "=D" (mr1), "=c" (mr2), "=a" (result), "=d" (utcb)
+        
+	: /* inputs */
+	"S" (mr0), "a" (L4_nilthread), "d" (L4_waitnotify)
+	);
+#else
+    __asm__ __volatile__ (
+	"/* L4_Ipc() */					\n"
+	__L4_SAVE_REGS
+	"	call	__L4_Ipc			\n"
+	"	movl	%%ebp, %%ecx			\n"
+	__L4_RESTORE_REGS
+
+	: /* outputs */
+	"=S" (mr0), "=D" (mr1), "=c" (mr2), "=a" (result), "=b" (utcb),
+	"=d" (dummy)
+	    
+	: /* inputs */
+	"S" (mr0), "a" (L4_nilthread), "d" (L4_waitnotify)
+	);
+#endif
+
+    *mask = mr1;
+
+    return mr0;
+}
+
+
+L4_INLINE L4_MsgTag_t L4_Lipc (L4_ThreadId_t to,
+			       L4_ThreadId_t FromSpecifier,
+			       L4_MsgTag_t tag,
+			       L4_ThreadId_t * from)
+{
+    L4_MsgTag_t mr0;
+    L4_Word_t mr1, mr2;
+    L4_ThreadId_t result;
+    L4_Word_t * utcb = __L4_X86_Utcb ();
+#if !defined(__pic__)
+    L4_Word_t dummy;
+#endif
+
+
+    mr0 = tag;
+    mr1 = utcb[1];
+    mr2 = utcb[2];
+
+#if defined(__pic__)
+    __asm__ __volatile__ (
+	"/* L4_Lipc() */				\n"
+	__L4_SAVE_REGS
+        "	movl	%%ecx, %%ebp			\n"
+	"	call	__L4_Lipc			\n"
+        "	movl	%%ebp, %%ecx			\n"
+	"	movl	%%ebx, %%edx			\n"
+	__L4_RESTORE_REGS
+
+	: /* outputs */
+	"=S" (mr0), "=D" (mr1), "=c" (mr2), "=a" (result), "=d" (utcb)
+        
+	: /* inputs */
+	"S" (mr0), "D" (mr1), "c" (mr2), "a" (to.raw), "d" (FromSpecifier)
+	);
+#else
+    __asm__ __volatile__ (
+	"/* L4_Lipc() */				\n"
+	__L4_SAVE_REGS
+        "	movl	%%ecx, %%ebp			\n"
+	"	call	__L4_Lipc			\n"
+        "	movl	%%ebp, %%ecx			\n"
+	__L4_RESTORE_REGS
+
+	: /* outputs */
+	"=S" (mr0), "=D" (mr1), "=c" (mr2), "=a" (result), "=b" (utcb),
+        "=d" (dummy)
+        
+	: /* inputs */
+	"S" (mr0), "D" (mr1), "c" (mr2), "a" (to.raw), "d" (FromSpecifier)
+	);
+#endif
+
+    utcb[0] = mr0.raw;
+
+    if (! L4_IsNilThread (FromSpecifier)) {
+	*from = result; 
+	utcb[1] = mr1;
+	utcb[2] = mr2;
+    }
+
+    return mr0;
+}
+
+L4_INLINE L4_Word_t L4_MapControl (L4_ThreadId_t SpaceSpecifier, L4_Word_t control)
+{
+    L4_Word_t dummy, result;
+    L4_Word_t * utcb = __L4_X86_Utcb ();
+
+    __asm__ __volatile__ (
+	"/* L4_MapControl() */				\n"
+	__L4_SAVE_REGS
+	"	call	__L4_MapControl			\n"
+	__L4_RESTORE_REGS
+
+	: /* outputs */
+	"=S" (utcb[0]),
+	"=D" (dummy),
+	"=a" (result),
+	"=c" (dummy)
+
+	: /* inputs */
+	"0" (utcb[0]),
+	"1" (utcb),
+	"2" (SpaceSpecifier),
+	"3" (control)
+
+	: /* clobbered */
+	"edx", __L4_CLOBBER_REGS);
+
+    return result;
+}
+
+
+L4_INLINE L4_Word_t L4_SpaceControl (L4_ThreadId_t SpaceSpecifier,
+				     L4_Word_t control,
+				     L4_Fpage_t KernelInterfacePageArea,
+				     L4_Fpage_t UtcbArea,
+				     L4_Word_t *old_control)
+{
+    L4_Word_t result, dummy;
+
+    __asm__ __volatile__ (
+	"/* L4_SpaceControl() */			\n"
+	__L4_SAVE_REGS
+	"	call	__L4_SpaceControl		\n"
+	__L4_RESTORE_REGS
+
+	: /* outputs */
+	"=a" (result),
+	"=c" (*old_control),
+	"=d" (dummy),
+	"=S" (dummy)
+
+	: /* inputs */
+	"0" (SpaceSpecifier),
+	"1" (control),
+	"2" (KernelInterfacePageArea),
+	"3" (UtcbArea)
+
+
+	: /* clobbers */
+	__L4_CLOBBER_REGS);
+
+    return result;
+}
+
+
+L4_INLINE L4_Word_t L4_ProcessorControl (L4_Word_t ProcessorNo,
+					 L4_Word_t InternalFrequency,
+					 L4_Word_t ExternalFrequency,
+					 L4_Word_t voltage)
+{
+    L4_Word_t result, dummy;
+
+    __asm__ __volatile__ (
+	"/* L4_ProcessorControl() */			\n"
+	__L4_SAVE_REGS
+	"	call	__L4_ProcessorControl		\n"
+	__L4_RESTORE_REGS
+
+	: /* outputs */
+	"=a" (result),
+	"=c" (dummy),
+	"=d" (dummy),
+	"=S" (dummy),
+	"=D" (dummy)
+
+	: /* inputs */
+	"0" (ProcessorNo),
+	"1" (InternalFrequency),
+	"2" (ExternalFrequency),
+	"3" (voltage)
+
+	: /* clobbers */
+	__L4_CLOBBER_REGS);
+
+    return result;
+}
+
+
+L4_INLINE L4_Word_t L4_CacheControl (L4_ThreadId_t SpaceSpecifier,
+				     L4_Word_t control)
+{
+    L4_Word_t dummy, result;
+    L4_Word_t * utcb = __L4_X86_Utcb ();
+
+    __asm__ __volatile__ (
+	"/* L4_CacheControl() */			\n"
+	__L4_SAVE_REGS
+	"	call	__L4_CacheControl		\n"
+	__L4_RESTORE_REGS
+
+	: /* outputs */
+	"=S" (utcb[0]),
+	"=D" (dummy),
+	"=a" (result),
+	"=c" (dummy)
+
+	: /* inputs */
+	"0" (utcb[0]),
+	"1" (utcb),
+	"2" (SpaceSpecifier),
+	"3" (control)
+
+	: /* clobbered */
+	"edx", __L4_CLOBBER_REGS);
+
+    return result;
+}
+
+
+#endif /* !__L4__X86__SYSCALLS_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/tracebuffer.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/tracebuffer.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/tracebuffer.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/tracebuffer.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,209 @@
+/*********************************************************************
+ *
+ * Copyright (C) 2002,  Karlsruhe University
+ *
+ * File path:     l4/ia32/tracebuffer.h
+ * Description:   Functions for accessing the tracebuffer
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ ********************************************************************/
+#ifndef __L4__IA32__TRACEBUFFER_H__
+#define __L4__IA32__TRACEBUFFER_H__
+
+#if defined(TRACEBUFFER)
+#include <l4/types.h>
+
+typedef struct {
+    L4_Word32_t cycles;
+    L4_Word32_t pmc0;
+    L4_Word32_t pmc1;
+} L4_Tracestatus_t;
+
+typedef struct {
+    L4_Tracestatus_t status;
+    L4_Word32_t identifier;
+    L4_Word32_t data[4];
+} L4_Trace_t;
+
+typedef struct {
+    L4_Word32_t current;
+    L4_Word32_t magic;
+    L4_Word32_t counter;
+    L4_Word32_t threshold;
+    L4_Word32_t pad[4];
+    L4_Trace_t trace[];
+} L4_Tracebuffer_t;
+
+extern L4_Tracebuffer_t * L4_Tracebuffer;
+
+#define L4_TBUF_MAGIC 0x20121977
+
+#if defined(PERFMON)
+#define __L4_RDPMC "rdpmc\n"
+#else
+#define __L4_RDPMC "xor %%eax, %%eax\n"
+#endif
+
+#define __L4_TBUF_GET_NEXT_RECORD(addr)			\
+   asm volatile (					\
+       "	movl	%%fs:0, %%esi		\n"	\
+       "	addl	$32, %%esi		\n"	\
+       "	movl   %%esi, %%edi		\n"	\
+       "	andl   $0x1fffff, %%esi		\n"	\
+       "	movl	%%esi, %%fs:0		\n"	\
+       "	rdtsc				\n"	\
+       "	movl	%%eax, %%fs:0(%%edi)	\n"	\
+       "	xor	%%ecx, %%ecx		\n"	\
+       __L4_RDPMC					\
+       "	movl   %%eax, %%fs:4(%%edi)	\n"	\
+       "	inc	%%ecx			\n"	\
+       __L4_RDPMC					\
+       "	movl	%%eax, %%fs:8(%%edi)	\n"	\
+       :"=D" (addr)					\
+       :						\
+       :"eax", "ecx", "edx", "esi")
+
+#define __L4_TBUF_STORE_ITEM(addr, offset, item)		\
+    asm volatile ("movl %0, %%fs:(" #offset "*4+12)(%%edi)"	\
+		  :						\
+		  :"r" (item), "D" (addr))
+
+L4_INLINE void L4_TBUF_RECORD_EVENT (unsigned _id)
+{
+    unsigned addr;
+    __L4_TBUF_GET_NEXT_RECORD (addr);
+    __L4_TBUF_STORE_ITEM (addr, 0, _id & 0x7FFFFFFF);
+}
+
+L4_INLINE void L4_TBUF_RECORD_EVENT_1 (unsigned _id,
+				       unsigned _p0)
+{
+    unsigned addr;
+    __L4_TBUF_GET_NEXT_RECORD (addr);
+    __L4_TBUF_STORE_ITEM (addr, 0, _id & 0x7FFFFFFF);
+    __L4_TBUF_STORE_ITEM (addr, 1, _p0);
+}
+
+L4_INLINE void L4_TBUF_RECORD_EVENT_2 (unsigned _id,
+				       unsigned _p0,
+				       unsigned _p1)
+{
+    unsigned addr;
+    __L4_TBUF_GET_NEXT_RECORD (addr);
+    __L4_TBUF_STORE_ITEM (addr, 0, _id & 0x7FFFFFFF);
+    __L4_TBUF_STORE_ITEM (addr, 1, _p0);
+    __L4_TBUF_STORE_ITEM (addr, 2, _p1);
+}
+
+L4_INLINE void L4_TBUF_RECORD_EVENT_3 (unsigned _id,
+				       unsigned _p0,
+				       unsigned _p1,
+				       unsigned _p2)
+{
+    unsigned addr;
+    __L4_TBUF_GET_NEXT_RECORD (addr);
+    __L4_TBUF_STORE_ITEM (addr, 0, _id & 0x7FFFFFFF);
+    __L4_TBUF_STORE_ITEM (addr, 1, _p0);
+    __L4_TBUF_STORE_ITEM (addr, 2, _p1);
+    __L4_TBUF_STORE_ITEM (addr, 3, _p2);
+}
+
+L4_INLINE void L4_TBUF_RECORD_EVENT_4 (unsigned _id,
+				       unsigned _p0,
+				       unsigned _p1,
+				       unsigned _p2,
+				       unsigned _p3)
+{
+    unsigned addr;
+    __L4_TBUF_GET_NEXT_RECORD (addr);
+    __L4_TBUF_STORE_ITEM (addr, 0, _id & 0x7FFFFFFF);
+    __L4_TBUF_STORE_ITEM (addr, 1, _p0);
+    __L4_TBUF_STORE_ITEM (addr, 2, _p1);
+    __L4_TBUF_STORE_ITEM (addr, 3, _p2);
+    __L4_TBUF_STORE_ITEM (addr, 4, _p3);
+}
+
+#if defined(__l4_cplusplus)
+L4_INLINE void L4_TBUF_RECORD_EVENT (unsigned _id, unsigned _p0)
+{
+    L4_TBUF_RECORD_EVENT_1 (_id, _p0);
+}
+
+L4_INLINE void L4_TBUF_RECORD_EVENT (unsigned _id,
+				     unsigned _p0,
+				     unsigned _p1)
+{
+    L4_TBUF_RECORD_EVENT_2 (_id, _p0, _p1);
+}
+
+L4_INLINE void L4_TBUF_RECORD_EVENT (unsigned _id,
+				     unsigned _p0,
+				     unsigned _p1,
+				     unsigned _p2)
+{
+    L4_TBUF_RECORD_EVENT_3 (_id, _p0, _p1, _p2);
+}
+
+L4_INLINE void L4_TBUF_RECORD_EVENT (unsigned _id,
+				     unsigned _p0,
+				     unsigned _p1,
+				     unsigned _p2,
+				     unsigned _p3)
+{
+    L4_TBUF_RECORD_EVENT_4 (_id, _p0, _p1, _p2, _p3);
+}
+#endif /* __l4_cplusplus */
+
+#define L4_TBUF_INCREMENT_TRACE_COUNTER()			\
+    asm volatile (						\
+	"	movl	%%fs:8, %%edx		\n"		\
+	"	movl	%%fs:12, %%edi		\n"		\
+	"	inc	%%edx			\n"		\
+	"	movl	%%edx, %%fs:8		\n"		\
+	"	cmpl	%%edx, %%edi		\n"		\
+	"	jge	1f			\n"		\
+	"	int3				\n"		\
+	"	xor	%%edx, %%edx		\n"		\
+	"	movl	%%edx, %%fs:8		\n"		\
+	"1:					\n"		\
+	:							\
+	:							\
+	:"edx", "edi")
+
+#define L4_TBUF_CLEAR_BUFFER() \
+    asm volatile ("movl $0, %fs:0")
+
+
+#else /* !TRACEBUFFER */
+
+#define L4_TBUF_RECORD_EVENT(args...)
+#define L4_TBUF_RECORD_EVENT_1(args...)
+#define L4_TBUF_RECORD_EVENT_2(args...)
+#define L4_TBUF_RECORD_EVENT_3(args...)
+#define L4_TBUF_RECORD_EVENT_4(args...)
+#define L4_TBUF_INCREMENT_TRACE_COUNTER()
+#define L4_TBUF_CLEAR_BUFFER()
+
+#endif /* !TRACEBUFFER */
+
+#endif /* !__L4__IA32__TRACEBUFFER_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/types.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/types.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/types.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/types.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,48 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2001, 2002, 2003,  Karlsruhe University
+ *                
+ * File path:     l4/ia32/types.h
+ * Description:   x86 specific type declararions
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: types.h,v 1.7 2003/09/24 19:06:23 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__X86__TYPES_H__
+#define __L4__X86__TYPES_H__
+
+
+#define L4_32BIT
+#define L4_LITTLE_ENDIAN
+
+
+typedef unsigned long long      L4_Word64_t;
+typedef unsigned long		L4_Word32_t;
+typedef unsigned short		L4_Word16_t;
+typedef unsigned char		L4_Word8_t;
+
+typedef unsigned long		L4_Word_t;
+typedef unsigned int		L4_Size_t;
+
+#endif /* !__L4__X86__TYPES_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/vregs_asm.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/vregs_asm.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/vregs_asm.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/vregs_asm.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,21 @@
+# Location of TCRs within UTCB.
+# Note: Keep up to date with vregs.h
+
+#define __L4_TCR_PREEMPTED_IP			(-3)
+#define __L4_TCR_PREEMPT_CALLBACK_IP		(-4)
+#define __L4_TCR_VIRTUAL_ACTUAL_SENDER		(-5)
+#define __L4_TCR_INTENDED_RECEIVER		(-6)
+#define __L4_TCR_ERROR_CODE			(-7)
+#define __L4_TCR_PREEMPT_FLAGS			(-8)
+#define __L4_TCR_COP_FLAGS			(-8)
+#define __L4_TCR_EXCEPTION_HANDLER		(-9)
+#define __L4_TCR_PAGER				(-10)
+#define __L4_TCR_USER_DEFINED_HANDLE		(-11)
+#define __L4_TCR_PROCESSOR_NO			(-12)
+#define __L4_TCR_ACCEPTOR			(-13)
+#define __L4_TCR_NOTIFY_BITS			(-14)
+#define __L4_TCR_NOTIFY_MASK			(-15)
+#define __L4_TCR_MY_GLOBAL_ID			(-16)
+#define __L4_TCR_THREAD_WORD_0			(-17)
+#define __L4_TCR_THREAD_WORD_1			(-18)
+#define __L4_TCR_PLAT_TLS			(-19)
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/vregs.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/vregs.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia32/vregs.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia32/vregs.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,321 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2001-2003,  Karlsruhe University
+ *                
+ * File path:     l4/ia32/vregs.h
+ * Description:   x86 virtual registers
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: vregs.h,v 1.12 2003/12/12 15:54:29 joshua Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__X86__VREGS_H__
+#define __L4__X86__VREGS_H__
+
+
+/*
+ * All virtual registers on x86 is located in a user Level Thread
+ * Control Block (UTCB).
+ */
+
+#if (__GNUC__ >= 3) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 96))
+L4_INLINE L4_Word_t * __L4_X86_Utcb (void) __attribute__ ((pure));
+#endif
+
+L4_INLINE L4_Word_t * __L4_X86_Utcb (void)
+{
+    L4_Word_t *utcb;
+
+    __asm__ __volatile__ (
+	"/* __L4_X86_Utcb() */			\n"
+	"	mov %%gs:0, %0			\n"
+
+	: /* outputs */
+	"=r"(utcb)
+
+	/* no inputs */
+	/* no clobbers */
+	);
+
+    return utcb;
+}
+
+L4_INLINE L4_Word_t * L4_GetUtcbBase (void);
+L4_INLINE L4_Word_t * L4_GetUtcbBase (void)
+{
+    /* want to return beginning of UTCB, not half way through */
+	return __L4_X86_Utcb() - (0x100 >> 2);
+}
+
+
+#define __L4_NUM_MRS	64
+
+/*
+ * Location of TCRs within UTCB.
+ */
+
+#define __L4_TCR_PREEMPTED_IP			(-3)
+#define __L4_TCR_PREEMPT_CALLBACK_IP		(-4)
+#define __L4_TCR_VIRTUAL_ACTUAL_SENDER		(-5)
+#define __L4_TCR_INTENDED_RECEIVER		(-6)
+#define __L4_TCR_ERROR_CODE			(-7)
+#define __L4_TCR_PREEMPT_FLAGS			(-8)
+#define __L4_TCR_COP_FLAGS			(-8)
+#define __L4_TCR_EXCEPTION_HANDLER		(-9)
+#define __L4_TCR_PAGER				(-10)
+#define __L4_TCR_USER_DEFINED_HANDLE		(-11)
+#define __L4_TCR_PROCESSOR_NO			(-12)
+#define __L4_TCR_ACCEPTOR			(-13)
+#define __L4_TCR_NOTIFY_BITS			(-14)
+#define __L4_TCR_NOTIFY_MASK			(-15)
+#define __L4_TCR_MY_GLOBAL_ID			(-16)
+#define __L4_TCR_THREAD_WORD_0			(-17)
+#define __L4_TCR_THREAD_WORD_1			(-18)
+#define __L4_TCR_PLAT_TLS			(-19)
+
+
+/*
+ * Thread Control Registers.
+ */
+
+L4_INLINE L4_Word_t __L4_TCR_MyGlobalId (void)
+{
+    return (__L4_X86_Utcb ())[__L4_TCR_MY_GLOBAL_ID];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ProcessorNo (void)
+{
+    return (__L4_X86_Utcb ())[__L4_TCR_PROCESSOR_NO];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_UserDefinedHandle (void)
+{
+    return (__L4_X86_Utcb ())[__L4_TCR_USER_DEFINED_HANDLE];
+}
+
+L4_INLINE void __L4_TCR_Set_UserDefinedHandle (L4_Word_t w)
+{
+    (__L4_X86_Utcb ())[__L4_TCR_USER_DEFINED_HANDLE] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_Pager (void)
+{
+    return (__L4_X86_Utcb ())[__L4_TCR_PAGER];
+}
+
+L4_INLINE void __L4_TCR_Set_Pager (L4_Word_t w)
+{
+    (__L4_X86_Utcb ())[__L4_TCR_PAGER] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ExceptionHandler (void)
+{
+    return (__L4_X86_Utcb ())[__L4_TCR_EXCEPTION_HANDLER];
+}
+
+L4_INLINE void __L4_TCR_Set_ExceptionHandler (L4_Word_t w)
+{
+    (__L4_X86_Utcb ())[__L4_TCR_EXCEPTION_HANDLER] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ErrorCode (void)
+{
+    return (__L4_X86_Utcb ())[__L4_TCR_ERROR_CODE];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_IntendedReceiver(void)
+{
+    return (__L4_X86_Utcb ())[__L4_TCR_INTENDED_RECEIVER];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ActualSender (void)
+{
+    return (__L4_X86_Utcb ())[__L4_TCR_VIRTUAL_ACTUAL_SENDER];
+}
+
+L4_INLINE void __L4_TCR_Set_VirtualSender (L4_Word_t w)
+{
+    (__L4_X86_Utcb ())[__L4_TCR_VIRTUAL_ACTUAL_SENDER] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_Acceptor( void )
+{
+    return (__L4_X86_Utcb ())[__L4_TCR_ACCEPTOR];
+}
+
+L4_INLINE void __L4_TCR_Set_Acceptor( L4_Word_t w )
+{
+    (__L4_X86_Utcb ())[__L4_TCR_ACCEPTOR] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_NotifyBits( void )
+{
+    return (__L4_X86_Utcb ())[__L4_TCR_NOTIFY_BITS];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_NotifyMask( void )
+{
+    return (__L4_X86_Utcb ())[__L4_TCR_NOTIFY_MASK];
+}
+
+L4_INLINE void __L4_TCR_Set_NotifyMask( L4_Word_t w )
+{
+    (__L4_X86_Utcb ())[__L4_TCR_NOTIFY_MASK] = w;
+}
+
+L4_INLINE void __L4_TCR_Set_NotifyBits( L4_Word_t w )
+{
+    (__L4_X86_Utcb())[ __L4_TCR_NOTIFY_BITS ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ThreadWord (L4_Word_t n)
+{
+    return (__L4_X86_Utcb ())[__L4_TCR_THREAD_WORD_0 - (int) n];
+}
+
+L4_INLINE void __L4_TCR_Set_ThreadWord (L4_Word_t n, L4_Word_t w)
+{
+    (__L4_X86_Utcb ())[__L4_TCR_THREAD_WORD_0 - (int) n] = w;
+}
+
+L4_INLINE void L4_Set_CopFlag (L4_Word_t n)
+{
+    __asm__ ("orl %0, %1"
+	     :
+	     :
+	     "ir" (1 << (8 + n)),
+	     "m" ((__L4_X86_Utcb ())[__L4_TCR_COP_FLAGS]));
+}
+
+L4_INLINE void L4_Clr_CopFlag (L4_Word_t n)
+{
+    __asm__ ("andl %0, %1"
+	     :
+	     :
+	     "ir" (~(1 << (8 + n))),
+	     "m" ((__L4_X86_Utcb ())[__L4_TCR_COP_FLAGS]));
+}
+
+L4_INLINE L4_Word_t L4_PreemptedIP( void )
+{
+    return (__L4_X86_Utcb())[ __L4_TCR_PREEMPTED_IP ];
+}
+
+L4_INLINE void L4_Set_PreemptCallbackIP( L4_Word_t ip )
+{
+    (__L4_X86_Utcb())[ __L4_TCR_PREEMPT_CALLBACK_IP] = ip;
+}
+
+L4_INLINE L4_Bool_t L4_EnablePreemptionCallback (void)
+{
+    L4_Word8_t retval = 0;
+
+    __asm__ ("bts %0, %1" : : "i" (5), "m" ((__L4_X86_Utcb ())[__L4_TCR_PREEMPT_FLAGS]));
+    __asm__ ("setc %0" : "=r" (retval) : );
+
+    return (L4_Bool_t)retval;
+}
+
+L4_INLINE L4_Bool_t L4_DisablePreemptionCallback (void)
+{
+    L4_Word8_t retval = 0;
+
+    __asm__ ("btr %0, %1" : : "i" (5), "m" ((__L4_X86_Utcb ())[__L4_TCR_PREEMPT_FLAGS]));
+    __asm__ ("setc %0" : "=r" (retval) : );
+
+    return (L4_Bool_t)retval;
+}
+
+
+/*
+ * Message Registers.
+ */
+
+L4_INLINE void L4_StoreMR (int i, L4_Word_t * w)
+{
+    *w = (__L4_X86_Utcb ())[i];
+}
+
+L4_INLINE void L4_LoadMR (int i, L4_Word_t w)
+{
+    (__L4_X86_Utcb ())[i] = w;
+}
+
+L4_INLINE void L4_StoreMRs (int i, int k, L4_Word_t * w)
+{
+    L4_Word_t * mr = __L4_X86_Utcb () + i;
+
+    while (k-- > 0)
+	*w++ = *mr++;
+}
+
+L4_INLINE void L4_LoadMRs (int i, int k, L4_Word_t * w)
+{
+    L4_Word_t * mr = __L4_X86_Utcb () + i;
+
+    while (k-- > 0)
+	*mr++ = *w++;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ThreadLocalStorage (void)
+{
+    return (__L4_X86_Utcb())[__L4_TCR_PLAT_TLS];
+}
+
+L4_INLINE void __L4_TCR_Set_ThreadLocalStorage(L4_Word_t w)
+{
+    (__L4_X86_Utcb())[__L4_TCR_PLAT_TLS] = w;
+}
+
+/*
+ * Buffer Registers.
+ */
+
+L4_INLINE void L4_StoreBR (int i, L4_Word_t * w)
+{
+    *w = (__L4_X86_Utcb ())[-16 - i];
+}
+
+L4_INLINE void L4_LoadBR (int i, L4_Word_t w)
+{
+    (__L4_X86_Utcb ())[-16 - i] = w;
+}
+
+L4_INLINE void L4_StoreBRs (int i, int k, L4_Word_t * w)
+{
+    L4_Word_t * br = (__L4_X86_Utcb ()) - 16 - i;
+
+    while (k-- > 0)
+	*w++ = *br--;
+}
+
+L4_INLINE void L4_LoadBRs (int i, int k, L4_Word_t * w)
+{
+    L4_Word_t * br = (__L4_X86_Utcb ()) - 16 - i;
+
+    while (k-- > 0)
+	*br-- = *w++;
+}
+
+
+#endif /* !__L4__X86__VREGS_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/arch.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/arch.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/arch.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/arch.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,62 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2003,  Karlsruhe University
+ *                
+ * File path:     l4/ia64/arch.h
+ * Description:   Architecture specific functionality
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: arch.h,v 1.2 2003/09/24 19:06:24 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__IA64__ARCH_H__
+#define __L4__IA64__ARCH_H__
+
+
+/*
+ * SAL Access
+ */
+
+#define __L4_SAL_PCI_CONFIG_READ	(0x01000010)
+#define __L4_SAL_PCI_CONFIG_WRITE	(0x01000011)
+
+L4_INLINE L4_Word_t L4_SAL_PCI_ConfigRead (L4_Word_t address, L4_Word_t size,
+					   L4_Word_t *value)
+{
+    L4_Word_t dummy;
+    return L4_SAL_Call (__L4_SAL_PCI_CONFIG_READ, 
+			address, size, 0, 0, 0, 0,
+			value, &dummy, &dummy);
+}
+
+L4_INLINE L4_Word_t L4_SAL_PCI_ConfigWrite (L4_Word_t address, L4_Word_t size,
+					    L4_Word_t value)
+{
+    L4_Word_t dummy;
+    return L4_SAL_Call (__L4_SAL_PCI_CONFIG_WRITE,
+			address, size, value, 0, 0, 0,
+			&dummy, &dummy, &dummy);
+}
+
+
+#endif /* !__L4__IA64__ARCH_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/arch.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/arch.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/arch.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/arch.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.112
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/=id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/=id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/=id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/=id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:55:19 2004 7607.0
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/kdebug.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/kdebug.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/kdebug.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/kdebug.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.113
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/runconv.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/runconv.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/runconv.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/runconv.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.114
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/specials.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/specials.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/specials.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/specials.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.115
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/syscalls.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/syscalls.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/syscalls.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/syscalls.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.116
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/types.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/types.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/types.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/types.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.117
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/vregs.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/vregs.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/vregs.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/.arch-ids/vregs.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.118
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/kdebug.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/kdebug.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/kdebug.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/kdebug.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,107 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002-2004,  Karlsruhe University
+ *                
+ * File path:     l4/ia64/kdebug.h
+ * Description:   IA64 kernel debugger interface
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: kdebug.h,v 1.9 2004/03/17 18:34:24 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__IA64__KDEBUG_H__
+#define __L4__IA64__KDEBUG_H__
+
+#include <l4/types.h>
+
+#define L4_KDB_Enter(s)						\
+do {								\
+    __asm__ __volatile__ (					\
+	"{ .mlx					\n"		\
+	"	break.m	0x3			\n"		\
+	"	movl	r0 = 1f ;;		\n"		\
+	"}					\n"		\
+	"					\n"		\
+	"	.rodata				\n"		\
+	"1:	stringz " #s "			\n"		\
+	"	.previous			\n"		\
+	:							\
+	:							\
+	:							\
+	"memory");						\
+} while (0)
+
+
+L4_INLINE void L4_KDB_ClearPage (void)
+{
+}
+
+L4_INLINE void L4_KDB_PrintChar (char c)
+{
+    register char r14 asm ("r14") = c;
+
+    asm volatile (
+	"{ .mlx					\n"
+	"	break.m	0x1			\n"
+	"	movl	r0 = 0 ;;		\n"
+	"}					\n"
+	:
+	:
+	"r" (r14));
+}
+
+L4_INLINE void L4_KDB_PrinString (const char * s)
+{
+}
+
+L4_INLINE char L4_KDB_ReadChar (void)
+{
+    register char r14 asm ("r14");
+
+    asm volatile (
+	"{ .mlx					\n"
+	"	break.m	0x4			\n"
+	"	movl	r0 = 0 ;;		\n"
+	"}					\n"
+	:							       
+	"=r" (r14));
+
+    return r14;
+}
+
+L4_INLINE char L4_KDB_ReadChar_Blocked (void)
+{
+    register char r14 asm ("r14");
+
+    asm volatile (
+	"{ .mlx					\n"
+	"	break.m	0x2			\n"
+	"	movl	r0 = 0 ;;		\n"
+	"}					\n"
+	:							       
+	"=r" (r14));
+
+    return r14;
+}
+
+#endif /* !__L4__IA64__KDEBUG_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/runconv.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/runconv.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/runconv.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/runconv.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,114 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002-2004,  Karlsruhe University
+ *                
+ * File path:     l4/ia64/runconv.h
+ * Description:   IA-64 runtime convention definitions
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: runconv.h,v 1.7 2004/04/15 14:20:38 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__IA64__RUNCONV_H__
+#define __L4__IA64__RUNCONV_H__
+
+#define __L4_MOST_CALLER_SAVED_GENERAL_REGS 				\
+    "r2",  "r3", "r21", "r22",						\
+    "r23", "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31",	\
+    "out0",  "out1",  "out2",  "out3",  "out4",				\
+    "out5",  "out6",  "out7"
+
+#define __L4_SOME_CALLER_SAVED_GENERAL_REGS 				\
+    "r2",  "r3", "r21", "r22",						\
+    "r23", "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31"
+
+#define __L4_CALLER_SAVED_GENERAL_REGS 					\
+    "r2",  "r3",							\
+    "r8",  "r9",  "r10", "r11",						\
+    "r14", "r15", "r16", "r17", "r18", "r19", "r20", "r21", "r22",	\
+    "r23", "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31",	\
+    "out0",  "out1",  "out2",  "out3",  "out4",				\
+    "out5",  "out6",  "out7"
+
+#define __L4_CALLER_SAVED_FP_REGS					  \
+    "f6",  "f7",  "f8",  "f9",  "f11", "f12", "f13", "f14", "f15",	  \
+    "f32", "f33", "f34", "f35", "f36", "f37", "f38", "f39",		  \
+    "f40", "f41", "f42", "f43", "f44", "f45", "f46", "f47", "f48", "f49", \
+    "f50", "f51", "f52", "f53", "f54", "f55", "f56", "f57", "f58", "f59", \
+    "f60", "f61", "f62", "f63", "f64", "f65", "f66", "f67", "f68", "f69", \
+    "f70", "f71", "f72", "f73", "f74", "f75", "f76", "f77", "f78", "f79", \
+    "f80", "f81", "f82", "f83", "f84", "f85", "f86", "f87", "f88", "f89", \
+    "f90", "f91", "f92", "f93", "f94", "f95", "f96", "f97", "f98", "f99", \
+    "f100", "f101", "f102", "f103", "f104",				  \
+    "f105", "f106", "f107", "f108", "f109",				  \
+    "f110", "f111", "f112", "f113", "f114",				  \
+    "f115", "f116", "f117", "f118", "f119",				  \
+    "f120", "f121", "f122", "f123", "f124",				  \
+    "f125", "f126", "f127"
+
+#define __L4_CALLER_SAVED_PREDICATE_REGS \
+    "p6", "p7", "p8", "p9", "p10", "p11", "p12", "p13", "p14", "p15"
+
+#define __L4_CALLER_SAVED_BRANCH_REGS \
+    "b0", "b6", "b7"
+
+#define __L4_CALLER_SAVED_REGS						\
+    __L4_CALLER_SAVED_GENERAL_REGS, __L4_CALLER_SAVED_FP_REGS,		\
+    __L4_CALLER_SAVED_PREDICATE_REGS, __L4_CALLER_SAVED_BRANCH_REGS,	\
+    "ar.pfs"
+
+#define __L4_CLOBBER_CALLER_REGS(regs...)				\
+    __L4_MOST_CALLER_SAVED_GENERAL_REGS, __L4_CALLER_SAVED_FP_REGS,	\
+    __L4_CALLER_SAVED_PREDICATE_REGS, __L4_CALLER_SAVED_BRANCH_REGS,	\
+    "ar.pfs" , ## regs
+
+#define __L4_CLOBBER_CALLER_REGS_NOOUT(regs...)				\
+    __L4_SOME_CALLER_SAVED_GENERAL_REGS, __L4_CALLER_SAVED_FP_REGS,	\
+    __L4_CALLER_SAVED_PREDICATE_REGS, __L4_CALLER_SAVED_BRANCH_REGS,	\
+    "ar.pfs" , ## regs
+
+#define __L4_CALLEE_SAVED_GENERAL_REGS \
+    "r4", "r5", "r6", "r7"
+
+#define __L4_CALLEE_SAVED_FP_REGS				\
+    "f2", "f3", "f4", "f5",					\
+    "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",	\
+    "f23", "f24", "f25", "f26", "f27", "f29", "f30", "f31"
+
+#define __L4_CALLEE_SAVED_PREDICATE_REGS				  \
+    "p16", "p17", "p18", "p19", 					  \
+    "p20", "p21", "p22", "p23", "p24", "p25", "p26", "p27", "p28", "p29", \
+    "p30", "p31", "p32", "p33", "p34", "p35", "p36", "p37", "p38", "p39", \
+    "p40", "p41", "p42", "p43", "p44", "p45", "p46", "p47", "p48", "p49", \
+    "p50", "p51", "p52", "p53", "p54", "p55", "p56", "p57", "p58", "p59", \
+    "p60", "p61", "p62", "p63"
+
+#define __L4_CALLEE_SAVED_BRANCH_REGS \
+    "b1", "b2", "b3", "b4", "b5"
+
+#define __L4_CALLEE_SAVED_REGS						\
+    __L4_CALLEE_SAVED_GENERAL_REGS, __L4_CALLEE_SAVED_FP_REGS,		\
+    __L4_CALLEE_SAVED_PREDICATE_REGS, __L4_CALLEE_SAVED_BRANCH_REGS
+
+
+#endif /* !__L4__IA64__RUNCONV_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/specials.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/specials.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/specials.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/specials.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,138 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002, 2003,  Karlsruhe University
+ *                
+ * File path:     l4/ia64/specials.h
+ * Description:   ia64 specific functions and defines
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: specials.h,v 1.7 2003/09/24 19:06:24 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__IA64__SPECIALS_H__
+#define __L4__IA64__SPECIALS_H__
+
+
+/*
+ * Architecture specific helper functions.
+ */
+
+L4_INLINE int __L4_Msb (L4_Word_t w) __attribute__ ((const));
+
+L4_INLINE int __L4_Msb (L4_Word_t w)
+{
+    int bitnum;
+
+    if (w == 0)
+	return 64;
+
+    for (bitnum = 0, w >>= 1; w != 0; bitnum++)
+	w >>= 1;
+
+    return bitnum;
+}
+
+
+
+
+/*
+ * Cacheability hints for string items.
+ */
+
+#define L4_CacheNonTemporalL1		(L4_CacheAllocationHint_t) { raw: 1 })
+#define L4_CacheNonTemporalL2		(L4_CacheAllocationHint_t) { raw: 2 })
+#define L4_CacheNonTemporalAllLevels	(L4_CacheAllocationHint_t) { raw: 3 })
+
+
+
+
+/*
+ * Memory attributes for MemoryControl system call.
+ */
+
+#define L4_WriteBackMemory		1
+#define L4_WriteCoalescingMemory	7
+#define L4_UncacheableMemory		5
+#define L4_UncacheableExportedMemory	6
+#define L4_NaTPageMemory		8
+
+
+
+
+/*
+ * Architecture specific memory descriptor types.
+ */
+
+#define L4_ACPIMemoryType		(0x1f)
+
+
+
+
+/*
+ * PCI config fpages
+ */
+
+typedef union {
+    L4_Word_t	raw;
+    struct {
+	L4_Word_t	rwx:4;
+	L4_Word_t	__two:6;
+	L4_Word_t	s:6;
+	L4_Word_t	p:48;
+    } X;
+} L4_PCIConfigFpage_t;
+
+L4_INLINE L4_Fpage_t L4_PCIConfigFpage (L4_Word_t BaseAddress, int FpageSize)
+{
+    L4_PCIConfigFpage_t fp;
+    L4_Fpage_t ret;
+    L4_Word_t msb = __L4_Msb (FpageSize);
+
+    fp.X.p = BaseAddress;
+    fp.X.__two = 2;
+    fp.X.s = (1UL << msb) < (L4_Word_t) FpageSize ? msb + 1 : msb;
+    fp.X.rwx = L4_NoAccess;
+
+    ret.raw = fp.raw;
+    return ret;
+}
+
+L4_INLINE L4_Fpage_t L4_PCIConfigFpageLog2 (L4_Word_t BaseAddress,
+					    int FpageSize)
+{
+    L4_PCIConfigFpage_t fp;
+    L4_Fpage_t ret;
+
+    fp.X.p = BaseAddress;
+    fp.X.__two = 2;
+    fp.X.s = FpageSize;
+    fp.X.rwx = L4_NoAccess;
+
+    ret.raw = fp.raw;
+    return ret;
+}
+
+
+
+
+#endif /* !__L4__IA64__SPECIALS_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/syscalls.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/syscalls.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/syscalls.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/syscalls.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,639 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002-2004,  Karlsruhe University
+ *                
+ * File path:     l4/ia64/syscalls.h
+ * Description:   IA64 system call ABI
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: syscalls.h,v 1.36 2004/08/23 18:43:12 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__IA64__SYSCALLS_H__
+#define __L4__IA64__SYSCALLS_H__
+
+#include __L4_INC_ARCH(vregs.h)
+#include __L4_INC_ARCH(runconv.h)
+#include __L4_INC_ARCH(specials.h)
+#include <l4/message.h>
+
+#include <l4/kdebug.h>
+
+#define __L4_ASM_ENTER_KDEBUG(str)				\
+	"{.mlx						\n"	\
+	"	break.m	0x3				\n"	\
+	"	movl r0 = 9f ;;				\n"	\
+	"}						\n"	\
+	"	.rodata					\n"	\
+	"9:	stringz " #str "			\n"	\
+	"	.previous				\n"
+
+#define __L4_ASM_CALL(func)					\
+	"	add	r31 = -40, sp			\n"	\
+	"	add	r30 = -32, sp			\n"	\
+	"	add	sp  = -40, sp			\n"	\
+	"	mov	r29 = ar.unat			\n"	\
+	"	mov	r28 = rp			\n"	\
+	"	mov	r27 = ar.pfs			\n"	\
+	"	mov	r26 = ar.fpsr			\n"	\
+	"	;;					\n"	\
+	"	st8	[r31] = r29, 16			\n"	\
+	"	st8	[r30] = r28, 16			\n"	\
+	"	;;					\n"	\
+	"	st8	[r31] = r27			\n"	\
+	"	st8	[r30] = r26			\n"	\
+	"						\n"	\
+	"	br.call.sptk.few rp = " #func "		\n"	\
+	"						\n"	\
+	"      	mov	r31 = sp			\n"	\
+	"	add	r30 = 8, sp			\n"	\
+	"	;;					\n"	\
+	"	ld8	r29 = [r31], 16			\n"	\
+	"	ld8	r28 = [r30], 16			\n"	\
+	"	;;					\n"	\
+	"	ld8	r27 = [r31]			\n"	\
+	"	ld8	r26 = [r30]			\n"	\
+	"	;;					\n"	\
+	"	mov	ar.unat = r29			\n"	\
+	"	mov	rp = r28			\n"	\
+	"	mov	ar.pfs = r27			\n"	\
+	"	mov	ar.fpsr = r26			\n"	\
+	"	add	sp = 40, sp			\n"	\
+	"	;;					\n"
+
+
+L4_INLINE void * L4_KernelInterface (L4_Word_t *ApiVersion,
+				     L4_Word_t *ApiFlags,
+				     L4_Word_t *KernelId)
+{
+    register void * base_address	asm ("r8");
+    register L4_Word_t api_version	asm ("r9");
+    register L4_Word_t api_flags	asm ("r10");
+    register L4_Word_t kernel_id	asm ("r11");
+
+    __asm__ __volatile__ (
+	"/* L4_KernelInterface() */ 			\n"
+	"{ .mlx						\n"
+	"	break.m	0x1face				\n"
+	"	movl	r0 = 0x0 ;;			\n"
+	"}						\n"
+	: /* outputs */
+	"=r" (base_address),
+	"=r" (api_version),
+	"=r" (api_flags),
+	"=r" (kernel_id));
+
+    *ApiVersion = api_version;
+    *ApiFlags = api_flags;
+    *KernelId = kernel_id;
+
+    return base_address;
+}
+
+
+L4_INLINE L4_ThreadId_t L4_ExchangeRegisters (L4_ThreadId_t dest,
+					      L4_Word_t control,
+					      L4_Word_t sp,
+					      L4_Word_t ip,
+					      L4_Word_t flags,
+					      L4_Word_t UserDefHandle,
+					      L4_ThreadId_t pager,
+					      L4_Word_t *old_control,
+					      L4_Word_t *old_sp,
+					      L4_Word_t *old_ip,
+					      L4_Word_t *old_flags,
+					      L4_Word_t *old_UserDefHandle,
+					      L4_ThreadId_t *old_pager)
+{
+    register L4_ThreadId_t r_dest	asm ("r14") = dest;
+    register L4_Word_t r_control	asm ("r15") = control;
+    register L4_Word_t r_sp		asm ("r16") = sp;
+    register L4_Word_t r_ip		asm ("r17") = ip;
+    register L4_Word_t r_flags		asm ("r18") = flags;
+    register L4_Word_t r_userhandle	asm ("r19") = UserDefHandle;
+    register L4_ThreadId_t r_pager	asm ("r20") = pager;
+
+    __asm__ __volatile__ (
+	"/* L4_ExchangeRegisters() */				\n"
+	__L4_ASM_CALL(__L4_ExchangeRegisters)
+
+	: /* outputs */
+	"+r" (r_dest),
+	"+r" (r_control),
+	"+r" (r_sp),
+	"+r" (r_ip),
+	"+r" (r_flags),
+	"+r" (r_userhandle),
+	"+r" (r_pager)
+
+	: /* inputs (same as outputs) */
+
+	: /* clobbers */
+	__L4_CLOBBER_CALLER_REGS ("r8","r9","r10","r11"));
+
+    *old_control = r_control;
+    *old_sp = r_sp;
+    *old_ip = r_ip;
+    *old_flags = r_flags;
+    *old_UserDefHandle = r_userhandle;
+    *old_pager = r_pager;
+
+    return r_dest;
+}
+
+
+L4_INLINE L4_Word_t L4_ThreadControl (L4_ThreadId_t dest,
+				      L4_ThreadId_t SpaceSpecifier,
+				      L4_ThreadId_t Scheduler,
+				      L4_ThreadId_t Pager,
+				      void * UtcbLocation)
+{
+    register L4_Word_t result 			asm ("r8");
+    register L4_ThreadId_t r_dest		asm ("r14") = dest;
+    register L4_ThreadId_t r_SpaceSpecifier	asm ("r15") = SpaceSpecifier;
+    register L4_ThreadId_t r_Scheduler		asm ("r16") = Scheduler;
+    register L4_ThreadId_t r_Pager		asm ("r17") = Pager;
+    register void * r_UtcbLocation		asm ("r18") = UtcbLocation;
+
+    __asm__ __volatile__ (
+	"/* L4_ThreadControl() */				\n"
+	__L4_ASM_CALL(__L4_ThreadControl)
+
+	: /* outputs */
+	"=r" (result),
+
+	/* inputs (clobbered on output) */ 
+	"+r" (r_dest),
+	"+r" (r_SpaceSpecifier),
+	"+r" (r_Scheduler),
+	"+r" (r_Pager),
+	"+r" (r_UtcbLocation)
+
+	: /* no unclobbered inputs */
+
+	: /* clobbers */
+	__L4_CLOBBER_CALLER_REGS ("r9","r10","r11","r19","r20"));
+
+    return result;
+}
+
+
+L4_INLINE void L4_ThreadSwitch (L4_ThreadId_t dest)
+{
+    register L4_ThreadId_t r_dest		asm ("r14") = dest;
+
+    __asm__ __volatile__ (
+	"/* L4_ThreadSwitch() */\n"
+	__L4_ASM_CALL(__L4_ThreadSwitch)
+
+	: /* no outputs */
+
+	/* inputs (clobbered on output) */ 
+	"+r" (r_dest)
+
+	: /* no unclobbered inputs */
+
+	: /* clobbers */
+	__L4_CLOBBER_CALLER_REGS ("r8","r9","r10","r11",
+				  "r15","r16","r17","r18","r19","r20"));
+}
+
+
+L4_INLINE L4_Word_t  L4_Schedule (L4_ThreadId_t dest,
+				  L4_Word_t TimeCtrl,
+				  L4_Word_t ProcessorCtrl,
+				  L4_Word_t prio,
+				  L4_Word_t PreemptionCtrl,
+				  L4_Word_t * old_TimeCtrl)
+{
+    register L4_Word_t result 			asm ("r8");
+    register L4_Word_t ret_TimeCtrl		asm ("r9");
+    register L4_ThreadId_t r_dest		asm ("r14") = dest;
+    register L4_Word_t r_TimeCtrl		asm ("r15") = TimeCtrl;
+    register L4_Word_t r_ProcessorCtrl		asm ("r16") = ProcessorCtrl;
+    register L4_Word_t r_prio			asm ("r17") = prio;
+    register L4_Word_t r_PreemptionCtrl		asm ("r18") = PreemptionCtrl;
+
+    __asm__ __volatile__ (
+	"/* L4_Schedule() */					\n"
+	__L4_ASM_CALL(__L4_Schedule)
+
+	: /* outputs */
+	"=r" (result),
+	"=r" (ret_TimeCtrl),
+
+	/* inputs (clobbered on output) */ 
+	"+r" (r_dest),
+	"+r" (r_TimeCtrl),
+	"+r" (r_ProcessorCtrl),
+	"+r" (r_prio),
+	"+r" (r_PreemptionCtrl)
+
+	: /* no unclobbered inputs */
+
+	: /* clobbers */
+	__L4_CLOBBER_CALLER_REGS ("r10","r11","r19","r20"));
+
+    *old_TimeCtrl = ret_TimeCtrl;
+
+    return result;
+}
+
+
+L4_INLINE L4_MsgTag_t L4_Ipc (L4_ThreadId_t to,
+			      L4_ThreadId_t FromSpecifier,
+			      L4_Word_t Timeouts,
+			      L4_ThreadId_t * from)
+{
+    register L4_ThreadId_t r_to			asm ("r14") = to;
+    register L4_ThreadId_t r_FromSpecifier	asm ("r15") = FromSpecifier;
+    register L4_Word_t r_Timeouts		asm ("r16") = Timeouts;
+    register L4_ThreadId_t ret_from		asm ("r9");
+    L4_Word_t * mrs = __L4_IA64_Utcb () + __L4_TCB_MR_OFFSET;
+
+    register L4_Word_t mr0 asm ("out0");
+    register L4_Word_t mr1 asm ("out1");
+    register L4_Word_t mr2 asm ("out2");
+    register L4_Word_t mr3 asm ("out3");
+    register L4_Word_t mr4 asm ("out4");
+    register L4_Word_t mr5 asm ("out5");
+    register L4_Word_t mr6 asm ("out6");
+    register L4_Word_t mr7 asm ("out7");
+    L4_MsgTag_t tag;
+
+    L4_Word_t ar_lc, ar_ec;
+    __asm__ __volatile__ ("	;;			\n"
+			  "	mov	%0 = ar.lc	\n"
+			  "	mov	%1 = ar.ec	\n"
+			  :
+			  "=r" (ar_lc), "=r" (ar_ec));
+
+    // Only load MRs if send phase is included
+    if (! L4_IsNilThread (to))
+    {
+	r_to = to;
+	r_FromSpecifier = FromSpecifier;
+	r_Timeouts = Timeouts;
+
+	mr0 = mrs[0];
+	mr1 = mrs[1];
+	mr2 = mrs[2];
+	mr3 = mrs[3];
+	mr4 = mrs[4];
+	mr5 = mrs[5];
+	mr6 = mrs[6];
+	mr7 = mrs[7];
+
+	__asm__ __volatile__ (
+	    "/* L4_Ipc() */\n"
+	    __L4_ASM_CALL (__L4_Ipc)
+
+	    : /* outputs */
+	    "=r" (mr0), "=r" (mr1), "=r" (mr2), "=r" (mr3),
+	    "=r" (mr4), "=r" (mr5), "=r" (mr6), "=r" (mr7),
+	    "=r" (ret_from),
+
+	    /* inputs (clobbered on output) */ 
+	    "+r" (r_to), "+r" (r_FromSpecifier), "+r" (r_Timeouts)
+
+	    : /* inputs */
+	    "0" (mr0), "1" (mr1), "2" (mr2), "3" (mr3),
+	    "4" (mr4), "5" (mr5), "6" (mr6), "7" (mr7)
+
+	    : /* clobbers */
+	    "r2",  "r3", "r8", "r10", "r11",
+	    "r17", "r18", "r19", "r20", "r21", "r22",
+	    "r23", "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31",
+	    __L4_CALLER_SAVED_FP_REGS, __L4_CALLER_SAVED_PREDICATE_REGS,
+	    __L4_CALLER_SAVED_BRANCH_REGS, __L4_CALLEE_SAVED_REGS);
+    }
+    else
+    {
+	r_to = to;
+	r_FromSpecifier = FromSpecifier;
+	r_Timeouts = Timeouts;
+
+	__asm__ __volatile__ (
+	    "/* L4_Ipc() */\n"
+	    __L4_ASM_CALL (__L4_Ipc)
+ 
+	    : /* outputs */
+	    "=r" (mr0), "=r" (mr1), "=r" (mr2), "=r" (mr3),
+	    "=r" (mr4), "=r" (mr5), "=r" (mr6), "=r" (mr7),
+	    "=r" (ret_from),
+
+	    /* inputs (clobbered on output) */ 
+	    "+r" (r_to), "+r" (r_FromSpecifier), "+r" (r_Timeouts)
+
+	    : /* no unclobbered inputs */
+
+	    : /* clobbers */
+	    "r2",  "r3", "r8", "r10", "r11",
+	    "r17", "r18", "r19", "r20", "r21", "r22",
+	    "r23", "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31",
+	    __L4_CALLER_SAVED_FP_REGS, __L4_CALLER_SAVED_PREDICATE_REGS,
+	    __L4_CALLER_SAVED_BRANCH_REGS, __L4_CALLEE_SAVED_REGS);
+    }
+
+    // Set sender id and store received MRs
+    if (! L4_IsNilThread (FromSpecifier))
+    {
+	*from = ret_from;
+
+	mrs[1] = mr1;
+	mrs[2] = mr2;
+	mrs[3] = mr3;
+	mrs[4] = mr4;
+	mrs[5] = mr5;
+	mrs[6] = mr6;
+	mrs[7] = mr7;
+    }
+
+    __asm__ __volatile__ ("	mov	ar.lc = %0	\n"
+			  "	mov	ar.ec = %1	\n"
+			  :
+			  :
+			  "r" (ar_lc), "r" (ar_ec));
+
+    tag.raw = mr0;
+    return tag;
+}
+
+
+L4_INLINE L4_MsgTag_t L4_Lipc (L4_ThreadId_t to,
+			       L4_ThreadId_t FromSpecifier,
+			       L4_Word_t Timeouts,
+			       L4_ThreadId_t * from)
+{
+    return L4_Ipc (to, FromSpecifier, Timeouts, from);
+}
+
+
+L4_INLINE void L4_Unmap (L4_Word_t control)
+{
+    register L4_Word_t r_control	asm ("r14") = control;
+    register L4_Word_t mr0 		asm ("out0");
+    register L4_Word_t mr1 		asm ("out1");
+    register L4_Word_t mr2 		asm ("out2");
+    register L4_Word_t mr3 		asm ("out3");
+    register L4_Word_t mr4 		asm ("out4");
+    register L4_Word_t mr5 		asm ("out5");
+    register L4_Word_t mr6 		asm ("out6");
+    register L4_Word_t mr7 		asm ("out7");
+
+    L4_Word_t * mrs = __L4_IA64_Utcb () + __L4_TCB_MR_OFFSET;
+
+    mr0 = mrs[0];
+    mr1 = mrs[1];
+    mr2 = mrs[2];
+    mr3 = mrs[3];
+    mr4 = mrs[4];
+    mr5 = mrs[5];
+    mr6 = mrs[6];
+    mr7 = mrs[7];
+
+    __asm__ __volatile__ (
+	"/* L4_Unmap() */\n"
+	__L4_ASM_CALL(__L4_Unmap)
+	: /* outputs */
+	"=r" (mr0), "=r" (mr1), "=r" (mr2), "=r" (mr3),
+	"=r" (mr4), "=r" (mr5), "=r" (mr6), "=r" (mr7),
+
+	/* inputs (clobbered on output) */ 
+	"+r" (r_control)
+
+	: /* inputs */
+	"0" (mr0), "1" (mr1), "2" (mr2), "3" (mr3),
+	"4" (mr4), "5" (mr5), "6" (mr6), "7" (mr7)
+
+	: /* clobbers */
+	__L4_CLOBBER_CALLER_REGS_NOOUT ("r8", "r9", "r10", "r11",
+					"r15", "r16", "r17", "r18",
+					"r19", "r20"));
+
+    mrs[0] = mr0;
+    mrs[1] = mr1;
+    mrs[2] = mr2;
+    mrs[3] = mr3;
+    mrs[4] = mr4;
+    mrs[5] = mr5;
+    mrs[6] = mr6;
+    mrs[7] = mr7;
+}
+
+
+L4_INLINE L4_Word_t L4_SpaceControl (L4_ThreadId_t SpaceSpecifier,
+				     L4_Word_t control,
+				     L4_Fpage_t KernelInterfacePageArea,
+				     L4_Fpage_t UtcbArea,
+				     L4_ThreadId_t redirector,
+				     L4_Word_t *old_control)
+{
+    register L4_Word_t result		asm ("r8");
+    register L4_Word_t ret_control	asm ("r9");
+    register L4_ThreadId_t r_space	asm ("r14") = SpaceSpecifier;
+    register L4_Word_t r_control	asm ("r15") = control;
+    register L4_Fpage_t r_kiparea	asm ("r16") = KernelInterfacePageArea;
+    register L4_Fpage_t r_utcbarea	asm ("r17") = UtcbArea;
+    register L4_ThreadId_t r_redirector	asm ("r18") = redirector;
+
+    __asm__ __volatile__ (
+	"/* L4_SpaceControl() */				\n"
+	__L4_ASM_CALL(__L4_SpaceControl)
+
+	: /* outputs */
+	"=r" (result),
+	"=r" (ret_control),
+
+	/* inputs (clobbered on output) */ 
+	"+r" (r_space),
+	"+r" (r_control),
+	"+r" (r_kiparea),
+	"+r" (r_utcbarea),
+	"+r" (r_redirector)
+
+	: /* no unclobbered inputs */
+	
+	: /* clobbers */
+	__L4_CLOBBER_CALLER_REGS ("r10","r11","r19","r20"));
+
+    *old_control = ret_control;
+
+    return result;
+}
+
+
+L4_INLINE L4_Word_t L4_ProcessorControl (L4_Word_t ProcessorNo,
+					 L4_Word_t InternalFrequency,
+					 L4_Word_t ExternalFrequency,
+					 L4_Word_t voltage)
+{
+    L4_KDB_Enter ("ProcessorControl");
+    return 0;
+}
+
+
+L4_INLINE L4_Word_t L4_MemoryControl (L4_Word_t control,
+				      const L4_Word_t * attributes)
+{
+    register L4_Word_t result		asm ("r8");
+    register L4_Word_t r_ctrl		asm ("r14") = control;
+    register L4_Word_t r_att0		asm ("r15") = attributes[0];
+    register L4_Word_t r_att1		asm ("r16") = attributes[1];
+    register L4_Word_t r_att2		asm ("r17") = attributes[2];
+    register L4_Word_t r_att3		asm ("r18") = attributes[3];
+    register L4_Word_t mr0 		asm ("out0");
+    register L4_Word_t mr1 		asm ("out1");
+    register L4_Word_t mr2 		asm ("out2");
+    register L4_Word_t mr3 		asm ("out3");
+    register L4_Word_t mr4 		asm ("out4");
+    register L4_Word_t mr5 		asm ("out5");
+    register L4_Word_t mr6 		asm ("out6");
+    register L4_Word_t mr7 		asm ("out7");
+
+    L4_Word_t * mrs = __L4_IA64_Utcb () + __L4_TCB_MR_OFFSET;
+
+    mr0 = mrs[0];
+    mr1 = mrs[1];
+    mr2 = mrs[2];
+    mr3 = mrs[3];
+    mr4 = mrs[4];
+    mr5 = mrs[5];
+    mr6 = mrs[6];
+    mr7 = mrs[7];
+
+    __asm__ __volatile__ (
+	"/* L4_MemoryControl */				\n"
+	__L4_ASM_CALL(__L4_MemoryControl)
+
+	: /* outputs */
+	"=r" (result),
+
+	"+r" (mr0), "+r" (mr1), "+r" (mr2), "+r" (mr3),
+	"+r" (mr4), "+r" (mr5), "+r" (mr6), "+r" (mr7),
+
+	/* inputs (clobbered on output) */ 
+	"+r" (r_ctrl),
+	"+r" (r_att0),
+	"+r" (r_att1),
+	"+r" (r_att2),
+	"+r" (r_att3)
+	:
+	:
+	__L4_CLOBBER_CALLER_REGS_NOOUT ("r9", "r10", "r11", "r19","r20"));
+
+    return result;
+}
+
+
+L4_INLINE L4_Word_t L4_PAL_Call (L4_Word_t idx,
+				 L4_Word_t a1, L4_Word_t a2, L4_Word_t a3,
+				 L4_Word_t *r1, L4_Word_t *r2, L4_Word_t *r3)
+{
+    register L4_Word_t status		asm ("r8");
+    register L4_Word_t ret1		asm ("r9");
+    register L4_Word_t ret2		asm ("r10");
+    register L4_Word_t ret3		asm ("r11");
+    register L4_Word_t out0		asm ("r28") = idx;
+    register L4_Word_t out1		asm ("r29") = a1;
+    register L4_Word_t out2		asm ("r30") = a2;
+    register L4_Word_t out3		asm ("r31") = a3;
+
+    __asm__ __volatile__ (
+	"/* L4_PAL_Call */				\n"
+	__L4_ASM_CALL(__L4_PAL_Call)
+	:
+	"=r" (status),
+	"=r" (ret1),
+	"=r" (ret2),
+	"=r" (ret3),
+
+	/* inputs (clobbered on output) */ 
+	"+r" (out0),
+	"+r" (out1),
+	"+r" (out2),
+	"+r" (out3)
+	:
+	:
+	"r2",  "r3", "r14", "r15", "r16", "r17", "r18", "r19",
+	"r20", "r21", "r22", "r23", "r24", "r25", "r26", "r27",
+	"out4",	"out5", "out6", "out7",
+	__L4_CALLER_SAVED_FP_REGS, __L4_CALLER_SAVED_PREDICATE_REGS,
+	__L4_CALLER_SAVED_BRANCH_REGS, "ar.pfs");
+
+    *r1 = ret1;
+    *r2 = ret2;
+    *r3 = ret3;
+
+    return status;
+}
+
+
+L4_INLINE L4_Word_t L4_SAL_Call (L4_Word_t idx,
+				 L4_Word_t a1, L4_Word_t a2, L4_Word_t a3,
+				 L4_Word_t a4, L4_Word_t a5, L4_Word_t a6,
+				 L4_Word_t *r1, L4_Word_t *r2, L4_Word_t *r3)
+{
+    register L4_Word_t status		asm ("r8");
+    register L4_Word_t ret1		asm ("r9");
+    register L4_Word_t ret2		asm ("r10");
+    register L4_Word_t ret3		asm ("r11");
+    register L4_Word_t out0		asm ("out0") = idx;
+    register L4_Word_t out1		asm ("out1") = a1;
+    register L4_Word_t out2		asm ("out2") = a2;
+    register L4_Word_t out3		asm ("out3") = a3;
+    register L4_Word_t out4		asm ("out4") = a4;
+    register L4_Word_t out5		asm ("out5") = a5;
+    register L4_Word_t out6		asm ("out6") = a6;
+
+    __asm__ __volatile__ (
+	"/* L4_SAL_Call */				\n"
+	__L4_ASM_CALL(__L4_SAL_Call)
+	:
+	"=r" (status),
+	"=r" (ret1),
+	"=r" (ret2),
+	"=r" (ret3),
+
+	/* inputs (clobbered on output) */ 
+	"+r" (out0),
+	"+r" (out1),
+	"+r" (out2),
+	"+r" (out3),
+	"+r" (out4),
+	"+r" (out5),
+	"+r" (out6)
+	:
+	:
+	__L4_CLOBBER_CALLER_REGS_NOOUT ("r14", "r15", "r16", "r17", 
+					"r18", "r19", "r20", "out7"));
+
+    *r1 = ret1;
+    *r2 = ret2;
+    *r3 = ret3;
+
+    return status;
+}
+
+
+#endif /* !__L4__IA64__SYSCALLS_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/types.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/types.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/types.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/types.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,46 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002, 2003,  Karlsruhe University
+ *                
+ * File path:     l4/ia64/types.h
+ * Description:   IA-64 specific type declararions
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: types.h,v 1.6 2003/09/24 19:06:24 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__IA64__TYPES_H__
+#define __L4__IA64__TYPES_H__
+
+#define L4_64BIT
+#define L4_LITTLE_ENDIAN
+
+typedef unsigned long		L4_Word64_t;
+typedef unsigned int		L4_Word32_t;
+typedef unsigned short		L4_Word16_t;
+typedef unsigned char		L4_Word8_t;
+
+typedef unsigned long 		L4_Word_t;
+typedef long unsigned int	L4_Size_t;
+
+#endif /* !__L4__IA64__TYPES_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/vregs.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/vregs.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ia64/vregs.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ia64/vregs.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,393 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002, 2003,  Karlsruhe University
+ *                
+ * File path:     l4/ia64/vregs.h
+ * Description:   IA64 virtual register ABI
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: vregs.h,v 1.8 2003/09/24 19:06:24 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__IA64__VREGS_H__
+#define __L4__IA64__VREGS_H__
+
+
+//#define __L4_OLD_IPCABI
+
+
+L4_INLINE L4_Word_t * __L4_IA64_Utcb (void) __attribute__ ((const));
+L4_INLINE L4_Word_t * __L4_IA64_Utcb (void)
+{
+    L4_Word_t * utcb;
+
+    __asm__ (
+	"/* __L4_IA64_Utcb() */			\n"
+	"	mov %0 = ar.k6			\n"
+
+	: /* outputs */
+	"=r" (utcb)
+
+	/* no inputs */
+	/* no clobbers */
+	);
+
+    return utcb;
+}
+
+
+
+#define __L4_NUM_MRS	64
+#define __L4_NUM_BRS	33
+
+/*
+ * Location of TCRs within UTCB.
+ */
+
+#define __L4_TCB_MR_OFFSET			(48)
+#define __L4_TCR_THREAD_WORD_1			(44)
+#define __L4_TCR_THREAD_WORD_0			(43)
+#define __L4_TCB_BR_OFFSET			(10)
+#define __L4_TCR_ERROR_CODE			(9)
+#define __L4_TCR_VIRTUAL_ACTUAL_SENDER		(8)
+#define __L4_TCR_INTENDED_RECEIVER		(7)
+#define __L4_TCR_XFER_TIMEOUT			(6)
+#define __L4_TCR_PREEMPT_FLAGS			(5)
+#define __L4_TCR_COP_FLAGS			(5)
+#define __L4_TCR_EXCEPTION_HANDLER		(4)
+#define __L4_TCR_PAGER				(3)
+#define __L4_TCR_USER_DEFINED_HANDLE		(2)
+#define __L4_TCR_PROCESSOR_NO			(1)
+
+
+
+/*
+ * Thread Control Registers.
+ */
+
+L4_INLINE L4_Word_t __L4_TCR_MyGlobalId (void)
+{
+    L4_Word_t tid;
+
+    __asm__ (
+	"/* __L4_TCR_MyGlobalId() */		\n"
+	"	mov %0 = ar.k5			\n"
+
+	: /* outputs */
+	"=r" (tid)
+
+	/* no inputs */
+	/* no clobbers */
+	);
+
+    return tid;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ProcessorNo (void)
+{
+    return (__L4_IA64_Utcb ())[__L4_TCR_PROCESSOR_NO];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_UserDefinedHandle (void)
+{
+    return (__L4_IA64_Utcb ())[__L4_TCR_USER_DEFINED_HANDLE];
+}
+
+L4_INLINE void __L4_TCR_Set_UserDefinedHandle (L4_Word_t w)
+{
+    (__L4_IA64_Utcb ())[__L4_TCR_USER_DEFINED_HANDLE] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_Pager (void)
+{
+    return (__L4_IA64_Utcb ())[__L4_TCR_PAGER];
+}
+
+L4_INLINE void __L4_TCR_Set_Pager (L4_Word_t w)
+{
+    (__L4_IA64_Utcb ())[__L4_TCR_PAGER] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ExceptionHandler (void)
+{
+    return (__L4_IA64_Utcb ())[__L4_TCR_EXCEPTION_HANDLER];
+}
+
+L4_INLINE void __L4_TCR_Set_ExceptionHandler (L4_Word_t w)
+{
+    (__L4_IA64_Utcb ())[__L4_TCR_EXCEPTION_HANDLER] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ErrorCode (void)
+{
+    return (__L4_IA64_Utcb ())[__L4_TCR_ERROR_CODE];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_XferTimeout (void)
+{
+    return (__L4_IA64_Utcb ())[__L4_TCR_XFER_TIMEOUT];
+}
+
+L4_INLINE void __L4_TCR_Set_XferTimeout (L4_Word_t w)
+{
+    (__L4_IA64_Utcb ())[__L4_TCR_XFER_TIMEOUT] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_IntendedReceiver(void)
+{
+    return (__L4_IA64_Utcb ())[__L4_TCR_INTENDED_RECEIVER];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ActualSender (void)
+{
+    return (__L4_IA64_Utcb ())[__L4_TCR_VIRTUAL_ACTUAL_SENDER];
+}
+
+L4_INLINE void __L4_TCR_Set_VirtualSender (L4_Word_t w)
+{
+    (__L4_IA64_Utcb ())[__L4_TCR_VIRTUAL_ACTUAL_SENDER] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ThreadWord (L4_Word_t n)
+{
+    return (__L4_IA64_Utcb ())[__L4_TCR_THREAD_WORD_0 + n];
+}
+
+L4_INLINE void __L4_TCR_Set_ThreadWord (L4_Word_t n, L4_Word_t w)
+{
+    (__L4_IA64_Utcb ())[__L4_TCR_THREAD_WORD_0 + n] = w;
+}
+
+L4_INLINE void L4_Set_CopFlag (L4_Word_t n)
+{
+    L4_Word8_t old, readval;
+
+    do {
+	old = *(L4_Word8_t *) &(__L4_IA64_Utcb ())[__L4_TCR_COP_FLAGS];
+
+	__asm__ __volatile__ (
+	    "	mov	r14 = ar.ccv			\n"
+	    "	mov	ar.ccv = %2 ;;			\n"
+	    "	cmpxchg1.acq %0 = [%1], %3, ar.ccv ;;	\n"
+	    "	mov	ar.ccv = r14			\n"
+	    :
+	    "=r" (readval)
+	    :
+	    "r" (&(__L4_IA64_Utcb ())[__L4_TCR_COP_FLAGS]),
+	    "r" (old),
+	    "r" (old | (1 << n))
+	    :
+	    "r14");
+    } while (old != readval);
+}
+
+L4_INLINE void L4_Clr_CopFlag (L4_Word_t n)
+{
+    L4_Word8_t old, readval;
+
+    do {
+	old = *(L4_Word8_t *) &(__L4_IA64_Utcb ())[__L4_TCR_COP_FLAGS];
+
+	__asm__ __volatile__ (
+	    "	mov	r14 = ar.ccv			\n"
+	    "	mov	ar.ccv = %2 ;;			\n"
+	    "	cmpxchg1.acq %0 = [%1], %3, ar.ccv ;;	\n"
+	    "	mov	ar.ccv = r14			\n"
+	    :
+	    "=r" (readval)
+	    :
+	    "r" (&(__L4_IA64_Utcb ())[__L4_TCR_COP_FLAGS]),
+	    "r" (old),
+	    "r" (old & ~(1 << n))
+	    :
+	    "r14");
+    } while (old != readval);
+}
+
+L4_INLINE L4_Bool_t L4_EnablePreemptionFaultException (void)
+{
+    return 0;
+}
+
+L4_INLINE L4_Bool_t L4_DisablePreemptionFaultException (void)
+{
+    return 0;
+}
+
+L4_INLINE L4_Bool_t L4_EnablePreemption (void)
+{
+    return 0;
+}
+
+L4_INLINE L4_Bool_t L4_DisablePreemption (void)
+{
+    return 0;
+}
+
+L4_INLINE L4_Bool_t L4_PreemptionPending (void)
+{
+    return 0;
+}
+
+
+
+/*
+ * Message Registers.
+ */
+
+#if defined(__L4_OLD_IPCABI)
+L4_INLINE int __L4_IsNaTCollection (L4_Word_t * addr)
+{
+    return ((L4_Word_t) addr & 0x1f8) == 0x1f8;
+}
+
+L4_INLINE L4_Word_t * __L4_PrevNaTCollection (L4_Word_t * addr)
+{
+    return (L4_Word_t *) (((L4_Word_t) addr & ~0x1ff) - 8);
+}
+
+L4_INLINE void L4_StoreMR (int i, L4_Word_t * w)
+{
+    L4_Word_t * ptr = &(__L4_IA64_Utcb ())[__L4_TCB_MR_OFFSET + i];
+    L4_Word_t * nat = __L4_PrevNaTCollection (ptr);
+
+    if ((ptr - nat) <= i)
+	ptr++;
+
+    if (__L4_IsNaTCollection (ptr))
+	ptr++;
+
+    *w = *ptr;
+}
+
+L4_INLINE void L4_LoadMR (int i, L4_Word_t w)
+{
+    L4_Word_t * ptr = &(__L4_IA64_Utcb ())[__L4_TCB_MR_OFFSET + i];
+    L4_Word_t * nat = __L4_PrevNaTCollection (ptr);
+
+    if ((ptr - nat) <= i)
+	ptr++;
+
+    if (__L4_IsNaTCollection (ptr))
+	ptr++;
+    
+    *ptr = w;
+}
+
+L4_INLINE void L4_StoreMRs (int i, int k, L4_Word_t * w)
+{
+    L4_Word_t * mr = (__L4_IA64_Utcb ()) + __L4_TCB_MR_OFFSET + i;
+    L4_Word_t * nat = __L4_PrevNaTCollection (mr);
+
+    if ((mr - nat) <= i)
+	mr++;
+
+    while (k-- > 0)
+    {
+	if (__L4_IsNaTCollection (mr))
+	    mr++;
+	*w++ = *mr++;
+    }
+}
+
+L4_INLINE void L4_LoadMRs (int i, int k, L4_Word_t * w)
+{
+    L4_Word_t * mr = (__L4_IA64_Utcb ()) + __L4_TCB_MR_OFFSET + i;
+    L4_Word_t * nat = __L4_PrevNaTCollection (mr);
+
+    if ((mr - nat) <= i)
+	mr++;
+
+    while (k-- > 0)
+    {
+	if (__L4_IsNaTCollection (mr))
+	    mr++;
+	*mr++ = *w++;
+    }
+}
+
+#else /* !__L4_OLD_IPCABI */
+
+L4_INLINE void L4_StoreMR (int i, L4_Word_t * w)
+{
+    *w = (__L4_IA64_Utcb ())[__L4_TCB_MR_OFFSET + i];
+}
+
+L4_INLINE void L4_LoadMR (int i, L4_Word_t w)
+{
+    (__L4_IA64_Utcb ())[__L4_TCB_MR_OFFSET + i] = w;
+}
+
+L4_INLINE void L4_StoreMRs (int i, int k, L4_Word_t * w)
+{
+    L4_Word_t * mr = (__L4_IA64_Utcb ()) + __L4_TCB_MR_OFFSET + i;
+
+    while (k-- > 0)
+	*w++ = *mr++;
+}
+
+L4_INLINE void L4_LoadMRs (int i, int k, L4_Word_t * w)
+{
+    L4_Word_t * mr = (__L4_IA64_Utcb ()) + __L4_TCB_MR_OFFSET + i;
+
+    while (k-- > 0)
+	*mr++ = *w++;
+}
+
+#endif
+
+
+
+
+
+/*
+ * Buffer Registers.
+ */
+
+L4_INLINE void L4_StoreBR (int i, L4_Word_t * w)
+{
+    *w = (__L4_IA64_Utcb ())[__L4_TCB_BR_OFFSET + i];
+}
+
+L4_INLINE void L4_LoadBR (int i, L4_Word_t w)
+{
+    (__L4_IA64_Utcb ())[__L4_TCB_BR_OFFSET + i] = w;
+}
+
+L4_INLINE void L4_StoreBRs (int i, int k, L4_Word_t * w)
+{
+    L4_Word_t * mr = (__L4_IA64_Utcb ()) + __L4_TCB_BR_OFFSET + i;
+
+    while (k-- > 0)
+	*w++ = *mr++;
+}
+
+L4_INLINE void L4_LoadBRs (int i, int k, L4_Word_t * w)
+{
+    L4_Word_t * mr = (__L4_IA64_Utcb ()) + __L4_TCB_BR_OFFSET + i;
+
+    while (k-- > 0)
+	*mr++ = *w++;
+}
+
+#endif /* !__L4__IA64__VREGS_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/ipc.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ipc.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/ipc.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/ipc.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,267 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2001, 2002, 2003,  Karlsruhe University
+ *                
+ * File path:     l4/ipc.h
+ * Description:   L4 IPC operations
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: ipc.h,v 1.12 2003/09/24 19:06:21 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__IPC_H__
+#define __L4__IPC_H__
+
+#include <l4/types.h>
+#include __L4_INC_ARCH(syscalls.h)
+#include <l4/message.h>
+#include <l4/thread.h>
+
+
+/*
+ * Support functions
+ */
+
+L4_INLINE L4_Bool_t L4_IpcSucceeded (L4_MsgTag_t t)
+{
+    return (t.X.flags & 0x8) == 0;
+}
+
+L4_INLINE L4_Bool_t L4_IpcFailed (L4_MsgTag_t t)
+{
+    return (t.X.flags & 0x8) != 0;
+}
+
+L4_INLINE L4_Bool_t L4_IpcPropagated (L4_MsgTag_t t)
+{
+    return (t.X.flags & 0x1) != 0;
+}
+
+L4_INLINE L4_Bool_t L4_IpcRedirected (L4_MsgTag_t t)
+{
+    return (t.X.flags & 0x2) != 0;
+}
+
+L4_INLINE L4_Bool_t L4_IpcXcpu (L4_MsgTag_t t)
+{
+    return (t.X.flags & 0x4) != 0;
+}
+
+L4_INLINE void L4_Set_Propagation (L4_MsgTag_t * t)
+{
+    t->X.flags |= 1;
+}
+
+L4_INLINE void L4_Set_Notify(L4_MsgTag_t * t)
+{
+    t->X.flags |= 2;
+}
+
+L4_INLINE void L4_Set_ReceiveBlock(L4_MsgTag_t * t)
+{
+    t->X.flags |= 4;
+}
+
+L4_INLINE void L4_Set_SendBlock(L4_MsgTag_t * t)
+{
+    t->X.flags |= 8;
+}
+
+L4_INLINE void L4_Clear_ReceiveBlock(L4_MsgTag_t * t)
+{
+    t->X.flags &= (~4u);
+}
+
+L4_INLINE void L4_Clear_SendBlock(L4_MsgTag_t * t)
+{
+    t->X.flags &= (~8u);
+}
+
+
+/*
+ * Derived functions
+ */
+
+/*
+ * These are the functions derived from the two IPC syscalls.  For
+ * normal C, function overloading is not supported.  Functions with
+ * unique names (i.e., with the suffix inside <> appended) have
+ * therefore been provided.
+ *
+ *   L4_Call			(to)
+ *   L4_Send			(to)
+ *   L4_Send_Nonblocking	(to)
+ *   L4_Reply			(to)
+ *   L4_Receive			(from)
+ *   L4_Receive_Nonblocking	(from)
+ *   L4_Wait			(&from)
+ *   L4_ReplyWait		(to, &from)
+ *   L4_ReplyWait_Nonblocking	(to, &from)
+ *   L4_Lcall			(to)
+ *   L4_Lreply_Wait		(to, &from)
+ *   L4_WaitForever		()
+ *
+ */
+
+L4_INLINE L4_MsgTag_t L4_Call (L4_ThreadId_t to)
+{
+    L4_ThreadId_t dummy;
+    L4_MsgTag_t tag = L4_MsgTag ();
+
+    L4_Set_SendBlock(&tag);
+    L4_Set_ReceiveBlock(&tag);
+
+    return L4_Ipc (to, to, tag, &dummy);
+}
+
+L4_INLINE L4_MsgTag_t L4_Send_Nonblocking(L4_ThreadId_t to)
+{
+    L4_MsgTag_t tag = L4_MsgTag ();
+    L4_Clear_SendBlock(&tag);
+
+    return L4_Ipc (to, L4_nilthread, tag, (L4_ThreadId_t *) 0);
+}
+
+#if defined(__l4_cplusplus)
+L4_INLINE L4_MsgTag_t L4_Send (L4_ThreadId_t to, L4_MsgTag_t tag)
+{
+    return L4_Ipc (to, L4_nilthread, tag, (L4_ThreadId_t *) 0);
+}
+#endif
+
+L4_INLINE L4_MsgTag_t L4_Send (L4_ThreadId_t to)
+{
+    L4_MsgTag_t tag = L4_MsgTag ();
+    L4_Set_SendBlock(&tag);
+
+    return L4_Ipc (to, L4_nilthread, tag, (L4_ThreadId_t *) 0);
+}
+
+L4_INLINE L4_MsgTag_t L4_Reply (L4_ThreadId_t to)
+{
+    return L4_Send_Nonblocking(to);
+}
+
+L4_INLINE L4_MsgTag_t L4_Receive_Nonblocking (L4_ThreadId_t from)
+{
+    L4_ThreadId_t dummy;
+    L4_MsgTag_t tag = L4_Niltag;
+
+    L4_Clear_ReceiveBlock(&tag);
+
+    return L4_Ipc (L4_nilthread, from, tag, &dummy);
+}
+
+#if defined(__l4_cplusplus)
+L4_INLINE L4_MsgTag_t L4_Receive (L4_ThreadId_t from, L4_MsgTag_t tag)
+{
+    L4_ThreadId_t dummy;
+    return L4_Ipc (L4_nilthread, from, tag, &dummy);
+}
+#endif
+
+L4_INLINE L4_MsgTag_t L4_Receive (L4_ThreadId_t from)
+{
+    L4_ThreadId_t dummy;
+    L4_MsgTag_t tag = L4_Niltag;
+
+    L4_Set_ReceiveBlock(&tag);
+
+    return L4_Ipc (L4_nilthread, from, tag, &dummy);
+}
+
+#if defined(__l4_cplusplus)
+L4_INLINE L4_MsgTag_t L4_Wait (L4_Time_t RcvTimeout, L4_MsgTag_t tag, L4_ThreadId_t * from)
+{
+    return L4_Ipc (L4_nilthread, L4_anythread, tag, from);
+}
+#endif
+
+L4_INLINE L4_MsgTag_t L4_Wait (L4_ThreadId_t * from)
+{
+    L4_MsgTag_t tag = L4_Niltag;
+    L4_Set_ReceiveBlock(&tag);
+
+    return L4_Ipc (L4_nilthread, L4_anythread, tag, from);
+}
+
+L4_INLINE L4_MsgTag_t L4_ReplyWait_Nonblocking (L4_ThreadId_t to,
+					    L4_ThreadId_t * from)
+{
+    L4_MsgTag_t tag = L4_MsgTag ();
+    L4_Clear_SendBlock(&tag);
+    L4_Clear_ReceiveBlock(&tag);
+
+    return L4_Ipc (to, L4_anythread, tag, from);
+}
+
+#if defined(__l4_cplusplus)
+L4_INLINE L4_MsgTag_t L4_ReplyWait (L4_ThreadId_t to,
+				    L4_MsgTag_t tag,
+				    L4_ThreadId_t * from)
+{
+    return L4_Ipc (to, L4_anythread, tag, from);
+}
+#endif
+
+
+L4_INLINE L4_MsgTag_t L4_ReplyWait (L4_ThreadId_t to, L4_ThreadId_t * from)
+{
+    L4_MsgTag_t tag = L4_MsgTag ();
+    L4_Clear_SendBlock(&tag);
+    L4_Set_ReceiveBlock(&tag);
+
+    return L4_Ipc (to, L4_anythread, tag, from);
+}
+
+L4_INLINE L4_MsgTag_t L4_Lcall (L4_ThreadId_t to)
+{
+    L4_ThreadId_t dummy;
+    L4_MsgTag_t tag = L4_MsgTag ();
+
+    L4_Set_SendBlock(&tag);
+    L4_Set_ReceiveBlock(&tag);
+
+    return L4_Lipc (to, to, tag, &dummy);
+}
+
+L4_INLINE L4_MsgTag_t L4_LreplyWait (L4_ThreadId_t to, L4_ThreadId_t * from)
+{
+    L4_MsgTag_t tag = L4_MsgTag ();
+    L4_Clear_SendBlock(&tag);
+    L4_Set_ReceiveBlock(&tag);
+
+    return L4_Lipc (to, L4_anythread, tag, from);
+}
+
+L4_INLINE L4_MsgTag_t L4_WaitForever(void)
+{
+    L4_ThreadId_t dummy;
+    L4_MsgTag_t tag = L4_Niltag;
+
+    L4_Set_ReceiveBlock(&tag);
+
+    return L4_Ipc (L4_nilthread, L4_MyGlobalId (), tag, &dummy);
+}
+
+#endif /* !__L4__IPC_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/kcp.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/kcp.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/kcp.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/kcp.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,105 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002, 2003,  Karlsruhe University
+ *                
+ * File path:     l4/kcp.h
+ * Description:   Kernel configuration page definitions used to pass
+ *                paramters to L4 at boot time.
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: kcp.h,v 1.8 2003/09/24 19:06:21 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__KCP_H__
+#define __L4__KCP_H__
+
+#include <l4/types.h>
+
+/*
+ * Magic that identifies the kernel configuration page.
+ */
+#ifndef L4_MAGIC
+#if defined(L4_BIG_ENDIAN)
+# define L4_MAGIC	(('L' << 24) + ('4' << 16) + (230 << 8) + 'K')
+#else
+# define L4_MAGIC	(('K' << 24) + (230 << 16) + ('4' << 8) + 'L')
+#endif
+#endif /* L4_MAGIC */
+
+typedef struct L4_KernelRootServer {
+    L4_Word_t   sp;
+    L4_Word_t   ip;
+    L4_Word_t   low;
+    L4_Word_t   high;
+} L4_KernelRootServer_t;
+
+typedef struct L4_KernelConfigurationPage {
+    L4_Word_t		magic;
+
+    /* 0x04 */
+    L4_Word_t		__padding04[3];
+
+    L4_KernelRootServer_t Kdebug;
+    L4_KernelRootServer_t reserved0;
+    L4_KernelRootServer_t reserved1;
+    L4_KernelRootServer_t root_server;
+
+    /* 0x50 */
+    L4_Word_t __padding50[1];
+
+    struct {
+       	L4_BITFIELD2( L4_Word_t, 
+	    n : L4_BITS_PER_WORD / 2, 
+	    MemDescPtr : L4_BITS_PER_WORD / 2 
+	    );
+    } MemoryInfo;	// Match declaration in kip.h
+
+    L4_Word_t Kdebug_config[2];
+
+    /* 0x60 */
+    struct {
+	L4_Word_t	low;
+	L4_Word_t	high;
+    } MainMem;
+
+    /* 0x68 */
+    L4_Word_t __padding68[4];
+
+    /* 0x78 */
+    struct {
+	L4_Word_t	low;
+	L4_Word_t	high;
+    } DedicatedMem[5];
+
+    /* 0xA0 */
+    L4_Word_t		__paddingA0[6];
+
+    /* 0xB8 */
+    L4_Word_t		BootInfo;
+
+    /* 0xBC */
+    L4_Word_t		__paddingBC[1];
+} L4_KernelConfigurationPage_t;
+
+
+#endif /* !__L4__KCP_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/kdebug.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/kdebug.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/kdebug.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/kdebug.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,45 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2003,  Karlsruhe University
+ *                
+ * File path:     l4/kdebug.h
+ * Description:   Default L4 kernel debugger functionality
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: kdebug.h,v 1.3 2003/09/24 19:06:21 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__KDEBUG_H__
+#define __L4__KDEBUG_H__
+
+#include <l4/types.h>
+#include __L4_INC_ARCH(kdebug.h)
+
+/*
+ * Compatibility with old naming scheme.
+ */
+#define enter_kdebug(x)		L4_KDB_Enter(x)
+#define kd_inchar()		L4_KDB_ReadChar_Blocked()
+
+
+#endif /* !__L4__KDEBUG_H__ */
Binary files newlib-1.12.0/newlib/libc/sys/l4/include/l4/.kdebug.h.swp and newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.kdebug.h.swp differ
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/kip.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/kip.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/kip.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/kip.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,693 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2001-2004,  Karlsruhe University
+ *                
+ * File path:     l4/kip.h
+ * Description:   Kernel interface page definitions.
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: kip.h,v 1.34 2004/08/23 18:42:35 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__KERNEL_IFACE_PAGE_H__
+#define __L4__KERNEL_IFACE_PAGE_H__
+
+#include <l4/types.h>
+#include __L4_INC_ARCH(syscalls.h)
+
+
+#if defined(L4_64BIT)
+# define __PAD32	__pad32:32
+# define __PLUS32	+ 32
+#else
+# define __PAD32	:0
+# define __PLUS32
+#endif
+
+
+typedef union {
+    L4_Word_t	raw;
+    struct {
+	L4_BITFIELD4( L4_Word_t,
+	    __padding:16,
+	    subid:8,
+	    id:8,
+	    __PAD32
+	);
+    } x;
+} L4_KernelId_t;
+
+
+typedef union {
+    L4_Word_t	raw;
+    struct {
+	L4_BITFIELD4( L4_Word_t,
+	    __padding:16,
+	    subversion:8,
+	    version:8,
+	    __PAD32
+	);
+    } x;
+} L4_ApiVersion_t;
+
+
+typedef union {
+    L4_Word_t	raw;
+    struct {
+	L4_BITFIELD3( L4_Word_t,
+	    ee:2,
+	    ww:2,
+	    __padding:28 __PLUS32
+	);
+    } x;
+} L4_ApiFlags_t;
+
+
+typedef struct {
+    L4_BITFIELD2( L4_Word_t,
+	n:L4_BITS_PER_WORD / 2,
+	MemDescPtr:L4_BITS_PER_WORD / 2
+    );
+} L4_MemoryInfo_t;
+
+
+
+typedef struct {
+    L4_Word_t		magic;
+    L4_ApiVersion_t	ApiVersion;
+    L4_ApiFlags_t	ApiFlags;
+    L4_Word_t		KernelVerPtr;
+
+    /* 0x10 */
+    L4_Word_t		__padding10[17];
+    L4_MemoryInfo_t	MemoryInfo;
+    L4_Word_t		__padding58[2];
+
+    /* 0x60 */
+    struct {
+	L4_Word_t	low;
+	L4_Word_t	high;
+    } MainMem;
+
+    /* 0x68 */
+    struct {
+	L4_Word_t	low;
+	L4_Word_t	high;
+    } ReservedMem[2];
+
+    /* 0x78 */
+    struct {
+	L4_Word_t	low;
+	L4_Word_t	high;
+    } DedicatedMem[5];
+
+    /* 0xA0 */
+    L4_Word_t		__paddingA0[1];
+
+    union {
+	L4_Word_t	raw;
+	struct {
+	    L4_BITFIELD2( L4_Word_t,
+		n:6,
+		__padding:26 __PLUS32
+	    );
+	} X;
+    } VirtualRegInfo;
+
+    union {
+	L4_Word_t	raw;
+	struct {
+	    L4_BITFIELD4( L4_Word_t,
+		m:10,
+		a:6,
+		s:6,
+		__padding:10 __PLUS32
+	    );
+	} X;
+    } UtcbAreaInfo;
+
+    union {
+	L4_Word_t	raw;
+	struct {
+	    L4_BITFIELD2( L4_Word_t,
+		s:6,
+		__padding:26 __PLUS32
+	    );
+	} X;
+    } KipAreaInfo;
+
+    /* 0xB0 */
+    L4_Word_t		__paddingB0[2];
+    L4_Word_t		BootInfo;
+    L4_Word_t		ProcDescPtr;
+
+    /* 0xC0 */
+    union {
+	L4_Word_t	raw;
+	struct {
+	    L4_BITFIELD2( L4_Word_t,
+		SchedulePrecision:32,
+		__PAD32
+	    );
+	} X;
+    } ClockInfo;
+
+    union {
+	L4_Word_t	raw;
+	struct {
+	    L4_BITFIELD4( L4_Word_t,
+		t:8,
+		SystemBase:12,
+		UserBase:12,
+		__PAD32
+	    );
+	} X;
+    } ThreadInfo;
+
+    union {
+	L4_Word_t	raw;
+	struct {
+	    L4_BITFIELD3( L4_Word_t,
+		rwx:3,
+		__padding:7,
+		page_size_mask:22 __PLUS32
+	    );
+	} X;
+    } PageInfo;		
+
+    union {
+	L4_Word_t	raw;
+	struct {
+	    L4_BITFIELD3( L4_Word_t,
+		processors:16,
+		__pading:12 __PLUS32,
+		s:4
+	    );
+	} X;
+    } ProcessorInfo;
+
+    /* 0xD0 */
+    L4_Word_t	MapControl;
+    L4_Word_t	SpaceControl;
+    L4_Word_t	ThreadControl;
+    L4_Word_t	ProcessorControl;
+    L4_Word_t	CacheControl;
+
+    /* 0xE0 */
+    L4_Word_t	Ipc;
+    L4_Word_t	Lipc;
+    L4_Word_t	ExchangeRegisters;
+
+    /* 0xF0 */
+    L4_Word_t	__paddingF0;
+    L4_Word_t	ThreadSwitch;
+    L4_Word_t	Schedule;
+    L4_Word_t	__paddingFC;
+
+    /* 0x100 */
+    L4_Word_t	__padding100[4];
+
+    /* 0x110 */
+    L4_Word_t	ArchSyscall0;
+    L4_Word_t	ArchSyscall1;
+    L4_Word_t	ArchSyscall2;
+    L4_Word_t	ArchSyscall3;
+} L4_KernelInterfacePage_t;
+
+
+typedef union {
+    L4_Word_t	raw[4];
+    struct {
+	L4_Word_t	ExternalFreq;
+	L4_Word_t	InternalFreq;
+	L4_Word_t	__padding[2];
+    } X;
+} L4_ProcDesc_t;
+
+
+typedef struct {
+    L4_KernelId_t	KernelId;
+
+    union {
+	L4_Word_t	raw;
+	struct {
+	    L4_BITFIELD4( L4_Word_t,
+		day:5,
+		month:4,
+		year:7,
+		__padding:16 __PLUS32
+	    );
+	} X;
+    } KernelGenDate;
+
+    union {
+	L4_Word_t	raw;
+	struct {
+	    L4_BITFIELD4( L4_Word_t,
+		subsubver:16,
+		subver:8,
+		ver:8,
+		__PAD32
+	    );
+	} X;
+    } KernelVer;
+
+    L4_Word_t	Supplier;
+
+#if defined(__ARMCC_VERSION)
+    char	VersionString[1];
+#else
+    char	VersionString[0];
+#endif
+} L4_KernelDesc_t;
+
+
+/*
+ * Magic that identifies the kernel interface page.
+ */
+#ifndef L4_MAGIC
+#if defined(L4_BIG_ENDIAN)
+#if defined(L4_64BIT)
+# define L4_MAGIC	((((L4_Word_t)'L' << (24 + 32)) + ((L4_Word_t)'4' << (16 + 32)) + ((L4_Word_t)230 << (8 + 32)) + ((L4_Word_t)'K' << (0 + 32))))
+#else
+# define L4_MAGIC	((('L' << 24) + ('4' << 16) + (230 << 8) + ('K' << 0)))
+#endif
+#else
+# define L4_MAGIC	((('K' << 24) + (230 << 16) + ('4' << 8) + 'L'))
+#endif
+#endif /* L4_MAGIC  */
+
+/* Values for API version field. */
+#define L4_APIVERSION_2		(0x02)
+#define L4_APIVERSION_4		(0x04)
+#define L4_APIVERSION_X0	(0x83)
+#define L4_APIVERSION_X1	(0x83)
+#define L4_APIVERSION_X2	(0x84)
+#define L4_APIVERSION_N1	(0x86)
+#define L4_APISUBVERSION_X0	(0x80)
+#define L4_APISUBVERSION_X1	(0x81)
+#define L4_APISUBVERSION_X2	(0x82)
+
+/* Values for API flags field. */
+#define L4_APIFLAG_LE		(0x00)
+#define L4_APIFLAG_BE		(0x01)
+#define L4_APIFLAG_32BIT	(0x00)
+#define L4_APIFLAG_64BIT	(0x01)
+
+/* Values for kernel id/subid field. */
+#define L4_KID_L4_486		((0 << 16) + 1)
+#define L4_KID_L4_PENTIUM	((0 << 16) + 2)
+#define L4_KID_L4_X86		((0 << 16) + 3)
+#define L4_KID_L4_MIPS		((1 << 16) + 1)
+#define L4_KID_L4_ALPHA		((2 << 16) + 1)
+#define L4_KID_FIASCO		((3 << 16) + 1)
+#define L4_KID_L4KA_Hazelnut	((4 << 16) + 1)
+#define L4_KID_L4KA_Pistachio	((4 << 16) + 2)
+#define L4_KID_L4KA_Strawberry	((4 << 16) + 3)
+#define L4_KID_NICTA_Pistachio	((5 << 16) + 1)
+
+/* Values for kernel Supplier field. */
+#if defined(L4_BIG_ENDIAN)
+# define L4_SUPL_GMD	(('G' << 24) + ('M' << 16) + ('D' << 8) + ' ')
+# define L4_SUPL_IBM	(('I' << 24) + ('B' << 16) + ('M' << 8) + ' ')
+# define L4_SUPL_UNSW	(('U' << 24) + ('N' << 16) + ('S' << 8) + 'W')
+# define L4_SUPL_UKA	(('U' << 24) + ('K' << 16) + ('a' << 8) + ' ')
+# define L4_SUPL_NICTA	(('N' << 24) + ('I' << 16) + ('C' << 8) + 'T')
+#else
+# define L4_SUPL_GMD	((' ' << 24) + ('D' << 16) + ('M' << 8) + 'G')
+# define L4_SUPL_IBM	((' ' << 24) + ('M' << 16) + ('B' << 8) + 'I')
+# define L4_SUPL_UNSW	(('W' << 24) + ('S' << 16) + ('N' << 8) + 'U')
+# define L4_SUPL_NICTA	(('T' << 24) + ('C' << 16) + ('I' << 8) + 'N')
+#endif
+
+
+
+/*
+ * Derived functions
+ */
+
+L4_INLINE void * L4_GetKernelInterface (void)
+{
+    L4_ApiVersion_t version;
+    L4_ApiFlags_t flags;
+    L4_KernelId_t kernel_id;
+
+    return L4_KernelInterface (&version.raw, &flags.raw, &kernel_id.raw);
+}
+
+#if defined(__l4_cplusplus)
+L4_INLINE void * L4_KernelInterface (void)
+{
+    return L4_GetKernelInterface ();
+}
+#endif
+
+L4_INLINE L4_Word_t L4_ApiVersion (void)
+{
+    L4_ApiVersion_t version;
+    L4_ApiFlags_t flags;
+    L4_KernelId_t kernel_id;
+
+    L4_KernelInterface (&version.raw, &flags.raw, &kernel_id.raw);
+
+    return version.raw;
+}
+
+L4_INLINE L4_Word_t L4_ApiFlags (void)
+{
+    L4_ApiVersion_t version;
+    L4_ApiFlags_t flags;
+    L4_KernelId_t kernel_id;
+
+    L4_KernelInterface (&version.raw, &flags.raw, &kernel_id.raw);
+
+    return flags.raw;
+}
+
+L4_INLINE L4_Word_t L4_KernelId (void)
+{
+    L4_ApiVersion_t version;
+    L4_ApiFlags_t flags;
+    L4_KernelId_t kernel_id;
+
+    L4_KernelInterface (&version.raw, &flags.raw, &kernel_id.raw);
+
+    return kernel_id.raw;
+}
+
+L4_INLINE void L4_KernelGenDate (void * KernelInterface, L4_Word_t * year,
+				 L4_Word_t * month, L4_Word_t * day)
+{
+    L4_KernelInterfacePage_t * kip;
+    L4_Word_t gen;
+
+    kip = (L4_KernelInterfacePage_t *) KernelInterface;
+    gen = ((L4_Word_t*)((L4_Word_t) KernelInterface + kip->KernelVerPtr))[1];
+
+    *year = ((gen >> 9) & 0x7f) + 2000;
+    *month = ((gen >> 5) & 0x0f);
+    *day = (gen & 0x1f);
+}
+
+L4_INLINE L4_Word_t L4_KernelVersion (void * KernelInterface)
+{
+    L4_KernelInterfacePage_t * kip;
+    kip = (L4_KernelInterfacePage_t *) KernelInterface;
+
+    return ((L4_Word_t*)((L4_Word_t) KernelInterface + kip->KernelVerPtr))[2];
+}
+
+L4_INLINE L4_Word_t L4_KernelSupplier (void * KernelInterface)
+{
+    L4_KernelInterfacePage_t * kip;
+    kip = (L4_KernelInterfacePage_t *) KernelInterface;
+
+    return ((L4_Word_t*)((L4_Word_t) KernelInterface + kip->KernelVerPtr))[3];
+}
+
+L4_INLINE L4_Word_t L4_NumProcessors (void * KernelInterface)
+{
+    L4_KernelInterfacePage_t * kip;
+    kip = (L4_KernelInterfacePage_t *) KernelInterface;
+
+    return kip->ProcessorInfo.X.processors + 1;
+}
+
+L4_INLINE L4_Word_t L4_NumMemoryDescriptors (void * KernelInterface)
+{
+    L4_KernelInterfacePage_t * kip;
+    kip = (L4_KernelInterfacePage_t *) KernelInterface;
+
+    return kip->MemoryInfo.n;
+}
+
+L4_INLINE L4_Word_t L4_PageSizeMask (void * KernelInterface)
+{
+    L4_KernelInterfacePage_t * kip;
+    kip = (L4_KernelInterfacePage_t *) KernelInterface;
+
+    return kip->PageInfo.X.page_size_mask << 10;
+}
+
+L4_INLINE L4_Word_t L4_PageRights (void * KernelInterface)
+{
+    L4_KernelInterfacePage_t * kip;
+    kip = (L4_KernelInterfacePage_t *) KernelInterface;
+
+    return kip->PageInfo.X.rwx;
+}
+
+L4_INLINE L4_Word_t L4_ThreadIdBits (void * KernelInterface)
+{
+    L4_KernelInterfacePage_t * kip;
+    kip = (L4_KernelInterfacePage_t *) KernelInterface;
+
+    return kip->ThreadInfo.X.t;
+}
+
+L4_INLINE L4_Word_t L4_ThreadIdSystemBase (void * KernelInterface)
+{
+    L4_KernelInterfacePage_t * kip;
+    kip = (L4_KernelInterfacePage_t *) KernelInterface;
+
+    return kip->ThreadInfo.X.SystemBase;
+}
+
+L4_INLINE L4_Word_t L4_ThreadIdUserBase (void * KernelInterface)
+{
+    L4_KernelInterfacePage_t * kip;
+    kip = (L4_KernelInterfacePage_t *) KernelInterface;
+
+    return kip->ThreadInfo.X.UserBase;
+}
+
+L4_INLINE L4_Word_t L4_SchedulePrecision (void * KernelInterface)
+{
+    L4_KernelInterfacePage_t * kip;
+    kip = (L4_KernelInterfacePage_t *) KernelInterface;
+
+    return kip->ClockInfo.X.SchedulePrecision;
+}
+
+L4_INLINE L4_Word_t L4_MessageRegisters(void * KernelInterface)
+{
+    L4_KernelInterfacePage_t * kip;
+    kip = (L4_KernelInterfacePage_t *) KernelInterface;
+
+    return kip->VirtualRegInfo.X.n+1;
+}
+
+L4_INLINE L4_Word_t L4_UtcbAreaSizeLog2 (void * KernelInterface)
+{
+    L4_KernelInterfacePage_t * kip;
+    kip = (L4_KernelInterfacePage_t *) KernelInterface;
+
+    return kip->UtcbAreaInfo.X.s;
+}
+
+L4_INLINE L4_Word_t L4_UtcbAreaSize (void * KernelInterface)
+{
+    return 1UL << L4_UtcbAreaSizeLog2 (KernelInterface);
+}
+
+L4_INLINE L4_Word_t L4_UtcbAlignmentLog2 (void * KernelInterface)
+{
+    L4_KernelInterfacePage_t * kip;
+    kip = (L4_KernelInterfacePage_t *) KernelInterface;
+
+    return kip->UtcbAreaInfo.X.a;
+}
+
+L4_INLINE L4_Word_t L4_UtcbSize (void * KernelInterface)
+{
+    L4_KernelInterfacePage_t * kip;
+    kip = (L4_KernelInterfacePage_t *) KernelInterface;
+
+    return (1UL << kip->UtcbAreaInfo.X.a) * kip->UtcbAreaInfo.X.m;
+}
+
+L4_INLINE L4_Word_t L4_KipAreaSizeLog2 (void * KernelInterface)
+{
+    L4_KernelInterfacePage_t * kip;
+    kip = (L4_KernelInterfacePage_t *) KernelInterface;
+
+    return kip->KipAreaInfo.X.s;
+}
+
+L4_INLINE L4_Word_t L4_KipAreaSize (void * KernelInterface)
+{
+    return 1UL << L4_KipAreaSizeLog2 (KernelInterface);
+}
+
+L4_INLINE L4_Word_t L4_BootInfo (void * KernelInterface)
+{
+    L4_KernelInterfacePage_t * kip;
+    kip = (L4_KernelInterfacePage_t *) KernelInterface;
+
+    return kip->BootInfo;
+}
+
+L4_INLINE char * L4_KernelVersionString (void * KernelInterface)
+{
+    L4_KernelInterfacePage_t * kip;
+    kip = (L4_KernelInterfacePage_t *) KernelInterface;
+
+    return (char *) ((L4_Word_t) KernelInterface + kip->KernelVerPtr +
+		     sizeof (L4_Word_t) * 4);
+}
+
+L4_INLINE char * L4_Feature (void * KernelInterface, L4_Word_t num)
+{
+    char * str = L4_KernelVersionString (KernelInterface);
+
+    do {
+	while (*str++ != 0) {}
+	if (*str == 0)
+	    return (char *) 0;
+    } while (num--);
+
+    return str;
+}
+
+typedef union {
+    L4_Word_t	raw[2];
+    struct {
+	L4_BITFIELD5( L4_Word_t,
+	    type	:4,
+	    t		:4,
+	    __padding1	:1,
+	    v		:1,
+	    low		:(L4_BITS_PER_WORD - 10)
+	);
+	L4_BITFIELD2( L4_Word_t,
+	    __padding2	:10,
+	    high	:(L4_BITS_PER_WORD - 10)
+	);
+    } x;
+} L4_MemoryDesc_t;
+
+#define L4_UndefinedMemoryType			(0x0)
+#define L4_ConventionalMemoryType		(0x1)
+#define L4_ReservedMemoryType			(0x2)
+#define L4_DedicatedMemoryType			(0x3)
+#define L4_NUMAMemoryType			(0x4)
+#define L4_GlobalMemoryType			(0x5)
+#define L4_TracebufferMemoryType		(0xb)
+#define L4_BootLoaderSpecificMemoryType		(0xe)
+#define L4_ArchitectureSpecificMemoryType	(0xf)
+
+L4_INLINE L4_MemoryDesc_t * L4_MemoryDesc (void * KernelInterface,
+					   L4_Word_t num)
+{
+    L4_KernelInterfacePage_t * kip;
+    kip = (L4_KernelInterfacePage_t *) KernelInterface;
+
+    if (num >= kip->MemoryInfo.n)
+	return (L4_MemoryDesc_t *) 0;
+
+    return (L4_MemoryDesc_t *)
+	((L4_Word_t) kip + kip->MemoryInfo.MemDescPtr) + num;
+}
+
+L4_INLINE L4_Bool_t L4_IsMemoryDescVirtual (L4_MemoryDesc_t * m)
+{
+    return m->x.v;
+}
+
+L4_INLINE L4_Word_t L4_MemoryDescType (L4_MemoryDesc_t * m)
+{
+    return (m->x.type >= 0x0E) ? (m->x.type + (m->x.t << 4)) : (m->x.type);
+}
+
+L4_INLINE L4_Word_t L4_MemoryDescLow (L4_MemoryDesc_t * m)
+{
+    return m->x.low << 10;
+}
+
+L4_INLINE L4_Word_t L4_MemoryDescHigh (L4_MemoryDesc_t * m)
+{
+    return (m->x.high << 10) + 0x3ff;
+}
+
+#if defined(__l4_cplusplus)
+L4_INLINE L4_Bool_t L4_IsVirtual (L4_MemoryDesc_t * m)
+{
+    return L4_IsMemoryDescVirtual (m);
+}
+
+L4_INLINE L4_Word_t L4_Type (L4_MemoryDesc_t * m)
+{
+    return L4_MemoryDescType (m);
+}
+
+L4_INLINE L4_Word_t L4_Low (L4_MemoryDesc_t * m)
+{
+    return L4_MemoryDescLow (m);
+}
+
+L4_INLINE L4_Word_t L4_High (L4_MemoryDesc_t * m)
+{
+    return L4_MemoryDescHigh (m);
+}
+#endif /* __l4_cplusplus */
+
+L4_INLINE L4_ProcDesc_t * L4_ProcDesc (void * KernelInterface, L4_Word_t cpu)
+{
+    L4_KernelInterfacePage_t * kip;
+    kip = (L4_KernelInterfacePage_t *) KernelInterface;
+
+    if (cpu > kip->ProcessorInfo.X.processors)
+	return (L4_ProcDesc_t *) 0;
+
+    return (L4_ProcDesc_t *)
+	((L4_Word_t)kip + kip->ProcDescPtr + 
+	 ((1 << kip->ProcessorInfo.X.s) * cpu));
+}
+
+L4_INLINE L4_Word_t L4_ProcDescExternalFreq (L4_ProcDesc_t * p)
+{
+    return p->X.ExternalFreq;
+}
+
+L4_INLINE L4_Word_t L4_ProcDescInternalFreq (L4_ProcDesc_t * p)
+{
+    return p->X.InternalFreq;
+}
+
+#if defined(__l4_cplusplus)
+L4_INLINE L4_Word_t L4_ExternalFreq (L4_ProcDesc_t * p)
+{
+    return L4_ProcDescExternalFreq (p);
+}
+
+L4_INLINE L4_Word_t L4_InternalFreq (L4_ProcDesc_t * p)
+{
+    return L4_ProcDescInternalFreq (p);
+}
+#endif /* __l4_cplusplus */
+
+
+#undef __PAD32
+#undef __PLUS32
+
+#endif /* !__L4__KERNEL_IFACE_PAGE_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/map.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/map.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/map.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/map.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,71 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2005,  National ICT Australai
+ *                
+ * File path:     l4/map.h
+ * Description:   Interfaces for mappings in map control
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ ********************************************************************/
+#ifndef __L4__MAP_H__
+#define __L4__MAP_H__
+
+#include <l4/types.h>
+
+#if defined(L4_64BIT)
+# define __PLUS32	+ 32
+#else
+# define __PLUS32
+#endif
+
+/*
+ * Physical descriptor from MapControl item
+ */
+typedef union {
+    L4_Word_t	raw;
+    struct {
+	L4_BITFIELD2( L4_Word_t,
+		attr	: 6,
+		base	: 26 __PLUS32
+	);
+    } X;
+} L4_PhysDesc_t;
+
+L4_INLINE L4_PhysDesc_t L4_PhysDesc (L4_Word64_t PhysAddr, L4_Word_t Attribute)
+{
+    L4_PhysDesc_t phys;
+
+    phys.X.base = PhysAddr >> 10;
+    phys.X.attr = Attribute;
+    return phys;
+}
+
+/*
+ * MapControl controls
+ */
+#define L4_MapCtrl_Read		(1UL << (L4_BITS_PER_WORD - 2))
+#define L4_MapCtrl_Modify	(1UL << (L4_BITS_PER_WORD - 1))
+
+#undef __PLUS32
+
+#endif /* !__L4__MAP_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/message.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/message.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/message.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/message.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,441 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2001, 2002, 2003-2004,  Karlsruhe University
+ *                
+ * File path:     l4/message.h
+ * Description:   Message construction functions
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: message.h,v 1.30 2004/03/12 13:41:21 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__MESSAGE_H__
+#define __L4__MESSAGE_H__
+
+#include <l4/types.h>
+#include __L4_INC_ARCH(vregs.h)
+
+#if defined(L4_64BIT)
+# define __PLUS32	+ 32
+#else
+# define __PLUS32
+#endif
+
+
+
+
+/*
+ * Message tag
+ */
+
+typedef union {
+    L4_Word_t	raw;
+    struct {
+	L4_BITFIELD4( L4_Word_t,
+	    u:6,
+	    __res:6,
+	    flags:4,
+	    label:16 __PLUS32
+	);
+    } X;
+} L4_MsgTag_t;
+
+#if defined(__ARMCC_VERSION) || defined(_lint)
+extern const L4_MsgTag_t L4_Niltag;
+extern const L4_MsgTag_t L4_Notifytag;
+extern const L4_MsgTag_t L4_Waittag;
+#else /*  __GNUC__ */
+#define L4_Niltag		((L4_MsgTag_t) { raw : 0UL })
+#define L4_Notifytag		((L4_MsgTag_t) { raw : (1UL << 13) })
+#define L4_Waittag		((L4_MsgTag_t) { raw : (1UL << 14) })
+#endif
+
+L4_INLINE L4_Bool_t L4_IsMsgTagEqual (const L4_MsgTag_t l,
+				      const L4_MsgTag_t r)
+{
+    return l.raw == r.raw;
+}
+
+L4_INLINE L4_Bool_t L4_IsMsgTagNotEqual (const L4_MsgTag_t l,
+					 const L4_MsgTag_t r)
+{
+    return l.raw != r.raw;
+}
+
+#if defined(__l4_cplusplus)
+static inline L4_Bool_t operator == (const L4_MsgTag_t & l,
+				     const L4_MsgTag_t & r)
+{
+    return l.raw == r.raw;
+}
+
+static inline L4_Bool_t operator != (const L4_MsgTag_t & l,
+				     const L4_MsgTag_t & r)
+{
+    return l.raw != r.raw;
+}
+#endif /* __l4_cplusplus */
+
+L4_INLINE L4_MsgTag_t L4_MsgTagAddLabel (const L4_MsgTag_t t, int label)
+{
+    L4_MsgTag_t tag = t;
+    tag.X.label = label;
+    return tag;
+}
+
+L4_INLINE L4_MsgTag_t L4_MsgTagAddLabelTo (L4_MsgTag_t * t, int label)
+{
+    t->X.label = label;
+    return *t;
+}
+
+#if defined(__l4_cplusplus)
+static inline L4_MsgTag_t operator + (const L4_MsgTag_t & t, int label)
+{
+    return L4_MsgTagAddLabel (t, label);
+}
+
+static inline L4_MsgTag_t operator += (L4_MsgTag_t & t, int label)
+{
+    return L4_MsgTagAddLabelTo (&t, label);
+}
+#endif /* __l4_cplusplus */
+
+L4_INLINE L4_Word_t L4_Label (L4_MsgTag_t t)
+{
+    return t.X.label;
+}
+
+L4_INLINE L4_Word_t L4_UntypedWords (L4_MsgTag_t t)
+{
+    return t.X.u;
+}
+
+L4_INLINE void L4_Set_Label (L4_MsgTag_t * t, L4_Word_t label)
+{
+    t->X.label = label;
+}
+
+L4_INLINE L4_MsgTag_t L4_MsgTag (void)
+{
+    L4_MsgTag_t msgtag;
+    L4_StoreMR (0, &msgtag.raw);
+    return msgtag;
+}
+
+L4_INLINE void L4_Set_MsgTag (L4_MsgTag_t t)
+{
+    L4_LoadMR (0, t.raw);
+}
+
+
+
+/*
+ * Message objects
+ */
+
+typedef union {
+    L4_Word_t raw[__L4_NUM_MRS];
+    L4_Word_t msg[__L4_NUM_MRS];
+    L4_MsgTag_t tag;
+} L4_Msg_t;
+
+L4_INLINE void L4_MsgPut (L4_Msg_t * msg, L4_Word_t label,
+			  int u, L4_Word_t * Untyped)
+{
+    int i;
+
+    for (i = 0; i < u; i++)
+	msg->msg[i+1] = Untyped[i];
+
+    msg->tag.X.label = label;
+    msg->tag.X.flags = 0;
+    msg->tag.X.u = u;
+    msg->tag.X.__res = 0;
+}
+
+L4_INLINE void L4_MsgGet (const L4_Msg_t * msg, L4_Word_t * Untyped)
+{
+    int i, u;
+    u = msg->tag.X.u;
+
+    for (i = 0; i < u; i++)
+	Untyped[i] = msg->msg[i + 1];
+}
+
+L4_INLINE L4_MsgTag_t L4_MsgMsgTag (const L4_Msg_t * msg)
+{
+    return msg->tag;
+}
+
+L4_INLINE void L4_Set_MsgMsgTag (L4_Msg_t * msg, L4_MsgTag_t t)
+{
+    msg->tag = t;
+}
+
+L4_INLINE L4_Word_t L4_MsgLabel (const L4_Msg_t * msg)
+{
+    return msg->tag.X.label;
+}
+
+L4_INLINE void L4_Set_MsgLabel (L4_Msg_t * msg, L4_Word_t label)
+{
+    msg->tag.X.label = label;
+}
+
+L4_INLINE void L4_MsgLoad (L4_Msg_t * msg)
+{
+    L4_LoadMRs (0, msg->tag.X.u + 1, &msg->msg[0]);
+}
+
+L4_INLINE void L4_MsgStore (L4_MsgTag_t t, L4_Msg_t * msg)
+{
+    L4_StoreMRs (1, t.X.u, &msg->msg[1]);
+    msg->tag = t;
+}
+
+L4_INLINE void L4_MsgClear (L4_Msg_t * msg)
+{
+    msg->msg[0] = 0;
+}
+
+L4_INLINE void L4_MsgAppendWord (L4_Msg_t * msg, L4_Word_t w)
+{
+    msg->msg[++msg->tag.X.u] = w;
+}
+
+L4_INLINE void L4_MsgPutWord (L4_Msg_t * msg, L4_Word_t u, L4_Word_t w)
+{
+    msg->msg[u+1] = w;
+}
+
+L4_INLINE L4_Word_t L4_MsgWord (L4_Msg_t * msg, L4_Word_t u)
+{
+    return msg->msg[u + 1];
+}
+
+L4_INLINE void L4_MsgGetWord (L4_Msg_t * msg, L4_Word_t u, L4_Word_t * w)
+{
+    *w = msg->msg[u + 1];
+}
+
+#if defined(__l4_cplusplus)
+L4_INLINE void L4_Put (L4_Msg_t * msg, L4_Word_t label,
+		       int u, L4_Word_t * Untyped)
+{
+    L4_MsgPut (msg, label, u, Untyped);
+}
+
+L4_INLINE void L4_Get (const L4_Msg_t * msg, L4_Word_t * Untyped)
+{
+    L4_MsgGet (msg, Untyped);
+}
+
+L4_INLINE L4_MsgTag_t L4_MsgTag (const L4_Msg_t * msg)
+{
+    return L4_MsgMsgTag (msg);
+}
+
+L4_INLINE void L4_Set_MsgTag (L4_Msg_t * msg, L4_MsgTag_t t)
+{
+    L4_Set_MsgMsgTag (msg, t);
+}
+
+L4_INLINE L4_Word_t L4_Label (const L4_Msg_t * msg)
+{
+    return L4_MsgLabel (msg);
+}
+
+L4_INLINE void L4_Set_Label (L4_Msg_t * msg, L4_Word_t label)
+{
+    L4_Set_MsgLabel (msg, label);
+}
+
+L4_INLINE void L4_Load (L4_Msg_t * msg)
+{
+    L4_MsgLoad (msg);
+}
+
+L4_INLINE void L4_Store (L4_MsgTag_t t, L4_Msg_t * msg)
+{
+    L4_MsgStore (t, msg);
+}
+
+L4_INLINE void L4_Clear (L4_Msg_t * msg)
+{
+    L4_MsgClear (msg);
+}
+
+L4_INLINE void L4_Append (L4_Msg_t * msg, L4_Word_t w)
+{
+    L4_MsgAppendWord (msg, w);
+}
+
+L4_INLINE void L4_Append (L4_Msg_t * msg, int w)
+{
+    L4_MsgAppendWord (msg, (L4_Word_t) w);
+}
+
+L4_INLINE void L4_Put (L4_Msg_t * msg, L4_Word_t u, L4_Word_t w)
+{
+    L4_MsgPutWord (msg, u, w);
+}
+
+L4_INLINE L4_Word_t L4_Get (L4_Msg_t * msg, L4_Word_t u)
+{
+    return L4_MsgWord (msg, u);
+}
+
+L4_INLINE void L4_Get (L4_Msg_t * msg, L4_Word_t u, L4_Word_t * w)
+{
+    L4_MsgGetWord (msg, u, w);
+}
+
+#endif /* __l4_cplusplus */
+
+
+
+
+/*
+ * Acceptors and mesage buffers.
+ */
+
+typedef union {
+    L4_Word_t	raw;
+    struct {
+	L4_BITFIELD3( L4_Word_t,
+	    __zero1:1,
+	    a:1,
+	    __zero2:30 __PLUS32
+	);
+    } X;
+} L4_Acceptor_t;
+
+#if defined(__ARMCC_VERSION)
+  extern const L4_Acceptor_t L4_UntypedWordsAcceptor;
+  extern const L4_Acceptor_t L4_NotifyMsgAcceptor;
+#else
+#define L4_UntypedWordsAcceptor		((L4_Acceptor_t) { raw: 0 })
+#define L4_NotifyMsgAcceptor		((L4_Acceptor_t) { raw: 2 })
+#endif
+
+#define L4_AsynchItemsAcceptor		L4_NotifyMsgAcceptor	// OBSOLETE
+
+L4_INLINE L4_Acceptor_t L4_AddAcceptor (const L4_Acceptor_t l,
+					const L4_Acceptor_t r)
+{
+    L4_Acceptor_t a;
+    a.raw = 0;
+    a.X.a = (l.X.a | r.X.a);
+    return a;
+}
+
+L4_INLINE L4_Acceptor_t L4_AddAcceptorTo (L4_Acceptor_t l,
+					  const L4_Acceptor_t r)
+{
+    l.X.a = (l.X.a | r.X.a);
+    return l;
+}
+
+L4_INLINE L4_Acceptor_t L4_RemoveAcceptor (const L4_Acceptor_t l,
+					   const L4_Acceptor_t r)
+{
+    L4_Acceptor_t a = l;
+    if (r.X.a)
+	a.X.a = 0;
+    return a;
+}
+
+L4_INLINE L4_Acceptor_t L4_RemoveAcceptorFrom (L4_Acceptor_t l,
+					       const L4_Acceptor_t r)
+{
+    if (r.X.a)
+	l.X.a = 0;
+    return l;
+}
+
+#if defined(__l4_cplusplus)
+static inline L4_Acceptor_t operator + (const L4_Acceptor_t & l,
+					const L4_Acceptor_t & r)
+{
+    return L4_AddAcceptor (l, r);
+}
+
+static inline L4_Acceptor_t operator += (L4_Acceptor_t & l,
+					 const L4_Acceptor_t & r)
+{
+    return L4_AddAcceptorTo (l, r);
+}
+
+static inline L4_Acceptor_t operator - (const L4_Acceptor_t & l,
+					const L4_Acceptor_t & r)
+{
+    return L4_RemoveAcceptor (l, r);
+}
+
+static inline L4_Acceptor_t operator -= (L4_Acceptor_t & l,
+					 const L4_Acceptor_t & r)
+{
+    return L4_RemoveAcceptorFrom (l, r);
+}
+#endif /* __l4_cplusplus */
+
+L4_INLINE void L4_Accept (const L4_Acceptor_t a)
+{
+    __L4_TCR_Set_Acceptor( a.raw );
+}
+
+L4_INLINE L4_Acceptor_t L4_Accepted (void)
+{
+    L4_Acceptor_t a;
+    a.raw = __L4_TCR_Acceptor();
+    return a;
+}
+
+L4_INLINE void L4_Set_NotifyMask (const L4_Word_t mask)
+{
+    __L4_TCR_Set_NotifyMask( mask );
+}
+
+L4_INLINE L4_Word_t L4_Get_NotifyMask (void)
+{
+    L4_Word_t mask;
+    mask = __L4_TCR_NotifyMask();
+    return mask;
+}
+
+L4_INLINE void L4_Set_NotifyBits (const L4_Word_t mask)
+{
+    __L4_TCR_Set_NotifyBits( mask );
+}
+
+L4_INLINE L4_Word_t L4_Get_NotifyBits (void)
+{
+    L4_Word_t mask;
+    mask = __L4_TCR_NotifyBits();
+    return mask;
+}
+
+#undef __PLUS32
+
+#endif /* !__L4__MESSAGE_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/asm.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/asm.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/asm.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/asm.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.124
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/=id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/=id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/=id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/=id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:55:17 2004 7606.0
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/kdebug.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/kdebug.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/kdebug.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/kdebug.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.125
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/regdef.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/regdef.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/regdef.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/regdef.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.126
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/specials.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/specials.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/specials.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/specials.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.127
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/syscalls.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/syscalls.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/syscalls.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/syscalls.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.128
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/types.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/types.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/types.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/types.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.129
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/vregs.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/vregs.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/vregs.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/.arch-ids/vregs.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.131
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/asm.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/asm.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/asm.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/asm.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,53 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002,  University of New South Wales
+ *                
+ * File path:     arch/mips64/asm.h
+ * Description:   Assembler macros etc. 
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: asm.h,v 1.2 2003/09/24 19:06:25 skoglund Exp $
+ *                
+ ********************************************************************/
+
+#ifndef __ARCH__MIPS64__ASM_H__
+#define __ARCH__MIPS64__ASM_H__
+
+#define BEGIN_PROC(name)			\
+    .global name;				\
+    .align 3;					\
+    .ent name;					\
+name:
+
+#define END_PROC(name)				\
+    .end name
+
+/*
+ * EXPORT - export definition of symbol
+ */
+#define EXPORT(symbol)				\
+    .globl  symbol;				\
+symbol:
+
+
+#endif /* __ARCH__MIPS64__ASM_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/kdebug.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/kdebug.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/kdebug.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/kdebug.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,122 @@
+/****************************************************************************
+ *
+ * Copyright (C) 2002-2003,  University of New South Wales
+ *
+ * File path:	l4/mips64/kdebug.h
+ * Description:	L4 Kdebug interface for Mips64.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $Id: kdebug.h,v 1.9 2004/02/06 03:38:09 cvansch Exp $
+ *
+ ***************************************************************************/
+#ifndef __L4__MIPS64__KDEBUG_H__
+#define __L4__MIPS64__KDEBUG_H__
+
+#define __L4_TRAP_KPUTC		(-100ul)
+#define __L4_TRAP_KGETC		(-101ul)
+#define __L4_TRAP_KDEBUG	(-102ul)
+#define __L4_TRAP_KGETC_NB	(-104ul)
+#define __L4_TRAP_READ_PERF	(-110ul)
+#define __L4_TRAP_WRITE_PERF	(-111ul)
+#define __L4_TRAP_KSET_THRD_NAME (-120ul)
+
+#define L4_KDB_Enter(str...)			\
+do {						\
+    __asm__ __volatile__ (			\
+	".set	noat\n\t"			\
+	"li	$1, %0\n\t"			\
+	"dla	$2, 1f		    \n\t"	\
+	"break			    \n\t"	\
+	".set	at\n\t"				\
+	"	.data		    \n\t"	\
+	"1: .string	" #str ";"		\
+	"	.previous	    \n\t"	\
+	: : "i" (__L4_TRAP_KDEBUG) : "memory", "$1", "$2"	\
+    );						\
+} while (0)
+
+#define __L4_KDB_Op_Arg(op, name, argtype)	\
+L4_INLINE void L4_KDB_##name (argtype arg)	\
+{						\
+    register char r_c asm("$4") = arg;		\
+    __asm__ __volatile__ (			\
+	    ".set noat\n\t"			\
+	    "li     $1, %0\n\t"			\
+	    "break\n\t"				\
+	    ".set at\n\t"			\
+	    : : "i" (op), "r" (r_c) : "$1"	\
+	    );					\
+}
+
+
+#define __L4_KDB_Op_Ret(op, name, rettype)	\
+L4_INLINE rettype L4_KDB_##name (void)		\
+{						\
+    register char ret asm("$2");		\
+    __asm__ __volatile__ (			\
+	".set noat	\n\t"			\
+	"li	$1, %1	\n\t"			\
+	"break		\n\t"			\
+	".set at	\n\t"			\
+	: "=r" (ret) : "i" (op) : "$1"		\
+    );						\
+    return ret;					\
+}
+
+__L4_KDB_Op_Ret( __L4_TRAP_KGETC, ReadChar_Blocked, char )
+__L4_KDB_Op_Ret( __L4_TRAP_KGETC_NB, ReadChar, long )
+__L4_KDB_Op_Arg( __L4_TRAP_KPUTC, PrintChar, char )
+
+L4_INLINE void
+L4_KDB_SetThreadName(L4_ThreadId_t tid, const char *name)
+{
+    register L4_Word_t r_tid    asm("$4") = tid.raw;
+    register L4_Word_t w1       asm("$5") = 0;
+    register L4_Word_t w2       asm("$6") = 0;
+
+    L4_Word_t name_p[2], len = 0;
+    char *to = (char*) &name_p;
+
+    while(*name != '\0' && len < sizeof(name_p)) {
+	*to++ = *name++;
+	len++;
+    }
+    if (len < sizeof(name_p))
+	*to = 0;
+
+    w1 = name_p[0];
+    w2 = name_p[1];
+
+    __asm__ __volatile__ (
+	    ".set noat	\n\t"
+	    "li	$1, %0	\n\t"
+	    "break	\n\t"
+	    ".set at	\n\t"
+	    :
+	    : "i" (__L4_TRAP_KSET_THRD_NAME),
+	    "r" (r_tid), "r" (w1), "r" (w2)
+	    : "$1", "memory" );
+    return;
+}
+
+#endif /* !__L4__MIPS64__KDEBUG_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/regdef.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/regdef.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/regdef.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/regdef.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,81 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002,  University of New South Wales
+ *                
+ * File path:
+ * Created:       20/08/2002 by Carl van Schaik
+ * Description:   MIPS Register Descriptions
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: regdef.h,v 1.3 2003/09/24 19:06:25 skoglund Exp $
+ *                
+ ********************************************************************/
+
+#ifndef _ARCH_MIPS64_REGDEF_H_
+#define _ARCH_MIPS64_REGDEF_H_
+
+#define zero		$0  /* hardwired to zero */
+#define AT		$1  /* assembler temporary */
+#define v0		$2  /* result */
+#define v1		$3
+/* argument registers */
+#define a0		$4
+#define a1		$5
+#define a2		$6
+#define a3		$7
+#define a4		$8  /* ABI64 names */
+#define a5		$9
+#define a6		$10
+#define a7		$11
+/* temporary registers */
+#define t0		$8
+#define t1		$9
+#define t2		$10
+#define t3		$11
+#define t4		$12
+#define t5		$13
+#define t6		$14
+#define t7		$15
+/* saved registers */
+#define s0		$16
+#define s1		$17
+#define s2		$18
+#define s3		$19
+#define s4		$20
+#define s5		$21
+#define s6		$22
+#define s7		$23
+/* extra temporaries */
+#define t8		$24
+#define t9		$25
+/* kernel registers - don't touch */
+#define k0		$26
+#define k1		$27
+
+#define gp		$28	/* global pointer */
+#define sp		$29	/* stack pointer */
+#define fp		$30	/* frame pointer */
+#define s8		$30	/* or saved register */
+#define ra		$31	/* return address */
+
+#endif /* _ARCH_MIPS64_REGDEF_H_ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/specials.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/specials.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/specials.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/specials.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,55 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002,   University of New South Wales
+ *                
+ * File path:     l4/mips64/specials.h
+ * Description:   MIPS64 specific functions and defines
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: specials.h,v 1.3 2003/09/24 19:06:25 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__MIPS64__SPECIALS_H__
+#define __L4__MIPS64__SPECIALS_H__
+
+/*
+ * Architecture specific helper functions.
+ */
+
+L4_INLINE int __L4_Msb (L4_Word_t w) __attribute__ ((const));
+
+L4_INLINE int __L4_Msb (L4_Word_t w)
+{
+    int bitnum;
+
+    if (w == 0)
+	return 64;
+
+    for (bitnum = 0, w >>= 1; w != 0; bitnum++)
+	w >>= 1;
+
+    return bitnum;
+}
+
+
+#endif /* !__L4__MIPS64__SPECIALS_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/syscalls.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/syscalls.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/syscalls.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/syscalls.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,386 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002-2004,   University of New South Wales
+ *                
+ * File path:     l4/mips64/syscalls.h
+ * Description:   MIPS64 system call ABI
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: syscalls.h,v 1.10 2004/09/02 23:18:14 cvansch Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__MIPS64__SYSCALLS_H__
+#define __L4__MIPS64__SYSCALLS_H__
+
+#include <l4/types.h>
+#include <l4/message.h>
+
+
+/* The application gets the kernel info page by doing some illegal
+ * instruction, with at ($1) == 0x1face (interface) ca11 (call) 14 (L4) e1f
+ * (ELF) 64 (MIPS64)
+ */
+#define __L4_MAGIC_KIP_REQUEST          (0x1FACECA1114e1f64ULL)
+
+/* Memory attributes for MIPS64 memory control */
+#define L4_WriteThroughNoAllocMemory	8
+#define L4_FlushICache		29
+#define L4_FlushDCache		30
+#define L4_FlushCache		31
+
+
+L4_INLINE void * L4_KernelInterface (L4_Word_t *ApiVersion,
+				     L4_Word_t *ApiFlags,
+				     L4_Word_t *KernelId)
+{
+    register void * base_address	asm ("$8");  /* t0 */
+    register L4_Word_t api_version	asm ("$9");  /* t1 */
+    register L4_Word_t api_flags	asm ("$10"); /* t2 */
+    register L4_Word_t kernel_id	asm ("$11"); /* t3 */
+    register L4_Word_t i 		asm("$1");
+
+    __asm__ __volatile__ (".set noat;\n\t");
+    i = __L4_MAGIC_KIP_REQUEST;
+
+    __asm__ __volatile__ (
+	".word 0x07FFFFFF;\r\n"
+	".set at;     \n\r"
+	: "=r" (base_address), "=r" (api_version), "=r" (api_flags),
+	"=r" (kernel_id)
+	: "r" (i)
+    );
+
+
+    if( ApiVersion ) *ApiVersion = api_version;
+    if( ApiFlags ) *ApiFlags = api_flags;
+    if( KernelId ) *KernelId = kernel_id;
+
+    return base_address;
+}
+
+/* Implemented in exregs.S */
+typedef L4_ThreadId_t (*__L4_ExchangeRegisters_t)(L4_ThreadId_t dest,
+						  L4_Word_t control,
+						  L4_Word_t sp,
+						  L4_Word_t ip,
+						  L4_Word_t flags,
+						  L4_Word_t UserDefHandle,
+						  L4_ThreadId_t pager,
+						  L4_Word_t dummy);
+extern __L4_ExchangeRegisters_t __L4_ExchangeRegisters;
+
+L4_INLINE L4_ThreadId_t L4_ExchangeRegisters (L4_ThreadId_t dest,
+					      L4_Word_t control,
+					      L4_Word_t sp,
+					      L4_Word_t ip,
+					      L4_Word_t flags,
+					      L4_Word_t UserDefHandle,
+					      L4_ThreadId_t pager,
+					      L4_Word_t *old_control,
+					      L4_Word_t *old_sp,
+					      L4_Word_t *old_ip,
+					      L4_Word_t *old_flags,
+					      L4_Word_t *old_UserDefHandle,
+				    L4_ThreadId_t *old_pager)
+{
+    register L4_ThreadId_t r_dest	asm ("$2");
+    register L4_Word_t r_control	asm ("$4");
+    register L4_Word_t r_sp		asm ("$5");
+    register L4_Word_t r_ip		asm ("$6");
+    register L4_Word_t r_flags		asm ("$7");
+    register L4_Word_t r_userhandle	asm ("$8");
+    register L4_ThreadId_t r_pager	asm ("$9");
+    register L4_Word_t dummy		asm ("$11");
+
+    __L4_ExchangeRegisters(dest, control, sp, ip, flags, UserDefHandle, pager, dummy);
+    asm ("" : "=r" (r_dest), "=r" (r_control), "=r" (r_sp), "=r" (r_ip),
+	      "=r" (r_flags), "=r" (r_userhandle), "=r" (r_pager));
+
+    *old_control = r_control;
+    *old_sp = r_sp;
+    *old_ip = r_ip;
+    *old_flags = r_flags;
+    *old_UserDefHandle = r_userhandle;
+    *old_pager = r_pager;
+
+    return r_dest;
+}
+
+typedef L4_Word_t (*__L4_ThreadControl_t)(L4_ThreadId_t, L4_ThreadId_t, L4_ThreadId_t,
+		L4_ThreadId_t, L4_ThreadId_t, L4_ThreadId_t, void *);
+extern __L4_ThreadControl_t __L4_ThreadControl;
+
+L4_INLINE L4_Word_t L4_ThreadControl (L4_ThreadId_t dest,
+				      L4_ThreadId_t SpaceSpecifier,
+				      L4_ThreadId_t Scheduler,
+				      L4_ThreadId_t Pager,
+				      L4_ThreadId_t SendRedirector,
+				      L4_ThreadId_t RecvRedirector,
+				      void * UtcbLocation)
+{
+     return __L4_ThreadControl(dest, SpaceSpecifier, Scheduler, Pager, SendRedirector, RecvRedirector, UtcbLocation);
+}
+
+typedef L4_Word_t (*__L4_ThreadSwitch_t)(L4_ThreadId_t);
+extern __L4_ThreadSwitch_t __L4_ThreadSwitch;
+
+L4_INLINE L4_Word_t L4_ThreadSwitch (L4_ThreadId_t dest)
+{
+    return __L4_ThreadSwitch(dest);
+}
+
+typedef L4_Word_t (*__L4_Schedule_t)(L4_ThreadId_t dest, L4_Word_t ts_len,
+	L4_Word_t total_quantum, L4_Word_t hw_thread_bitmask, L4_Word_t ProcessorControl, L4_Word_t prio); 
+extern __L4_Schedule_t __L4_Schedule;
+
+L4_INLINE L4_Word_t  L4_Schedule (L4_ThreadId_t dest,
+				  L4_Word_t timeslice,
+				  L4_Word_t total_quantum,
+				  L4_Word_t hw_thread_bitmask,
+				  L4_Word_t ProcessorControl,
+				  L4_Word_t prio,
+				  L4_Word_t *rem_timeslice,
+				  L4_Word_t *rem_total)
+{
+    register L4_Word_t r_result  asm ("$2");
+    register L4_Word_t r_tslen   asm ("$5");
+    register L4_Word_t r_quantum asm ("$6");
+
+    __L4_Schedule(dest, timeslice, total_quantum, hw_thread_bitmask, ProcessorControl, prio);
+    asm ("" : "=r" (r_result), "=r" (r_tslen), "=r" (r_quantum));
+
+    *rem_timeslice = r_tslen;
+    *rem_total = r_quantum;
+
+    return r_result;
+}
+
+typedef L4_ThreadId_t (*__L4_Ipc_t)(L4_ThreadId_t to, L4_ThreadId_t FromSpecifier, L4_MsgTag_t tag);
+extern __L4_Ipc_t __L4_Ipc;
+
+L4_INLINE L4_MsgTag_t L4_Ipc (L4_ThreadId_t to,
+			      L4_ThreadId_t FromSpecifier,
+			      L4_MsgTag_t tag,
+			      L4_ThreadId_t * from)
+{
+    register L4_ThreadId_t to_r asm ("$4") = to;
+    register L4_ThreadId_t from_r asm ("$5") = FromSpecifier;
+    register L4_ThreadId_t result asm ("$2");
+    register L4_Word_t mr0 asm ("$3") = tag.raw;
+    register L4_Word_t mr1 asm ("$16");
+    register L4_Word_t mr2 asm ("$17");
+    register L4_Word_t mr3 asm ("$18");
+    register L4_Word_t mr4 asm ("$19");
+    register L4_Word_t mr5 asm ("$20");
+    register L4_Word_t mr6 asm ("$21");
+    register L4_Word_t mr7 asm ("$22");
+    register L4_Word_t mr8 asm ("$23");
+
+    // Only load MRs if send phase is included
+    if (! L4_IsNilThread (to))
+    {
+	mr1 = (__L4_Mips64_Utcb())[__L4_TCR_MR_OFFSET +  1];
+	mr2 = (__L4_Mips64_Utcb())[__L4_TCR_MR_OFFSET +  2];
+	mr3 = (__L4_Mips64_Utcb())[__L4_TCR_MR_OFFSET +  3];
+	mr4 = (__L4_Mips64_Utcb())[__L4_TCR_MR_OFFSET +  4];
+	mr5 = (__L4_Mips64_Utcb())[__L4_TCR_MR_OFFSET +  5];
+	mr6 = (__L4_Mips64_Utcb())[__L4_TCR_MR_OFFSET +  6];
+	mr7 = (__L4_Mips64_Utcb())[__L4_TCR_MR_OFFSET +  7];
+	mr8 = (__L4_Mips64_Utcb())[__L4_TCR_MR_OFFSET +  8];
+
+	__asm__ __volatile__ (
+	    "ld	    $2,	__L4_Ipc	\n\r"
+	    "jalr   $2			\n\r"
+	    :
+	    "+r" (to_r), "+r" (from_r),
+	    "+r" (mr0), "+r" (mr1), "+r" (mr2), "+r" (mr3),
+	    "+r" (mr4), "+r" (mr5), "+r" (mr6), "+r" (mr7), "+r" (mr8),
+	    "=r" (result)
+	    : 
+	    : "$1", "$6", "$7", "$8", "$9", "$10", "$11", "$12",
+	      "$13", "$14", "$15", "$24", "$25", /*"$28",*/ "$31",
+	      "memory"
+	);
+    } else {
+	__asm__ __volatile__ (
+	    "ld	    $2,	__L4_Ipc	\n\r"
+	    "jalr   $2			\n\r"
+	    :
+	    "+r" (to_r), "+r" (from_r),
+	    "+r" (mr0), "=r" (mr1), "=r" (mr2), "=r" (mr3),
+	    "=r" (mr4), "=r" (mr5), "=r" (mr6), "=r" (mr7), "=r" (mr8),
+	    "=r" (result)
+	    : 
+	    : "$1", "$6", "$7", "$8", "$9", "$10", "$11", "$12",
+	      "$13", "$14", "$15", "$24", "$25", /*"$28",*/ "$31",
+	      "memory"
+	);
+    }
+   
+    if( !L4_IsNilThread(FromSpecifier) ) {
+	*from = result;
+
+	(__L4_Mips64_Utcb())[__L4_TCR_MR_OFFSET +  1] = mr1;
+	(__L4_Mips64_Utcb())[__L4_TCR_MR_OFFSET +  2] = mr2;
+	(__L4_Mips64_Utcb())[__L4_TCR_MR_OFFSET +  3] = mr3;
+	(__L4_Mips64_Utcb())[__L4_TCR_MR_OFFSET +  4] = mr4;
+	(__L4_Mips64_Utcb())[__L4_TCR_MR_OFFSET +  5] = mr5;
+	(__L4_Mips64_Utcb())[__L4_TCR_MR_OFFSET +  6] = mr6;
+	(__L4_Mips64_Utcb())[__L4_TCR_MR_OFFSET +  7] = mr7;
+	(__L4_Mips64_Utcb())[__L4_TCR_MR_OFFSET +  8] = mr8;
+    }
+
+    /* Return MR0 */
+    tag.raw = mr0;
+    return tag;
+}
+
+L4_INLINE L4_MsgTag_t L4_Notify (L4_ThreadId_t to, L4_Word_t mask)
+{
+    L4_MsgTag_t tag;
+    register L4_ThreadId_t to_r asm ("$4") = to;
+    register L4_ThreadId_t from_r asm ("$5") = L4_nilthread;
+    register L4_Word_t mr0 asm ("$3") = L4_Notifytag.raw;
+    register L4_Word_t mr1 asm ("$16") = mask;
+    register L4_ThreadId_t result asm ("$2");
+
+    __asm__ __volatile__ (
+	"ld	$2,	__L4_Ipc	\n\r"
+	"jalr   $2			\n\r"
+	: "+r" (mr0), "+r" (mr1), "=r" (result)
+	: "r" (to_r), "r" (from_r)
+	: "$1", "$6", "$7", "$8", "$9", "$10", "$11",
+	"$12", "$13", "$14", "$15", /*"$16",*/ "$17", "$18", "$19", 
+	"$20", "$21", "$22", "$23", "$24", "$25", "$31",
+	"memory"
+    );
+
+    tag.raw = mr0;
+
+    return tag;
+}
+
+L4_INLINE L4_MsgTag_t L4_WaitNotify (L4_Word_t * mask)
+{
+    L4_MsgTag_t tag;
+    register L4_ThreadId_t to_r asm ("$4") = L4_nilthread;
+    register L4_ThreadId_t from_r asm ("$5") = L4_waitnotify;
+    register L4_Word_t mr0 asm ("$3") = L4_Waittag.raw;
+    register L4_Word_t mr1 asm ("$16") = *mask;
+
+    __asm__ __volatile__ (
+	"ld	$2,	__L4_Ipc	\n\r"
+	"jalr   $2			\n\r"
+	: "+r" (mr0), "=r" (mr1)
+	: "r" (to_r), "r" (from_r)
+	: "$1", "$6", "$7", "$8", "$9", "$10", "$11", "$12", "$13", 
+	  "$14", "$15", /*"$16",*/ "$17", "$18", "$19", "$20", "$21", 
+	  "$22", "$23", "$24", "$25", "$31",
+	  "memory"
+    );
+
+    *mask = mr1;
+    tag.raw = mr0;
+
+    return tag;
+}
+
+typedef L4_ThreadId_t (*__L4_Lipc_t)(L4_ThreadId_t to, L4_ThreadId_t FromSpecifier, L4_MsgTag_t tag);
+extern __L4_Lipc_t __L4_Lipc;
+
+L4_INLINE L4_MsgTag_t L4_Lipc (L4_ThreadId_t to,
+			       L4_ThreadId_t FromSpecifier,
+			       L4_MsgTag_t tag,
+			       L4_ThreadId_t * from)
+{
+    L4_MsgTag_t mr0;
+    L4_ThreadId_t result;
+
+    result = __L4_Lipc(to, FromSpecifier, tag);
+   
+    if( !L4_IsNilThread(FromSpecifier) ) {
+	*from = result;
+    }
+
+    /* Return MR0 */
+    L4_StoreMR(0, (L4_Word_t *) &mr0);
+    return mr0;
+}
+
+
+typedef L4_Word_t (*__L4_MapControl_t)(L4_ThreadId_t, L4_Word_t);
+extern __L4_MapControl_t __L4_MapControl;
+
+L4_INLINE L4_Word_t L4_MapControl (L4_ThreadId_t SpaceSpecifier, L4_Word_t control)
+{
+    return __L4_MapControl(SpaceSpecifier, control);
+}
+
+typedef void (*__L4_SpaceControl_t)(L4_ThreadId_t SpaceSpecifier,
+				     L4_Word_t control,
+				     L4_Fpage_t KernelInterfacePageArea,
+				     L4_Fpage_t UtcbArea);
+extern __L4_SpaceControl_t __L4_SpaceControl;
+
+L4_INLINE L4_Word_t L4_SpaceControl (L4_ThreadId_t SpaceSpecifier,
+				     L4_Word_t control,
+				     L4_Fpage_t KernelInterfacePageArea,
+				     L4_Fpage_t UtcbArea,
+				     L4_Word_t *old_control)
+{
+    register L4_Word_t r_result         asm ("$2");
+    register L4_ThreadId_t r_space	asm ("$4") = SpaceSpecifier; /* and old_control */
+
+    __L4_SpaceControl(SpaceSpecifier, control, KernelInterfacePageArea, UtcbArea);
+    asm ("" : "=r" (r_result), "=r" (r_space));
+
+    if(old_control)
+	*old_control = r_space.raw;
+
+    return r_result;
+}
+
+
+typedef L4_Word_t (*__L4_ProcessorControl_t)(L4_Word_t ProcessorNo,
+					  L4_Word_t InternalFrequency,
+					  L4_Word_t ExternalFrequency,
+					  L4_Word_t voltage);
+extern __L4_ProcessorControl_t __L4_ProcessorControl;
+    
+L4_INLINE L4_Word_t L4_ProcessorControl (L4_Word_t ProcessorNo,
+					 L4_Word_t InternalFrequency,
+					 L4_Word_t ExternalFrequency,
+					 L4_Word_t voltage)
+{
+    return __L4_ProcessorControl(ProcessorNo, InternalFrequency, ExternalFrequency, voltage);
+}
+
+typedef L4_Word_t (*__L4_CacheControl_t)(L4_ThreadId_t, L4_Word_t);
+extern __L4_CacheControl_t __L4_CacheControl;
+
+L4_INLINE L4_Word_t L4_CacheControl (L4_ThreadId_t SpaceSpecifier, L4_Word_t control)
+{
+    return __L4_CacheControl(SpaceSpecifier, control);
+}
+
+#endif /* !__L4__MIPS64__SYSCALLS_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/types.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/types.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/types.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/types.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,53 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002,   University of New South Wales
+ *                
+ * File path:     l4/mips64/types.h
+ * Description:   MIPS64 specific type declararions
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: types.h,v 1.7 2003/11/27 01:26:56 cvansch Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__MIPS64__TYPES_H__
+#define __L4__MIPS64__TYPES_H__
+
+#define L4_64BIT
+
+#if defined(ENDIAN_BIG)
+#define L4_BIG_ENDIAN
+#elif defined(ENDIAN_LITTLE)
+#define L4_LITTLE_ENDIAN
+#else
+#error No endianness configured
+#endif
+
+typedef unsigned long		L4_Word64_t;
+typedef unsigned int		L4_Word32_t;
+typedef unsigned short		L4_Word16_t;
+typedef unsigned char		L4_Word8_t;
+
+typedef unsigned long		L4_Word_t;
+typedef long unsigned int	L4_Size_t;
+
+#endif /* !__L4__MIPS64__TYPES_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/vregs.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/vregs.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/mips64/vregs.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/mips64/vregs.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,292 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002, 2003,   University of New South Wales
+ *                
+ * File path:     l4/mips64/vregs.h
+ * Description:   Mips64 virtual register ABI
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: vregs.h,v 1.8 2004/04/28 03:04:36 cvansch Exp $
+ *                
+ ********************************************************************/
+
+#ifndef __L4__MIPS64__VREGS_H__
+#define __L4__MIPS64__VREGS_H__
+
+#define __L4_NUM_MRS	64
+
+/*
+ * Location of TCRs within UTCB.
+ */
+
+/* Thread local storage */
+#define __L4_TCR_PLAT_TLS			(__L4_TCR_PLATFORM_OFFSET + 0)
+#define __L4_TCR_PLATFORM_OFFSET		(80)
+
+#define __L4_TCR_MR_OFFSET		        (16)
+#define __L4_TCR_THREAD_WORD1    		(15)
+#define __L4_TCR_THREAD_WORD0    		(14)
+#define __L4_TCR_VIRTUAL_ACTUAL_SENDER		(13)
+#define __L4_TCR_INTENDED_RECEIVER		(12)
+#define __L4_TCR_ERROR_CODE			(11)
+#define __L4_TCR_USER_DEFINED_HANDLE		(10)
+#define __L4_TCR_PREEMPTED_IP			(9)
+#define __L4_TCR_PREEMPT_CALLBACK_IP		(8)
+#define __L4_TCR_NOTIFY_BITS			(7)
+#define __L4_TCR_NOTIFY_MASK			(6)
+#define __L4_TCR_ACCEPTOR			(5)
+#define __L4_TCR_COP_FLAGS			(4)
+#define __L4_TCR_PREEMPT_FLAGS			(4)
+#define __L4_TCR_EXCEPTION_HANDLER		(3)
+#define __L4_TCR_PAGER				(2)
+#define __L4_TCR_PROCESSOR_NO			(1)
+#define __L4_TCR_MY_GLOBAL_ID			(0)
+
+#if !defined(__ASSEMBLER__)
+
+L4_INLINE L4_Word_t *__L4_Mips64_Utcb( void ) __attribute__ ((const));
+L4_INLINE L4_Word_t *__L4_Mips64_Utcb( void )
+{
+    register L4_Word_t * utcb asm ("$26");	// k0
+    return utcb;
+}
+L4_INLINE L4_Word_t *L4_GetUtcbBase( void ) __attribute__ ((const));
+L4_INLINE L4_Word_t *L4_GetUtcbBase( void )
+{
+    return __L4_Mips64_Utcb();
+}
+
+typedef struct {
+    L4_Word8_t	    PreemptFlags;
+    L4_Word8_t	    CopFlags;
+    L4_Word16_t	    __reserved0;
+    L4_Word32_t	    __reserved1;
+} UtcbParts;
+
+/*
+ * Thread Control Registers.
+ */
+
+L4_INLINE L4_Word_t __L4_TCR_MyGlobalId( void )
+{
+    return (__L4_Mips64_Utcb())[ __L4_TCR_MY_GLOBAL_ID ];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ProcessorNo( void )
+{
+    return (__L4_Mips64_Utcb())[ __L4_TCR_PROCESSOR_NO ];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_UserDefinedHandle( void )
+{
+    return (__L4_Mips64_Utcb())[ __L4_TCR_USER_DEFINED_HANDLE ];
+}
+
+L4_INLINE void __L4_TCR_Set_UserDefinedHandle( L4_Word_t w )
+{
+    (__L4_Mips64_Utcb())[ __L4_TCR_USER_DEFINED_HANDLE ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_Pager( void )
+{
+    return (__L4_Mips64_Utcb())[ __L4_TCR_PAGER ];
+}
+
+L4_INLINE void __L4_TCR_Set_Pager( L4_Word_t w )
+{
+    (__L4_Mips64_Utcb())[ __L4_TCR_PAGER ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ExceptionHandler( void )
+{
+    return (__L4_Mips64_Utcb())[ __L4_TCR_EXCEPTION_HANDLER ];
+}
+
+L4_INLINE void __L4_TCR_Set_ExceptionHandler( L4_Word_t w )
+{
+    (__L4_Mips64_Utcb())[ __L4_TCR_EXCEPTION_HANDLER ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_Acceptor( void )
+{
+    return (__L4_Mips64_Utcb())[ __L4_TCR_ACCEPTOR ];
+}
+
+L4_INLINE void __L4_TCR_Set_Acceptor( L4_Word_t w )
+{
+    (__L4_Mips64_Utcb())[ __L4_TCR_ACCEPTOR ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_NotifyMask( void )
+{
+    return (__L4_Mips64_Utcb())[ __L4_TCR_NOTIFY_MASK ];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_NotifyBits( void )
+{
+    return (__L4_Mips64_Utcb())[ __L4_TCR_NOTIFY_BITS ];
+}
+
+L4_INLINE void __L4_TCR_Set_NotifyMask( L4_Word_t w )
+{
+    (__L4_Mips64_Utcb())[ __L4_TCR_NOTIFY_MASK ] = w;
+}
+
+L4_INLINE void __L4_TCR_Set_NotifyBits( L4_Word_t w )
+{
+    (__L4_Mips64_Utcb())[ __L4_TCR_NOTIFY_BITS ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ErrorCode( void )
+{
+    return (__L4_Mips64_Utcb())[ __L4_TCR_ERROR_CODE ];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_IntendedReceiver( void )
+{
+    return (__L4_Mips64_Utcb())[ __L4_TCR_INTENDED_RECEIVER ];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ActualSender( void )
+{
+    return (__L4_Mips64_Utcb())[ __L4_TCR_VIRTUAL_ACTUAL_SENDER ];
+}
+
+L4_INLINE void __L4_TCR_Set_VirtualSender( L4_Word_t w )
+{
+    (__L4_Mips64_Utcb())[ __L4_TCR_VIRTUAL_ACTUAL_SENDER ] = w;
+}
+
+L4_INLINE L4_Word_t L4_PreemptedIP( void )
+{
+    return (__L4_Mips64_Utcb())[ __L4_TCR_PREEMPTED_IP];
+}
+
+L4_INLINE void L4_Set_PreemptCallbackIP( L4_Word_t ip )
+{
+    (__L4_Mips64_Utcb())[ __L4_TCR_PREEMPT_CALLBACK_IP] = ip;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ThreadWord (L4_Word_t n)
+{
+    return (__L4_Mips64_Utcb ())[__L4_TCR_THREAD_WORD0 + (int) n];
+}
+
+L4_INLINE void __L4_TCR_Set_ThreadWord (L4_Word_t n, L4_Word_t w)
+{
+    (__L4_Mips64_Utcb ())[__L4_TCR_THREAD_WORD0 + (int) n] = w;
+}
+
+#define COP_FLAGS   ((UtcbParts *)&(__L4_Mips64_Utcb())[ __L4_TCR_COP_FLAGS ])->CopFlags
+
+L4_INLINE void L4_Set_CopFlag( L4_Word_t n )
+{
+    COP_FLAGS |= (1 << n);
+}
+
+L4_INLINE void L4_Clr_CopFlag( L4_Word_t n )
+{
+    COP_FLAGS &= ~(1 << n);
+}
+
+#define PREEMPT_FLAGS	((UtcbParts *)&(__L4_Mips64_Utcb())[ __L4_TCR_PREEMPT_FLAGS ])->PreemptFlags
+
+L4_INLINE L4_Bool_t L4_EnablePreemptionCallback( void )
+{
+    L4_Bool_t old = (PREEMPT_FLAGS >> 5) & 1;
+    PREEMPT_FLAGS |= (1 << 5);
+    return old;
+}
+
+L4_INLINE L4_Bool_t L4_DisablePreemptionCallback( void )
+{
+    L4_Bool_t old = (PREEMPT_FLAGS >> 5) & 1;
+    PREEMPT_FLAGS &= ~(1 << 5);
+    return old;
+}
+
+L4_INLINE L4_Bool_t L4_EnablePreemption( void )
+{
+    L4_Bool_t old = (PREEMPT_FLAGS >> 6) & 1;
+    PREEMPT_FLAGS |= (1 << 6);
+    return old;
+}
+
+L4_INLINE L4_Bool_t L4_DisablePreemption( void )
+{
+    L4_Bool_t old = (PREEMPT_FLAGS >> 6) & 1;
+    PREEMPT_FLAGS &= ~(1 << 6);
+    return old;
+}
+
+L4_INLINE L4_Bool_t L4_PreemptionPending( void )
+{
+    L4_Bool_t retval = (PREEMPT_FLAGS >> 7) & 1;
+    return retval;
+}
+
+
+/*
+ * Message Registers.
+ */
+
+L4_INLINE void L4_StoreMR( int i, L4_Word_t * w )
+{
+    *w = (__L4_Mips64_Utcb())[__L4_TCR_MR_OFFSET +  i ];
+}
+
+L4_INLINE void L4_LoadMR( int i, L4_Word_t w )
+{
+    (__L4_Mips64_Utcb())[__L4_TCR_MR_OFFSET + i ] = w;
+}
+
+L4_INLINE void L4_StoreMRs( int i, int k, L4_Word_t * w )
+{
+    L4_Word_t * mr = &(__L4_Mips64_Utcb())[__L4_TCR_MR_OFFSET + i];
+
+    while( k-- > 0 )
+	*w++ = *mr++;
+}
+
+L4_INLINE void L4_LoadMRs( int i, int k, L4_Word_t * w )
+{
+    L4_Word_t * mr = &(__L4_Mips64_Utcb())[__L4_TCR_MR_OFFSET + i];
+
+    while( k-- > 0 )
+	*mr++ = *w++;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ThreadLocalStorage ( void )
+{
+    return (__L4_Mips64_Utcb())[ __L4_TCR_PLAT_TLS ];
+}
+
+L4_INLINE void __L4_TCR_Set_ThreadLocalStorage ( L4_Word_t tls )
+{
+    (__L4_Mips64_Utcb())[ __L4_TCR_PLAT_TLS ] = tls;
+}
+
+#endif
+
+#endif	/* __L4__MIPS64__VREGS_H__ */
+
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/misc.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/misc.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/misc.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/misc.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,53 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2001, 2002, 2003,  Karlsruhe University
+ *                
+ * File path:     l4/misc.h
+ * Description:   Miscelaneous interfaces
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: misc.h,v 1.4 2003/11/17 06:21:55 cvansch Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__MISC_H__
+#define __L4__MISC_H__
+
+#include <l4/types.h>
+#include __L4_INC_ARCH(syscalls.h)
+
+
+/*
+ * Memory attributes
+ */
+
+#define L4_DefaultMemory	0
+#define L4_CachedMemory		1
+#define L4_UncachedMemory	2
+#define L4_WriteBackMemory	3
+#define L4_WriteThroughMemory	4
+#define L4_CoherentMemory	5
+#define L4_IOMemory		6
+#define L4_IOCombinedMemory	7
+
+
+#endif /* !__L4__MISC_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/pagefault.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/pagefault.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/pagefault.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/pagefault.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,66 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2001, 2002, 2003,  Karlsruhe University
+ *                
+ * File path:     l4/pagefault.h
+ * Description:   Page-fault RPC protocol
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: pagefault.h,v 1.7 2003/09/24 19:06:21 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__PAGEFAULT_H__
+#define __L4__PAGEFAULT_H__
+
+#include <l4/message.h>
+#include __L4_INC_ARCH(message.h)
+
+
+#if defined(L4_64BIT)
+# define __PLUS32	+ 32
+#else
+# define __PLUS32
+#endif
+
+
+typedef union L4_PfRequest {
+    L4_Word_t	raw[3];
+    struct {
+	struct {
+	    L4_BITFIELD5( L4_Word_t,
+		u:6,			/* 2 */
+		t:6,			/* 0 */
+		__zero:4,
+		wrx:4,
+		__padding:12 __PLUS32	/* -2 */
+	    );
+	};
+	L4_Word_t	fault_address;
+	L4_Word_t	fault_ip;
+    } X;
+} L4_PfRequest_t;
+
+
+#undef __PLUS32
+
+#endif /* !__L4__PAGEFAULT_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc/.arch-ids/=id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc/.arch-ids/=id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc/.arch-ids/=id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc/.arch-ids/=id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:55:15 2004 7604.0
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc/.arch-ids/kdebug.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc/.arch-ids/kdebug.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc/.arch-ids/kdebug.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc/.arch-ids/kdebug.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.134
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc/.arch-ids/specials.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc/.arch-ids/specials.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc/.arch-ids/specials.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc/.arch-ids/specials.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.135
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc/.arch-ids/syscalls.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc/.arch-ids/syscalls.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc/.arch-ids/syscalls.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc/.arch-ids/syscalls.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.136
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc/.arch-ids/types.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc/.arch-ids/types.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc/.arch-ids/types.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc/.arch-ids/types.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.137
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc/.arch-ids/vregs.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc/.arch-ids/vregs.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc/.arch-ids/vregs.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc/.arch-ids/vregs.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.138
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc/kdebug.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc/kdebug.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc/kdebug.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc/kdebug.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,89 @@
+/****************************************************************************
+ *
+ * Copyright (C) 2002-2003, Karlsruhe University
+ *
+ * File path:	l4/powerpc/kdebug.h
+ * Description:	L4 Kdebug interface for PowerPC.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $Id: kdebug.h,v 1.8 2003/11/03 14:40:33 joshua Exp $
+ *
+ ***************************************************************************/
+#ifndef __L4__POWERPC__KDEBUG_H__
+#define __L4__POWERPC__KDEBUG_H__
+
+#define __L4_TRAP_KDEBUG	(0x5afe)
+#define __L4_TRAP_KPUTC	(__L4_TRAP_KDEBUG + 1)
+#define __L4_TRAP_KGETC	(__L4_TRAP_KDEBUG + 2)
+
+#define L4_KDB_Enter(str...)					\
+    asm volatile (						\
+	"li %%r0, %0 ;"						\
+	"trap ;"						\
+	"b 1f ;"						\
+	".string	\"KD# " str "\";"			\
+	".align 2 ;"						\
+	"1:"							\
+	: /* outputs */						\
+	: /* inputs */ "i" (__L4_TRAP_KDEBUG)			\
+	: /* clobbers */ "r0" )
+
+
+#define __L4_KDB_Op_Arg(op, name, argtype)	\
+L4_INLINE void L4_KDB_##name (argtype arg)	\
+{						\
+    __asm__ __volatile__ (			\
+	    "mr %%r3, %0 ;"			\
+	    "li %%r0, %1 ;"			\
+	    "trap ;"				\
+	    : /* outputs */			\
+	    : /* inputs */			\
+	    "b" (arg), "i" (op)			\
+	    : /* clobbers */			\
+	    "r0", "r3"				\
+	    );					\
+}
+
+
+#define __L4_KDB_Op_Ret(op, name, rettype)	\
+L4_INLINE rettype L4_KDB_##name (void)		\
+{						\
+    rettype ret;				\
+    __asm__ __volatile__ (			\
+	    "li %%r0, %1 ;"			\
+	    "trap ;"				\
+	    "mr %0, %%r3 ;"			\
+	    : /* outputs */			\
+	    "=b" (ret)				\
+	    : /* inputs */			\
+	    "i" (op)				\
+	    : /* clobbers */			\
+	    "r0", "r3"				\
+	    );					\
+    return ret;					\
+}
+
+__L4_KDB_Op_Ret( __L4_TRAP_KGETC, ReadChar_Blocked, char );
+__L4_KDB_Op_Arg( __L4_TRAP_KPUTC, PrintChar, char );
+
+#endif	/* __L4__POWERPC__KDEBUG_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc/specials.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc/specials.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc/specials.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc/specials.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,55 @@
+/****************************************************************************
+ *
+ * Copyright (C) 2002-2003, Karlsruhe University
+ *
+ * File path:	l4/powerpc/specials.h
+ * Description:	PowerPC specific functions and defines.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $Id: specials.h,v 1.5 2003/09/24 19:06:25 skoglund Exp $
+ *
+ ***************************************************************************/
+#ifndef __L4__POWERPC__SPECIALS_H__
+#define __L4__POWERPC__SPECIALS_H__
+
+L4_INLINE int __L4_Msb( L4_Word_t w ) __attribute__ ((const));
+
+L4_INLINE int __L4_Msb( L4_Word_t w )
+{
+    int zeros;
+
+    asm volatile ("cntlzw %0, %1" : "=r" (zeros) : "r" (w) );
+
+    return 31-zeros;
+}
+
+#if defined(__l4_cplusplus)
+L4_INLINE L4_Fpage_t L4_Fpage (L4_Fpage_t f)
+{
+        L4_Fpage_t out;
+	    out.raw = f.raw;
+	        return out;
+}
+#endif
+
+#endif	/* __L4__POWERPC__SPECIALS_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc/syscalls.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc/syscalls.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc/syscalls.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc/syscalls.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,513 @@
+/****************************************************************************
+ *
+ * Copyright (C) 2002-2003, Karlsruhe University
+ *
+ * File path:	l4/powerpc/syscalls.h
+ * Description:	PowerPC system call implementations.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $Id: syscalls.h,v 1.31 2004/08/23 18:43:13 skoglund Exp $
+ *
+ ***************************************************************************/
+#ifndef __L4__POWERPC__SYSCALLS_H__
+#define __L4__POWERPC__SYSCALLS_H__
+
+#include <l4/types.h>
+#include <l4/message.h>
+
+#define __L4_PPC_CLOBBER_REGS	\
+			"r0", "r11", "r12", "r13", "r14", "r15", "r16", "r17",\
+			"r18", "r19", "r20", "r21", "r22", "r23", "r24", "r25",\
+			"r26", "r27", "r28", "r29", "lr", "ctr"
+#if (__GNUC__ >= 3)
+#define __L4_PPC_CLOBBER_CR_REGS	\
+			"cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", \
+			"cr7", "xer"
+#else
+#define __L4_PPC_CLOBBER_CR_REGS	\
+			"cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7"
+#endif
+
+typedef struct {
+    L4_Word_t r3;
+    L4_Word_t r4;
+} __L4_Return_t;
+
+L4_INLINE void * L4_KernelInterface(
+	L4_Word_t *ApiVersion,
+	L4_Word_t *ApiFlags,
+	L4_Word_t *KernelId
+	)
+{
+    register void * base_address;
+    register L4_Word_t api_version;
+    register L4_Word_t api_flags;
+    register L4_Word_t kernel_id;
+
+    __asm__ __volatile__ (
+	    "tlbia ;"
+	    "mr	%0, %%r3 ;"
+	    "mr	%1, %%r4 ;"
+	    "mr	%2, %%r5 ;"
+	    "mr	%3, %%r6 ;"
+	    : /* ouputs */
+	      "=r" (base_address), "=r" (api_version),
+	      "=r" (api_flags), "=r" (kernel_id)
+	    : /* inputs */
+	    : /* clobbers */
+	      "r3", "r4", "r5", "r6"
+	    );
+
+    if( ApiVersion ) *ApiVersion = api_version;
+    if( ApiFlags ) *ApiFlags = api_flags;
+    if( KernelId ) *KernelId = kernel_id;
+
+    return base_address;
+}
+
+typedef L4_Word_t (*__L4_ExchangeRegisters_t)( L4_Word_t, L4_Word_t, L4_Word_t,
+	L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t );
+extern __L4_ExchangeRegisters_t __L4_ExchangeRegisters;
+
+L4_INLINE L4_ThreadId_t L4_ExchangeRegisters(
+	L4_ThreadId_t dest,
+	L4_Word_t control,
+	L4_Word_t sp,
+	L4_Word_t ip,
+	L4_Word_t flags,
+	L4_Word_t UserDefHandle,
+	L4_ThreadId_t pager,
+	L4_Word_t *old_control,
+	L4_Word_t *old_sp,
+	L4_Word_t *old_ip,
+	L4_Word_t *old_flags,
+	L4_Word_t *old_UserDefHandle,
+	L4_ThreadId_t *old_pager
+	)
+{
+    register L4_Word_t r3 asm("r3") = dest.raw;
+
+    struct {
+	L4_Word_t control;
+	L4_Word_t sp;
+	L4_Word_t ip;
+	L4_Word_t flags;
+	L4_Word_t handle;
+	L4_Word_t pager;
+    } inputs;
+
+    inputs.control = control;
+    inputs.sp = sp;
+    inputs.ip = ip;
+    inputs.flags = flags;
+    inputs.handle = UserDefHandle;
+    inputs.pager = pager.raw;
+
+    __asm__ __volatile__ (
+	    "lwz %%r4, (0*4)(%2) ;"
+	    "lwz %%r5, (1*4)(%2) ;"
+	    "lwz %%r6, (2*4)(%2) ;"
+	    "lwz %%r7, (3*4)(%2) ;"
+	    "lwz %%r8, (4*4)(%2) ;"
+	    "lwz %%r9, (5*4)(%2) ;"
+	    "mtctr %1 ;"
+	    "bctrl ;"
+	    "stw %%r4, (0*4)(%2) ;"
+	    "stw %%r5, (1*4)(%2) ;"
+	    "stw %%r6, (2*4)(%2) ;"
+	    "stw %%r7, (3*4)(%2) ;"
+	    "stw %%r8, (4*4)(%2) ;"
+	    "stw %%r9, (5*4)(%2) ;"
+	    : /* outputs */
+	      "+r" (r3)
+	    : /* inputs */
+	      "r" (__L4_ExchangeRegisters), "r" (&inputs)
+	    : /* clobbers */
+	      "r4", "r5", "r6", "r7", "r8", "r9", "r10",
+	      __L4_PPC_CLOBBER_REGS, "memory", __L4_PPC_CLOBBER_CR_REGS
+	    );
+
+    *old_control = inputs.control;
+    *old_sp = inputs.sp;
+    *old_ip = inputs.ip;
+    *old_flags = inputs.flags;
+    *old_UserDefHandle = inputs.handle;
+    old_pager->raw = inputs.pager;
+
+    return (L4_ThreadId_t) {raw: r3};
+}
+
+typedef L4_Word_t (*__L4_ThreadControl_t)( L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t );
+extern __L4_ThreadControl_t __L4_ThreadControl;
+
+L4_INLINE L4_Word_t L4_ThreadControl(
+	L4_ThreadId_t dest,
+	L4_ThreadId_t SpaceSpecifier,
+	L4_ThreadId_t Scheduler,
+	L4_ThreadId_t Pager,
+	void * UtcbLocation)
+{
+    register L4_Word_t r3 asm("r3") = dest.raw;
+    register L4_Word_t r4 asm("r4") = SpaceSpecifier.raw;
+    register L4_Word_t r5 asm("r5") = Scheduler.raw;
+    register L4_Word_t r6 asm("r6") = Pager.raw;
+    register void *    r7 asm("r7") = UtcbLocation;
+
+    __asm__ __volatile__ (
+	    "mtctr %5 ;"
+	    "bctrl ;"
+	    : /* outputs */
+	    "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6), "+r" (r7)
+	    : /* inputs */
+	    "r" (__L4_ThreadControl)
+	    : /* clobbers */
+	    "r8", "r9", "r10",
+	      __L4_PPC_CLOBBER_REGS, "memory", __L4_PPC_CLOBBER_CR_REGS
+	    );
+
+    return r3;
+}
+
+typedef L4_Word_t (*__L4_ThreadSwitch_t)( L4_Word_t );
+extern __L4_ThreadSwitch_t __L4_ThreadSwitch;
+
+L4_INLINE void L4_ThreadSwitch( L4_ThreadId_t dest )
+{
+    register L4_Word_t r3 asm("r3") = dest.raw;
+    
+    __asm__ __volatile__ (
+	    "mtctr %1 ;"
+	    "bctrl ;"
+	    : /* outputs */
+	      "+r" (r3)
+	    : /* inputs */
+	      "r" (__L4_ThreadSwitch)
+	    : /* clobbers */
+	      "r4", "r5", "r6", "r7", "r8", "r9", "r10",
+	      __L4_PPC_CLOBBER_REGS, "memory", __L4_PPC_CLOBBER_CR_REGS
+	    );
+}
+
+typedef __L4_Return_t (*__L4_Schedule_t)( L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t );
+extern __L4_Schedule_t __L4_Schedule;
+
+L4_INLINE L4_Word_t  L4_Schedule(
+	L4_ThreadId_t dest,
+	L4_Word_t TimeControl,
+	L4_Word_t ProcessorControl,
+	L4_Word_t prio,
+	L4_Word_t PreemptionControl,
+	L4_Word_t * old_TimeControl
+	)
+{
+    register L4_Word_t r3 asm("r3") = dest.raw;
+    register L4_Word_t r4 asm("r4") = TimeControl;
+    register L4_Word_t r5 asm("r5") = ProcessorControl;
+    register L4_Word_t r6 asm("r6") = prio;
+    register L4_Word_t r7 asm("r7") = PreemptionControl;
+    
+    __asm__ __volatile__ (
+	    "mtctr %2 ;"
+	    "bctrl ;"
+	    : /* outputs */
+	      "+r" (r3), "+r" (r4)
+	    : /* inputs */
+	      "r" (__L4_Schedule), "r" (r5), "r" (r6), "r" (r7)
+	    : /* clobbers */
+	      "r8", "r9", "r10",
+	      __L4_PPC_CLOBBER_REGS, "memory", __L4_PPC_CLOBBER_CR_REGS
+	    );
+
+    *old_TimeControl = r4;
+    return r3;
+}
+
+typedef L4_Word_t (*__L4_Ipc_t)( L4_Word_t, L4_Word_t, L4_Word_t );
+extern __L4_Ipc_t __L4_Ipc;
+
+L4_INLINE L4_MsgTag_t L4_Ipc(
+	L4_ThreadId_t to,
+	L4_ThreadId_t FromSpecifier,
+	L4_Word_t Timeouts,
+	L4_ThreadId_t *from
+	)
+{
+    register L4_Word_t r15 asm("r15") = to.raw;
+    register L4_Word_t r16 asm("r16") = FromSpecifier.raw;
+    register L4_Word_t r17 asm("r17") = Timeouts;
+
+    asm volatile (
+	    "lwz %%r0, 36 (%%r2) ;"
+	    "lwz %%r3, 4  (%%r2) ;"
+	    "lwz %%r4, 8  (%%r2) ;"
+	    "lwz %%r5, 12 (%%r2) ;"
+	    "lwz %%r6, 16 (%%r2) ;"
+	    "lwz %%r7, 20 (%%r2) ;"
+	    "lwz %%r8, 24 (%%r2) ;"
+	    "lwz %%r9, 28 (%%r2) ;"
+	    "lwz %%r10, 32 (%%r2) ;"
+	    "lwz %%r14, 0 (%%r2) ;"
+
+	    "mtctr %3 ;"
+	    "bctrl ;"
+
+	    "stw %%r0, 36 (%%r2) ;"
+	    "stw %%r3, 4  (%%r2) ;"
+	    "stw %%r4, 8  (%%r2) ;"
+	    "stw %%r5, 12 (%%r2) ;"
+	    "stw %%r6, 16 (%%r2) ;"
+	    "stw %%r7, 20 (%%r2) ;"
+	    "stw %%r8, 24 (%%r2) ;"
+	    "stw %%r9, 28 (%%r2) ;"
+	    "stw %%r10, 32 (%%r2) ;"
+	    "stw %%r14, 0 (%%r2) ;"
+
+	    : /* outputs */
+	      "+r" (r15), "+r" (r16), "+r" (r17)
+	    : /* inputs */
+	      "r" (__L4_Ipc)
+	    : /* clobbers */
+	      "r0", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11",
+	      "r12", "r13", "r14",
+	      "r18", "r19", "r20", "r21", "r22", "r23", "r24", "r25", 
+	      "r26", "r27", "r28", "r29", "lr", "ctr",
+	      "memory", __L4_PPC_CLOBBER_CR_REGS
+	    );
+
+    if( !L4_IsNilThread(FromSpecifier) && from ) {
+	from->raw = r16;
+    }
+
+    return (L4_MsgTag_t){ raw: __L4_PPC_Utcb()[0] };	/* mr0 */
+}
+
+typedef L4_Word_t (*__L4_Lipc_t)( L4_Word_t, L4_Word_t, L4_Word_t );
+extern __L4_Lipc_t __L4_Lipc;
+
+L4_INLINE L4_MsgTag_t L4_Lipc(
+	L4_ThreadId_t to,
+	L4_ThreadId_t FromSpecifier,
+	L4_Word_t Timeouts,
+	L4_ThreadId_t *from
+	)
+{
+    register L4_Word_t r15 asm("r15") = to.raw;
+    register L4_Word_t r16 asm("r16") = FromSpecifier.raw;
+    register L4_Word_t r17 asm("r17") = Timeouts;
+
+    asm volatile (
+	    "lwz %%r0, 36 (%%r2) ;"
+	    "lwz %%r3, 4  (%%r2) ;"
+	    "lwz %%r4, 8  (%%r2) ;"
+	    "lwz %%r5, 12 (%%r2) ;"
+	    "lwz %%r6, 16 (%%r2) ;"
+	    "lwz %%r7, 20 (%%r2) ;"
+	    "lwz %%r8, 24 (%%r2) ;"
+	    "lwz %%r9, 28 (%%r2) ;"
+	    "lwz %%r10, 32 (%%r2) ;"
+	    "lwz %%r14, 0 (%%r2) ;"
+
+	    "mtctr %3 ;"
+	    "bctrl ;"
+
+	    "stw %%r0, 36 (%%r2) ;"
+	    "stw %%r3, 4  (%%r2) ;"
+	    "stw %%r4, 8  (%%r2) ;"
+	    "stw %%r5, 12 (%%r2) ;"
+	    "stw %%r6, 16 (%%r2) ;"
+	    "stw %%r7, 20 (%%r2) ;"
+	    "stw %%r8, 24 (%%r2) ;"
+	    "stw %%r9, 28 (%%r2) ;"
+	    "stw %%r10, 32 (%%r2) ;"
+	    "stw %%r14, 0 (%%r2) ;"
+
+	    : /* outputs */
+	      "+r" (r15), "+r" (r16), "+r" (r17)
+	    : /* inputs */
+	      "r" (__L4_Lipc)
+	    : /* clobbers */
+	      "r0", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11",
+	      "r12", "r13", "r14",
+	      "r18", "r19", "r20", "r21", "r22", "r23", "r24", "r25", 
+	      "r26", "r27", "r28", "r29", "lr", "ctr",
+	      "memory", __L4_PPC_CLOBBER_CR_REGS
+	    );
+
+    if( !L4_IsNilThread(FromSpecifier) ) {
+	from->raw = r16;
+    }
+
+   return (L4_MsgTag_t){ raw: __L4_PPC_Utcb()[0] };	/* mr0 */
+}
+
+typedef void (*__L4_Unmap_t)( L4_Word_t );
+extern __L4_Unmap_t __L4_Unmap;
+
+L4_INLINE void L4_Unmap( L4_Word_t control )
+{
+    register L4_Word_t r15 asm("r15") = control;
+
+    asm volatile (
+	    "lwz %%r0, 36 (%%r2) ;"
+	    "lwz %%r3, 4  (%%r2) ;"
+	    "lwz %%r4, 8  (%%r2) ;"
+	    "lwz %%r5, 12 (%%r2) ;"
+	    "lwz %%r6, 16 (%%r2) ;"
+	    "lwz %%r7, 20 (%%r2) ;"
+	    "lwz %%r8, 24 (%%r2) ;"
+	    "lwz %%r9, 28 (%%r2) ;"
+	    "lwz %%r10, 32 (%%r2) ;"
+	    "lwz %%r14, 0 (%%r2) ;"
+
+	    "mtctr %0 ;"
+	    "bctrl ;"
+
+	    "stw %%r0, 36 (%%r2) ;"
+	    "stw %%r3, 4  (%%r2) ;"
+	    "stw %%r4, 8  (%%r2) ;"
+	    "stw %%r5, 12 (%%r2) ;"
+	    "stw %%r6, 16 (%%r2) ;"
+	    "stw %%r7, 20 (%%r2) ;"
+	    "stw %%r8, 24 (%%r2) ;"
+	    "stw %%r9, 28 (%%r2) ;"
+	    "stw %%r10, 32 (%%r2) ;"
+	    "stw %%r14, 0 (%%r2) ;"
+
+	    : /* outputs */
+	    : /* inputs */
+	      "r" (__L4_Unmap), "r" (r15)
+	    : /* clobbers */
+	      "r0", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10",
+	      __L4_PPC_CLOBBER_REGS, "memory", __L4_PPC_CLOBBER_CR_REGS
+	    );
+}
+
+typedef __L4_Return_t (*__L4_SpaceControl_t)( L4_Word_t, L4_Word_t, L4_Word_t,
+	L4_Word_t, L4_Word_t );
+extern __L4_SpaceControl_t __L4_SpaceControl;
+
+L4_INLINE L4_Word_t L4_SpaceControl(
+	L4_ThreadId_t SpaceSpecifier,
+	L4_Word_t control,
+	L4_Fpage_t KernelInterfacePageArea,
+	L4_Fpage_t UtcbArea,
+	L4_ThreadId_t redirector,
+	L4_Word_t *old_control
+	)
+{
+    register L4_Word_t r3 asm("r3") = SpaceSpecifier.raw;
+    register L4_Word_t r4 asm("r4") = control;
+    register L4_Word_t r5 asm("r5") = KernelInterfacePageArea.raw;
+    register L4_Word_t r6 asm("r6") = UtcbArea.raw;
+    register L4_Word_t r7 asm("r7") = redirector.raw;
+
+    __asm__ __volatile__ (
+	    "mtctr %5 ;"
+	    "bctrl ;"
+	    : /* outputs */
+	      "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6), "+r" (r7)
+	    : /* inputs */
+	      "r" (__L4_SpaceControl)
+	    : /* clobbers */
+	      "r8", "r9", "r10",
+	      __L4_PPC_CLOBBER_REGS, "memory", __L4_PPC_CLOBBER_CR_REGS
+	    );
+
+    *old_control = r4;
+    return r3;
+}
+
+typedef L4_Word_t (*__L4_ProcessorControl_t)( L4_Word_t,  L4_Word_t,
+	L4_Word_t, L4_Word_t );
+extern __L4_ProcessorControl_t __L4_ProcessorControl;
+
+L4_INLINE L4_Word_t L4_ProcessorControl(
+	L4_Word_t ProcessorNo,
+	L4_Word_t InternalFrequency,
+	L4_Word_t ExternalFrequency,
+	L4_Word_t voltage
+	)
+{
+    register L4_Word_t r3 asm("r3") = ProcessorNo;
+    register L4_Word_t r4 asm("r4") = InternalFrequency;
+    register L4_Word_t r5 asm("r5") = ExternalFrequency;
+    register L4_Word_t r6 asm("r6") = voltage;
+
+    __asm__ __volatile__ (
+	    "mtctr %4 ;"
+	    "bctrl ;"
+	    : /* outputs */
+	      "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6)
+	    : /* inputs */
+	      "r" (__L4_ProcessorControl)
+	    : /* clobbers */
+	      "r7", "r8", "r9", "r10",
+	      __L4_PPC_CLOBBER_REGS, "memory", __L4_PPC_CLOBBER_CR_REGS
+	    );
+
+    return r3;
+}
+
+typedef L4_Word_t (*__L4_MemoryControl_t)( L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t );
+extern __L4_MemoryControl_t __L4_MemoryControl;
+
+L4_INLINE L4_Word_t L4_MemoryControl(
+	L4_Word_t control,
+	const L4_Word_t attributes[4]
+	)
+{
+    register L4_Word_t r15 asm("r15") = control;
+    register L4_Word_t r16 asm("r16") = attributes[0];
+    register L4_Word_t r17 asm("r17") = attributes[1];
+    register L4_Word_t r18 asm("r18") = attributes[2];
+    register L4_Word_t r19 asm("r19") = attributes[3];
+    register L4_Word_t r3 asm("r3");
+
+    asm volatile (
+	    "lwz %%r0, 36 (%%r2) ;"
+	    "lwz %%r3, 4  (%%r2) ;"
+	    "lwz %%r4, 8  (%%r2) ;"
+	    "lwz %%r5, 12 (%%r2) ;"
+	    "lwz %%r6, 16 (%%r2) ;"
+	    "lwz %%r7, 20 (%%r2) ;"
+	    "lwz %%r8, 24 (%%r2) ;"
+	    "lwz %%r9, 28 (%%r2) ;"
+	    "lwz %%r10, 32 (%%r2) ;"
+	    "lwz %%r14, 0 (%%r2) ;"
+
+	    "mtctr %1 ;"
+	    "bctrl ;"
+	    : /* outputs */
+	      "=r" (r3)
+	    : /* inputs */
+	      "r" (__L4_MemoryControl), "r" (r15), "r" (r16), "r" (r17),
+	      "r" (r18), "r" (r19)
+	    : /* clobbers */
+	      "r0", "r4", "r5", "r6", "r7", "r8", "r9", "r10",
+	      __L4_PPC_CLOBBER_REGS, "memory", __L4_PPC_CLOBBER_CR_REGS
+	    );
+
+    return r3;
+}
+
+#endif	/* __L4__POWERPC__SYSCALLS_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc/types.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc/types.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc/types.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc/types.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,47 @@
+/****************************************************************************
+ *
+ * Copyright (C) 2002-2003, Karlsruhe University
+ *
+ * File path:	l4/powerpc/types.h
+ * Description:	PowerPC types.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $Id: types.h,v 1.6 2003/09/24 19:06:25 skoglund Exp $
+ *
+ ***************************************************************************/
+#ifndef __L4__POWERPC__TYPES_H__
+#define __L4__POWERPC__TYPES_H__
+
+#define L4_32BIT
+#undef  L4_64BIT
+#define L4_BIG_ENDIAN
+
+typedef unsigned long long      L4_Word64_t;
+typedef unsigned int		L4_Word32_t;
+typedef unsigned short		L4_Word16_t;
+typedef unsigned char		L4_Word8_t;
+
+typedef unsigned long		L4_Word_t;
+typedef unsigned int		L4_Size_t;
+
+#endif	/* __L4__POWERPC__TYPES_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc/vregs.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc/vregs.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc/vregs.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc/vregs.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,269 @@
+/****************************************************************************
+ *
+ * Copyright (C) 2002-2003, Karlsruhe University
+ *
+ * File path:	l4/powerpc/vregs.h
+ * Description:	PowerPC virtual registers.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $Id: vregs.h,v 1.8 2003/10/27 16:21:33 joshua Exp $
+ *
+ ***************************************************************************/
+#ifndef __L4__POWERPC__VREGS_H__
+#define __L4__POWERPC__VREGS_H__
+
+L4_INLINE L4_Word_t *__L4_PPC_Utcb( void ) __attribute__ ((const));
+
+L4_INLINE L4_Word_t *__L4_PPC_Utcb( void )
+{
+#if 0
+    extern L4_Word_t *_l4_utcb;
+    return _l4_utcb;
+#else
+    L4_Word_t *utcb;
+
+    __asm__ __volatile__ ( "mr %0, %%r2" : "=r" (utcb) );
+
+    return utcb;
+#endif
+}
+
+
+#define __L4_NUM_MRS	64
+#define __L4_NUM_BRS	33
+
+/*
+ * Location of TCRs within UTCB.
+ */
+
+#define __L4_TCR_THREAD_WORD_0			(-4)
+#define __L4_TCR_THREAD_WORD_1			(-5)
+#define __L4_TCR_VIRTUAL_ACTUAL_SENDER		(-6)
+#define __L4_TCR_INTENDED_RECEIVER		(-7)
+#define __L4_TCR_XFER_TIMEOUT			(-8)
+#define __L4_TCR_ERROR_CODE			(-9)
+#define __L4_TCR_PREEMPT_FLAGS			(-10)
+#define __L4_TCR_COP_FLAGS			(-10)
+#define __L4_TCR_EXCEPTION_HANDLER		(-11)
+#define __L4_TCR_PAGER				(-12)
+#define __L4_TCR_USER_DEFINED_HANDLE		(-13)
+#define __L4_TCR_PROCESSOR_NO			(-14)
+#define __L4_TCR_MY_GLOBAL_ID			(-15)
+
+
+
+/*
+ * Thread Control Registers.
+ */
+
+L4_INLINE L4_Word_t __L4_TCR_MyGlobalId( void )
+{
+    return (__L4_PPC_Utcb())[ __L4_TCR_MY_GLOBAL_ID ];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ProcessorNo( void )
+{
+    return (__L4_PPC_Utcb())[ __L4_TCR_PROCESSOR_NO ];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_UserDefinedHandle( void )
+{
+    return (__L4_PPC_Utcb())[ __L4_TCR_USER_DEFINED_HANDLE ];
+}
+
+L4_INLINE void __L4_TCR_Set_UserDefinedHandle( L4_Word_t w )
+{
+    (__L4_PPC_Utcb())[ __L4_TCR_USER_DEFINED_HANDLE ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_Pager( void )
+{
+    return (__L4_PPC_Utcb())[ __L4_TCR_PAGER ];
+}
+
+L4_INLINE void __L4_TCR_Set_Pager( L4_Word_t w )
+{
+    (__L4_PPC_Utcb())[ __L4_TCR_PAGER ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ExceptionHandler( void )
+{
+    return (__L4_PPC_Utcb())[ __L4_TCR_EXCEPTION_HANDLER ];
+}
+
+L4_INLINE void __L4_TCR_Set_ExceptionHandler( L4_Word_t w )
+{
+    (__L4_PPC_Utcb())[ __L4_TCR_EXCEPTION_HANDLER ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ErrorCode( void )
+{
+    return (__L4_PPC_Utcb())[ __L4_TCR_ERROR_CODE ];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_XferTimeout( void )
+{
+    return (__L4_PPC_Utcb())[ __L4_TCR_XFER_TIMEOUT ];
+}
+
+L4_INLINE void __L4_TCR_Set_XferTimeout( L4_Word_t w )
+{
+    (__L4_PPC_Utcb())[ __L4_TCR_XFER_TIMEOUT ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_IntendedReceiver( void )
+{
+    return (__L4_PPC_Utcb())[ __L4_TCR_INTENDED_RECEIVER ];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ActualSender( void )
+{
+    return (__L4_PPC_Utcb())[ __L4_TCR_VIRTUAL_ACTUAL_SENDER ];
+}
+
+L4_INLINE void __L4_TCR_Set_VirtualSender( L4_Word_t w )
+{
+    (__L4_PPC_Utcb())[ __L4_TCR_VIRTUAL_ACTUAL_SENDER ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ThreadWord (L4_Word_t n)
+{
+    return (__L4_PPC_Utcb ())[__L4_TCR_THREAD_WORD_0 - (int) n];
+}
+
+L4_INLINE void __L4_TCR_Set_ThreadWord (L4_Word_t n, L4_Word_t w)
+{
+    (__L4_PPC_Utcb ())[__L4_TCR_THREAD_WORD_0 - (int) n] = w;
+}
+
+L4_INLINE void L4_Set_CopFlag( L4_Word_t n )
+{
+    (__L4_PPC_Utcb())[ __L4_TCR_COP_FLAGS ] |= (1 << (8 + n));
+}
+
+L4_INLINE void L4_Clr_CopFlag( L4_Word_t n )
+{
+    (__L4_PPC_Utcb())[ __L4_TCR_COP_FLAGS ] &= ~(1 << (8 + n));
+}
+
+L4_INLINE L4_Bool_t L4_EnablePreemptionFaultException( void )
+{
+    L4_Bool_t old = ((__L4_PPC_Utcb())[ __L4_TCR_PREEMPT_FLAGS ] >> 5) & 1;
+    (__L4_PPC_Utcb())[ __L4_TCR_PREEMPT_FLAGS ] |= (1 << 5);
+    return old;
+}
+
+L4_INLINE L4_Bool_t L4_DisablePreemptionFaultException( void )
+{
+    L4_Bool_t old = ((__L4_PPC_Utcb())[ __L4_TCR_PREEMPT_FLAGS ] >> 5) & 1;
+    (__L4_PPC_Utcb())[ __L4_TCR_PREEMPT_FLAGS ] &= ~(1 << 5);
+    return old;
+}
+
+L4_INLINE L4_Bool_t L4_EnablePreemption( void )
+{
+    L4_Bool_t old = ((__L4_PPC_Utcb())[ __L4_TCR_PREEMPT_FLAGS ] >> 6) & 1;
+    (__L4_PPC_Utcb())[ __L4_TCR_PREEMPT_FLAGS ] |= (1 << 6);
+    return old;
+}
+
+L4_INLINE L4_Bool_t L4_DisablePreemption( void )
+{
+    L4_Bool_t old = ((__L4_PPC_Utcb())[ __L4_TCR_PREEMPT_FLAGS ] >> 6) & 1;
+    (__L4_PPC_Utcb())[ __L4_TCR_PREEMPT_FLAGS ] &= ~(1 << 6);
+    return old;
+}
+
+L4_INLINE L4_Bool_t L4_PreemptionPending( void )
+{
+    L4_Bool_t retval = (((__L4_PPC_Utcb())[ __L4_TCR_PREEMPT_FLAGS ]) >> 7) & 1;
+    return retval;
+}
+
+
+
+/*
+ * Message Registers.
+ */
+
+L4_INLINE void L4_StoreMR( int i, L4_Word_t * w )
+{
+    *w = (__L4_PPC_Utcb())[ i ];
+}
+
+L4_INLINE void L4_LoadMR( int i, L4_Word_t w )
+{
+    (__L4_PPC_Utcb())[ i ] = w;
+}
+
+L4_INLINE void L4_StoreMRs( int i, int k, L4_Word_t * w )
+{
+    L4_Word_t * mr = __L4_PPC_Utcb() + i;
+
+    while( k-- > 0 )
+	*w++ = *mr++;
+}
+
+L4_INLINE void L4_LoadMRs( int i, int k, L4_Word_t * w )
+{
+    L4_Word_t * mr = __L4_PPC_Utcb() + i;
+
+    while( k-- > 0 )
+	*mr++ = *w++;
+}
+
+
+
+/*
+ * Buffer Registers.
+ */
+
+L4_INLINE void L4_StoreBR( int i, L4_Word_t * w )
+{
+    *w = (__L4_PPC_Utcb())[ -16 - i ];
+}
+
+L4_INLINE void L4_LoadBR( int i, L4_Word_t w )
+{
+    (__L4_PPC_Utcb())[ -16 - i ] = w;
+}
+
+L4_INLINE void L4_StoreBRs( int i, int k, L4_Word_t * w )
+{
+    L4_Word_t * br = (__L4_PPC_Utcb()) - 16 - i;
+
+    while( k-- > 0 )
+	*w++ = *br--;
+}
+
+L4_INLINE void L4_LoadBRs( int i, int k, L4_Word_t * w )
+{
+    L4_Word_t * br = (__L4_PPC_Utcb()) - 16 - i;
+
+    while( k-- > 0 )
+	*br-- = *w++;
+}
+
+
+#endif	/* __L4__POWERPC__VREGS_H__ */
+
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/asm.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/asm.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/asm.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/asm.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.139
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/=id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/=id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/=id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/=id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:55:13 2004 7603.0
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/kdebug.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/kdebug.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/kdebug.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/kdebug.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.140
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/specials.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/specials.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/specials.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/specials.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.141
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/syscalls.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/syscalls.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/syscalls.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/syscalls.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.142
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/types.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/types.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/types.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/types.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.143
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/vregs.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/vregs.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/vregs.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc64/.arch-ids/vregs.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.144
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc64/asm.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc64/asm.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc64/asm.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc64/asm.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,77 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2002,  University of New South Wales
+ *                
+ * File path:     arch/powerpc64/asm.h
+ * Created:       23/07/2002 17:48:20 by Simon Winwood (sjw)
+ * Description:   Assembler macros etc. 
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: asm.h,v 1.3 2003/10/17 01:48:55 cvansch Exp $
+ *                
+ ********************************************************************/
+
+#ifndef __L4__POWERPC64__ASM_H__
+#define __L4__POWERPC64__ASM_H__
+
+#define BEGIN_PROC(name)			\
+    .global name;				\
+    .align 3;					\
+    .func name;					\
+name:
+
+#define END_PROC(name)				\
+    .endfunc
+
+/*
+ * LD_ADDR ( reg, symbol )
+ *   loads the address of symbol into reg
+ */
+#define	LD_ADDR(reg, symbol)		\
+    lis	    reg, symbol##@highest;	\
+    ori	    reg, reg, symbol##@higher;	\
+    rldicr  reg, reg, 32,31;		\
+    oris    reg, reg, symbol##@h;	\
+    ori	    reg, reg, symbol##@l
+
+#define LD_CONST(reg, value)			\
+    lis	    reg,(((value)>>48)&0xFFFF);		\
+    ori     reg,reg,(((value)>>32)&0xFFFF);	\
+    rldicr  reg,reg,32,31;			\
+    oris    reg,reg,(((value)>>16)&0xFFFF);	\
+    ori     reg,reg,((value)&0xFFFF);
+
+#define LD_LABEL(reg, label)		\
+    lis     reg,(label)@highest;        \
+    ori     reg,reg,(label)@higher;     \
+    rldicr  reg,reg,32,31;              \
+    oris    reg,reg,(label)@h;          \
+    ori     reg,reg,(label)@l;
+/*
+ * Register names
+ */
+#define	sp	%r1
+#define	toc	%r2
+#define	utcb	%r13
+
+#endif /* __L4__POWERPC64__ASM_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc64/kdebug.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc64/kdebug.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc64/kdebug.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc64/kdebug.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,99 @@
+/****************************************************************************
+ *
+ * Copyright (C) 2003, University of New South Wales
+ *
+ * File path:	l4/powerpc64/kdebug.h
+ * Description:	L4 Kdebug interface for PowerPC64
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $Id: kdebug.h,v 1.4 2004/04/07 03:25:38 cvansch Exp $
+ *
+ ***************************************************************************/
+#ifndef __L4__POWERPC64__KDEBUG_H__
+#define __L4__POWERPC64__KDEBUG_H__
+
+
+#define __L4_TRAP64_MAGIC	    (0x4c345f5050433634ul)  /* "L4_PPC64" */
+#define __L4_TRAP64_KDEBUG	    (__L4_TRAP64_MAGIC + 0)
+#define __L4_TRAP64_KPUTC	    (__L4_TRAP64_MAGIC + 1)
+#define __L4_TRAP64_KGETC	    (__L4_TRAP64_MAGIC + 2)
+#define __L4_TRAP64_KGETC_NB	    (__L4_TRAP64_MAGIC + 3)
+#define __L4_TRAP64_KSET_THRD_NAME  (__L4_TRAP64_MAGIC + 5)
+
+#define L4_KDB_Enter(str...)					\
+{								\
+    register L4_Word_t call asm("r0") = __L4_TRAP64_KDEBUG;	\
+    asm volatile (						\
+	"trap ;"						\
+	"b 1f ;"						\
+	".string	\"KD# " str "\";"			\
+	".align 2 ;"						\
+	"1:" 							\
+	:: "r" (call)						\
+    );								\
+}
+
+
+#define __L4_KDB_Op_Arg(op, name, argtype)	\
+L4_INLINE void L4_KDB_##name (argtype arg)	\
+{						\
+    register L4_Word_t call asm("r0") = op;	\
+    register L4_Word_t r_r3 asm("r3") = arg;	\
+    __asm__ __volatile__ (			\
+	    "trap ;"				\
+	    :: "r" (call), "r" (r_r3)		\
+    );						\
+}
+
+
+#define __L4_KDB_Op_Ret(op, name, rettype)	\
+L4_INLINE rettype L4_KDB_##name (void)		\
+{						\
+    register L4_Word_t call asm("r0") = op;	\
+    register rettype r_r3 asm("r3");		\
+    __asm__ __volatile__ (			\
+	    "trap ;"				\
+	    : "=r" (r_r3) : "r" (call)		\
+    );						\
+    return r_r3;				\
+}
+
+__L4_KDB_Op_Ret( __L4_TRAP64_KGETC, ReadChar_Blocked, char );
+__L4_KDB_Op_Ret( __L4_TRAP64_KGETC_NB, ReadChar, char );
+__L4_KDB_Op_Arg( __L4_TRAP64_KPUTC, PrintChar, char );
+
+L4_INLINE void
+L4_KDB_SetThreadName(L4_ThreadId_t tid, const char *name)
+{
+    L4_Word_t *name_p = (L4_Word_t*) name;
+    register L4_Word_t r_tid	asm("r3") = tid.raw;
+    register L4_Word_t first	asm("r4") = name_p[0];
+    register L4_Word_t call	asm("r0") = __L4_TRAP64_KSET_THRD_NAME;
+
+    __asm__ __volatile__ (
+	"trap			\n"
+	:: "r" (call), "r" (r_tid), "r" (first)
+    );
+}
+
+#endif	/* __L4__POWERPC64__KDEBUG_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc64/specials.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc64/specials.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc64/specials.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc64/specials.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,55 @@
+/****************************************************************************
+ *
+ * Copyright (C) 2002-2003, Karlsruhe University
+ *
+ * File path:	l4/powerpc/specials.h
+ * Description:	PowerPC specific functions and defines.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $Id: specials.h,v 1.2 2003/09/24 19:06:26 skoglund Exp $
+ *
+ ***************************************************************************/
+#ifndef __L4__POWERPC__SPECIALS_H__
+#define __L4__POWERPC__SPECIALS_H__
+
+L4_INLINE int __L4_Msb( L4_Word_t w ) __attribute__ ((const));
+
+L4_INLINE int __L4_Msb( L4_Word_t w )
+{
+    int zeros;
+
+    asm volatile ("cntlzd %0, %1\n" : "=r" (zeros) : "r" (w) );
+
+    return (zeros == 64) ? zeros : 63-zeros;
+}
+
+#if defined(__l4_cplusplus)
+L4_INLINE L4_Fpage_t L4_Fpage (L4_Fpage_t f)
+{
+        L4_Fpage_t out;
+	    out.raw = f.raw;
+	        return out;
+}
+#endif
+
+#endif	/* __L4__POWERPC__SPECIALS_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc64/syscalls.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc64/syscalls.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc64/syscalls.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc64/syscalls.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,545 @@
+/****************************************************************************
+ *
+ * Copyright (C) 2003, University of New South Wales
+ *
+ * File path:	l4/powerpc64/syscalls.h
+ * Description:	PowerPC64 system call implementations.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $Id: syscalls.h,v 1.7 2004/08/23 18:43:16 skoglund Exp $
+ *
+ ***************************************************************************/
+#ifndef __L4__POWERPC64__SYSCALLS_H__
+#define __L4__POWERPC64__SYSCALLS_H__
+
+#include <l4/types.h>
+#include <l4/message.h>
+
+#define __L4_PPC64_CLOBBER_REGS						\
+		"r0",  "r11", "r12", "r14", "r15", "r16", "r17",	\
+		"r18", "r19", "r20", "r21", "r22", "r23", "r24",	\
+		"r25", "r26", "r27", "r28", "r29", "lr", "ctr"
+#if (__GNUC__ >= 3)
+#define __L4_PPC64_CLOBBER_CR_REGS					\
+		"cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6",	\
+		"cr7", "xer"
+#else
+#define __L4_PPC64_CLOBBER_CR_REGS					\
+		"cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7"
+#endif
+
+L4_INLINE void * L4_KernelInterface(
+	L4_Word_t *ApiVersion,
+	L4_Word_t *ApiFlags,
+	L4_Word_t *KernelId
+	)
+{
+    register void * base_address asm("r3");
+    register L4_Word_t api_version asm("r4");
+    register L4_Word_t api_flags asm("r5");
+    register L4_Word_t kernel_id asm("r6");
+
+    __asm__ __volatile__ (
+	"tlbia ;"
+	: /* ouputs */
+	 "=r" (base_address), "=r" (api_version),
+	 "=r" (api_flags), "=r" (kernel_id)
+	: /* inputs */
+    );
+
+    if( ApiVersion ) *ApiVersion = api_version;
+    if( ApiFlags ) *ApiFlags = api_flags;
+    if( KernelId ) *KernelId = kernel_id;
+
+    return base_address;
+}
+
+typedef L4_Word_t (*__L4_ExchangeRegisters_t)( L4_Word_t, L4_Word_t, L4_Word_t,
+	L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t );
+extern __L4_ExchangeRegisters_t __L4_ExchangeRegisters;
+
+L4_INLINE L4_ThreadId_t L4_ExchangeRegisters(
+	L4_ThreadId_t dest,
+	L4_Word_t control,
+	L4_Word_t sp,
+	L4_Word_t ip,
+	L4_Word_t flags,
+	L4_Word_t UserDefHandle,
+	L4_ThreadId_t pager,
+	L4_Word_t *old_control,
+	L4_Word_t *old_sp,
+	L4_Word_t *old_ip,
+	L4_Word_t *old_flags,
+	L4_Word_t *old_UserDefHandle,
+	L4_ThreadId_t *old_pager
+	)
+{
+    register L4_Word_t r3 asm("r3") = dest.raw;
+    register L4_Word_t r4 asm("r4") = control;
+    register L4_Word_t r5 asm("r5") = sp;
+    register L4_Word_t r6 asm("r6") = ip;
+    register L4_Word_t r7 asm("r7") = flags;
+    register L4_Word_t r8 asm("r8") = UserDefHandle;
+    register L4_Word_t r9 asm("r9") = pager.raw;
+    register L4_Word_t r10 asm("r10") = 0; // -- is_local ??
+
+    __asm__ __volatile__ (
+	"mtctr  %[sys];"
+	"bctrl ;"
+	: /* outputs */
+	 "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6),
+	 "+r" (r7), "+r" (r8), "+r" (r9), "+r" (r10)
+	: /* inputs */
+	 [sys] "r" (__L4_ExchangeRegisters)
+	: /* clobbers */
+	 __L4_PPC64_CLOBBER_REGS, "memory", __L4_PPC64_CLOBBER_CR_REGS
+    );
+
+    *old_control = r4;
+    *old_sp = r5;
+    *old_ip = r6;
+    *old_flags = r7;
+    *old_UserDefHandle = r8;
+    old_pager->raw = r9;
+
+    return (L4_ThreadId_t) {raw: r3};
+}
+
+typedef L4_Word_t (*__L4_ThreadControl_t)( L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t );
+extern __L4_ThreadControl_t __L4_ThreadControl;
+
+L4_INLINE L4_Word_t L4_ThreadControl(
+	L4_ThreadId_t dest,
+	L4_ThreadId_t SpaceSpecifier,
+	L4_ThreadId_t Scheduler,
+	L4_ThreadId_t Pager,
+	L4_ThreadId_t SendRedirector,
+	L4_ThreadId_t RecvRedirector,
+	void * UtcbLocation)
+{
+    register L4_Word_t r3 asm("r3") = dest.raw;
+    register L4_Word_t r4 asm("r4") = SpaceSpecifier.raw;
+    register L4_Word_t r5 asm("r5") = Scheduler.raw;
+    register L4_Word_t r6 asm("r6") = Pager.raw;
+    register L4_Word_t r7 asm("r7") = SendRedirector.raw;
+    register L4_Word_t r8 asm("r8") = RecvRedirector.raw;
+    register void *    r9 asm("r9") = UtcbLocation;
+
+    __asm__ __volatile__ (
+	"mtctr  %[sys];"
+	"bctrl;"
+	: /* outputs */
+	 "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6),
+	 "+r" (r7), "+r" (r8), "+r" (r9)
+	: /* inputs */
+	 [sys] "r" (__L4_ThreadControl)
+	: /* clobbers */
+	 "r10",
+	 __L4_PPC64_CLOBBER_REGS, "memory", __L4_PPC64_CLOBBER_CR_REGS
+    );
+
+    return r3;
+}
+
+typedef L4_Word_t (*__L4_ThreadSwitch_t)( L4_Word_t );
+extern __L4_ThreadSwitch_t __L4_ThreadSwitch;
+
+L4_INLINE void L4_ThreadSwitch( L4_ThreadId_t dest )
+{
+    register L4_Word_t r3 asm("r3") = dest.raw;
+    
+    __asm__ __volatile__ (
+	"mtctr  %[sys];"
+	"bctrl ;"
+	: /* outputs */
+	 "+r" (r3)
+	: /* inputs */
+	 [sys] "r" (__L4_ThreadSwitch)
+	: /* clobbers */
+	 "r4", "r5", "r6", "r7", "r8", "r9", "r10",
+	 __L4_PPC64_CLOBBER_REGS, "memory", __L4_PPC64_CLOBBER_CR_REGS
+    );
+}
+
+typedef L4_Word_t (*__L4_Schedule_t)( L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t );
+extern __L4_Schedule_t __L4_Schedule;
+
+L4_INLINE L4_Word_t  L4_Schedule(
+	L4_ThreadId_t dest,
+	L4_Word_t TimeControl,
+	L4_Word_t ProcessorControl,
+	L4_Word_t prio,
+	L4_Word_t PreemptionControl,
+	L4_Word_t * old_TimeControl
+	)
+{
+    register L4_Word_t r3 asm("r3") = dest.raw;
+    register L4_Word_t r4 asm("r4") = TimeControl;
+    register L4_Word_t r5 asm("r5") = ProcessorControl;
+    register L4_Word_t r6 asm("r6") = prio;
+    register L4_Word_t r7 asm("r7") = PreemptionControl;
+    
+    __asm__ __volatile__ (
+	"mtctr  %[sys];"
+	"bctrl;"
+	: /* outputs */
+	 "+r" (r3), "+r" (r4)
+	: /* inputs */
+	 [sys] "r" (__L4_Schedule), "r" (r5), "r" (r6), "r" (r7)
+	: /* clobbers */
+	 "r8", "r9", "r10",
+	 __L4_PPC64_CLOBBER_REGS, "memory", __L4_PPC64_CLOBBER_CR_REGS
+    );
+
+    *old_TimeControl = r4;
+    return r3;
+}
+
+typedef L4_Word_t (*__L4_Ipc_t)( L4_Word_t, L4_Word_t, L4_Word_t );
+extern __L4_Ipc_t __L4_Ipc;
+
+L4_INLINE L4_MsgTag_t L4_Ipc(
+	L4_ThreadId_t to,
+	L4_ThreadId_t FromSpecifier,
+	L4_Word_t Timeouts,
+	L4_ThreadId_t *from
+	)
+{
+    register L4_Word_t r3 asm("r3") = to.raw;
+    register L4_Word_t r4 asm("r4") = FromSpecifier.raw;
+    register L4_Word_t r5 asm("r5") = Timeouts;
+
+    register L4_Word_t mr0 asm ("r14");
+    register L4_Word_t mr1 asm ("r15");
+    register L4_Word_t mr2 asm ("r16");
+    register L4_Word_t mr3 asm ("r17");
+    register L4_Word_t mr4 asm ("r18");
+    register L4_Word_t mr5 asm ("r19");
+    register L4_Word_t mr6 asm ("r20");
+    register L4_Word_t mr7 asm ("r21");
+    register L4_Word_t mr8 asm ("r22");
+    register L4_Word_t mr9 asm ("r23");
+
+    // Only load MRs if send phase is included
+    if (! L4_IsNilThread (to))
+    {
+	mr0 = (__L4_PPC64_Utcb())[__L4_TCR_MR_OFFSET + 0];
+	mr1 = (__L4_PPC64_Utcb())[__L4_TCR_MR_OFFSET + 1];
+	mr2 = (__L4_PPC64_Utcb())[__L4_TCR_MR_OFFSET + 2];
+	mr3 = (__L4_PPC64_Utcb())[__L4_TCR_MR_OFFSET + 3];
+	mr4 = (__L4_PPC64_Utcb())[__L4_TCR_MR_OFFSET + 4];
+	mr5 = (__L4_PPC64_Utcb())[__L4_TCR_MR_OFFSET + 5];
+	mr6 = (__L4_PPC64_Utcb())[__L4_TCR_MR_OFFSET + 6];
+	mr7 = (__L4_PPC64_Utcb())[__L4_TCR_MR_OFFSET + 7];
+	mr8 = (__L4_PPC64_Utcb())[__L4_TCR_MR_OFFSET + 8];
+	mr9 = (__L4_PPC64_Utcb())[__L4_TCR_MR_OFFSET + 9];
+
+	asm volatile (
+	    "" ::
+	     "r" (mr0), "r" (mr1), "r" (mr2), "r" (mr3), "r" (mr4),
+	     "r" (mr5), "r" (mr6), "r" (mr7), "r" (mr8), "r" (mr9)
+	);
+    }
+
+    asm volatile (
+	"mtctr	%[sys];"
+	"bctrl;"
+
+	: /* outputs */
+	 "+r" (r3), "+r" (r4), "+r" (r5),
+	 "=r" (mr0), "=r" (mr1), "=r" (mr2), "=r" (mr3), "=r" (mr4),
+	 "=r" (mr5), "=r" (mr6), "=r" (mr7), "=r" (mr8), "=r" (mr9)
+	: /* inputs */
+	 [sys] "r" (__L4_Ipc)
+	: /* clobbers */
+	 "r0", "ctr", "lr", "memory"
+    );
+
+    /* Trash the rest. This allows the compiler to choose which
+     * inputs to use in the asm code above
+     */
+    asm volatile (
+	"" :::
+	 "r0", "r6", "r7", "r8", "r9", "r10", "r11", "r12",
+	 "r24", "r25", "r26", "r27", "r28", "r29",
+	 __L4_PPC64_CLOBBER_CR_REGS
+    );
+
+    if( !L4_IsNilThread(FromSpecifier) ) {
+	from->raw = r3;		    /* Result is in r3 */
+
+	(__L4_PPC64_Utcb())[__L4_TCR_MR_OFFSET + 0] = mr0;
+	(__L4_PPC64_Utcb())[__L4_TCR_MR_OFFSET + 1] = mr1;
+	(__L4_PPC64_Utcb())[__L4_TCR_MR_OFFSET + 2] = mr2;
+	(__L4_PPC64_Utcb())[__L4_TCR_MR_OFFSET + 3] = mr3;
+	(__L4_PPC64_Utcb())[__L4_TCR_MR_OFFSET + 4] = mr4;
+	(__L4_PPC64_Utcb())[__L4_TCR_MR_OFFSET + 5] = mr5;
+	(__L4_PPC64_Utcb())[__L4_TCR_MR_OFFSET + 6] = mr6;
+	(__L4_PPC64_Utcb())[__L4_TCR_MR_OFFSET + 7] = mr7;
+	(__L4_PPC64_Utcb())[__L4_TCR_MR_OFFSET + 8] = mr8;
+	(__L4_PPC64_Utcb())[__L4_TCR_MR_OFFSET + 9] = mr9;
+    }
+
+    return (L4_MsgTag_t){ raw: mr0 };	/* mr0 */
+}
+
+L4_INLINE L4_MsgTag_t L4_AsynchIpc (L4_ThreadId_t to, L4_Word_t mask)
+{
+    register L4_ThreadId_t r_dest   asm ("r3") = to;
+    register L4_Word_t r_mr0	    asm ("r14") = L4_Asynchtag.raw;
+    register L4_Word_t r_mr1	    asm ("r15") = mask;
+
+    asm volatile (
+	"mtctr	%[sys];"
+	"bctrl;"
+
+	: /* outputs */
+	 "+r" (r_dest), "+r" (r_mr0), "+r" (r_mr1)
+	: /* inputs */
+	 [sys] "r" (__L4_Ipc)
+	: /* clobbers */
+	 "r0", "r4", "r5", "ctr", "lr", "memory"
+    );
+
+    /* Trash the rest. This allows the compiler to choose which
+     * inputs to use in the asm code above
+     */
+    asm volatile (
+	"" :::
+	 "r6", "r7", "r8", "r9", "r10", "r11", "r12",
+	 "r16", "r17", "r18", "r19", "r20", "r21", "r22",
+	 "r23", "r24", "r25", "r26", "r27", "r28", "r29",
+	 __L4_PPC64_CLOBBER_CR_REGS
+    );
+
+    {
+	L4_MsgTag_t tag;
+
+	tag.raw = r_mr0;
+	return tag;
+    }
+}
+
+L4_INLINE L4_MsgTag_t L4_WaitAsynch (L4_Word_t * mask, L4_ThreadId_t * from)
+{
+    register L4_ThreadId_t r_dest   asm ("r3") = L4_nilthread;
+    register L4_ThreadId_t r_from   asm ("r4") = L4_anythread;
+    register L4_Word_t r_timeout    asm ("r5") = 0;
+    register L4_Word_t r_mr0	    asm ("r14") = L4_Asynchtag.raw;
+    register L4_Word_t r_mr1	    asm ("r15");
+
+    asm volatile (
+	"mtctr	%[sys];"
+	"bctrl;"
+
+	: /* outputs */
+	 "+r" (r_dest), "+r" (r_from), "+r" (r_timeout),
+	 "+r" (r_mr0), "=r" (r_mr1)
+	: /* inputs */
+	 [sys] "r" (__L4_Ipc)
+	: /* clobbers */
+	 "r0", "ctr", "lr", "memory"
+    );
+
+    /* Trash the rest. This allows the compiler to choose which
+     * inputs to use in the asm code above
+     */
+    asm volatile (
+	"" :::
+	 "r6", "r7", "r8", "r9", "r10", "r11", "r12",
+	 "r16", "r17", "r18", "r19", "r20", "r21", "r22",
+	 "r23", "r24", "r25", "r26", "r27", "r28", "r29",
+	 __L4_PPC64_CLOBBER_CR_REGS
+    );
+
+    *mask = r_mr1;
+    *from = r_dest;
+    
+    {
+	L4_MsgTag_t tag;
+
+	tag.raw = r_mr0;
+	return tag;
+    }
+}
+
+typedef L4_Word_t (*__L4_Lipc_t)( L4_Word_t, L4_Word_t, L4_Word_t );
+extern __L4_Lipc_t __L4_Lipc;
+
+L4_INLINE L4_MsgTag_t L4_Lipc(
+	L4_ThreadId_t to,
+	L4_ThreadId_t FromSpecifier,
+	L4_Word_t Timeouts,
+	L4_ThreadId_t *from
+	)
+{
+    return L4_Ipc( to, FromSpecifier, Timeouts, from );
+}
+
+typedef void (*__L4_Unmap_t)( L4_Word_t );
+extern __L4_Unmap_t __L4_Unmap;
+
+L4_INLINE void L4_Unmap( L4_Word_t control )
+{
+    register L4_Word_t r3 asm("r3") = control;
+ 
+    asm volatile (
+	"mtctr %[sys];"
+	"bctrl ;"
+	: /* outputs */
+	 "+r" (r3)
+	: /* inputs */
+	 [sys] "r" (__L4_Unmap)
+	: /* clobbers */
+	 "r4", "r5", "r6", "r7", "r8", "r9", "r10",
+	 __L4_PPC64_CLOBBER_REGS, "memory", __L4_PPC64_CLOBBER_CR_REGS
+    );
+}
+
+typedef void (*__L4_SpaceControl_t)( L4_Word_t, L4_Word_t, L4_Word_t,
+	L4_Word_t );
+extern __L4_SpaceControl_t __L4_SpaceControl;
+
+L4_INLINE L4_Word_t L4_SpaceControl(
+	L4_ThreadId_t SpaceSpecifier,
+	L4_Word_t control,
+	L4_Fpage_t KernelInterfacePageArea,
+	L4_Fpage_t UtcbArea,
+	L4_Word_t *old_control
+	)
+{
+    register L4_Word_t r3 asm("r3") = SpaceSpecifier.raw;
+    register L4_Word_t r4 asm("r4") = control;
+    register L4_Word_t r5 asm("r5") = KernelInterfacePageArea.raw;
+    register L4_Word_t r6 asm("r6") = UtcbArea.raw;
+
+    __asm__ __volatile__ (
+	"mtctr  %[sys];"
+	"bctrl ;"
+	: /* outputs */
+	 "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6)
+	: /* inputs */
+	 [sys] "r" (__L4_SpaceControl)
+	: /* clobbers */
+	 "r8", "r9", "r10",
+	 __L4_PPC64_CLOBBER_REGS, "memory", __L4_PPC64_CLOBBER_CR_REGS
+    );
+
+    *old_control = r4;
+    return r3;
+}
+
+typedef L4_Word_t (*__L4_ProcessorControl_t)( L4_Word_t,  L4_Word_t,
+	L4_Word_t, L4_Word_t );
+extern __L4_ProcessorControl_t __L4_ProcessorControl;
+
+L4_INLINE L4_Word_t L4_ProcessorControl(
+	L4_Word_t ProcessorNo,
+	L4_Word_t InternalFrequency,
+	L4_Word_t ExternalFrequency,
+	L4_Word_t voltage
+	)
+{
+    register L4_Word_t r3 asm("r3") = ProcessorNo;
+    register L4_Word_t r4 asm("r4") = InternalFrequency;
+    register L4_Word_t r5 asm("r5") = ExternalFrequency;
+    register L4_Word_t r6 asm("r6") = voltage;
+
+    __asm__ __volatile__ (
+	    "mtctr  %[sys];"
+	    "bctrl ;"
+	    : /* outputs */
+	      "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6)
+	    : /* inputs */
+	      [sys] "r" (__L4_ProcessorControl)
+	    : /* clobbers */
+	      "r7", "r8", "r9", "r10",
+	      __L4_PPC64_CLOBBER_REGS, "memory", __L4_PPC64_CLOBBER_CR_REGS
+	    );
+
+    return r3;
+}
+
+typedef L4_Word_t (*__L4_MemoryControl_t)( L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t );
+extern __L4_MemoryControl_t __L4_MemoryControl;
+
+L4_INLINE L4_Word_t L4_MemoryControl(
+	L4_Word_t control,
+	const L4_Word_t attributes[4]
+	)
+{
+    register L4_Word_t r3 asm("r3") = control;
+    register L4_Word_t r4 asm("r4") = attributes[0];
+    register L4_Word_t r5 asm("r5") = attributes[1];
+    register L4_Word_t r6 asm("r6") = attributes[2];
+    register L4_Word_t r7 asm("r7") = attributes[3];
+
+    __asm__ __volatile__ (
+	"mtctr  %[sys];"
+	"bctrl ;"
+	: /* outputs */
+	 "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6), "+r" (r7)
+	: /* inputs */
+	 [sys] "r" (__L4_MemoryControl)
+	: /* clobbers */
+	 "r8", "r9", "r10",
+	 __L4_PPC64_CLOBBER_REGS, "memory", __L4_PPC64_CLOBBER_CR_REGS
+    );
+
+    return r3;
+}
+
+typedef L4_Word_t (*__L4_RtasCall_t)( L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t* );
+extern __L4_RtasCall_t __L4_RtasCall;
+
+L4_INLINE L4_Word_t L4_RtasCall(
+	L4_Word_t token,
+	L4_Word_t nargs,
+	L4_Word_t nret,
+	L4_Word_t *ptr
+	)
+{
+    if (!__L4_RtasCall)
+	return -1ul;
+
+    register L4_Word_t r3 asm("r3") = token;
+    register L4_Word_t r4 asm("r4") = nargs;
+    register L4_Word_t r5 asm("r5") = nret;
+    register L4_Word_t r6 asm("r6") = (L4_Word_t)ptr;
+
+    __asm__ __volatile__ (
+	"mtctr  %[sys];"
+	"bctrl ;"
+	: /* outputs */
+	 "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6)
+	: /* inputs */
+	 [sys] "r" (__L4_RtasCall)
+	: /* clobbers */
+	 "r7", "r8", "r9", "r10",
+	 __L4_PPC64_CLOBBER_REGS, "memory", __L4_PPC64_CLOBBER_CR_REGS
+    );
+
+    return r3;
+}
+
+#endif	/* __L4__POWERPC64__SYSCALLS_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc64/types.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc64/types.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc64/types.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc64/types.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,47 @@
+/****************************************************************************
+ *
+ * Copyright (C) 2002-2003, University of New South Wales
+ *
+ * File path:	l4/powerpc64/types.h
+ * Description:	PowerPC64 types.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $Id: types.h,v 1.2 2003/09/24 19:06:26 skoglund Exp $
+ *
+ ***************************************************************************/
+#ifndef __L4__POWERPC64__TYPES_H__
+#define __L4__POWERPC64__TYPES_H__
+
+#define L4_64BIT
+#undef  L4_32BIT
+#define L4_BIG_ENDIAN
+
+typedef unsigned long		L4_Word64_t;
+typedef unsigned int		L4_Word32_t;
+typedef unsigned short		L4_Word16_t;
+typedef unsigned char		L4_Word8_t;
+
+typedef unsigned long		L4_Word_t;
+typedef long unsigned int	L4_Size_t;
+
+#endif	/* __L4__POWERPC64__TYPES_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc64/vregs.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc64/vregs.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/powerpc64/vregs.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/powerpc64/vregs.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,255 @@
+/****************************************************************************
+ *
+ * Copyright (C) 2003, University of New South Wales
+ *
+ * File path:	l4/powerpc64/vregs.h
+ * Description:	PowerPC64 virtual registers.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $Id: vregs.h,v 1.3 2003/10/28 01:26:17 cvansch Exp $
+ *
+ ***************************************************************************/
+#ifndef __L4__POWERPC64__VREGS_H__
+#define __L4__POWERPC64__VREGS_H__
+
+L4_INLINE L4_Word_t *__L4_PPC64_Utcb( void ) __attribute__ ((const));
+
+L4_INLINE L4_Word_t *__L4_PPC64_Utcb( void )
+{
+    register L4_Word_t *utcb asm("r13");
+
+    return utcb;
+}
+
+
+#define __L4_NUM_MRS	64
+
+/*
+ * Location of TCRs within UTCB.
+ */
+
+#define __L4_TCB_USER_OFFSET			(96)	/* 96..112 */
+#define __L4_TCR_MR_OFFSET		        (16)
+
+#define __L4_TCB_KERNEL_RESERVED2		(15)
+#define __L4_TCB_KERNEL_RESERVED1		(14)
+#define __L4_TCB_KERNEL_RESERVED0		(13)
+
+#define __L4_TCR_PREEMPTED_IP			(12)
+#define __L4_TCR_PREEMPT_CALLBACK_IP		(11)
+#define __L4_TCR_VIRTUAL_ACTUAL_SENDER		(10)
+#define __L4_TCR_INTENDED_RECEIVER		(9)
+#define __L4_TCR_ERROR_CODE			(8)
+#define __L4_TCR_NOTIFY_MASK			(7)
+#define __L4_TCR_ACCEPTOR			(6)
+#define __L4_TCR_COP_FLAGS			(5)
+#define __L4_TCR_PREEMPT_FLAGS			(5)
+#define __L4_TCR_EXCEPTION_HANDLER		(4)
+#define __L4_TCR_PAGER				(3)
+#define __L4_TCR_USER_DEFINED_HANDLE		(2)
+#define __L4_TCR_PROCESSOR_NO			(1)
+#define __L4_TCR_MY_GLOBAL_ID			(0)
+
+typedef struct {
+    L4_Word8_t	    PreemptFlags;
+    L4_Word8_t	    CopFlags;
+    L4_Word16_t	    __reserved0;
+    L4_Word32_t	    __reserved1;
+} UtcbParts;
+
+/*
+ * Thread Control Registers.
+ */
+
+L4_INLINE L4_Word_t __L4_TCR_MyGlobalId( void )
+{
+    return (__L4_PPC64_Utcb())[ __L4_TCR_MY_GLOBAL_ID ];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ProcessorNo( void )
+{
+    return (__L4_PPC64_Utcb())[ __L4_TCR_PROCESSOR_NO ];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_UserDefinedHandle( void )
+{
+    return (__L4_PPC64_Utcb())[ __L4_TCR_USER_DEFINED_HANDLE ];
+}
+
+L4_INLINE void __L4_TCR_Set_UserDefinedHandle( L4_Word_t w )
+{
+    (__L4_PPC64_Utcb())[ __L4_TCR_USER_DEFINED_HANDLE ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_Pager( void )
+{
+    return (__L4_PPC64_Utcb())[ __L4_TCR_PAGER ];
+}
+
+L4_INLINE void __L4_TCR_Set_Pager( L4_Word_t w )
+{
+    (__L4_PPC64_Utcb())[ __L4_TCR_PAGER ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ExceptionHandler( void )
+{
+    return (__L4_PPC64_Utcb())[ __L4_TCR_EXCEPTION_HANDLER ];
+}
+
+L4_INLINE void __L4_TCR_Set_ExceptionHandler( L4_Word_t w )
+{
+    (__L4_PPC64_Utcb())[ __L4_TCR_EXCEPTION_HANDLER ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ErrorCode( void )
+{
+    return (__L4_PPC64_Utcb())[ __L4_TCR_ERROR_CODE ];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_IntendedReceiver( void )
+{
+    return (__L4_PPC64_Utcb())[ __L4_TCR_INTENDED_RECEIVER ];
+}
+
+L4_INLINE L4_Word_t __L4_TCR_Acceptor( void )
+{
+    return (__L4_PPC64_Utcb())[ __L4_TCR_ACCEPTOR ];
+}
+
+L4_INLINE void __L4_TCR_Set_Acceptor( L4_Word_t w )
+{
+    (__L4_PPC64_Utcb())[ __L4_TCR_ACCEPTOR ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_NotifyMask( void )
+{
+    return (__L4_PPC64_Utcb())[ __L4_TCR_NOTIFY_MASK ];
+}
+
+L4_INLINE void __L4_TCR_Set_NotifyMask( L4_Word_t w )
+{
+    (__L4_PPC64_Utcb())[ __L4_TCR_NOTIFY_MASK ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ActualSender( void )
+{
+    return (__L4_PPC64_Utcb())[ __L4_TCR_VIRTUAL_ACTUAL_SENDER ];
+}
+
+L4_INLINE void __L4_TCR_Set_VirtualSender( L4_Word_t w )
+{
+    (__L4_PPC64_Utcb())[ __L4_TCR_VIRTUAL_ACTUAL_SENDER ] = w;
+}
+
+L4_INLINE L4_Word_t __L4_TCR_ThreadWord (L4_Word_t n)
+{
+    return (__L4_PPC64_Utcb ())[__L4_TCB_USER_OFFSET + (int) n];
+}
+
+L4_INLINE void __L4_TCR_Set_ThreadWord (L4_Word_t n, L4_Word_t w)
+{
+    (__L4_PPC64_Utcb ())[__L4_TCB_USER_OFFSET + (int) n] = w;
+}
+
+#define COP_FLAGS   ((UtcbParts *)&(__L4_PPC64_Utcb())[ __L4_TCR_COP_FLAGS ])->CopFlags
+
+L4_INLINE void L4_Set_CopFlag( L4_Word_t n )
+{
+    COP_FLAGS |= (1 << n);
+}
+
+L4_INLINE void L4_Clr_CopFlag( L4_Word_t n )
+{
+    COP_FLAGS &= ~(1 << n);
+}
+
+#define PREEMPT_FLAGS	((UtcbParts *)&(__L4_PPC64_Utcb())[ __L4_TCR_PREEMPT_FLAGS ])->PreemptFlags
+
+L4_INLINE L4_Bool_t L4_EnablePreemptionFaultException( void )
+{
+    L4_Bool_t old = (PREEMPT_FLAGS >> 5) & 1;
+    PREEMPT_FLAGS |= (1 << 5);
+    return old;
+}
+
+L4_INLINE L4_Bool_t L4_DisablePreemptionFaultException( void )
+{
+    L4_Bool_t old = (PREEMPT_FLAGS >> 5) & 1;
+    PREEMPT_FLAGS &= ~(1 << 5);
+    return old;
+}
+
+L4_INLINE L4_Bool_t L4_EnablePreemption( void )
+{
+    L4_Bool_t old = (PREEMPT_FLAGS >> 6) & 1;
+    PREEMPT_FLAGS |= (1 << 6);
+    return old;
+}
+
+L4_INLINE L4_Bool_t L4_DisablePreemption( void )
+{
+    L4_Bool_t old = (PREEMPT_FLAGS >> 6) & 1;
+    PREEMPT_FLAGS &= ~(1 << 6);
+    return old;
+}
+
+L4_INLINE L4_Bool_t L4_PreemptionPending( void )
+{
+    L4_Bool_t retval = (PREEMPT_FLAGS >> 7) & 1;
+    return retval;
+}
+
+
+
+/*
+ * Message Registers.
+ */
+
+L4_INLINE void L4_StoreMR( int i, L4_Word_t * w )
+{
+    *w = (__L4_PPC64_Utcb())[ __L4_TCR_MR_OFFSET + i ];
+}
+
+L4_INLINE void L4_LoadMR( int i, L4_Word_t w )
+{
+    (__L4_PPC64_Utcb())[ __L4_TCR_MR_OFFSET + i ] = w;
+}
+
+L4_INLINE void L4_StoreMRs( int i, int k, L4_Word_t * w )
+{
+    L4_Word_t * mr = &(__L4_PPC64_Utcb())[__L4_TCR_MR_OFFSET + i];
+
+    while( k-- > 0 )
+	*w++ = *mr++;
+}
+
+L4_INLINE void L4_LoadMRs( int i, int k, L4_Word_t * w )
+{
+    L4_Word_t * mr = &(__L4_PPC64_Utcb())[__L4_TCR_MR_OFFSET + i];
+
+    while( k-- > 0 )
+	*mr++ = *w++;
+}
+
+#endif	/* __L4__POWERPC64__VREGS_H__ */
+
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/schedule.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/schedule.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/schedule.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/schedule.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,91 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2001, 2002, 2003,  Karlsruhe University
+ *                
+ * File path:     l4/schedule.h
+ * Description:   Interfaces for doing scheduling
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: schedule.h,v 1.14 2003/09/24 19:06:21 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__SCHEDULE_H__
+#define __L4__SCHEDULE_H__
+
+#include <l4/types.h>
+#include __L4_INC_ARCH(syscalls.h)
+
+
+/*
+ * Derived functions
+ */
+
+L4_INLINE void L4_Yield (void)
+{
+    L4_ThreadSwitch (L4_nilthread);
+}
+
+L4_INLINE L4_Word_t L4_Set_Priority (L4_ThreadId_t tid, L4_Word_t prio)
+{
+    L4_Word_t dummy;
+    prio &= 0xff;
+
+    return L4_Schedule(tid, ~0UL, ~0UL, ~0UL, ~0UL, prio, &dummy, &dummy);
+}
+
+L4_INLINE L4_Word_t L4_Set_ProcessorNo (L4_ThreadId_t tid, L4_Word_t cpu_no)
+{
+    L4_Word_t dummy;
+    cpu_no &= 0xffff;
+
+    return L4_Schedule(tid, ~0UL, ~0UL, ~0UL, cpu_no, ~0UL, &dummy, &dummy);
+}
+
+L4_INLINE L4_Word_t L4_Set_Timeslice (L4_ThreadId_t tid, L4_Word_t timeslice, L4_Word_t totalquantum)
+{
+    L4_Word_t dummy;
+    return L4_Schedule(tid, timeslice, totalquantum, ~0UL, ~0UL, ~0UL, &dummy, &dummy);
+}
+
+L4_INLINE L4_Word_t L4_Timeslice (L4_ThreadId_t tid, L4_Word_t * timeslice, L4_Word_t * totalquantum)
+{
+    return L4_Schedule(tid, ~0UL, ~0UL, ~0UL, ~0UL, ~0UL, timeslice, totalquantum);
+}
+
+
+/*
+ * Result values from schedule system call
+ */
+
+#define L4_SCHEDRESULT_ERROR		(0)
+#define L4_SCHEDRESULT_DEAD		(1)
+#define L4_SCHEDRESULT_INACTIVE		(2)
+#define L4_SCHEDRESULT_RUNNING		(3)
+#define L4_SCHEDRESULT_PENDING_SEND	(4)
+#define L4_SCHEDRESULT_SENDING		(5)
+#define L4_SCHEDRESULT_WAITING		(6)
+#define L4_SCHEDRESULT_RECEIVING	(7)
+
+
+
+#endif /* !__L4__SCHEDULE_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/sigma0.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sigma0.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/sigma0.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sigma0.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,92 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2001, 2002, 2003,  Karlsruhe University
+ *                
+ * File path:     l4/sigma0.h
+ * Description:   Sigma0 RPC protocol
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: sigma0.h,v 1.10 2003/09/24 19:06:21 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__SIGMA0_H__
+#define __L4__SIGMA0_H__
+
+#include <l4/types.h>
+#include <l4/kip.h>
+#include <l4/message.h>
+#include <l4/ipc.h>
+
+L4_INLINE L4_Fpage_t L4_Sigma0_GetPage_RcvWindow (L4_ThreadId_t s0,
+						  L4_Fpage_t f,
+						  L4_Fpage_t RcvWindow)
+{
+    L4_MsgTag_t tag;
+    L4_Msg_t msg;
+
+    if (L4_IsNilThread (s0))
+    {
+	L4_KernelInterfacePage_t * kip = (L4_KernelInterfacePage_t *)
+	    L4_GetKernelInterface ();
+	s0 = L4_GlobalId (kip->ThreadInfo.X.UserBase, 1);
+    }
+
+    L4_MsgClear (&msg);
+    L4_MsgAppendWord (&msg, f.raw);
+    L4_MsgAppendWord (&msg, 0);
+    L4_Set_MsgLabel (&msg, (L4_Word_t) -6UL << 4);
+    L4_MsgLoad (&msg);
+    L4_Accept (L4_MapGrantItems (RcvWindow));
+	
+    tag = L4_Call (s0);
+    if (L4_IpcFailed (tag))
+	return L4_Nilpage;
+
+    L4_StoreMR (2, &f.raw);
+    return f;
+}
+
+#if defined(__l4_cplusplus)
+L4_INLINE L4_Fpage_t L4_Sigma0_GetPage (L4_ThreadId_t s0,
+					L4_Fpage_t f,
+					L4_Fpage_t RcvWindow)
+{
+    return L4_Sigma0_GetPage_RcvWindow (s0, f, RcvWindow);
+}
+#endif
+
+L4_INLINE L4_Fpage_t L4_Sigma0_GetPage (L4_ThreadId_t s0, L4_Fpage_t f)
+{
+    return L4_Sigma0_GetPage_RcvWindow (s0, f, L4_CompleteAddressSpace);
+}
+
+L4_INLINE L4_Fpage_t L4_Sigma0_GetAny (L4_ThreadId_t s0,
+				      L4_Word_t	s,
+				      L4_Fpage_t RcvWindow)
+{
+    return L4_Sigma0_GetPage_RcvWindow (s0, L4_FpageLog2 (~0UL, s), RcvWindow);
+}
+
+
+#endif /* !__L4__SIGMA0_H__ */
+
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/space.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/space.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/space.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/space.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,125 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2001-2004,  Karlsruhe University
+ *                
+ * File path:     l4/space.h
+ * Description:   Interfaces for handling address spaces/mappings
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: space.h,v 1.12 2004/03/12 17:50:56 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__SPACE_H__
+#define __L4__SPACE_H__
+
+#include <l4/types.h>
+#include <l4/map.h>
+#include <l4/kip.h>
+#include __L4_INC_ARCH(syscalls.h)
+
+#include __L4_INC_ARCH(kdebug.h)
+
+/*
+ * Derived functions
+ */
+
+L4_INLINE L4_Word_t L4_MapFpage (L4_ThreadId_t s, L4_Fpage_t f, L4_PhysDesc_t p)
+{
+    L4_LoadMR (0, p.raw);
+    L4_LoadMR (1, f.raw);
+
+    return L4_MapControl(s, L4_MapCtrl_Modify);
+}
+
+L4_INLINE L4_Word_t L4_MapFpages (L4_ThreadId_t s,
+	L4_Word_t n, L4_Fpage_t * fpages, L4_PhysDesc_t * descs)
+{
+    int i;
+    for (i = 0; i < n; i++) {
+	if ((fpages[i].raw & 0x7) == 0)
+	    L4_KDB_Enter("eek");
+	L4_LoadMR (2*i, descs[i].raw);
+	L4_LoadMR (2*i + 1, fpages[i].raw);
+    }
+    return L4_MapControl(s, L4_MapCtrl_Modify | (n - 1));
+}
+
+L4_INLINE L4_Word_t L4_UnmapFpage (L4_ThreadId_t s, L4_Fpage_t f)
+{
+    L4_LoadMR (1, f.raw & (~0xFUL));
+
+    return L4_MapControl(s, L4_MapCtrl_Modify);
+}
+
+L4_INLINE L4_Word_t L4_UnmapFpages (L4_ThreadId_t s,
+	L4_Word_t n, L4_Fpage_t * fpages)
+{
+    int i;
+    for (i = 0; i < n; i++) {
+	L4_LoadMR (2*i+1, fpages[i].raw & (~0xfUL));
+    }
+    return L4_MapControl(s, L4_MapCtrl_Modify | (n - 1));
+}
+
+#if defined(__l4_cplusplus)
+L4_INLINE L4_Fpage_t L4_Unmap (L4_ThreadId_t s, L4_Fpage_t f)
+{
+    return L4_UnmapFpage (s, f);
+}
+
+L4_INLINE L4_Word_t L4_Unmap (L4_ThreadId_td s, L4_Word_t n,
+	L4_Fpage_t * fpages, L4_PhysDesc_t * descs)
+{
+    return L4_UnmapFpages (s, n, fpages, descs);
+}
+#endif
+
+L4_INLINE L4_Word_t L4_GetStatus (L4_ThreadId_t s, L4_Fpage_t * f, L4_PhysDesc_t * p)
+{
+    L4_Word_t r;
+    L4_LoadMR (0, f->raw);
+    r = L4_MapControl(s, L4_MapCtrl_Read);
+    L4_StoreMR (0, &f->raw);
+    if (p)
+	L4_StoreMR (1, &p->raw);
+    return r;
+}
+
+L4_INLINE L4_Bool_t L4_WasWritten (L4_Fpage_t f)
+{
+    return (f.raw & L4_Writable) != 0;
+}
+
+L4_INLINE L4_Bool_t L4_WasReferenced (L4_Fpage_t f)
+{
+    return (f.raw & L4_Readable) != 0;
+}
+
+L4_INLINE L4_Bool_t L4_WaseXecuted (L4_Fpage_t f)
+{
+    return (f.raw & L4_eXecutable) != 0;
+}
+
+
+
+#endif /* !__L4__SPACE_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/asm.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/asm.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/asm.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/asm.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.148
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/=id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/=id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/=id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/=id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:55:10 2004 7600.0
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/kdebug.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/kdebug.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/kdebug.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/kdebug.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.149
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/specials.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/specials.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/specials.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/specials.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.150
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/syscalls.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/syscalls.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/syscalls.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/syscalls.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.151
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/types.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/types.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/types.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/types.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.152
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/vregs.h.id newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/vregs.h.id
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/vregs.h.id	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sparc64/.arch-ids/vregs.h.id	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1 @@
+Ben Leslie <benjl@cse.unsw.edu.au> Tue Jul 20 13:45:39 2004 7349.153
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/sparc64/asm.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sparc64/asm.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/sparc64/asm.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sparc64/asm.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,44 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2003,  University of New South Wales
+ *                
+ * File path:     l4/sparc64/asm.h
+ * Description:   Assembler macros for sparc64. 
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: asm.h,v 1.2 2003/09/24 19:06:26 skoglund Exp $
+ *                
+ ********************************************************************/
+
+#ifndef __L4_SPARC64__ASM_H__
+#define __L4_SPARC64__ASM_H__
+
+#define BEGIN_PROC(name, sect) \
+  	.section sect;         \
+	.align 8;              \
+	.globl name;           \
+	.type name,@function;  \
+name:
+
+
+#endif /* !__L4_SPARC64__ASM_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/sparc64/kdebug.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sparc64/kdebug.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/sparc64/kdebug.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sparc64/kdebug.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,84 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2003,  University of New South Wales
+ *                
+ * File path:     l4/sparc64/kdebug.h
+ * Description:   SPARC v9 kernel debugger interface
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: kdebug.h,v 1.4 2004/02/15 23:05:04 philipd Exp $
+ *                
+ ********************************************************************/
+
+#ifndef __L4__SPARC64__KDEBUG_H__
+#define __L4__SPARC64__KDEBUG_H__
+
+#define __L4_TRAP_KDB_PUTC		0x7c
+#define __L4_TRAP_KDB_GETC		0x7d
+#define __L4_TRAP_KDB_GETC_NB		0x7e
+#define __L4_TRAP_KDB_ENTER		0x7f
+
+#define L4_KDB_Enter(str...)					\
+do {                         					\
+    asm volatile (						\
+	"setx	1f, %%g1, %%o0\n\t"				\
+	"ldub	[ %%o0 ], %%g0\n\t"				\
+	"ta	%0\n\t"						\
+	".data\n\t"						\
+	"1:	.string " #str "\n\t 2:"			\
+	".previous"						\
+	:: "i" (__L4_TRAP_KDB_ENTER) : "memory", "g1",		\
+		"o0", "o1", "o2", "o3", "o4", "o5"		\
+    );								\
+} while(0)
+
+#define __L4_KDB_Op_Arg(op, name, argtype) 			\
+L4_INLINE void L4_KDB_##name(argtype arg)      			\
+{                                          			\
+    register char r_c asm("o0") = arg;				\
+    __asm__ __volatile__ (					\
+	"ta	%0"						\
+	:: "r" (op), "r" (r_c) : "g1", "g4", "g5",		\
+		"o1", "o2", "o3", "o4", "o5"			\
+    );								\
+} // L4_KDB_##name()
+
+#define __L4_KDB_Op_Ret(op, name, rettype) 			\
+L4_INLINE rettype L4_KDB_##name(void)				\
+{								\
+    register char ret asm("o0");				\
+    __asm__ __volatile__ (					\
+	"ta	%1"						\
+	: "=r" (ret) : "r" (op) : "g1", "g4", "g5",		\
+		"o1", "o2", "o3", "o4", "o5"			\
+    );								\
+    return ret;							\
+} // L4_KDB_##name()
+
+
+__L4_KDB_Op_Ret(__L4_TRAP_KDB_GETC, ReadChar_Blocked, char);
+__L4_KDB_Op_Ret(__L4_TRAP_KDB_GETC_NB, ReadChar, char);
+__L4_KDB_Op_Arg(__L4_TRAP_KDB_PUTC, PrintChar, char);
+
+
+#endif /* !__L4__SPARC64__KDEBUG_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/sparc64/specials.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sparc64/specials.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/sparc64/specials.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sparc64/specials.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,53 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2003,  University of New South Wales
+ *                
+ * File path:     l4/sparc64/specials.h
+ * Description:   SPARC v9 specific functions and defines
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: specials.h,v 1.3 2004/02/10 04:49:52 philipd Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__SPARC64__SPECIALS_H__
+#define __L4__SPARC64__SPECIALS_H__
+
+L4_INLINE int __L4_Msb (L4_Word_t w) __attribute__ ((const));
+
+L4_INLINE int __L4_Msb (L4_Word_t w)
+{
+    /* philipd (10/02/04): use the plain C loop rather than POPC, because that
+     * instruction must be emulated on the UltraSPARC. */
+    int bitnum;
+
+    if (w == 0)
+	return 64;
+
+    for (bitnum = 0, w >>= 1; w != 0; bitnum++)
+	w >>= 1;
+
+    return bitnum;
+}
+
+
+#endif /* !__L4__SPARC64__SPECIALS_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/sparc64/syscalls.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sparc64/syscalls.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/sparc64/syscalls.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sparc64/syscalls.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,304 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2003-2004,  University of New South Wales
+ *                
+ * File path:     l4/sparc64/syscalls.h
+ * Description:   SPARC v9 system call ABI
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: syscalls.h,v 1.7 2004/08/23 18:43:17 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__SPARC64__SYSCALLS_H__
+#define __L4__SPARC64__SYSCALLS_H__
+
+#include <l4/types.h>
+#include <l4/message.h>
+
+#include <l4/sparc64/vregs.h>
+#include <l4/sparc64/kdebug.h>
+
+L4_INLINE void *
+L4_KernelInterface(L4_Word_t *ApiVersion,
+		   L4_Word_t *ApiFlags,
+		   L4_Word_t *KernelId)
+{
+    register void* result asm ("o0");
+    register L4_Word_t version asm ("o1");
+    register L4_Word_t flags asm ("o2");
+    register L4_Word_t id asm ("o3");
+
+    /* trap to the kernel */
+    asm volatile (
+	"ta	0x70\n\t"
+	:
+	"=r" (result), "=r" (version), "=r" (flags), "=r" (id)
+    );
+
+    if(ApiVersion) *ApiVersion = version;
+    if(ApiFlags) *ApiFlags = flags;
+    if(KernelId) *KernelId = id;
+    return result;
+}
+
+typedef L4_Word_t (*__L4_ExchangeRegisters_t)( L4_Word_t, L4_Word_t, L4_Word_t,
+	L4_Word_t, L4_Word_t, L4_Word_t );
+extern __L4_ExchangeRegisters_t __L4_ExchangeRegisters;
+
+L4_INLINE L4_ThreadId_t
+L4_ExchangeRegisters(L4_ThreadId_t dest,
+		     L4_Word_t control,
+		     L4_Word_t sp,
+		     L4_Word_t ip,
+		     L4_Word_t flags,
+		     L4_Word_t UserDefHandle,
+		     L4_ThreadId_t pager,
+		     L4_Word_t *old_control,
+		     L4_Word_t *old_sp,
+		     L4_Word_t *old_ip,
+		     L4_Word_t *old_flags,
+		     L4_Word_t *old_UserDefHandle,
+		     L4_ThreadId_t *old_pager)
+{
+    register L4_Word_t r_control asm ("o1");
+    register L4_Word_t r_sp asm ("o2");
+    register L4_Word_t r_ip asm ("o3");
+    register L4_ThreadId_t r_pager asm ("o4");
+    register L4_Word_t r_UserDefHandle asm ("o5");
+    register L4_Word_t r_flags asm ("g4");
+    L4_ThreadId_t r_dest;
+
+    r_flags = flags;
+
+    asm volatile ("" :: "r" (r_flags));
+    r_dest.raw = __L4_ExchangeRegisters(dest.raw, control, sp, ip, pager.raw,
+					UserDefHandle);
+    asm volatile ("" : "=r" (r_control), "=r" (r_sp), "=r" (r_ip), "=r" (r_pager),
+		  "=r" (r_UserDefHandle), "=r" (r_flags));
+
+    *old_control = r_control;
+    *old_sp = r_sp;
+    *old_ip = r_ip;
+    *old_flags = r_flags;
+    *old_UserDefHandle = r_UserDefHandle;
+    *old_pager = r_pager;
+
+    return r_dest;
+}
+
+typedef L4_Word_t (*__L4_ThreadControl_t)( L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t );
+extern __L4_ThreadControl_t __L4_ThreadControl;
+
+L4_INLINE L4_Word_t
+L4_ThreadControl(L4_ThreadId_t dest,
+		 L4_ThreadId_t SpaceSpecifier,
+		 L4_ThreadId_t Scheduler,
+		 L4_ThreadId_t Pager,
+		 void * utcb)
+{
+    return __L4_ThreadControl(dest.raw, SpaceSpecifier.raw, Scheduler.raw,
+			      Pager.raw, (L4_Word_t)utcb);
+} // L4_threadControl()
+
+typedef L4_Word_t (*__L4_ThreadSwitch_t)( L4_Word_t );
+extern __L4_ThreadSwitch_t __L4_ThreadSwitch;
+
+L4_INLINE L4_Word_t
+L4_ThreadSwitch(L4_ThreadId_t dest)
+{
+    return __L4_ThreadSwitch(dest.raw);
+} // L4_ThreadSwitch()
+
+typedef L4_Word_t (*__L4_Schedule_t)( L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t );
+extern __L4_Schedule_t __L4_Schedule;
+
+L4_INLINE L4_Word_t
+L4_Schedule(L4_ThreadId_t dest,
+	    L4_Word_t TimeControl,
+	    L4_Word_t ProcessorControl,
+	    L4_Word_t prio,
+	    L4_Word_t PreemptionControl,
+	    L4_Word_t * old_TimeControl)
+{
+    register L4_Word_t r_timecontrol asm("o1");
+    L4_Word_t result;
+
+    result = __L4_Schedule(dest.raw, TimeControl, ProcessorControl, prio,
+			   PreemptionControl);
+    asm volatile ("" : "=r" (r_timecontrol));
+
+    if(old_TimeControl) {
+	*old_TimeControl = r_timecontrol;
+    }
+    
+    return result;
+} // L4_Schedule()
+
+typedef L4_Word_t (*__L4_Ipc_t)( L4_Word_t, L4_Word_t, L4_Word_t );
+extern __L4_Ipc_t __L4_Ipc;
+
+L4_INLINE L4_MsgTag_t
+L4_Ipc(L4_ThreadId_t to,
+       L4_ThreadId_t FromSpecifier,
+       L4_Word_t Timeouts,
+       L4_ThreadId_t * from)
+{
+    L4_MsgTag_t tag;
+    register L4_ThreadId_t to_from asm ("o0") = to;
+    register L4_ThreadId_t from_specifier asm ("o1") = FromSpecifier;
+    register L4_Word_t timeout asm ("o2") = Timeouts;
+    register L4_Word_t mr0 asm ("l0");
+    register L4_Word_t mr1 asm ("l1");
+    register L4_Word_t mr2 asm ("l2");
+    register L4_Word_t mr3 asm ("l3");
+    register L4_Word_t mr4 asm ("l4");
+    register L4_Word_t mr5 asm ("l5");
+    register L4_Word_t mr6 asm ("l6");
+    register L4_Word_t mr7 asm ("l7");
+
+    // Only load MRs if send phase is included
+    if (! L4_IsNilThread (to))
+    {
+	mr0 = (__L4_Sparc64_Utcb())[__L4_TCR_MR_OFFSET +  0];
+	mr1 = (__L4_Sparc64_Utcb())[__L4_TCR_MR_OFFSET +  1];
+	mr2 = (__L4_Sparc64_Utcb())[__L4_TCR_MR_OFFSET +  2];
+	mr3 = (__L4_Sparc64_Utcb())[__L4_TCR_MR_OFFSET +  3];
+	mr4 = (__L4_Sparc64_Utcb())[__L4_TCR_MR_OFFSET +  4];
+	mr5 = (__L4_Sparc64_Utcb())[__L4_TCR_MR_OFFSET +  5];
+	mr6 = (__L4_Sparc64_Utcb())[__L4_TCR_MR_OFFSET +  6];
+	mr7 = (__L4_Sparc64_Utcb())[__L4_TCR_MR_OFFSET +  7];
+
+	asm ("" : :
+	    "r" (mr0), "r" (mr1), "r" (mr2), "r" (mr3),
+	    "r" (mr4), "r" (mr5), "r" (mr6), "r" (mr7)
+	    : "g1", "g4", "g5", "g6", "o3", "o4", "o5",
+	      "i0", "i1", "i2", "i3", "i4", "i5"
+	    );   /* i7, o7, fp, sp saved */
+    }
+
+//    result = __L4_Ipc(to, FromSpecifier, Timeouts);
+    asm ("setx	__L4_Ipc, %%g4, %%g1\n\t"
+	 "ldx	[ %%g1 ], %%g1\n\t"
+	 "call	%%g1\n\t"
+	 "nop"
+	: "=r" (mr0), "=r" (mr1), "=r" (mr2), "=r" (mr3),
+	  "=r" (mr4), "=r" (mr5), "=r" (mr6), "=r" (mr7),
+	  "=r" (to_from)
+	: "r" (to_from), "r" (from_specifier), "r" (timeout)
+	: "g1", "g4", "g5", "g6", "o3", "o4", "o5", "o7",
+	  "i0", "i1", "i2", "i3", "i4", "i5"
+	);
+   
+    if( !L4_IsNilThread(FromSpecifier) ) {
+	*from = to_from;
+
+	(__L4_Sparc64_Utcb())[__L4_TCR_MR_OFFSET + 1] = mr1;
+	(__L4_Sparc64_Utcb())[__L4_TCR_MR_OFFSET + 2] = mr2;
+	(__L4_Sparc64_Utcb())[__L4_TCR_MR_OFFSET + 3] = mr3;
+	(__L4_Sparc64_Utcb())[__L4_TCR_MR_OFFSET + 4] = mr4;
+	(__L4_Sparc64_Utcb())[__L4_TCR_MR_OFFSET + 5] = mr5;
+	(__L4_Sparc64_Utcb())[__L4_TCR_MR_OFFSET + 6] = mr6;
+	(__L4_Sparc64_Utcb())[__L4_TCR_MR_OFFSET + 7] = mr7;
+    }
+
+    /* Return MR0 */
+    tag.raw = mr0;
+    return tag;
+} // L4_Ipc()
+
+typedef L4_Word_t (*__L4_Lipc_t)( L4_Word_t, L4_Word_t, L4_Word_t );
+extern __L4_Lipc_t __L4_Lipc;
+
+L4_INLINE L4_MsgTag_t
+L4_Lipc(L4_ThreadId_t to,
+	L4_ThreadId_t FromSpecifier,
+	L4_Word_t Timeouts,
+	L4_ThreadId_t *from)
+{
+    return L4_Ipc(to, FromSpecifier, Timeouts, from);
+} // L4_Lipc()
+
+typedef void (*__L4_Unmap_t)( L4_Word_t );
+extern __L4_Unmap_t __L4_Unmap;
+
+L4_INLINE void
+L4_Unmap(L4_Word_t control)
+{
+    __L4_Unmap(control);
+} // L4_Unmap()
+
+typedef L4_Word_t (*__L4_SpaceControl_t)( L4_Word_t, L4_Word_t, L4_Word_t,
+	L4_Word_t, L4_Word_t );
+extern __L4_SpaceControl_t __L4_SpaceControl;
+
+L4_INLINE L4_Word_t
+L4_SpaceControl(L4_ThreadId_t SpaceSpecifier,
+		L4_Word_t control,
+		L4_Fpage_t KernelInterfacePageArea,
+		L4_Fpage_t UtcbArea,
+		L4_ThreadId_t redirector,
+		L4_Word_t *old_control)
+{
+    register L4_Word_t r_control asm("o1");
+    L4_Word_t result;
+
+    result = __L4_SpaceControl(SpaceSpecifier.raw, control, KernelInterfacePageArea.raw,
+			       UtcbArea.raw, redirector.raw);
+    asm volatile ("" : "=r" (r_control));
+
+    if(old_control) {
+	*old_control = r_control;
+    }
+
+    return control;
+} // L4_SpaceControl()
+
+typedef L4_Word_t (*__L4_ProcessorControl_t)( L4_Word_t,  L4_Word_t,
+	L4_Word_t, L4_Word_t );
+extern __L4_ProcessorControl_t __L4_ProcessorControl;
+
+L4_INLINE L4_Word_t
+L4_ProcessorControl(L4_Word_t ProcessorNo,
+		    L4_Word_t control,
+		    L4_Word_t InternalFrequency,
+		    L4_Word_t ExternalFrequency,
+		    L4_Word_t voltage)
+{
+    /* XXX what is control for? How many arguments does this syscall have? */
+    return __L4_ProcessorControl(ProcessorNo, InternalFrequency,
+				 ExternalFrequency, voltage);
+} // L4_ProcessorControl()
+
+typedef L4_Word_t (*__L4_MemoryControl_t)( L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t, L4_Word_t );
+extern __L4_MemoryControl_t __L4_MemoryControl;
+
+L4_INLINE L4_Word_t
+L4_MemoryControl(L4_Word_t control,
+		 const L4_Word_t * attributes)
+{
+    return __L4_MemoryControl(control, attributes[0], attributes[1],
+			      attributes[2], attributes[4]);
+} // L4_MemoryControl()
+
+
+#endif /* !__L4__SPARC64__SYSCALLS_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/sparc64/types.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sparc64/types.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/sparc64/types.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sparc64/types.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,49 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2003,  University of New South Wales
+ *                
+ * File path:     l4/sparc64/types.h
+ * Description:   Sparc v9 specific type declararions
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: types.h,v 1.2 2003/09/24 19:06:26 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__SPARC64__TYPES_H__
+#define __L4__SPARC64__TYPES_H__
+
+#undef L4_32BIT
+#define L4_64BIT
+#undef L4_LITTLE_ENDIAN
+#define L4_BIG_ENDIAN
+
+typedef unsigned long           L4_Word64_t;
+typedef unsigned int		L4_Word32_t;
+typedef unsigned short		L4_Word16_t;
+typedef unsigned char		L4_Word8_t;
+
+typedef unsigned long		L4_Word_t;
+typedef L4_Word64_t		L4_Size_t;
+
+
+#endif /* !__L4__SPARC64__TYPES_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/sparc64/vregs.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sparc64/vregs.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/sparc64/vregs.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/sparc64/vregs.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,294 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2003-2004,  University of New South Wales
+ *                
+ * File path:     l4/sparc64/vregs.h
+ * Description:   
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: vregs.h,v 1.3 2004/02/10 03:49:37 philipd Exp $
+ *                
+ ********************************************************************/
+
+#ifndef __L4__SPARC64__VREGS_H__
+#define __L4__SPARC64__VREGS_H__
+
+L4_INLINE L4_Word_t * __L4_Sparc64_Utcb(void) __attribute__ ((const));
+
+L4_INLINE L4_Word_t * __L4_Sparc64_Utcb(void)
+{
+    register L4_Word_t *utcb asm ("g7");
+    return utcb;
+}
+
+#define __L4_NUM_MRS	64
+#define __L4_NUM_BRS	33
+
+/************************
+* TCR locations in UTCB *
+************************/
+
+#define __L4_TCR_GLOBAL_ID             0
+#define __L4_TCR_PAGER                 1
+#define __L4_TCR_EXCEPTION_HANDLER     2
+#define __L4_TCR_USER_DEFINED_HANDLE   3
+#define __L4_TCR_XFER_TIMEOUT          4
+#define __L4_TCR_ERROR_CODE            5
+#define __L4_TCR_INTENDED_RECEIVER     6
+#define __L4_TCR_VIRTUAL_ACTUAL_SENDER 7
+#define __L4_TCR_PROCESSOR_NO          8
+#define __L4_TCR_PREEMPT_FLAGS         9
+#define __L4_TCR_COP_FLAGS             9
+#define __L4_TCR_THREAD_WORD0          10
+#define __L4_TCR_THREAD_WORD1          11
+#define __L4_TCR_BR_OFFSET             31
+#define __L4_TCR_MR_OFFSET             64
+
+
+/***************************
+* Thread Control Registers *
+***************************/
+
+L4_INLINE L4_Word_t
+__L4_TCR_MyGlobalId(void)
+{
+    return (__L4_Sparc64_Utcb())[__L4_TCR_GLOBAL_ID];
+} // __L4_TCR_MyGlobalId()
+
+L4_INLINE L4_Word_t
+__L4_TCR_ProcessorNo(void)
+{
+    return (__L4_Sparc64_Utcb())[__L4_TCR_PROCESSOR_NO];
+} // __L4_TCR_ProcessorNo()
+
+L4_INLINE L4_Word_t
+__L4_TCR_UserDefinedHandle(void)
+{
+    return (__L4_Sparc64_Utcb())[__L4_TCR_USER_DEFINED_HANDLE];
+} // __L4_TCR_UserDefinedHandle()
+
+L4_INLINE void
+__L4_TCR_Set_UserDefinedHandle(L4_Word_t w)
+{
+    (__L4_Sparc64_Utcb())[__L4_TCR_USER_DEFINED_HANDLE] =  w;
+} // __L4_TCR_Set_UserDefinedHandle()
+
+L4_INLINE L4_Word_t
+__L4_TCR_Pager(void)
+{
+    return (__L4_Sparc64_Utcb())[__L4_TCR_PAGER];
+
+} // __L4_TCR_Pager()
+
+L4_INLINE void
+__L4_TCR_Set_Pager(L4_Word_t w)
+{
+    (__L4_Sparc64_Utcb())[__L4_TCR_PAGER] = w;
+} // __L4_TCR_Set_Pager()
+
+L4_INLINE L4_Word_t
+__L4_TCR_ExceptionHandler(void)
+{
+    return (__L4_Sparc64_Utcb())[__L4_TCR_EXCEPTION_HANDLER];
+} // __L4_TCR_ExceptionHandler()
+
+L4_INLINE void
+__L4_TCR_Set_ExceptionHandler(L4_Word_t w)
+{
+    (__L4_Sparc64_Utcb())[__L4_TCR_EXCEPTION_HANDLER] = w;
+} // __L4_TCR_Set_ExceptionHandler()
+
+L4_INLINE L4_Word_t
+__L4_TCR_ErrorCode(void)
+{
+    return (__L4_Sparc64_Utcb())[__L4_TCR_ERROR_CODE];
+} // __L4_TCR_Error_Code()
+
+L4_INLINE L4_Word_t
+__L4_TCR_XferTimeout(void)
+{
+    return (__L4_Sparc64_Utcb())[__L4_TCR_XFER_TIMEOUT];
+} // __L4_TCR_XferTimeout()
+
+L4_INLINE void
+__L4_TCR_Set_XferTimeout(L4_Word_t w)
+{
+    (__L4_Sparc64_Utcb())[__L4_TCR_XFER_TIMEOUT] = w;
+} // __L4_TCR_Set_XferTimeout()
+
+L4_INLINE L4_Word_t
+__L4_TCR_IntendedReceiver(void)
+{
+    return (__L4_Sparc64_Utcb())[__L4_TCR_INTENDED_RECEIVER];
+} // __L4_TCR_IntendedReceiver()
+
+L4_INLINE L4_Word_t
+__L4_TCR_ActualSender()
+{
+    return (__L4_Sparc64_Utcb())[__L4_TCR_VIRTUAL_ACTUAL_SENDER];
+} // __L4_TCR_ActualSender()
+
+L4_INLINE void
+__L4_TCR_Set_VirtualSender(L4_Word_t w)
+{
+    (__L4_Sparc64_Utcb())[__L4_TCR_VIRTUAL_ACTUAL_SENDER] = w;
+} // __L4_TCR_Set_VirtualSender()
+
+L4_INLINE L4_Word_t
+__L4_TCR_ThreadWord(L4_Word_t n)
+{
+    return (__L4_Sparc64_Utcb())[__L4_TCR_THREAD_WORD0 + n];
+} // __L4_TCR_ThreadWord()
+
+L4_INLINE void
+__L4_TCR_Set_ThreadWord(L4_Word_t n, L4_Word_t w)
+{
+    (__L4_Sparc64_Utcb())[__L4_TCR_THREAD_WORD0 + n] = w;
+} // __L4_TCR_Set_ThreadWord()
+
+L4_INLINE void
+L4_Set_CopFlag(L4_Word_t n)
+{
+    (__L4_Sparc64_Utcb())[__L4_TCR_COP_FLAGS + n] |= (1 << (8 + n));
+} // L4_Set_CopFlag()
+
+L4_INLINE void
+L4_Clr_CopFlag(L4_Word_t n)
+{
+    (__L4_Sparc64_Utcb())[__L4_TCR_COP_FLAGS + n] &= ~(1 << (8 + n));
+} // L4_Clr_CopFlag()
+
+L4_INLINE L4_Bool_t
+L4_EnablePreemptionFaultException(void)
+{
+    L4_Bool_t old = ((__L4_Sparc64_Utcb())[__L4_TCR_PREEMPT_FLAGS] >> 5) & 1;
+    (__L4_Sparc64_Utcb())[__L4_TCR_PREEMPT_FLAGS] |= (1 << 5);
+    return old;
+} // L4_EnablePreemptionFaultException()
+
+L4_INLINE L4_Bool_t
+L4_DisablePreemptionFaultException(void)
+{
+    L4_Bool_t old = ((__L4_Sparc64_Utcb())[__L4_TCR_PREEMPT_FLAGS] >> 5) & 1;
+    (__L4_Sparc64_Utcb())[__L4_TCR_PREEMPT_FLAGS] &= ~(1 << 5);
+    return old;
+} // L4_DisablePreemptionFaultException()
+
+L4_INLINE L4_Bool_t
+L4_EnablePreemption(void)
+{
+    L4_Bool_t old = ((__L4_Sparc64_Utcb())[__L4_TCR_PREEMPT_FLAGS] >> 6) & 1;
+    (__L4_Sparc64_Utcb())[__L4_TCR_PREEMPT_FLAGS] |= (1 << 6);
+    return old;
+} // L4_EnablePreemption()
+
+L4_INLINE L4_Bool_t
+L4_DisablePreemption(void)
+{
+    L4_Bool_t old = ((__L4_Sparc64_Utcb())[__L4_TCR_PREEMPT_FLAGS] >> 6) & 1;
+    (__L4_Sparc64_Utcb())[__L4_TCR_PREEMPT_FLAGS] &= ~(1 << 6);
+    return old;
+} // L4_DisablePreemption()
+
+L4_INLINE L4_Bool_t
+L4_PreemptionPending(void)
+{
+    return ((__L4_Sparc64_Utcb())[__L4_TCR_PREEMPT_FLAGS] >> 7) & 1;
+} // L4_PreemptionPending()
+
+
+/********************
+* Message Registers *
+********************/
+
+L4_INLINE void
+L4_StoreMR(int i, L4_Word_t * w)
+{
+    *w = (__L4_Sparc64_Utcb())[__L4_TCR_MR_OFFSET + i];
+} // L4_StoreMR()
+
+L4_INLINE void
+L4_LoadMR(int i, L4_Word_t w)
+{
+    (__L4_Sparc64_Utcb())[__L4_TCR_MR_OFFSET + i] = w;
+} // L4_LoadMR()
+
+L4_INLINE void
+L4_StoreMRs(int i, int k, L4_Word_t * w)
+{
+    L4_Word_t* mr = __L4_Sparc64_Utcb() + __L4_TCR_MR_OFFSET + i;
+
+    while (k-- > 0) {
+	*w++ = *mr++;
+    }
+} // L4_StoreMRs()
+
+L4_INLINE void
+L4_LoadMRs(int i, int k, L4_Word_t * w)
+{
+    L4_Word_t* mr = __L4_Sparc64_Utcb() + __L4_TCR_MR_OFFSET + i;
+
+    while (k-- > 0) {
+	*mr++ = *w++;
+    }
+} // L4_LoadMRs()
+
+
+/*******************
+* Buffer Registers *
+*******************/
+
+L4_INLINE void
+L4_StoreBR(int i, L4_Word_t * w)
+{
+    *w = (__L4_Sparc64_Utcb())[__L4_TCR_BR_OFFSET + i];
+} // L4_StoreBR()
+
+L4_INLINE void
+L4_LoadBR(int i, L4_Word_t w)
+{
+    (__L4_Sparc64_Utcb())[__L4_TCR_BR_OFFSET + i] = w;
+} // L4_LoadBR()
+
+L4_INLINE void
+L4_StoreBRs(int i, int k, L4_Word_t * w)
+{
+    L4_Word_t* br = __L4_Sparc64_Utcb() + __L4_TCR_BR_OFFSET + i;
+
+    while (k-- > 0) {
+	*w++ = *br++;
+    }
+} // L4_StoreBRs()
+
+L4_INLINE void
+L4_LoadBRs(int i, int k, L4_Word_t * w)
+{
+    L4_Word_t* br = __L4_Sparc64_Utcb() + __L4_TCR_BR_OFFSET + i;
+
+    while (k-- > 0) {
+	*br++ = *w++;
+    }
+} // L4_LoadBRs()
+
+
+#endif /* !__L4__SPARC64__VREGS_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/thread.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/thread.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/thread.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/thread.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,609 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2001-2004,  Karlsruhe University
+ *                
+ * File path:     l4/thread.h
+ * Description:   Thread handling interfaces
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: thread.h,v 1.21 2004/03/12 17:52:14 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__THREAD_H__
+#define __L4__THREAD_H__
+
+#include <l4/types.h>
+#include __L4_INC_ARCH(syscalls.h)
+#include __L4_INC_ARCH(vregs.h)
+
+
+/*
+ * Thread states
+ */
+
+typedef struct L4_ThreadState {
+    L4_Word_t	raw;
+} L4_ThreadState_t;
+
+L4_INLINE L4_Bool_t L4_ThreadWasHalted (L4_ThreadState_t s)
+{
+    return s.raw & (1 << 0);
+}
+
+L4_INLINE L4_Bool_t L4_ThreadWasReceiving (L4_ThreadState_t s)
+{
+    return s.raw & (1 << 1);
+}
+
+L4_INLINE L4_Bool_t L4_ThreadWasSending (L4_ThreadState_t s)
+{
+    return s.raw & (1 << 2);
+}
+
+L4_INLINE L4_Bool_t L4_ThreadWasIpcing (L4_ThreadState_t s)
+{
+    return s.raw & (3 << 1);
+}
+
+
+
+/*
+ * TCR related functions
+ */
+
+L4_INLINE L4_ThreadId_t L4_MyGlobalId (void)
+{
+    L4_ThreadId_t id;
+    id.raw = __L4_TCR_MyGlobalId ();
+    return id;
+}
+
+L4_INLINE L4_ThreadId_t L4_Myself (void)
+{
+    return L4_MyGlobalId ();
+}
+
+L4_INLINE L4_Word_t L4_ProcessorNo (void)
+{
+    return __L4_TCR_ProcessorNo ();
+}
+
+L4_INLINE L4_Word_t L4_UserDefinedHandle (void)
+{
+    return __L4_TCR_UserDefinedHandle ();
+}
+
+L4_INLINE void L4_Set_UserDefinedHandle (L4_Word_t NewValue)
+{
+    __L4_TCR_Set_UserDefinedHandle (NewValue);
+}
+
+L4_INLINE L4_ThreadId_t L4_Pager (void)
+{
+    L4_ThreadId_t id;
+    id.raw = __L4_TCR_Pager ();
+    return id;
+}
+
+L4_INLINE void L4_Set_Pager (L4_ThreadId_t NewPager)
+{
+    __L4_TCR_Set_Pager (NewPager.raw);
+}
+
+L4_INLINE L4_ThreadId_t L4_ExceptionHandler (void)
+{
+    L4_ThreadId_t id;
+    id.raw = __L4_TCR_ExceptionHandler ();
+    return id;
+}
+
+L4_INLINE void L4_Set_ExceptionHandler (L4_ThreadId_t NewHandler)
+{
+    __L4_TCR_Set_ExceptionHandler (NewHandler.raw);
+}
+
+L4_INLINE L4_Word_t L4_ErrorCode (void)
+{
+    return __L4_TCR_ErrorCode ();
+}
+
+L4_INLINE L4_ThreadId_t L4_IntendedReceiver (void)
+{
+    L4_ThreadId_t id;
+    id.raw = __L4_TCR_IntendedReceiver ();
+    return id;
+}
+
+L4_INLINE L4_ThreadId_t L4_ActualSender (void)
+{
+    L4_ThreadId_t id;
+    id.raw = __L4_TCR_ActualSender ();
+    return id;
+}
+
+L4_INLINE void L4_Set_VirtualSender (L4_ThreadId_t t)
+{
+    __L4_TCR_Set_VirtualSender (t.raw);
+}
+
+
+
+/*
+ * Derived functions
+ */
+
+/*
+ * These are the functions derived from the exchange register syscall.
+ * For normal C, function overloading is not supported.  Functions
+ * with unique names (i.e., with the suffix inside <> appended) have
+ * therefore been provided.
+ *
+ *   L4_SameThreads				(l, r)
+ *   L4_UserDefinedHandle<Of>			(t)
+ *   L4_Set_UserDefinedHandle<Of>		(t, handle)
+ *   L4_Pager<Of>				(t)
+ *   L4_Set_Pager<Of>				(t, pager)
+ *   L4_Start					(t)
+ *   L4_Start<_SpIp>				(t, sp, ip)
+ *   L4_Start<_SpIpFlags>			(t, sp, ip, flags)
+ *   L4_Stop					(t)
+ *   L4_Stop_Thread				(t)	// No return state
+ *   L4_Stop<_SpIpFlags>			(t, &sp, &ip, &flags)
+ *   L4_AbortReceive_and_stop			(t)
+ *   L4_AbortReceive_and_stop_Thread		(t)	// No return state
+ *   L4_AbortReceive_and_stop<_SpIpFlags>	(t, &sp, &ip, &flags)
+ *   L4_AbortSend_and_stop			(t)
+ *   L4_AbortSend_and_stop_Thread		(t)	// No return state
+ *   L4_AbortSend_and_stop<_SpIpFlags>		(t, &sp, &ip, &flags)
+ *   L4_AbortIpc_and_stop_Thread		(t)	// No return state
+ *   L4_AbortIpc_and_stop<_SpIpFlags>		(t, &sp, &ip, &flags)
+ *   L4_CopyVolatile_regs			(src, dest)
+ *   L4_CopySaved_regs<_SpIp>			(src, dest)
+ *   L4_Copy_regs<_SpIp>			(src, dest)
+ *   L4_Copy_regs_to_mrs			(src)
+ *
+ */
+
+L4_INLINE L4_Word_t L4_UserDefinedHandleOf (L4_ThreadId_t t)
+{
+    L4_Word_t dummy, handle;
+    L4_ThreadId_t dummy_id;
+
+    (void) L4_ExchangeRegisters (t, L4_ExReg_Deliver, 0, 0, 0, 0, L4_nilthread,
+				 &dummy, &dummy, &dummy, &dummy, &handle,
+				 &dummy_id);
+
+    return handle;
+}
+
+L4_INLINE void L4_Set_UserDefinedHandleOf (L4_ThreadId_t t, L4_Word_t handle)
+{
+    L4_Word_t dummy;
+    L4_ThreadId_t dummy_id;
+
+    (void) L4_ExchangeRegisters (t, L4_ExReg_user, 0, 0, 0, handle, L4_nilthread,
+				 &dummy, &dummy, &dummy, &dummy, &dummy,
+				 &dummy_id);
+}
+
+#if defined(__l4_cplusplus)
+L4_INLINE L4_Word_t L4_UserDefinedHandle (L4_ThreadId_t t)
+{
+    return L4_UserDefinedHandleOf (t);
+}
+
+L4_INLINE void L4_Set_UserDefinedHandle (L4_ThreadId_t t, L4_Word_t handle)
+{
+    L4_Set_UserDefinedHandleOf (t, handle);
+}
+#endif /* __l4_cplusplus */
+
+L4_INLINE L4_ThreadId_t L4_PagerOf (L4_ThreadId_t t)
+{
+    L4_Word_t dummy;
+    L4_ThreadId_t pager;
+
+    (void) L4_ExchangeRegisters (t, L4_ExReg_Deliver, 0, 0, 0, 0, L4_nilthread,
+				 &dummy, &dummy, &dummy, &dummy, &dummy,
+				 &pager);
+
+    return pager;
+}
+
+L4_INLINE void L4_Set_PagerOf (L4_ThreadId_t t, L4_ThreadId_t p)
+{
+    L4_Word_t dummy;
+    L4_ThreadId_t dummy_id;
+
+    (void) L4_ExchangeRegisters (t, L4_ExReg_pager, 0, 0, 0, 0, p,
+				 &dummy, &dummy, &dummy, &dummy, &dummy,
+				 &dummy_id);
+}
+
+#if defined(__l4_cplusplus)
+L4_INLINE L4_ThreadId_t L4_Pager (L4_ThreadId_t t)
+{
+    return L4_PagerOf (t);
+}
+
+L4_INLINE void L4_Set_Pager (L4_ThreadId_t t, L4_ThreadId_t p)
+{
+    L4_Set_PagerOf (t, p);
+}
+#endif /* __l4_cplusplus */
+
+L4_INLINE void L4_Start (L4_ThreadId_t t)
+{
+    L4_Word_t dummy;
+    L4_ThreadId_t dummy_id;
+
+    (void) L4_ExchangeRegisters (t, L4_ExReg_Resume + L4_ExReg_AbortIPC, 0, 0, 0, 0, L4_nilthread,
+				 &dummy, &dummy, &dummy, &dummy, &dummy,
+				 &dummy_id);
+}
+
+L4_INLINE void L4_Start_SpIp (L4_ThreadId_t t, L4_Word_t sp, L4_Word_t ip)
+{
+    L4_Word_t dummy;
+    L4_ThreadId_t dummy_id;
+
+    (void) L4_ExchangeRegisters (t, L4_ExReg_sp_ip + L4_ExReg_Resume + L4_ExReg_AbortIPC,
+				 sp, ip, 0, 0, L4_nilthread,
+				 &dummy, &dummy, &dummy, &dummy, &dummy,
+				 &dummy_id);
+}
+
+
+L4_INLINE void L4_Start_SpIpFlags (L4_ThreadId_t t, L4_Word_t sp,
+				   L4_Word_t ip, L4_Word_t flags)
+{
+    L4_Word_t dummy;
+    L4_ThreadId_t dummy_id;
+
+    (void) L4_ExchangeRegisters (t, L4_ExReg_sp_ip_flags +  L4_ExReg_Resume + L4_ExReg_AbortIPC,
+				 sp, ip, flags, 0, L4_nilthread,
+				 &dummy, &dummy, &dummy, &dummy, &dummy,
+				 &dummy_id);
+}
+
+#if defined(__l4_cplusplus)
+L4_INLINE void L4_Start (L4_ThreadId_t t, L4_Word_t sp, L4_Word_t ip)
+{
+    L4_Start_SpIp (t, sp, ip);
+}
+
+
+L4_INLINE void L4_Start (L4_ThreadId_t t, L4_Word_t sp,
+			 L4_Word_t ip, L4_Word_t flags)
+{
+    L4_Start_SpIpFlags (t, sp, ip, flags);
+}
+#endif
+
+L4_INLINE L4_ThreadState_t L4_Stop (L4_ThreadId_t t)
+{
+    L4_Word_t dummy;
+    L4_ThreadId_t dummy_id;
+    L4_ThreadState_t state;
+
+    (void) L4_ExchangeRegisters (t, L4_ExReg_Halt + L4_ExReg_Deliver,
+				 0, 0, 0, 0, L4_nilthread,
+				 &state.raw, &dummy, &dummy, &dummy, &dummy,
+				 &dummy_id);
+
+    return state;
+}
+
+L4_INLINE void L4_Stop_Thread (L4_ThreadId_t t)
+{
+    L4_Word_t dummy;
+    L4_ThreadId_t dummy_id;
+
+    (void) L4_ExchangeRegisters (t, L4_ExReg_Halt, 0, 0, 0, 0, L4_nilthread,
+				 &dummy, &dummy, &dummy, &dummy, &dummy,
+				 &dummy_id);
+}
+
+L4_INLINE L4_ThreadState_t L4_Stop_SpIpFlags (L4_ThreadId_t t,
+					      L4_Word_t *sp,
+					      L4_Word_t *ip,
+					      L4_Word_t *flags)
+{
+    L4_Word_t dummy;
+    L4_ThreadId_t dummy_id;
+    L4_ThreadState_t state;
+
+    (void) L4_ExchangeRegisters (t, L4_ExReg_Halt + L4_ExReg_Deliver,
+				 0, 0, 0, 0, L4_nilthread,
+				 &state.raw, sp, ip, flags, &dummy,
+				 &dummy_id);
+
+    return state;
+}
+
+#if defined(__l4_cplusplus)
+L4_INLINE L4_ThreadState_t L4_Stop (L4_ThreadId_t t, L4_Word_t *sp,
+				    L4_Word_t *ip, L4_Word_t *flags)
+{
+    return L4_Stop_SpIpFlags (t, sp, ip, flags);
+}
+#endif
+
+L4_INLINE L4_ThreadState_t L4_AbortReceive_and_stop (L4_ThreadId_t t)
+{
+    L4_Word_t dummy;
+    L4_ThreadId_t dummy_id;
+    L4_ThreadState_t state;
+
+    (void) L4_ExchangeRegisters (t, L4_ExReg_Halt + L4_ExReg_AbortRecvIPC + L4_ExReg_Deliver,
+				 0, 0, 0, 0, L4_nilthread,
+				 &state.raw, &dummy, &dummy, &dummy, &dummy,
+				 &dummy_id);
+
+    return state;
+}
+
+L4_INLINE void L4_AbortReceive_and_stop_Thread (L4_ThreadId_t t)
+{
+    L4_Word_t dummy;
+    L4_ThreadId_t dummy_id;
+
+    (void) L4_ExchangeRegisters (t, L4_ExReg_Halt + L4_ExReg_AbortRecvIPC,
+				 0, 0, 0, 0, L4_nilthread,
+				 &dummy, &dummy, &dummy, &dummy, &dummy,
+				 &dummy_id);
+}
+
+L4_INLINE L4_ThreadState_t L4_AbortReceive_and_stop_SpIpFlags (
+    L4_ThreadId_t t,
+    L4_Word_t *sp,
+    L4_Word_t *ip,
+    L4_Word_t *flags)
+{
+    L4_Word_t dummy;
+    L4_ThreadId_t dummy_id;
+    L4_ThreadState_t state;
+
+    (void) L4_ExchangeRegisters (t, L4_ExReg_Halt + L4_ExReg_AbortRecvIPC + L4_ExReg_Deliver,
+				 0, 0, 0, 0, L4_nilthread,
+				 &state.raw, sp, ip, flags, &dummy,
+				 &dummy_id);
+
+    return state;
+}
+
+#if defined(__l4_cplusplus)
+L4_INLINE L4_ThreadState_t L4_AbortReceive_and_stop (L4_ThreadId_t t,
+						     L4_Word_t *sp,
+						     L4_Word_t *ip,
+						     L4_Word_t *flags)
+{
+    return L4_AbortReceive_and_stop_SpIpFlags (t, sp, ip, flags);
+}
+#endif
+    
+L4_INLINE L4_ThreadState_t L4_AbortSend_and_stop (L4_ThreadId_t t)
+{
+    L4_Word_t dummy;
+    L4_ThreadId_t dummy_id;
+    L4_ThreadState_t state;
+
+    (void) L4_ExchangeRegisters (t, L4_ExReg_Halt + L4_ExReg_AbortSendIPC + L4_ExReg_Deliver,
+				 0, 0, 0, 0, L4_nilthread,
+				 &state.raw, &dummy, &dummy, &dummy, &dummy,
+				 &dummy_id);
+
+    return state;
+}
+
+L4_INLINE void L4_AbortSend_and_stop_Thread (L4_ThreadId_t t)
+{
+    L4_Word_t dummy;
+    L4_ThreadId_t dummy_id;
+
+    (void) L4_ExchangeRegisters (t, L4_ExReg_Halt + L4_ExReg_AbortSendIPC,
+				 0, 0, 0, 0, L4_nilthread,
+				 &dummy, &dummy, &dummy, &dummy, &dummy,
+				 &dummy_id);
+}
+
+L4_INLINE L4_ThreadState_t L4_AbortSend_and_stop_SpIpFlags (
+    L4_ThreadId_t t,
+    L4_Word_t *sp,
+    L4_Word_t *ip,
+    L4_Word_t *flags)
+{
+
+    L4_Word_t dummy;
+    L4_ThreadId_t dummy_id;
+    L4_ThreadState_t state;
+
+    (void) L4_ExchangeRegisters (t, L4_ExReg_Halt + L4_ExReg_AbortSendIPC + L4_ExReg_Deliver,
+				 0, 0, 0, 0, L4_nilthread,
+				 &state.raw, sp, ip, flags, &dummy,
+				 &dummy_id);
+
+    return state;
+}
+
+#if defined(__l4_cplusplus)
+L4_INLINE L4_ThreadState_t L4_AbortSend_and_stop (L4_ThreadId_t t,
+						   L4_Word_t *sp,
+						   L4_Word_t *ip,
+						   L4_Word_t *flags)
+{
+    return L4_AbortSend_and_stop_SpIpFlags (t, sp, ip, flags);
+}
+#endif
+
+L4_INLINE L4_ThreadState_t L4_AbortIpc_and_stop (L4_ThreadId_t t)
+{
+    L4_Word_t dummy;
+    L4_ThreadId_t dummy_id;
+    L4_ThreadState_t state;
+
+    (void) L4_ExchangeRegisters (t, L4_ExReg_Halt + L4_ExReg_AbortIPC + L4_ExReg_Deliver,
+				 0, 0, 0, 0, L4_nilthread,
+				 &state.raw, &dummy, &dummy, &dummy, &dummy,
+				 &dummy_id);
+
+    return state;
+}
+
+L4_INLINE void L4_AbortIpc_and_stop_Thread (L4_ThreadId_t t)
+{
+    L4_Word_t dummy;
+    L4_ThreadId_t dummy_id;
+
+    (void) L4_ExchangeRegisters (t, L4_ExReg_Halt + L4_ExReg_AbortIPC,
+				 0, 0, 0, 0, L4_nilthread,
+				 &dummy, &dummy, &dummy, &dummy, &dummy,
+				 &dummy_id);
+}
+
+L4_INLINE L4_ThreadState_t L4_AbortIpc_and_stop_SpIpFlags (L4_ThreadId_t t,
+							   L4_Word_t *sp,
+							   L4_Word_t *ip,
+							   L4_Word_t *flags)
+{
+    L4_Word_t dummy;
+    L4_ThreadId_t dummy_id;
+    L4_ThreadState_t state;
+
+    (void) L4_ExchangeRegisters (t, L4_ExReg_Halt + L4_ExReg_AbortIPC + L4_ExReg_Deliver,
+				 0, 0, 0, 0, L4_nilthread,
+				 &state.raw, sp, ip, flags, &dummy,
+				 &dummy_id);
+
+    return state;
+}
+
+#if defined(__l4_cplusplus)
+L4_INLINE L4_ThreadState_t L4_AbortIpc_and_stop (L4_ThreadId_t t,
+						 L4_Word_t *sp,
+						 L4_Word_t *ip,
+						 L4_Word_t *flags)
+{
+    return L4_AbortIpc_and_stop_SpIpFlags (t, sp, ip, flags);
+}
+#endif
+
+L4_INLINE void L4_CopyVolatile_regs (L4_ThreadId_t src, L4_ThreadId_t dest)
+{
+    L4_Word_t dummy;
+    L4_ThreadId_t dummy_id;
+
+    (void) L4_ExchangeRegisters (dest, L4_ExReg_VolatileRegs + L4_ExReg_SrcThread(src),
+				 0, 0, 0, 0, L4_nilthread,
+				 &dummy, &dummy, &dummy, &dummy, &dummy,
+				 &dummy_id);
+}
+
+L4_INLINE void L4_CopySaved_regs (L4_ThreadId_t src, L4_ThreadId_t dest)
+{
+    L4_Word_t dummy;
+    L4_ThreadId_t dummy_id;
+
+    (void) L4_ExchangeRegisters (dest, L4_ExReg_SavedRegs + L4_ExReg_SrcThread(src),
+				 0, 0, 0, 0, L4_nilthread,
+				 &dummy, &dummy, &dummy, &dummy, &dummy,
+				 &dummy_id);
+}
+
+L4_INLINE void L4_CopySaved_regs_SpIp (L4_ThreadId_t src, L4_ThreadId_t dest, L4_Word_t sp, L4_Word_t ip)
+{
+    L4_Word_t dummy;
+    L4_ThreadId_t dummy_id;
+
+    (void) L4_ExchangeRegisters (dest, L4_ExReg_sp_ip + L4_ExReg_SavedRegs + L4_ExReg_SrcThread(src),
+				 sp, ip, 0, 0, L4_nilthread,
+				 &dummy, &dummy, &dummy, &dummy, &dummy,
+				 &dummy_id);
+}
+
+L4_INLINE void L4_Copy_regs (L4_ThreadId_t src, L4_ThreadId_t dest)
+{
+    L4_Word_t dummy;
+    L4_ThreadId_t dummy_id;
+
+    (void) L4_ExchangeRegisters (dest, L4_ExReg_VolatileRegs + L4_ExReg_SavedRegs + L4_ExReg_SrcThread(src),
+				 0, 0, 0, 0, L4_nilthread,
+				 &dummy, &dummy, &dummy, &dummy, &dummy,
+				 &dummy_id);
+}
+
+L4_INLINE void L4_Copy_regs_SpIp (L4_ThreadId_t src, L4_ThreadId_t dest, L4_Word_t sp, L4_Word_t ip)
+{
+    L4_Word_t dummy;
+    L4_ThreadId_t dummy_id;
+
+    (void) L4_ExchangeRegisters (dest, L4_ExReg_sp_ip + L4_ExReg_VolatileRegs +
+				 L4_ExReg_SavedRegs + L4_ExReg_SrcThread(src),
+				 sp, ip, 0, 0, L4_nilthread,
+				 &dummy, &dummy, &dummy, &dummy, &dummy,
+				 &dummy_id);
+}
+
+L4_INLINE void L4_Copy_regs_to_mrs (L4_ThreadId_t src)
+{
+    L4_Word_t dummy;
+    L4_ThreadId_t dummy_id;
+
+    (void) L4_ExchangeRegisters (src, L4_ExReg_RegsToMRs, 
+				 0, 0, 0, 0, L4_nilthread,
+				 &dummy, &dummy, &dummy, &dummy, &dummy,
+				 &dummy_id);
+}
+
+L4_INLINE L4_Word_t L4_AssociateInterrupt (L4_ThreadId_t InterruptThread,
+					   L4_ThreadId_t HandlerThread)
+{
+    return L4_ThreadControl (InterruptThread, InterruptThread,
+			     L4_nilthread, HandlerThread, 
+			     L4_anythread, L4_anythread, (void *) -1);
+}
+
+L4_INLINE L4_Word_t L4_Set_SendRedirector (L4_ThreadId_t Thread,
+					   L4_ThreadId_t Redirector)
+{
+    return L4_ThreadControl (Thread, Thread,
+			     L4_nilthread, L4_nilthread, 
+			     Redirector, L4_nilthread, (void *) -1);
+}
+
+L4_INLINE L4_Word_t L4_Set_ReceiveRedirector (L4_ThreadId_t Thread,
+					   L4_ThreadId_t Redirector)
+{
+    return L4_ThreadControl (Thread, Thread,
+			     L4_nilthread, L4_nilthread, 
+			     L4_nilthread, Redirector, (void *) -1);
+}
+
+L4_INLINE L4_Word_t L4_DeassociateInterrupt (L4_ThreadId_t InterruptThread)
+{
+    return L4_ThreadControl (InterruptThread, InterruptThread,
+			     L4_nilthread, InterruptThread, 
+			     L4_anythread, L4_anythread, (void *) -1);
+}
+
+#endif /* !__L4__THREAD_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/time.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/time.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/time.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/time.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,38 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2001-2004,  Karlsruhe University
+ *                
+ * File path:     l4/types.h
+ * Description:   Commonly used L4 types
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: types.h,v 1.41 2004/08/23 18:41:45 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__TIME_H__
+#define __L4__TIME_H__
+
+#include <l4/types.h>
+#include __L4_INC_ARCH(syscalls.h)
+
+#endif /* !__L4__TIME_H__ */
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/include/l4/types.h newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/types.h
--- newlib-1.12.0/newlib/libc/sys/l4/include/l4/types.h	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/types.h	2006-10-03 22:39:54.000000000 +0530
@@ -0,0 +1,465 @@
+/*********************************************************************
+ *                
+ * Copyright (C) 2001-2004,  Karlsruhe University
+ *                
+ * File path:     l4/types.h
+ * Description:   Commonly used L4 types
+ *                
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *                
+ * $Id: types.h,v 1.41 2004/08/23 18:41:45 skoglund Exp $
+ *                
+ ********************************************************************/
+#ifndef __L4__TYPES_H__
+#define __L4__TYPES_H__
+
+#undef L4_32BIT
+#undef L4_64BIT
+#undef L4_BIG_ENDIAN
+#undef L4_LITTLE_ENDIAN
+
+/*
+ * Determine which architecture dependent files to include
+ */
+
+#if !defined(__L4_ARCH__)
+# if defined(__i386__)
+#  define L4_ARCH_IA32
+#  define __L4_ARCH__ ia32
+# elif defined(__ia64__)
+#  undef ia64
+#  define L4_ARCH_IA64
+#  define __L4_ARCH__ ia64
+# elif defined(__PPC64__)
+#  define L4_ARCH_POWERPC64
+#  define __L4_ARCH__ powerpc64
+# elif defined(__PPC__)
+#  undef powerpc
+#  define L4_ARCH_POWERPC
+#  define __L4_ARCH__ powerpc
+# elif defined(ARCH_ARM) || defined(__arm__) || defined(__thumb__) || defined(__ARMCC_VERSION) 
+#  define L4_ARCH_ARM
+#  define __L4_ARCH__ arm
+# elif defined(__x86_64__)
+#  define L4_ARCH_AMD64
+#  define __L4_ARCH__ amd64
+# elif defined(__alpha__)
+#  define L4_ARCH_ALPHA
+#  define __L4_ARCH__ alpha
+# elif defined(__mips__)
+#  define L4_ARCH_MIPS64
+#  define __L4_ARCH__ mips64
+# elif defined(__sparc__)
+#  define L4_ARCH_SPARC64
+#  define __L4_ARCH__ sparc64
+# else
+#  error Unknown hardware architecture.
+# endif
+#endif
+
+#if !defined(__ARMCC_VERSION) && !defined(__GNUC__)
+  #define __GNUC__
+#endif
+
+#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION<210000)
+  //this is ADS 1.2
+  #define __L4_INC_ARCH(file) <l4/arm/##file##>
+#else /* __GNUC__ */
+#define __L4_INC_ARCH(file) <l4/__L4_ARCH__/file>
+#endif
+
+#include __L4_INC_ARCH(types.h)
+
+#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION<210000)
+#if defined(__l4_cplusplus)
+  #define __CPP "C"
+#else
+  #define __CPP
+#endif
+#define __attribute__(a) 
+#endif
+
+
+
+/*
+ * All types used within <arch/syscalls.h> should be declared in this
+ * file.
+ */
+
+typedef L4_Word_t		L4_Bool_t;
+
+#if defined(__ARMCC_VERSION)
+#define L4_INLINE		__inline
+#else
+#define L4_INLINE		static inline
+#endif
+#define L4_BITS_PER_WORD	(sizeof (L4_Word_t) * 8)
+
+// XXX: magpie workaround
+// # define __PLUS32	+ (sizeof (L4_Word_t) * 8 - 32)
+#if defined(L4_64BIT)
+# define __PLUS32	+ 32
+# define __14		32
+# define __18		32
+#else
+# define __PLUS32
+# define __14		14
+# define __18		18
+#endif
+
+#if defined(L4_BIG_ENDIAN)
+#define L4_BITFIELD2(t,a,b)		t b; t a
+#define L4_BITFIELD3(t,a,b,c)		t c; t b; t a
+#define L4_BITFIELD4(t,a,b,c,d)		t d; t c; t b; t a
+#define L4_BITFIELD5(t,a,b,c,d,e)	t e; t d; t c; t b; t a
+#define L4_BITFIELD6(t,a,b,c,d,e,f)	t f; t e; t d; t c; t b; t a
+#define L4_BITFIELD7(t,a,b,c,d,e,f,g)	t g; t f; t e; t d; t c; t b; t a
+#define L4_BITFIELD8(t,a,b,c,d,e,f,g,h)	t h; t g; t f; t e; t d; t c; t b; t a
+#define L4_BITFIELD9(t,a,b,c,d,e,f,g,h,i)	\
+	t i; t h; t g; t f; t e; t d; t c; t b; t a
+#define L4_SHUFFLE2(a,b)		b,a
+#define L4_SHUFFLE3(a,b,c)		c,b,a
+#define L4_SHUFFLE4(a,b,c,d)		d,c,b,a
+#define L4_SHUFFLE5(a,b,c,d,e)		e,d,c,b,a
+#define L4_SHUFFLE6(a,b,c,d,e,f)	f,e,d,c,b,a
+#define L4_SHUFFLE7(a,b,c,d,e,f,g)	g,f,e,d,c,b,a
+#else
+#define L4_BITFIELD2(t,a,b)		t a; t b
+#define L4_BITFIELD3(t,a,b,c)		t a; t b; t c
+#define L4_BITFIELD4(t,a,b,c,d)		t a; t b; t c; t d
+#define L4_BITFIELD5(t,a,b,c,d,e)	t a; t b; t c; t d; t e
+#define L4_BITFIELD6(t,a,b,c,d,e,f)	t a; t b; t c; t d; t e; t f
+#define L4_BITFIELD7(t,a,b,c,d,e,f,g)	t a; t b; t c; t d; t e; t f; t g
+#define L4_BITFIELD8(t,a,b,c,d,e,f,g,h)	t a; t b; t c; t d; t e; t f; t g; t h
+#define L4_BITFIELD9(t,a,b,c,d,e,f,g,h,i)	\
+	t a; t b; t c; t d; t e; t f; t g; t h; t i
+#define L4_SHUFFLE2(a,b)		a,b
+#define L4_SHUFFLE3(a,b,c)		a,b,c
+#define L4_SHUFFLE4(a,b,c,d)		a,b,c,d
+#define L4_SHUFFLE5(a,b,c,d,e)		a,b,c,d,e
+#define L4_SHUFFLE6(a,b,c,d,e,f)	a,b,c,d,e,f
+#define L4_SHUFFLE7(a,b,c,d,e,f,g)	a,b,c,d,e,f,g
+#endif
+
+/*
+ * Exregs controls
+ */
+#define L4_ExReg_sp		(1 << 3)
+#define L4_ExReg_ip		(1 << 4)
+#define L4_ExReg_sp_ip		(L4_ExReg_sp | L4_ExReg_ip)
+#define L4_ExReg_flags		(1 << 5)
+#define L4_ExReg_sp_ip_flags	(L4_ExReg_sp | L4_ExReg_ip | L4_ExReg_flags)
+#define L4_ExReg_user		(1 << 6)
+#define L4_ExReg_pager		(1 << 7)
+#define L4_ExReg_Halt		(1 << 8 | 1 << 0)
+#define L4_ExReg_Resume		(1 << 8)
+#define L4_ExReg_AbortIPC	(1 << 1 | 1 << 2)
+#define L4_ExReg_AbortRecvIPC	(1 << 1)
+#define L4_ExReg_AbortSendIPC	(1 << 2)
+#define L4_ExReg_Deliver	(1 << 9)
+#define L4_ExReg_VolatileRegs	(1 << 10)
+#define L4_ExReg_SavedRegs	(1 << 11)
+#define L4_ExReg_RegsToMRs	(1 << 12)
+#define L4_ExReg_SrcThread(x)	(((L4_GthreadId_t) { X : {L4_SHUFFLE2(0, L4_ThreadNo(x))}}).raw)
+
+/*
+ * Error codes
+ */
+
+#define L4_ErrOk		(0)
+#define L4_ErrNoPrivilege	(1)
+#define L4_ErrInvalidThread	(2)
+#define L4_ErrInvalidSpace	(3)
+#define L4_ErrInvalidScheduler	(4)
+#define L4_ErrInvalidParam	(5)
+#define L4_ErrUtcbArea		(6)
+#define L4_ErrKipArea		(7)
+#define L4_ErrNoMem		(8)
+#define L4_ErrInvalidRedirector	(9)
+
+/*
+ * IPC Error Codes
+ */
+#define L4_ErrTimeout		(1)
+#define L4_ErrNonExist		(2)
+#define L4_ErrCanceled		(3)
+
+#define L4_ErrMsgOverflow	(4)
+#define L4_ErrNotAccepted	(5)
+#define L4_ErrAborted		(7)
+
+/*
+ * IPC Error Phase, returned by L4_IpcError
+ */
+#define L4_ErrSendPhase         (0)
+#define L4_ErrRecvPhase         (1)
+
+L4_INLINE L4_Bool_t L4_IpcError (L4_Word_t err, L4_Word_t *err_code)
+{
+	L4_Bool_t phase;
+	phase = err & 0x1;
+	if (err_code) {
+		*err_code = (err >> 1) & 0xf;
+	}
+	return phase;
+}
+
+
+/*
+ * Fpages
+ */
+
+typedef union {
+    L4_Word_t	raw;
+    struct {
+	L4_BITFIELD4(L4_Word_t, 
+		rwx : 3,
+		reserved : 1,
+		s : 6,
+		b : 22 __PLUS32);
+    } X;
+} L4_Fpage_t;
+
+#define L4_Readable		(0x04)
+#define L4_Writable		(0x02)
+#define L4_eXecutable		(0x01)
+#define L4_FullyAccessible	(0x07)
+#define L4_ReadWriteOnly	(0x06)
+#define L4_ReadeXecOnly		(0x05)
+#define L4_NoAccess		(0x00)
+
+#if defined(__ARMCC_VERSION)
+  extern const L4_Fpage_t L4_Nilpage;
+  extern L4_Fpage_t L4_CompleteAddressSpace;
+#else
+#ifdef _lint
+/* We are playing tricks with the linter here because it doesn't like
+   this as a #define at all. It would be nice to clean up the code
+   but it doesn't really work */
+static const L4_Fpage_t L4_Nilpage = { 0UL };
+static const L4_Fpage_t L4_CompleteAddressSpace = { 1UL << 22 __PLUS32 };
+#else
+#define L4_Nilpage		((L4_Fpage_t) { raw : 0UL })
+#define L4_CompleteAddressSpace	((L4_Fpage_t) { X : { L4_SHUFFLE4(0, 0, 1, 0) }})
+#endif
+#endif
+
+#include __L4_INC_ARCH(specials.h)
+
+L4_INLINE L4_Bool_t L4_IsNilFpage (L4_Fpage_t f)
+{
+    return f.raw == 0;
+}
+
+L4_INLINE L4_Word_t L4_Rights (L4_Fpage_t f)
+{
+    return f.X.rwx;
+}
+
+L4_INLINE L4_Fpage_t L4_Set_Rights (L4_Fpage_t * f, L4_Word_t rwx)
+{
+    f->X.rwx = rwx;
+    return *f;
+}
+
+L4_INLINE L4_Fpage_t L4_FpageAddRights (L4_Fpage_t f, L4_Word_t rwx)
+{
+    f.X.rwx |= rwx;
+    return f;
+}
+
+L4_INLINE L4_Fpage_t L4_FpageAddRightsTo (L4_Fpage_t * f, L4_Word_t rwx)
+{
+    f->X.rwx |= rwx;
+    return *f;
+}
+
+L4_INLINE L4_Fpage_t L4_FpageRemoveRights (L4_Fpage_t f, L4_Word_t rwx)
+{
+    f.X.rwx &= ~rwx;
+    return f;
+}
+
+L4_INLINE L4_Fpage_t L4_FpageRemoveRightsFrom (L4_Fpage_t * f, L4_Word_t rwx)
+{
+    f->X.rwx &= ~rwx;
+    return *f;
+}
+
+#if defined(__l4_cplusplus)
+static inline L4_Fpage_t operator + (const L4_Fpage_t & f, L4_Word_t rwx)
+{
+    return L4_FpageAddRights (f, rwx);
+}
+
+static inline L4_Fpage_t operator += (L4_Fpage_t & f, L4_Word_t rwx)
+{
+    return L4_FpageAddRightsTo (&f, rwx);
+}
+
+static inline L4_Fpage_t operator - (const L4_Fpage_t & f, L4_Word_t rwx)
+{
+    return L4_FpageRemoveRights (f, rwx);
+}
+
+static inline L4_Fpage_t operator -= (L4_Fpage_t & f, L4_Word_t rwx)
+{
+    return L4_FpageRemoveRightsFrom (&f, rwx);
+}
+#endif /* __l4_cplusplus */
+
+L4_INLINE L4_Fpage_t L4_Fpage (L4_Word_t BaseAddress, L4_Word_t FpageSize)
+{
+    L4_Fpage_t fp;
+    L4_Word_t msb = __L4_Msb (FpageSize);
+    fp.raw = BaseAddress;
+    fp.X.s = (1UL << msb) < FpageSize ? msb + 1 : msb;
+    fp.X.rwx = L4_NoAccess;
+    fp.X.reserved = 0;
+    return fp;
+}
+
+L4_INLINE L4_Fpage_t L4_FpageLog2 (L4_Word_t BaseAddress, int FpageSize)
+{
+    L4_Fpage_t fp;
+    fp.raw = BaseAddress;
+    fp.X.s = FpageSize;
+    fp.X.rwx = L4_NoAccess;
+    fp.X.reserved = 0;
+    return fp;
+}
+
+L4_INLINE L4_Word_t L4_Address (L4_Fpage_t f)
+{
+    return f.raw & ~((1UL << f.X.s) - 1);
+}
+
+L4_INLINE L4_Word_t L4_Size (L4_Fpage_t f)
+{
+    return f.X.s == 0 ? 0 : (1UL << f.X.s);
+}
+
+L4_INLINE L4_Word_t L4_SizeLog2 (L4_Fpage_t f)
+{
+    return f.X.s;
+}
+
+
+/*
+ * Thread IDs
+ */
+
+typedef union {
+    L4_Word_t	raw;
+    struct {
+	L4_BITFIELD2( L4_Word_t,
+		version : __14,
+		thread_no : __18);
+    } X;
+} L4_GthreadId_t;
+
+typedef union {
+    L4_Word_t		raw;
+    L4_GthreadId_t	global;
+} L4_ThreadId_t;
+
+#if defined(__ARMCC_VERSION)
+  extern L4_Word_t L4_ExReg_SrcThread(L4_ThreadId_t x);
+#else
+  #define L4_ExReg_SrcThread(x) (((L4_GthreadId_t) { X : {L4_SHUFFLE2(0, L4_ThreadNo(x))}}).raw)
+#endif
+
+#if defined(__ARMCC_VERSION)
+
+extern const L4_ThreadId_t L4_nilthread;
+extern const L4_ThreadId_t L4_anythread;
+extern L4_ThreadId_t L4_anylocalthread;
+
+#else /*  __GNUC__ */
+
+#ifdef _lint
+static const L4_ThreadId_t L4_nilthread = { 0UL };
+static const L4_ThreadId_t L4_anythread	= { ~0UL};
+#else
+#define L4_nilthread		((L4_ThreadId_t) { raw : 0UL})
+#define L4_anythread		((L4_ThreadId_t) { raw : ~0UL})
+#define L4_waitnotify		((L4_ThreadId_t) { raw : -2UL})
+#define L4_anylocalthread	((L4_ThreadId_t) { raw : -64UL})
+
+#endif
+#endif
+
+L4_INLINE L4_ThreadId_t L4_GlobalId (L4_Word_t threadno, L4_Word_t version)
+{
+    L4_ThreadId_t t;
+    t.global.X.thread_no = threadno;
+    t.global.X.version = version;
+    return t;
+}
+
+L4_INLINE L4_Word_t L4_Version (L4_ThreadId_t t)
+{
+    return t.global.X.version;
+}
+
+L4_INLINE L4_Word_t L4_ThreadNo (L4_ThreadId_t t)
+{
+    return t.global.X.thread_no;
+}
+
+L4_INLINE L4_Bool_t L4_IsThreadEqual (const L4_ThreadId_t l,
+				      const L4_ThreadId_t r)
+{
+    return l.raw == r.raw;
+}
+
+L4_INLINE L4_Bool_t L4_IsThreadNotEqual (const L4_ThreadId_t l,
+					 const L4_ThreadId_t r)
+{
+    return l.raw != r.raw;
+}
+
+#if defined(__l4_cplusplus)
+static inline L4_Bool_t operator == (const L4_ThreadId_t & l,
+				     const L4_ThreadId_t & r)
+{
+    return l.raw == r.raw;
+}
+
+static inline L4_Bool_t operator != (const L4_ThreadId_t & l,
+				     const L4_ThreadId_t & r)
+{
+    return l.raw != r.raw;
+}
+#endif /* __l4_cplusplus */
+
+L4_INLINE L4_Bool_t L4_IsNilThread (L4_ThreadId_t t)
+{
+    return t.raw == 0;
+}
+
+
+#undef __14
+#undef __18
+#undef __PLUS32
+
+#endif /* !__L4__TYPES_H__ */
Binary files newlib-1.12.0/newlib/libc/sys/l4/include/l4/.types.h.swp and newlib-1.12.0_patched/newlib/libc/sys/l4/include/l4/.types.h.swp differ
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/l4_close.c newlib-1.12.0_patched/newlib/libc/sys/l4/l4_close.c
--- newlib-1.12.0/newlib/libc/sys/l4/l4_close.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/l4_close.c	2006-10-03 23:08:33.000000000 +0530
@@ -0,0 +1,18 @@
+/*
+ * close routine stub for l4
+ */
+/*
+  Author: Abhimanyu V
+  Created: 03/10/2006 
+*/
+
+#include <_ansi.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+
+int _close (int file)
+{
+ 	errno = ENOSYS;
+	return -1;
+}
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/l4_environ.c newlib-1.12.0_patched/newlib/libc/sys/l4/l4_environ.c
--- newlib-1.12.0/newlib/libc/sys/l4/l4_environ.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/l4_environ.c	2006-10-03 23:11:37.000000000 +0530
@@ -0,0 +1,10 @@
+/*
+ * declare empty environ variable for l4
+ */
+/*
+  Author: Abhimanyu V
+  Created: 03/10/2006 
+*/
+
+char *__env[1] = {0};
+char **environ = __env;
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/l4_execve.c newlib-1.12.0_patched/newlib/libc/sys/l4/l4_execve.c
--- newlib-1.12.0/newlib/libc/sys/l4/l4_execve.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/l4_execve.c	2006-10-03 23:17:54.000000000 +0530
@@ -0,0 +1,21 @@
+/*
+ * execve routine stub for l4
+ */
+/*
+  Author: Abhimanyu V
+  Created: 03/10/2006 
+*/
+
+#include <_ansi.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <errno.h>
+
+int
+_execve (const char *path, char *const argv[], char *const envp[])
+{
+  printf("path: %s, argv: %p, envp: %p", path, argv, envp);
+  errno = ENOSYS;
+  return -1;
+}
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/l4_exit.c newlib-1.12.0_patched/newlib/libc/sys/l4/l4_exit.c
--- newlib-1.12.0/newlib/libc/sys/l4/l4_exit.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/l4_exit.c	2006-10-04 02:11:45.000000000 +0530
@@ -0,0 +1,19 @@
+/*
+ * _exit routine for l4
+ */
+/*
+  Author: Abhimanyu V
+  Created: 03/10/2006 
+*/
+
+#include <stdlib.h>
+#include <assert.h>
+#include <stdio.h>
+#include "kdebug.h"
+
+void _exit(int status)
+{
+	L4_KDB_Enter("L4 Rootserver exit");
+	
+	while(1);
+}
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/l4_fork.c newlib-1.12.0_patched/newlib/libc/sys/l4/l4_fork.c
--- newlib-1.12.0/newlib/libc/sys/l4/l4_fork.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/l4_fork.c	2006-10-03 23:20:01.000000000 +0530
@@ -0,0 +1,20 @@
+/*
+ * execve routine stub for l4
+ */
+/*
+  Author: Abhimanyu V
+  Created: 03/10/2006 
+*/
+
+#include <_ansi.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <errno.h>
+
+int fork()
+{
+  printf("Fork system call is not implemented\n");
+  errno = ENOSYS;
+  return -1;
+}
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/l4_fstat.c newlib-1.12.0_patched/newlib/libc/sys/l4/l4_fstat.c
--- newlib-1.12.0/newlib/libc/sys/l4/l4_fstat.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/l4_fstat.c	2006-10-04 14:53:31.000000000 +0530
@@ -0,0 +1,18 @@
+/*
+ * execve routine stub for l4
+ */
+/*
+  Author: Abhimanyu V
+  Created: 03/10/2006 
+*/
+
+#include <_ansi.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+
+int _fstat(int file, struct stat *st)
+{
+  errno = ENOSYS;
+  return -1;
+}
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/l4_getpid.c newlib-1.12.0_patched/newlib/libc/sys/l4/l4_getpid.c
--- newlib-1.12.0/newlib/libc/sys/l4/l4_getpid.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/l4_getpid.c	2006-10-04 01:36:03.000000000 +0530
@@ -0,0 +1,20 @@
+/*
+ * getpid routine for l4
+ */
+/*
+  Author: Abhimanyu V
+  Created: 03/10/2006 
+*/
+
+#include <_ansi.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <l4/thread.h>
+#include <stdio.h>
+
+int getpid()
+{
+	L4_ThreadId_t tid;
+	tid = L4_Myself();
+  	return tid.raw;
+}
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/l4_isatty.c newlib-1.12.0_patched/newlib/libc/sys/l4/l4_isatty.c
--- newlib-1.12.0/newlib/libc/sys/l4/l4_isatty.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/l4_isatty.c	2006-10-03 23:38:20.000000000 +0530
@@ -0,0 +1,17 @@
+/*
+ * isatty stub routine for l4
+ */
+/*
+  Author: Abhimanyu V
+  Created: 03/10/2006 
+*/
+
+#include <_ansi.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdio.h>
+
+int isatty(int file)
+{
+	return 1;
+}
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/l4_kill.c newlib-1.12.0_patched/newlib/libc/sys/l4/l4_kill.c
--- newlib-1.12.0/newlib/libc/sys/l4/l4_kill.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/l4_kill.c	2006-10-04 01:37:13.000000000 +0530
@@ -0,0 +1,21 @@
+/*
+ * kill stub routine for l4
+ */
+/*
+  Author: Abhimanyu V
+  Created: 03/10/2006 
+*/
+
+#include <_ansi.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <l4/thread.h>
+#include <stdio.h>
+
+int _kill(int pid, int sig)
+{
+	L4_ThreadId_t tid;
+	tid.raw = pid;
+	L4_Stop_Thread(tid);
+	return 0;
+}
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/l4_link.c newlib-1.12.0_patched/newlib/libc/sys/l4/l4_link.c
--- newlib-1.12.0/newlib/libc/sys/l4/l4_link.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/l4_link.c	2006-10-03 23:50:43.000000000 +0530
@@ -0,0 +1,22 @@
+/*
+ * link stub routine for l4
+ */
+/*
+  Author: Abhimanyu V
+  Created: 03/10/2006 
+*/
+
+#include <_ansi.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <stdio.h>
+
+#undef errno;
+extern int errno;
+
+int _link(char *old, char *new)
+{
+	errno = EMLINK;
+	return -1;
+}
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/l4_lseek.c newlib-1.12.0_patched/newlib/libc/sys/l4/l4_lseek.c
--- newlib-1.12.0/newlib/libc/sys/l4/l4_lseek.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/l4_lseek.c	2006-10-03 23:52:39.000000000 +0530
@@ -0,0 +1,17 @@
+/*
+ * lseek stub routine for l4
+ */
+/*
+  Author: Abhimanyu V
+  Created: 03/10/2006 
+*/
+
+#include <_ansi.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdio.h>
+
+int _lseek(int file, int ptr, int dir)
+{
+	return 0;
+}
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/l4_open.c newlib-1.12.0_patched/newlib/libc/sys/l4/l4_open.c
--- newlib-1.12.0/newlib/libc/sys/l4/l4_open.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/l4_open.c	2006-10-04 14:54:15.000000000 +0530
@@ -0,0 +1,18 @@
+/*
+ * open stub routine for l4
+ */
+/*
+  Author: Abhimanyu V
+  Created: 03/10/2006 
+*/
+
+#include <_ansi.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdio.h>
+
+int _open(const char *file, int flags, int mode)
+{
+	//printf("Open system call is not implemented\n");
+	return -1;
+}
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/l4_read.c newlib-1.12.0_patched/newlib/libc/sys/l4/l4_read.c
--- newlib-1.12.0/newlib/libc/sys/l4/l4_read.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/l4_read.c	2006-10-04 00:04:52.000000000 +0530
@@ -0,0 +1,28 @@
+/*
+ * read routine for l4
+ */
+/*
+  Author: Abhimanyu V
+  Created: 03/10/2006 
+*/
+
+#include <_ansi.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <l4/kdebug.h>
+
+static size_t
+l4kdb_read(void *data, long int position, size_t count, void *handle /*unused*/)
+{
+        size_t i;
+        char *realdata = data;
+        for (i = 0; i < count; i++)
+                realdata[i] = L4_KDB_ReadChar_Blocked();
+        return count;
+}
+
+int _read(int file, char *ptr, int len)
+{
+	return l4kdb_read((void *)ptr, 0, len, NULL);
+}
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/l4_sbrk.c newlib-1.12.0_patched/newlib/libc/sys/l4/l4_sbrk.c
--- newlib-1.12.0/newlib/libc/sys/l4/l4_sbrk.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/l4_sbrk.c	2006-10-04 00:10:41.000000000 +0530
@@ -0,0 +1,18 @@
+/* 
+ * sbrk stub for l4.
+ */
+
+/*
+ * Author Abhimanyu V
+ * Created 03/10/2006
+ */
+
+#include <_ansi.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+caddr_t
+_sbrk (size_t incr)
+{
+	return -1;
+}
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/l4_stat.c newlib-1.12.0_patched/newlib/libc/sys/l4/l4_stat.c
--- newlib-1.12.0/newlib/libc/sys/l4/l4_stat.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/l4_stat.c	2006-10-04 14:54:27.000000000 +0530
@@ -0,0 +1,23 @@
+/* 
+ * stat stub for l4.
+ */
+
+/*
+ * Author Abhimanyu V
+ * Created 03/10/2006
+ */
+
+
+#include <_ansi.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+
+int
+_stat (const char *path, struct stat *st)
+
+{
+  //printf("path: %s, st: %p", path, st);
+  errno = ENOSYS;
+  return -1;
+}
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/l4_times.c newlib-1.12.0_patched/newlib/libc/sys/l4/l4_times.c
--- newlib-1.12.0/newlib/libc/sys/l4/l4_times.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/l4_times.c	2006-10-04 00:13:18.000000000 +0530
@@ -0,0 +1,21 @@
+/* 
+ * times stub for l4.
+ */
+
+/*
+ * Author Abhimanyu V
+ * Created 03/10/2006
+ */
+
+
+#include <_ansi.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include "sys/times.h"
+
+clock_t
+_times (struct tms *buffer)
+{
+  memset (buffer, 0, sizeof (*buffer));
+  return 0;
+}
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/l4_wait.c newlib-1.12.0_patched/newlib/libc/sys/l4/l4_wait.c
--- newlib-1.12.0/newlib/libc/sys/l4/l4_wait.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/l4_wait.c	2006-10-04 14:54:36.000000000 +0530
@@ -0,0 +1,21 @@
+/* 
+ *wait stub for l4.
+ */
+
+/*
+ * Author Abhimanyu V
+ * Created 03/10/2006
+ */
+
+
+#include <_ansi.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+
+int _wait (int *statusp)
+{
+  //printf("statusp: %p", statusp);
+  errno = ENOSYS;
+  return -1;
+}
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/l4_write.c newlib-1.12.0_patched/newlib/libc/sys/l4/l4_write.c
--- newlib-1.12.0/newlib/libc/sys/l4/l4_write.c	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/l4_write.c	2006-10-04 00:08:37.000000000 +0530
@@ -0,0 +1,28 @@
+/*
+ * write routine for l4
+ */
+/*
+  Author: Abhimanyu V
+  Created: 03/10/2006 
+*/
+
+#include <_ansi.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <l4/kdebug.h>
+
+static size_t
+l4kdb_write(const void *data, long int position, size_t count, void *handle /*unused*/)
+{
+        size_t i;
+        const char *realdata = data;
+        for (i = 0; i < count; i++)
+                L4_KDB_PrintChar(realdata[i]);
+        return count;
+}
+
+int _write(int file, char *ptr, int len)
+{
+	return l4kdb_write((void*)ptr, 0, len, NULL);
+}
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/Makefile.am newlib-1.12.0_patched/newlib/libc/sys/l4/Makefile.am
--- newlib-1.12.0/newlib/libc/sys/l4/Makefile.am	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/Makefile.am	2006-10-04 14:16:56.000000000 +0530
@@ -0,0 +1,22 @@
+## Process this file with automake to generate Makefile.in
+
+AUTOMAKE_OPTIONS = cygnus
+
+newlib_basedir = $(top_srcdir)/../../../../newlib
+
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/include/l4 -I$(top_srcdir)/include/l4/ia32 $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+
+noinst_LIBRARIES = lib.a
+
+CPPFLAGS = -DARCH_IA32 -DMACHINE_PC99_VGA -DPLATFORM_PC99 -DENDIAN_LITTLE -D__API__=v4 -D__ARCH__=ia32 -D__CPU__=i686 -D__PLATFORM__=pc99 -DCONFIG_ARCH_IA32=1 -DCONFIG_PLAT_PC99=1 -DCONFIG_CPU_IA32_I686=1 
+
+lib_a_SOURCES = l4_close.c  l4_exit.c  l4_getpid.c  l4_link.c   l4_read.c \
+	l4_times.c  l4_environ.c  l4_fork.c   l4_isatty.c  l4_lseek.c  \
+	l4_sbrk.c   l4_wait.c l4_execve.c   l4_fstat.c  l4_kill.c \
+	l4_open.c   l4_stat.c  l4_write.c \
+	crt0.S 
+
+all: crt0.o
+
+ACLOCAL_AMFLAGS = -I ../../..
+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff -rNup newlib-1.12.0/newlib/libc/sys/l4/Makefile.in newlib-1.12.0_patched/newlib/libc/sys/l4/Makefile.in
--- newlib-1.12.0/newlib/libc/sys/l4/Makefile.in	1970-01-01 05:30:00.000000000 +0530
+++ newlib-1.12.0_patched/newlib/libc/sys/l4/Makefile.in	2006-10-04 14:17:04.000000000 +0530
@@ -0,0 +1,322 @@
+# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = .
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+CC = @CC@
+HAVE_LIB = @HAVE_LIB@
+LIB = @LIB@
+LTLIB = @LTLIB@
+
+AUTOMAKE_OPTIONS = cygnus
+
+newlib_basedir = $(top_srcdir)/../../../../newlib
+
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/include/l4 -I$(top_srcdir)/include/l4/ia32 $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+
+noinst_LIBRARIES = lib.a
+
+CPPFLAGS = -DARCH_IA32 -DMACHINE_PC99_VGA -DPLATFORM_PC99 -DENDIAN_LITTLE -D__API__=v4 -D__ARCH__=ia32 -D__CPU__=i686 -D__PLATFORM__=pc99 -DCONFIG_ARCH_IA32=1 -DCONFIG_PLAT_PC99=1 -DCONFIG_CPU_IA32_I686=1 
+
+lib_a_SOURCES = l4_close.c  l4_exit.c  l4_getpid.c  l4_link.c   l4_read.c 	l4_times.c  l4_environ.c  l4_fork.c   l4_isatty.c  l4_lseek.c  	l4_sbrk.c   l4_wait.c l4_execve.c   l4_fstat.c  l4_kill.c 	l4_open.c   l4_stat.c  l4_write.c 	crt0.S 
+
+
+ACLOCAL_AMFLAGS = -I ../../..
+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../mkinstalldirs
+CONFIG_CLEAN_FILES = 
+LIBRARIES =  $(noinst_LIBRARIES)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) 
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+lib_a_LIBADD = 
+lib_a_OBJECTS =  l4_close.o l4_exit.o l4_getpid.o l4_link.o l4_read.o \
+l4_times.o l4_environ.o l4_fork.o l4_isatty.o l4_lseek.o l4_sbrk.o \
+l4_wait.o l4_execve.o l4_fstat.o l4_kill.o l4_open.o l4_stat.o \
+l4_write.o crt0.o
+AR = ar
+RANLIB = @RANLIB@
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON =  Makefile.am Makefile.in aclocal.m4 configure configure.in
+
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+SOURCES = $(lib_a_SOURCES)
+OBJECTS = $(lib_a_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .o .s
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(ACLOCAL_M4):  configure.in  ../../../acinclude.m4 ../../../aclocal.m4 \
+		../../../libtool.m4
+	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+	cd $(srcdir) && $(AUTOCONF)
+
+mostlyclean-noinstLIBRARIES:
+
+clean-noinstLIBRARIES:
+	-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+
+distclean-noinstLIBRARIES:
+
+maintainer-clean-noinstLIBRARIES:
+
+.c.o:
+	$(COMPILE) -c $<
+
+.s.o:
+	$(COMPILE) -c $<
+
+.S.o:
+	$(COMPILE) -c $<
+
+mostlyclean-compile:
+	-rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+	-rm -f *.tab.c
+
+maintainer-clean-compile:
+
+lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES)
+	-rm -f lib.a
+	$(AR) cru lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD)
+	$(RANLIB) lib.a
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	here=`pwd` && cd $(srcdir) \
+	  && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+	  || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags  $$unique $(LISP))
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+	-rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	-rm -rf $(distdir)
+	GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
+	mkdir $(distdir)/=build
+	mkdir $(distdir)/=inst
+	dc_install_base=`cd $(distdir)/=inst && pwd`; \
+	cd $(distdir)/=build \
+	  && ../configure --srcdir=.. --prefix=$$dc_install_base \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist
+	-rm -rf $(distdir)
+	@banner="$(distdir).tar.gz is ready for distribution"; \
+	dashes=`echo "$$banner" | sed s/./=/g`; \
+	echo "$$dashes"; \
+	echo "$$banner"; \
+	echo "$$dashes"
+dist: distdir
+	-chmod -R a+r $(distdir)
+	GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+	-rm -rf $(distdir)
+dist-all: distdir
+	-chmod -R a+r $(distdir)
+	GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+	-rm -rf $(distdir)
+distdir: $(DISTFILES)
+	-rm -rf $(distdir)
+	mkdir $(distdir)
+	-chmod 777 $(distdir)
+	@for file in $(DISTFILES); do \
+	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am:
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-info-am: 
+install-info: install-info-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile $(LIBRARIES)
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-noinstLIBRARIES mostlyclean-compile \
+		mostlyclean-tags mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-noinstLIBRARIES clean-compile clean-tags clean-generic \
+		mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-noinstLIBRARIES distclean-compile \
+		distclean-tags distclean-generic clean-am
+
+distclean: distclean-am
+	-rm -f config.status
+
+maintainer-clean-am:  maintainer-clean-noinstLIBRARIES \
+		maintainer-clean-compile maintainer-clean-tags \
+		maintainer-clean-generic distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+	-rm -f config.status
+
+.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \
+clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile tags mostlyclean-tags distclean-tags \
+clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
+check-am installcheck-am installcheck install-info-am install-info \
+install-exec-am install-exec install-data-am install-data install-am \
+install uninstall-am uninstall all-redirect all-am all installdirs \
+mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+all: crt0.o
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
