Index: tools/autotool.py
===================================================================
--- tools/autotool.py	(revision e540bc874e3accb1e3c70f4fa85bba2a12f7a592)
+++ tools/autotool.py	(revision c7a67c4164e47071669eabcb1ab3e57b3e80ab10)
@@ -934,5 +934,5 @@
 				{'type': 'long int', 'tag': 'LONG', 'strc': '"l"', 'conc': '"L"'},
 				{'type': 'int', 'tag': 'INT', 'strc': '""', 'conc': '""'},
-				{'type': 'short int', 'tag': 'SHORT', 'strc': '"h"', 'conc': '"@"'},
+				{'type': 'short int', 'tag': 'SHRT', 'strc': '"h"', 'conc': '"@"'},
 				{'type': 'char', 'tag': 'CHAR', 'strc': '"hh"', 'conc': '"@@"'}
 			],
@@ -946,5 +946,5 @@
 		int128 = probe_int128(common)
 		
-		maps = detect_sizes(probe, [1, 2, 4, 8], ['CHAR', 'SHORT', 'INT', 'LONG', 'LLONG'], ['LONG_DOUBLE', 'DOUBLE', 'FLOAT'])
+		maps = detect_sizes(probe, [1, 2, 4, 8], ['CHAR', 'SHRT', 'INT', 'LONG', 'LLONG'], ['LONG_DOUBLE', 'DOUBLE', 'FLOAT'])
 		
 	finally:
Index: uspace/lib/c/include/limits.h
===================================================================
--- uspace/lib/c/include/limits.h	(revision c7a67c4164e47071669eabcb1ab3e57b3e80ab10)
+++ uspace/lib/c/include/limits.h	(revision c7a67c4164e47071669eabcb1ab3e57b3e80ab10)
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2017 Jiri Svoboda
+ * 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.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_LIMITS_H_
+#define LIBC_LIMITS_H_
+
+/* XXX Make this more accurate */
+#include <stdint.h>
+#include <libarch/stdint.h>
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/posix/include/posix/limits.h
===================================================================
--- uspace/lib/posix/include/posix/limits.h	(revision e540bc874e3accb1e3c70f4fa85bba2a12f7a592)
+++ uspace/lib/posix/include/posix/limits.h	(revision c7a67c4164e47071669eabcb1ab3e57b3e80ab10)
@@ -36,13 +36,6 @@
 #define POSIX_LIMITS_H_
 
-#include "stdint.h"
-#include "libc/sys/types.h"
-
-#undef SHRT_MIN
-#undef SHRT_MAX
-#undef USHRT_MAX
-#define SHRT_MIN SHORT_MIN
-#define SHRT_MAX SHORT_MAX
-#define USHRT_MAX USHORT_MAX
+#include "posix/stdint.h"
+#include "libc/limits.h"
 
 #undef PATH_MAX
