Index: uspace/lib/posix/Makefile
===================================================================
--- uspace/lib/posix/Makefile	(revision 7ddc2c7a97bf75277145753f192b8a5f0365792d)
+++ uspace/lib/posix/Makefile	(revision 9df6b0f517e1ff178f1a72197b03101a00f3d6f0)
@@ -36,5 +36,4 @@
 
 INCLUDE_LIBC = ./include/libc
-INCLUDE_LIBMATH = ./include/libmath
 
 LIBC_FILE = $(LIBC_PREFIX)/libc.a
@@ -47,7 +46,7 @@
 COLLISIONS_LIST = collisions.list
 
-PRE_DEPEND = $(INCLUDE_LIBC) $(INCLUDE_LIBMATH)
+PRE_DEPEND = $(INCLUDE_LIBC)
 EXTRA_CLEAN = \
-	$(INCLUDE_LIBC) $(INCLUDE_LIBMATH) \
+	$(INCLUDE_LIBC) \
 	$(REDEFS_HIDE_LIBC) $(REDEFS_SHOW_LIBPOSIX) \
 	$(COLLISIONS_LIST)
@@ -85,7 +84,4 @@
 	ln -s -f -n ../$^ $@
 
-$(INCLUDE_LIBMATH): ../math/include
-	ln -s -f -n ../$^ $@
-
 $(FIXED_C_LIBRARY): $(REDEFS_HIDE_LIBC) $(REDEFS_SHOW_LIBPOSIX)
 	$(OBJCOPY) --redefine-syms=$(REDEFS_HIDE_LIBC) $(LIBC_FILE) $@
Index: uspace/lib/posix/include/posix/math.h
===================================================================
--- uspace/lib/posix/include/posix/math.h	(revision 7ddc2c7a97bf75277145753f192b8a5f0365792d)
+++ uspace/lib/posix/include/posix/math.h	(revision 9df6b0f517e1ff178f1a72197b03101a00f3d6f0)
@@ -31,4 +31,10 @@
  */
 /** @file Mathematical operations.
+ *
+ * The purpose of this file is only to provide prototypes of mathematical
+ * functions defined by C standard and by POSIX.
+ *
+ * It is up to the application to correctly link with either libmath
+ * (provided by HelenOS) or by some other math library (such as fdlibm).
  */
 
@@ -36,5 +42,37 @@
 #define POSIX_MATH_H_
 
-#include "libmath/math.h"
+#ifdef __GNUC__
+	#define HUGE_VAL (__builtin_huge_val())
+#endif
+
+extern double ldexp(double, int);
+extern double frexp(double, int *);
+
+extern double fabs(double);
+extern double floor(double);
+extern double ceil(double);
+extern double modf(double, double *);
+extern double fmod(double, double);
+extern double pow(double, double);
+extern double exp(double);
+extern double frexp(double, int *);
+extern double expm1(double);
+extern double sqrt(double);
+extern double log(double);
+extern double log10(double);
+extern double sin(double);
+extern double sinh(double);
+extern double asin(double);
+extern double asinh(double);
+extern double cos(double);
+extern double cosh(double);
+extern double acos(double);
+extern double acosh(double);
+extern double tan(double);
+extern double tanh(double);
+extern double atan(double);
+extern double atanh(double);
+extern double atan2(double, double);
+extern double copysign(double, double);
 
 #endif /* POSIX_MATH_H_ */
Index: uspace/lib/posix/include/posix/stdio.h
===================================================================
--- uspace/lib/posix/include/posix/stdio.h	(revision 7ddc2c7a97bf75277145753f192b8a5f0365792d)
+++ uspace/lib/posix/include/posix/stdio.h	(revision 9df6b0f517e1ff178f1a72197b03101a00f3d6f0)
@@ -64,5 +64,9 @@
 #define EOF (-1)
 
+/** Size of buffers used in stdio header. */
 #define BUFSIZ  4096
+
+/** Maximum size in bytes of the longest filename. */
+#define FILENAME_MAX 4096
 
 typedef struct _IO_FILE FILE;
@@ -155,5 +159,8 @@
 
 /* File Positioning */
-typedef struct _posix_fpos __POSIX_DEF__(fpos_t);
+typedef struct {
+	off64_t offset;
+} __POSIX_DEF__(fpos_t);
+
 extern int __POSIX_DEF__(fsetpos)(FILE *stream, const __POSIX_DEF__(fpos_t) *pos);
 extern int __POSIX_DEF__(fgetpos)(FILE *restrict stream, __POSIX_DEF__(fpos_t) *restrict pos);
Index: uspace/lib/posix/source/stdio.c
===================================================================
--- uspace/lib/posix/source/stdio.c	(revision 7ddc2c7a97bf75277145753f192b8a5f0365792d)
+++ uspace/lib/posix/source/stdio.c	(revision 9df6b0f517e1ff178f1a72197b03101a00f3d6f0)
@@ -309,8 +309,4 @@
 }
 
-struct _posix_fpos {
-	off64_t offset;
-};
-
 /** Restores stream a to position previously saved with fgetpos().
  *
