Index: uspace/Makefile
===================================================================
--- uspace/Makefile	(revision 2af29ed7c9c717445d7e7c17955fdb597d7ce3c8)
+++ uspace/Makefile	(revision 4ac901c75de3369e1bf6f3ed44dd3b48a7a630c1)
@@ -167,5 +167,4 @@
 	lib/block \
 	lib/clui \
-	lib/compat \
 	lib/softint \
 	lib/softfloat \
Index: uspace/app/pcc/cc/cc/Makefile
===================================================================
--- uspace/app/pcc/cc/cc/Makefile	(revision 2af29ed7c9c717445d7e7c17955fdb597d7ce3c8)
+++ uspace/app/pcc/cc/cc/Makefile	(revision 4ac901c75de3369e1bf6f3ed44dd3b48a7a630c1)
@@ -35,5 +35,5 @@
 BINARY = cc
 
-POSIX_COMPAT = 1
+POSIX_COMPAT = y
 
 
Index: uspace/app/pcc/cc/cpp/Makefile
===================================================================
--- uspace/app/pcc/cc/cpp/Makefile	(revision 2af29ed7c9c717445d7e7c17955fdb597d7ce3c8)
+++ uspace/app/pcc/cc/cpp/Makefile	(revision 4ac901c75de3369e1bf6f3ed44dd3b48a7a630c1)
@@ -35,5 +35,5 @@
 BINARY = cpp
 
-POSIX_COMPAT = 1
+POSIX_COMPAT = y
 
 YACC = yacc
