mescc: Guile eval.c support: headers.
* 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.
This commit is contained in:
parent
eee7f8cb3c
commit
5f90fe3919
|
@ -0,0 +1,29 @@
|
|||
/* -*-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
|
|
@ -23,7 +23,9 @@
|
|||
#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
|
||||
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
/* -*-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
|
|
@ -24,15 +24,21 @@ char **g_environment;
|
|||
int g_stdin;
|
||||
int g_stdout;
|
||||
|
||||
#define EOF -1
|
||||
#define NULL 0
|
||||
#define STDIN 0
|
||||
#define STDOUT 1
|
||||
#define STDERR 2
|
||||
|
||||
int printf (char const* format, ...);
|
||||
int sprintf (char *str, char const* format, ...);
|
||||
|
||||
#ifndef STDIN
|
||||
#define STDIN 0
|
||||
#endif
|
||||
|
||||
#ifndef STDOUT
|
||||
#define STDOUT 1
|
||||
#endif
|
||||
|
||||
#ifndef STDERR
|
||||
#define STDERR 2
|
||||
#endif
|
||||
|
||||
#if __GNUC__ && POSIX
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
|
@ -61,6 +67,14 @@ int fdungetc (int c, int fd);
|
|||
|
||||
#else // ! (__GNUC__ && POSIX)
|
||||
|
||||
#ifndef EOF
|
||||
#define EOF -1
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
// Hmm
|
||||
#define stdin 0
|
||||
#define stdout 1
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
/* -*-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
|
||||
|
Loading…
Reference in New Issue