* mlibc/include/signal.h (sigset_t): New type.
* mlibc/include/float.h: New file.
* mlibc/include/stddef.h: New file.
* mlibc/include/sys/select.h: New file.
--- /dev/null
+/* -*-comment-start: "//";comment-end:""-*-
+ * Mes --- Maxwell Equations of Software
+ * Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org>
+ *
+ * This file is part of Mes.
+ *
+ * Mes is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * Mes is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Mes. If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef __MES_FLOAT_H
+#define __MES_FLOAT_H 1
+
+#if __GNUC__ && POSIX
+#undef __MES_FLOAT_H
+#include_next <float.h>
+#else // ! (__GNUC__ && POSIX)
+#endif // ! (__GNUC__ && POSIX)
+
+#endif // __MES_FLOAT_H
#if __GNUC__ && POSIX
#undef __MES_SIGNAL_H
#include_next <signal.h>
-#endif // (__GNUC__ && POSIX)
+#else //! (__GNUC__ && POSIX)
+typedef int sigset_t;
+#endif //! (__GNUC__ && POSIX)
#endif // __MES_SIGNAL_H
--- /dev/null
+/* -*-comment-start: "//";comment-end:""-*-
+ * Mes --- Maxwell Equations of Software
+ * Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org>
+ *
+ * This file is part of Mes.
+ *
+ * Mes is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * Mes is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Mes. If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef __MES_STDDEF_H
+#define __MES_STDDEF_H 1
+
+#if __GNUC__ && POSIX
+#undef __MES_STDDEF_H
+#include_next <stddef.h>
+#else // ! (__GNUC__ && POSIX)
+#include <stdint.h>
+#include <unistd.h>
+#endif // ! (__GNUC__ && POSIX)
+
+#endif // __MES_STDDEF_H
int g_stdin;
int g_stdout;
-#define EOF -1
-#define NULL 0
+int printf (char const* format, ...);
+int sprintf (char *str, char const* format, ...);
+
+#ifndef STDIN
#define STDIN 0
+#endif
+
+#ifndef STDOUT
#define STDOUT 1
-#define STDERR 2
+#endif
-int printf (char const* format, ...);
-int sprintf (char *str, char const* format, ...);
+#ifndef STDERR
+#define STDERR 2
+#endif
#if __GNUC__ && POSIX
#ifndef _GNU_SOURCE
#else // ! (__GNUC__ && POSIX)
+#ifndef EOF
+#define EOF -1
+#endif
+
+#ifndef NULL
+#define NULL 0
+#endif
+
// Hmm
#define stdin 0
#define stdout 1
--- /dev/null
+/* -*-comment-start: "//";comment-end:""-*-
+ * Mes --- Maxwell Equations of Software
+ * Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org>
+ *
+ * This file is part of Mes.
+ *
+ * Mes is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * Mes is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Mes. If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef __MES_SYS_SELECT_H
+#define __MES_SYS_SELECT_H 1
+
+#if __GNUC__ && POSIX
+#undef __MES_SYS_SELECT_H
+#include_next <sys/select.h>
+#else //! (__GNUC__ && POSIX)
+typedef int fd_set;
+#endif //! (__GNUC__ && POSIX)
+
+#endif // __MES_SYS_SELECT_H
+