1 /* -*-comment-start: "//";comment-end:""-*-
2 * Mes --- Maxwell Equations of Software
3 * Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
5 * This file is part of Mes.
7 * Mes is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or (at
10 * your option) any later version.
12 * Mes is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Mes. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef __MES_UNISTD_H
21 #define __MES_UNISTD_H 1
28 #include_next <unistd.h>
32 #include <sys/types.h>
38 #define STDIN_FILENO 0
39 #define STDOUT_FILENO 1
40 #define STDERR_FILENO 2
41 #endif // STDIN_FILENO
44 #define STDIN_FILE_NO 0
45 #define STDOUT_FILE_NO 1
46 #define STDERR_FILE_NO 2
47 #endif // STDIN_FILE_NO
56 int access (char const *s, int mode);
57 unsigned int alarm (unsigned int seconds);
59 int execv (char const *file_name, char *const argv[]);
60 int execve (char const *file, char *const argv[], char *const env[]);
61 int execvp (char const *file, char *const argv[]);
63 char *getcwd (char *buf, size_t size);
67 int link (char const *oldname, char const *newname);
68 off_t lseek (int fd, off_t offset, int whence);
69 ssize_t read (int fd, void *buffer, size_t size);
70 #if __SBRK_CHAR_PTRDIFF
71 /* xmalloc in binutils <= 2.10.1 uses this old prototype */
72 char * sbrk (ptrdiff_t delta);
74 void * sbrk (intptr_t delta);
76 int unlink (char const *file_name);
77 ssize_t write (int filedes, void const *buffer, size_t size);
80 #endif // ! WITH_GLIBC
82 #endif // __MES_UNISTD_H