Index: pace/lib/compat/Makefile
===================================================================
--- uspace/lib/compat/Makefile	(revision 2af29ed7c9c717445d7e7c17955fdb597d7ce3c8)
+++ 	(revision )
@@ -1,39 +1,0 @@
-#
-# Copyright (c) 2011 Jiri Zarevucky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - 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.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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.
-#
-
-USPACE_PREFIX = ../..
-LIBRARY = libcompat
-
-SOURCES = \
-	ctype.c \
-	isatty.c \
-	sys/stat.c \
-	string.c \
-	time.c
-
-include $(USPACE_PREFIX)/Makefile.common
Index: pace/lib/compat/ctype.c
===================================================================
--- uspace/lib/compat/ctype.c	(revision 2af29ed7c9c717445d7e7c17955fdb597d7ce3c8)
+++ 	(revision )
@@ -1,10 +1,0 @@
-
-#include "ctype.h"
-
-int isxdigit(int ch) {
-	return isdigit(ch) ||
-	       (ch >= 'a' && ch <= 'f') ||
-	       (ch >= 'A' && ch <= 'F');
-}
-
-
Index: pace/lib/compat/ctype.h
===================================================================
--- uspace/lib/compat/ctype.h	(revision 2af29ed7c9c717445d7e7c17955fdb597d7ce3c8)
+++ 	(revision )
@@ -1,37 +1,0 @@
-/*
- * Copyright (c) 2011 Jiri Zarevucky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - 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.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 COMPAT_CTYPE_H
-#define COMPAT_CTYPE_H
-
-#include "../c/include/ctype.h"
-
-extern int isxdigit(int ch);
-
-#endif /* COMPAT_CTYPE_H */
-
Index: pace/lib/compat/errno.h
===================================================================
--- uspace/lib/compat/errno.h	(revision 2af29ed7c9c717445d7e7c17955fdb597d7ce3c8)
+++ 	(revision )
@@ -1,12 +1,0 @@
-
-#ifndef COMPAT_ERRNO_H
-#define COMPAT_ERRNO_H
-
-#include "../../c/include/errno.h"
-
-// TODO: HelenOS has negative error codes, while C standard dictates
-//       positive. Does any sane application depend on this, or can
-//       we just leave it as is?
-
-#endif // COMPAT_ERRNO_H
-
Index: pace/lib/compat/isatty.c
===================================================================
--- uspace/lib/compat/isatty.c	(revision 2af29ed7c9c717445d7e7c17955fdb597d7ce3c8)
+++ 	(revision )
@@ -1,8 +1,0 @@
-#include "unistd.h"
-
-
-int isatty(int fd) {
-	// TODO: stub
-	return 0;
-}
-
Index: pace/lib/compat/signal.h
===================================================================
--- uspace/lib/compat/signal.h	(revision 2af29ed7c9c717445d7e7c17955fdb597d7ce3c8)
+++ 	(revision )
@@ -1,56 +1,0 @@
-
-#include "sys/types.h"
-#include "time.h"
-#include "errno.h"
-
-/* HelenOS doesn't have signals, so calls to functions of this header
- * are just replaced with their respective failure return value.
- *
- * Other macros and constants are here just to satisfy the symbol resolver
- * and have no practical value whatsoever, until HelenOS implements some
- * equivalent of signals. Maybe something neat based on IPC could be devised
- * in the future?
- */
-
-#define SIG_DFL ((void (*)(int)) 0)
-#define SIG_ERR ((void (*)(int)) 0)
-#define SIG_IGN ((void (*)(int)) 0)
-
-
-#define signal(sig,func) (errno = ENOTSUP, SIG_ERR)
-#define raise(sig) ((int)-1)
-
-typedef int sig_atomic_t;
-
-// full POSIX set
-enum {
-	SIGABRT,
-	SIGALRM,
-	SIGBUS,
-	SIGCHLD,
-	SIGCONT,
-	SIGFPE,
-	SIGHUP,
-	SIGILL,
-	SIGINT,
-	SIGKILL,
-	SIGPIPE,
-	SIGQUIT,
-	SIGSEGV,
-	SIGSTOP,
-	SIGTERM,
-	SIGTSTP,
-	SIGTTIN,
-	SIGTTOU,
-	SIGUSR1,
-	SIGUSR2,
-	SIGPOLL,
-	SIGPROF,
-	SIGSYS,
-	SIGTRAP,
-	SIGURG,
-	SIGVTALRM,
-	SIGXCPU,
-	SIGXFSZ
-};
-
Index: pace/lib/compat/stdio.h
===================================================================
--- uspace/lib/compat/stdio.h	(revision 2af29ed7c9c717445d7e7c17955fdb597d7ce3c8)
+++ 	(revision )
@@ -1,10 +1,0 @@
-
-#ifndef COMPAT_STDIO_H
-#define COMPAT_STDIO_H
-
-#include "../../c/include/stdio.h"
-
-#define putc fputc
-
-#endif
-
Index: pace/lib/compat/stdlib.h
===================================================================
--- uspace/lib/compat/stdlib.h	(revision 2af29ed7c9c717445d7e7c17955fdb597d7ce3c8)
+++ 	(revision )
@@ -1,11 +1,0 @@
-
-#ifndef COMPAT_STDLIB_H
-#define COMPAT_STDLIB_H
-
-#include "../../c/include/stdlib.h"
-
-#define _exit exit
-#define _Exit exit
-
-#endif // COMPAT_STDLIB_H
-
Index: pace/lib/compat/string.c
===================================================================
--- uspace/lib/compat/string.c	(revision 2af29ed7c9c717445d7e7c17955fdb597d7ce3c8)
+++ 	(revision )
@@ -1,267 +1,0 @@
-/*
- * Copyright (c) 2011 Jiri Zarevucky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - 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.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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.
- */
- 
-
-#include "string.h"
-#include "assert.h"
-#include <str_error.h>
-
-/**
- * Defined for convenience. Returns pointer to the terminating nul character.
- */
-static char *strzero(const char *s) {
-	while (*s != '\0')
-		s ++;
-
-	return (char*) s;
-}
-
-char *strcpy(char *dest, const char *src) {
-	assert (dest != NULL);
-	assert (src != NULL);
-
-	char *dptr = dest;
-
-	while (*src != '\0') {
-		*dptr = *src;
-		src ++;
-		dptr ++;
-	}
-	
-	*dptr = '\0';
-	return dest;
-}
-
-char *strncpy(char *dest, const char *src, size_t n) {
-	assert (dest != NULL);
-	assert (src != NULL);
-
-	char *dptr = dest;
-
-	for (int i = 0; i < n; ++ i) {
-		/* the standard requires that nul characters
-		 * are appended to the length of n, in case src is shorter
-		 */
-		*dptr = *src;
-		if (*src != '\0') {
-			src ++;
-		}
-		dptr ++;
-	}
-	
-	return dest;
-}
-
-char *strcat(char *dest, const char *src) {
-	assert (dest != NULL);
-	assert (src != NULL);
-
-	strcpy(strzero(dest), src);
-	return dest;
-}
-
-char *strncat(char *dest, const char *src, size_t n) {
-	assert (dest != NULL);
-	assert (src != NULL);
-
-	char *zeroptr = strncpy(strzero(dest), src, n);
-	/* strncpy doesn't append the nul terminator */
-	zeroptr[n] = '\0';
-	return dest;
-}
-
-int memcmp(const void *mem1, const void *mem2, size_t n) {
-	assert (mem1 != NULL);
-	assert (mem2 != NULL);
-
-	const unsigned char *s1 = mem1;
-	const unsigned char *s2 = mem2;
-	
-	while (n != 0 && *s1 == *s2) {
-		n --;
-		s1 ++;
-		s2 ++;
-	}
-	
-	return (n == 0) ? 0 : (*s2 - *s1);
-}
-
-int strcmp(const char *s1, const char *s2) {
-	assert (s1 != NULL);
-	assert (s2 != NULL);
-
-	return strncmp(s1, s2, STR_NO_LIMIT);
-}
-
-int strncmp(const char *s1, const char *s2, size_t n) {
-	assert (s1 != NULL);
-	assert (s2 != NULL);
-
-	while (n != 0 && *s1 == *s2 && *s1 != '\0') {
-		n --;
-		s1 ++;
-		s2 ++;
-	}
-	
-	return (n == 0) ? 0 : (*s2 - *s1);
-}
-
-/* currently ignores locale and just calls strcmp */
-int strcoll(const char *s1, const char *s2) {
-	assert (s1 != NULL);
-	assert (s2 != NULL);
-
-	return strcmp(s1, s2);
-}
-
-/* strcoll is stub, so this just makes a copy */
-size_t strxfrm(char *s1, const char *s2, size_t n) {
-	assert (s1 != NULL || n == 0);
-	assert (s2 != NULL);
-
-	size_t len = strlen(s2);
-
-	if (n > len)
-		strcpy(s1, s2);
-
-	return len;
-}
-
-void *memchr(const void *mem, int c, size_t n) {
-	assert (mem != NULL);
-	
-	const unsigned char *s = mem;
-	
-	for (int i = 0; i < n; ++ i) {
-		if (*s == (unsigned char) c) {
-			return (void *) s;
-		}
-		s ++;
-	}
-	return NULL;
-}
-
-
-char *strchr(const char *s, int c) {
-	assert (s != NULL);
-	
-	if (c == '\0')
-		return strzero(s);
-	
-	while (*s != (char) c) {
-		if (*s == '\0')
-			return NULL;
-		
-		s ++;
-	}
-	return (char *) s;
-}
-
-char *strrchr(const char *s, int c) {
-	assert (s != NULL);
-	
-	const char *ptr;
-	
-	for (ptr = strzero(s); ptr >= s; -- ptr) {
-		if (*ptr == (char) c)
-			return (char *) ptr;
-	}
-	return NULL;
-}
-
-/* the same as strpbrk, except it returns pointer to the nul terminator
-   if no occurence is found */
-static char *strpbrk_null(const char *s1, const char *s2) {
-	while (!strchr(s2, *s1))
-		++ s1;
-	return (char *) s1;
-}
-
-size_t strcspn(const char *s1, const char *s2) {
-	assert (s1 != NULL);
-	assert (s2 != NULL);
-
-	char *ptr = strpbrk_null(s1, s2);
-	return (size_t) (ptr - s1);
-}
-
-char *strpbrk(const char *s1, const char *s2) {
-	assert (s1 != NULL);
-	assert (s2 != NULL);
-
-	char *ptr = strpbrk_null(s1, s2);
-	return (*ptr == '\0') ? NULL : ptr;
-}
-
-size_t strspn(const char *s1, const char *s2) {
-	assert (s1 != NULL);
-	assert (s2 != NULL);
-
-	const char *ptr;
-	for (ptr = s1; *ptr != '\0'; ++ ptr) {
-		if (!strchr(s2, *ptr))
-			break;
-	}
-	return ptr - s1;
-}
-
-/* returns true if s2 is a prefix of s1 */
-static bool begins_with(const char *s1, const char *s2) {
-	while (*s1 == *s2 && *s2 != '\0') {
-		s1 ++;
-		s2 ++;
-	}
-	return *s2 == '\0';
-}
-
-char *strstr(const char *s1, const char *s2) {
-	assert (s1 != NULL);
-	assert (s2 != NULL);
-
-	if (*s2 == '\0')
-		return (char *) s1;
-
-	while (*s1 != '\0') {
-		if (begins_with(s1, s2))
-			return (char *) s1;
-		
-		s1 ++;
-	}
-	
-	return NULL;
-}
-
-char *strerror(int errnum) {
-	return (char *) str_error (-errnum);
-}
-
-size_t strlen(const char *s) {
-	assert (s != NULL);
-	return (size_t) (strzero(s) - s);
-}
-
Index: pace/lib/compat/string.h
===================================================================
--- uspace/lib/compat/string.h	(revision 2af29ed7c9c717445d7e7c17955fdb597d7ce3c8)
+++ 	(revision )
@@ -1,75 +1,0 @@
-/*
- * Copyright (c) 2011 Jiri Zarevucky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - 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.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 COMPAT_STRING_H
-#define COMPAT_STRING_H
-
-#include <mem.h>
-#include <str.h>
-
-/// available in str.h
-//
-// char *strtok(char * /* restrict */ s1, const char * /* restrict */ s2);
-
-/// available in mem.h
-//
-// void *memset(void *, int, size_t);
-// void *memcpy(void *, const void *, size_t);
-// void *memmove(void *, const void *, size_t);
-
-#ifndef NULL
-	#define NULL  ((void *) 0)
-#endif
-
-extern char *strcpy(char * /* restrict */ dest, const char * /* restrict */ src);
-extern char *strncpy(char * /* restrict */ dest, const char * /* restrict */ src, size_t n);
-
-extern char *strcat(char * /* restrict */ dest, const char * /* restrict */ src);
-extern char *strncat(char * /* restrict */ dest, const char * /* restrict */ src, size_t n);
-
-extern int memcmp(const void *mem1, const void *mem2, size_t n);
-extern void *memchr(const void *mem, int c, size_t n);
-
-extern int strcmp(const char *s1, const char *s2);
-extern int strncmp(const char *s1, const char *s2, size_t n);
-extern int strcoll(const char *s1, const char *s2);
-extern size_t strxfrm(char * /* restrict */ s1, const char * /* restrict */ s2, size_t n);
-
-extern char *strchr(const char *s, int c);
-extern char *strrchr(const char *s, int c);
-extern char *strpbrk(const char *s1, const char *s2);
-extern size_t strcspn(const char *s1, const char *s2);
-extern size_t strspn(const char *s1, const char *s2);
-extern char *strstr(const char *s1, const char *s2);
-
-extern char *strerror(int errnum);
-
-extern size_t strlen(const char *s);
-
-#endif  // COMPAT_STRING_H
-
Index: pace/lib/compat/sys/stat.c
===================================================================
--- uspace/lib/compat/sys/stat.c	(revision 2af29ed7c9c717445d7e7c17955fdb597d7ce3c8)
+++ 	(revision )
@@ -1,44 +1,0 @@
-
-#include "stat.h"
-#include <mem.h>
-
-#undef stat
-#undef fstat
-
-static void stat_to_posix (struct posix_stat *dest, struct stat *src) {
-	
-	memset(dest, 0, sizeof(struct posix_stat));
-	
-	dest->st_dev = src->device;
-	
-	/* HelenOS doesn't support permissions, so we set them all */
-	dest->st_mode = S_IRWXU | S_IRWXG | S_IRWXO;
-	if (src->is_file)
-		dest->st_mode |= S_IFREG;
-	if (src->is_directory)
-		dest->st_mode |= S_IFDIR;
-	
-	dest->st_nlink = src->lnkcnt;
-	dest->st_size = src->size;
-}
-
-int posix_fstat(int fd, struct posix_stat *st) {
-	struct stat hst;
-	if (fstat(fd, &hst) == -1) {
-		// FIXME: propagate a POSIX compatible errno
-		return -1;
-	}
-	stat_to_posix(st, &hst);
-	return 0;
-}
-
-int posix_stat(const char *path, struct posix_stat *st) {
-	struct stat hst;
-	if (stat(path, &hst) == -1) {
-		// FIXME: propagate a POSIX compatible errno
-		return -1;
-	}
-	stat_to_posix(st, &hst);
-	return 0;
-}
-
Index: pace/lib/compat/sys/stat.h
===================================================================
--- uspace/lib/compat/sys/stat.h	(revision 2af29ed7c9c717445d7e7c17955fdb597d7ce3c8)
+++ 	(revision )
@@ -1,79 +1,0 @@
-
-#ifndef COMPAT_STAT_H
-#define COMPAT_STAT_H
-
-#include "../../c/include/sys/stat.h"
-#include "time.h"
-
-/* values are the same as on Linux */
-#define S_IFMT     0170000   /* all file types */
-#define S_IFSOCK   0140000   /* socket */
-#define S_IFLNK    0120000   /* symbolic link */
-#define S_IFREG    0100000   /* regular file */
-#define S_IFBLK    0060000   /* block device */
-#define S_IFDIR    0040000   /* directory */
-#define S_IFCHR    0020000   /* character device */
-#define S_IFIFO    0010000   /* FIFO */
-
-#define S_ISUID    0004000   /* SUID */
-#define S_ISGID    0002000   /* SGID */
-#define S_ISVTX    0001000   /* sticky */
-
-#define S_IRWXU    00700     /* owner permissions */
-#define S_IRUSR    00400
-#define S_IWUSR    00200
-#define S_IXUSR    00100
-
-#define S_IRWXG    00070     /* group permissions */
-#define S_IRGRP    00040
-#define S_IWGRP    00020
-#define S_IXGRP    00010
-
-#define S_IRWXO    00007     /* other permissions */
-#define S_IROTH    00004
-#define S_IWOTH    00002
-#define S_IXOTH    00001
-
-#define S_ISREG(m) ((m & S_IFREG) != 0)
-#define S_ISDIR(m) ((m & S_IFDIR) != 0)
-#define S_ISCHR(m) ((m & S_IFCHR) != 0)
-#define S_ISBLK(m) ((m & S_IFBLK) != 0)
-#define S_ISFIFO(m) ((m & S_IFIFO) != 0)
-#define S_ISLNK(m) ((m & S_IFLNK) != 0)   /* symbolic link? (Not in POSIX.1-1996.) */
-#define S_ISSOCK(m) ((m & S_IFSOCK) != 0) /* socket? (Not in POSIX.1-1996.) */
-
-typedef devmap_handle_t dev_t;
-typedef unsigned int ino_t;
-typedef unsigned int nlink_t;
-typedef unsigned int uid_t;
-typedef unsigned int gid_t;
-typedef aoff64_t off_t;
-typedef unsigned int blksize_t;
-typedef unsigned int blkcnt_t;
-
-struct posix_stat {
-	struct stat sys_stat;
-
-	dev_t     st_dev;     /* ID of device containing file */
-	ino_t     st_ino;     /* inode number */
-	mode_t    st_mode;    /* protection */
-	nlink_t   st_nlink;   /* number of hard links */
-	uid_t     st_uid;     /* user ID of owner */
-	gid_t     st_gid;     /* group ID of owner */
-	dev_t     st_rdev;    /* device ID (if special file) */
-	off_t     st_size;    /* total size, in bytes */
-	blksize_t st_blksize; /* blocksize for file system I/O */
-	blkcnt_t  st_blocks;  /* number of 512B blocks allocated */
-	time_t    st_atime;   /* time of last access */
-	time_t    st_mtime;   /* time of last modification */
-	time_t    st_ctime;   /* time of last status change */
-};
-
-extern int posix_fstat(int, struct posix_stat *);
-extern int posix_stat(const char *, struct posix_stat *);
-
-#define fstat posix_fstat
-#define stat posix_stat
-
-#endif /* COMPAT_STAT_H */
-
Index: pace/lib/compat/sys/types.h
===================================================================
--- uspace/lib/compat/sys/types.h	(revision 2af29ed7c9c717445d7e7c17955fdb597d7ce3c8)
+++ 	(revision )
@@ -1,11 +1,0 @@
-
-#ifndef COMPAT_TYPES_H
-#define COMPAT_TYPES_H
-
-#include "../../c/include/sys/types.h"
-#include <task.h>
-
-typedef task_id_t pid_t;
-
-#endif
-
Index: pace/lib/compat/time.c
===================================================================
--- uspace/lib/compat/time.c	(revision 2af29ed7c9c717445d7e7c17955fdb597d7ce3c8)
+++ 	(revision )
@@ -1,20 +1,0 @@
-
-#include "time.h"
-
-
-struct tm *localtime(const time_t *timep) {
-	// FIXME: stub
-	static struct tm result = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
-	return &result;
-}
-
-char *asctime(const struct tm *tm) {
-	// FIXME: stub
-	static char result[] = "Mon Jan 01 00:00:00 1900\n";
-	return result;
-}
-
-char *ctime(const time_t *timep) {
-	return asctime(localtime(timep));
-}
-
Index: pace/lib/compat/time.h
===================================================================
--- uspace/lib/compat/time.h	(revision 2af29ed7c9c717445d7e7c17955fdb597d7ce3c8)
+++ 	(revision )
@@ -1,52 +1,0 @@
-/*
- * Copyright (c) 2011 Jiri Zarevucky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - 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.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 COMPAT_TIME_H
-#define COMPAT_TIME_H
-
-#include "../c/include/time.h"
-
-struct tm {
-	int tm_sec;         /* seconds */
-	int tm_min;         /* minutes */
-	int tm_hour;        /* hours */
-	int tm_mday;        /* day of the month */
-	int tm_mon;         /* month */
-	int tm_year;        /* year */
-	int tm_wday;        /* day of the week */
-	int tm_yday;        /* day in the year */
-	int tm_isdst;       /* daylight saving time */
-
-};
-
-extern char *asctime(const struct tm *tm);
-extern struct tm *localtime(const time_t *timep);
-extern char *ctime(const time_t *timep);
-
-#endif /* COMPAT_TIME_H */
-
Index: pace/lib/compat/unistd.h
===================================================================
--- uspace/lib/compat/unistd.h	(revision 2af29ed7c9c717445d7e7c17955fdb597d7ce3c8)
+++ 	(revision )
@@ -1,49 +1,0 @@
-/*
- * Copyright (c) 2011 Jiri Zarevucky
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * - Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * - 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.
- * - The name of the author may not be used to endorse or promote products
- *   derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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 COMPAT_UNISTD_H
-#define COMPAT_UNISTD_H
-
-#include "../c/include/unistd.h"
-
-//#include <getopt.h>
-
-extern char *optarg;
-extern int optind, opterr, optopt;
-extern int getopt(int, char * const [], const char *);
-
-extern int isatty(int fd);
-
-#define getpid task_get_id
-
-#define STDIN_FILENO (fileno(stdin))
-#define STDOUT_FILENO (fileno(stdout))
-#define STDERR_FILENO (fileno(stderr))
-
-#endif /* COMPAT_UNISTD_H */
-
