lib: stat: Use SYS_stat64 for 32bit platforms.

This fixes <https://debbugs.gnu.org/41264>.

* include/linux/arm/syscall.h (SYS_stat64, SYS_lstat64,
SYS_fstat64)[__SIZEOF_LONG_LONG__ == 8]:
New defines.
(SYS_stat, SYS_lstat, SYS_fstat)[__SIZEOF_LONG_LONG__ == 8]: Redefine them.
* include/linux/x86/syscall.h (SYS_stat64, SYS_lstat64,
SYS_fstat64)[__SIZEOF_LONG_LONG__ == 8]:
New defines.
(SYS_stat, SYS_lstat, SYS_fstat)[__SIZEOF_LONG_LONG__ == 8]: Redefine them.
* include/sys/stat.h (struct stat): Move definition to...
* include/linux/arm/kernel-stat.h,
include/linux/m2/kernel-stat.h,
include/linux/x86/kernel-stat.h,
include/linux/x86_64/kernel-stat.h: These new files.
* include/gnu/x86/kernel-stat.h: New file.
* configure (main): Copy <srcdest>include/<kernel>/<arch>/*.h to
include/.
* configure.sh: Likewise.
* .gitignore: Ignore them.  Add copyright header.
* build-aux/GNUmakefile.in (X86_ARCH_HEADERS, ARCH_HEADERS): New
variables.
(build): Use them.
(include/arch/%.h, arch-dir): New targets.
* build-aux/bootstrap.sh.in (AM_CPPFLAGS): Replace
<srcdest>include/<kernel>/<cpu> with built ../include.
* build-aux/build.sh.in (AM_CPPFLAGS): Likewise.
* build-aux/install.sh.in: Also install built include.
* include/m2/types.h: New file.
* kaem.run: Use it.
* simple.sh: Copy kernel-stat.h, syscall.h for kernel/cpu to
include/arch.
This commit is contained in:
Jan (janneke) Nieuwenhuizen 2022-10-29 13:17:58 +02:00
parent 25e0c4d119
commit bc1fa57851
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
71 changed files with 617 additions and 158 deletions

19
.gitignore vendored
View File

@ -1,3 +1,21 @@
# GNU Mes --- Maxwell Equations of Software
# Copyright © 2016,2017,2019,2020,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
#
# This file is part of GNU Mes.
#
# GNU 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.
#
# GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*-
*~
.#*
@ -117,6 +135,7 @@
/doc/images/gcc-mesboot-graph.pdf
/doc/web/
/config.sh
/include/arch
/include/mes/config.h
/gcc-lib
/mescc-lib

View File

@ -85,17 +85,26 @@ PHONY_TARGETS:=\
.PHONY: $(PHONY_TARGETS)
X86_ARCH_HEADERS = $(wildcard $(scrdest)include/linux/x86/*.h)
ARCH_HEADERS = $(X86_ARCH_HEADERS:$(srcdest)include/linux/x86/%=include/arch/%)
default: all
all: doc
doc: build
build:
build: | $(ARCH_HEADERS)
$(SHELL) build.sh
src/${program_prefix}mes: build
include/arch/%.h: $(srcdest)include/$(mes_kernel)/$(mes_cpu)/%.h | arch-dir
cp -f $< $@
arch-dir:
mkdir -p include/arch
clean:
rm -f *.o *.s bin/mes bin/mes-gcc bin/mes-mescc
rm -f mes.{aux,cp,cps,fn,info,log,tmp,toc,vr,vrs}

View File

@ -50,7 +50,7 @@ srcdest=../${srcdest}
ln -sf ${srcdest}mes .
ln -sf ${srcdest}module .
ln -sf ${srcdest}src .
AM_CPPFLAGS="-D HAVE_CONFIG_H=1 -I ${srcdest}include -I ${srcdest}include/$mes_kernel/$mes_cpu"
AM_CPPFLAGS="-D HAVE_CONFIG_H=1 -I ${srcdest}include -I ../include -I include"
AM_CFLAGS="-L ${srcdest}lib"
mkdir -p $mes_cpu-mes
@ -108,7 +108,7 @@ $AR crD $mes_cpu-mes/libc+tcc.a $objects
cd ..
srcdest=
CPPFLAGS="-D HAVE_CONFIG_H=1 -I ${srcdest}include -I ${srcdest}include/$mes_kernel/$mes_cpu"
AM_CPPFLAGS="-D HAVE_CONFIG_H=1 -I ${srcdest}include -I ../include -I include"
AM_CFLAGS="-L ${srcdest}lib"
objects=

View File

@ -66,9 +66,8 @@ fi
AM_CPPFLAGS="
-D HAVE_CONFIG_H=1
-I ${srcdest}lib
-I include
-I ${srcdest}include
-I ${srcdest}include/$mes_kernel/$mes_cpu
-I ../include
"
if test $mes_kernel = gnu; then
AM_CPPFLAGS="$AM_CPPFLAGS
@ -93,9 +92,9 @@ fi
AM_CPPFLAGS="
-D HAVE_CONFIG_H=1
-I ${srcdest}lib
-I include
-I ${srcdest}include
-I ${srcdest}include/$mes_kernel/$mes_cpu
-I ../include
-I include
"
if test "$compiler" != bootstrap; then
${SHELL} ${srcdest}build-aux/build-mes.sh
@ -137,9 +136,9 @@ fi
AM_CPPFLAGS="
-D HAVE_CONFIG_H=1
-I ${srcdest}lib
-I include
-I ${srcdest}include
-I ${srcdest}include/$mes_kernel/$mes_cpu
-I ../include
-I include
"
compiler=mescc
AR=${MESAR-"${srcdest}pre-inst-env mesar"}

View File

@ -1,7 +1,7 @@
#! @SHELL@
# GNU Mes --- Maxwell Equations of Software
# Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
# Copyright © 2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
#
# This file is part of GNU Mes.
#
@ -99,6 +99,7 @@ mkdir -p $DESTDIR$includedir
mkdir -p $DESTDIR$libdir
mkdir -p $DESTDIR$pkgdatadir
tar -cf- -C ${srcdir}/include . | tar -${v}xf- -C $DESTDIR$includedir
tar -cf- -C include . | tar -${v}xf- -C $DESTDIR$includedir
tar -cf- -C ${srcdir}/lib $mes_cpu-mes | tar -${v}xf- -C $DESTDIR$libdir
tar -cf- -C ${srcdir}/lib $mes_kernel/$mes_cpu-mes | tar -${v}xf- -C $DESTDIR$libdir
if test -z "$srcdest"; then

7
configure vendored
View File

@ -707,6 +707,13 @@ See \"Porting GNU Mes\" in the manual, or try --with-courage\n" mes-system)
#define MES_VERSION \"" VERSION "\"
")))))
(substitute (string-append srcdest "build-aux/config.make.in") pairs #:target ".config.make"))
(let ((arch-dir (string-append srcdest "include/" mes-kernel "/" mes-cpu)))
(define (copy-header file-name)
(system* "cp" "-f" "-v"
(string-append arch-dir "/" file-name)
(string-append "include/arch/" file-name)))
(system* "mkdir" "-p" "include/arch")
(for-each copy-header '("kernel-stat.h" "syscall.h")))
(let ((make (and=> (file-name "make" deps) basename)))
(display (string-append "

View File

@ -271,6 +271,10 @@ cat >> include/mes/config.h <<EOF
#define MES_VERSION "$VERSION"
EOF
mkdir -p include/arch
cp -f -v ${srcdest}include/${mes_kernel}/${mes_cpu}/kernel-stat.h include/arch
cp -f -v ${srcdest}include/${mes_kernel}/${mes_cpu}/syscall.h include/arch
cat <<EOF
GNU Mes is configured for
compiler: $compiler

View File

@ -0,0 +1,25 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2017,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
* GNU 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.
*
* GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __MES_GNU_X86_KERNEL_STAT_H
#define __MES_GNU_X86_KERNEL_STAT_H 1
#include <arch/syscall.h>
#endif // __MES_GNU_X86_KERNEL_STAT_H

View File

@ -0,0 +1,79 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2017,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
* GNU 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.
*
* GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __MES_LINUX_ARM_KERNEL_STAT_H
#define __MES_LINUX_ARM_KERNEL_STAT_H 1
// https://github.com/torvalds/linux/blob/master/arch/arm/include/uapi/asm/stat.h
#include <arch/syscall.h>
#if __SIZEOF_LONG_LONG__ != 8
// *INDENT-OFF*
struct stat
{
unsigned long st_dev;
unsigned long st_ino;
unsigned short st_mode;
unsigned short st_nlink;
unsigned short st_uid;
unsigned short st_gid;
unsigned long st_rdev;
unsigned long st_size;
unsigned long st_blksize;
unsigned long st_blocks;
unsigned long st_atime;
unsigned long st_atime_usec;
unsigned long st_mtime;
unsigned long st_mtime_usec;
unsigned long st_ctime;
unsigned long st_ctime_usec;
unsigned long __pad0;
unsigned long __pad1;
};
#else // __SIZEOF_LONG_LONG__ == 8
struct stat
{
unsigned long long st_dev;
unsigned char __pad0[4];
unsigned long __st_ino;
unsigned int st_mode;
unsigned int st_nlink;
unsigned long st_uid;
unsigned long st_gid;
unsigned long long st_rdev;
unsigned char __pad3[4];
long long st_size;
unsigned long st_blksize;
unsigned long long st_blocks;
unsigned long st_atime;
unsigned long st_atime_nsec;
unsigned long st_mtime;
unsigned int st_mtime_nsec;
unsigned long st_ctime;
unsigned long st_ctime_nsec;
unsigned long long st_ino;
};
#endif // __SIZEOF_LONG_LONG__ == 8
#endif // __MES_LINUX_ARM_KERNEL_STAT_H

View File

@ -109,4 +109,23 @@
#define SYS_readlink 0x55
#define SYS_mknod 0x0e
#if __SIZEOF_LONG_LONG__ == 8
#define SYS_stat64 0xc3
#define SYS_lstat64 0xc4
#define SYS_fstat64 0xc5
#define SYS_fcntl64 0xdd
#define SYS_getdents64 0xdc
#undef SYS_stat
#define SYS_stat SYS_stat64
#undef SYS_lstat
#define SYS_lstat SYS_lstat64
#undef SYS_fstat
#define SYS_fstat SYS_fstat64
#endif // __SIZEOF_LONG_LONG__ == 8
#endif /* __MES_LINUX_ARM_SYSCALL_H */

View File

@ -0,0 +1,47 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
* GNU 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.
*
* GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __LINUX_M2_KERNEL_STAT_H
#define __LINUX_M2_KERNEL_STAT_H
/* https://github.com/torvalds/linux/blob/master/arch/x86/include/uapi/asm/stat.h */
/* *INDENT-OFF* */
struct stat
{
unsigned st_dev;
unsigned st_ino;
char st_mode[2];
char st_nlink[2];
char st_uid[2];
char st_gid[2];
unsigned st_rdev;
unsigned st_size;
unsigned st_blksize;
unsigned st_blocks;
unsigned st_atime;
unsigned st_atime_usec;
unsigned st_mtime;
unsigned st_mtime_usec;
unsigned st_ctime;
unsigned st_ctime_usec;
unsigned __pad0;
unsigned __pad1;
};
#endif /* __LINUX_M2_KERNEL_STAT_H */

View File

@ -0,0 +1,79 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2017,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
* GNU 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.
*
* GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __MES_LINUX_X86_KERNEL_STAT_H
#define __MES_LINUX_X86_KERNEL_STAT_H 1
// https://github.com/torvalds/linux/blob/master/arch/x86/include/uapi/asm/stat.h
#include <arch/syscall.h>
#if __SIZEOF_LONG_LONG__ != 8
// *INDENT-OFF*
struct stat
{
unsigned long st_dev;
unsigned long st_ino;
unsigned short st_mode;
unsigned short st_nlink;
unsigned short st_uid;
unsigned short st_gid;
unsigned long st_rdev;
unsigned long st_size;
unsigned long st_blksize;
unsigned long st_blocks;
unsigned long st_atime;
unsigned long st_atime_usec;
unsigned long st_mtime;
unsigned long st_mtime_usec;
unsigned long st_ctime;
unsigned long st_ctime_usec;
unsigned long __pad0;
unsigned long __pad1;
};
#else // __SIZEOF_LONG_LONG__ == 8
struct stat
{
unsigned long long st_dev;
unsigned char __pad0[4];
unsigned long __st_ino;
unsigned int st_mode;
unsigned int st_nlink;
unsigned long st_uid;
unsigned long st_gid;
unsigned long long st_rdev;
unsigned char __pad3[4];
long long st_size;
unsigned long st_blksize;
unsigned long long st_blocks;
unsigned long st_atime;
unsigned long st_atime_nsec;
unsigned long st_mtime;
unsigned int st_mtime_nsec;
unsigned long st_ctime;
unsigned long st_ctime_nsec;
unsigned long long st_ino;
};
#endif // __SIZEOF_LONG_LONG__ == 8
#endif // __MES_LINUX_X86_KERNEL_STAT_H

View File

@ -75,7 +75,6 @@
#define SYS_stat 0x6a
/* libc+gnu */
#define SYS_chdir 0x0c
#define SYS_link 0x09
#define SYS_getpid 0x14
@ -112,4 +111,23 @@
#define SYS_readlink 0x55
#define SYS_mknod 0x0e
#if __SIZEOF_LONG_LONG__ == 8
#define SYS_stat64 0xc3
#define SYS_lstat64 0xc4
#define SYS_fstat64 0xc5
#define SYS_fcntl64 0xdd
#define SYS_getdents64 0xdc
#undef SYS_stat
#define SYS_stat SYS_stat64
#undef SYS_lstat
#define SYS_lstat SYS_lstat64
#undef SYS_fstat
#define SYS_fstat SYS_fstat64
#endif // __SIZEOF_LONG_LONG__ == 8
#endif /* __MES_LINUX_X86_SYSCALL_H */

View File

@ -0,0 +1,51 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2017,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
* GNU 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.
*
* GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __MES_LINUX_X86_64_KERNEL_STAT_H
#define __MES_LINUX_X86_64_KERNEL_STAT_H 1
// https://github.com/torvalds/linux/blob/master/arch/x86/include/uapi/asm/stat.h
// *INDENT-OFF*
struct stat
{
unsigned long st_dev;
unsigned long st_ino;
unsigned long st_nlink;
unsigned int st_mode;
unsigned int st_uid;
unsigned int st_gid;
unsigned int __pad0;
unsigned long st_rdev;
unsigned long st_size;
unsigned long st_atime;
unsigned long st_atime_nsec;
unsigned long st_mtime;
unsigned long st_mtime_nsec;
unsigned long st_ctime;
unsigned long st_ctime_nsec;
unsigned long st_blksize;
long st_blocks;
unsigned long __pad1;
unsigned long __pad2;
unsigned long __pad3;
unsigned long __pad4;
};
#endif // __MES_LINUX_X86_64_KERNEL_STAT_H

138
include/m2/types.h Normal file
View File

@ -0,0 +1,138 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2017,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
* GNU 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.
*
* GNU 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 GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __M2_TYPES_H
#define __M2_TYPES_H 1
/*
#ifndef __MES_CLOCK_T
#define __MES_CLOCK_T
#undef clock_t
typedef long clock_t;
#endif
*/
#ifndef __MES_DEV_T
#define __MES_DEV_T
#undef dev_t
typedef long dev_t;
#endif
/*
#if !defined (__MES_FILE_T) && ! defined (_FILE_T)
#define __MES_FILE_T
#define _FILE_T
typedef long FILE;
#endif
*/
#ifndef __MES_GID_T
#define __MES_GID_T
#undef gid_t
typedef unsigned gid_t;
#endif
#ifndef __MES_INO_T
#define __MES_INO_T
#undef ino_t
typedef unsigned ino_t;
#endif
#if __SIZEOF_LONG_LONG__ == 8
#ifndef __MES_INO64_T
#define __MES_INO64_T
#undef ino64_t
typedef unsigned ino64_t;
#endif
#endif // __SIZEOF_LONG_LONG__ == 8
#if !defined (__MES_INTPTR_T) && !defined (__intptr_t_defined)
#define __MES_INTPTR_T
#define __intptr_t_defined
#undef intptr_t
typedef long intptr_t;
#undef uintptr_t
typedef unsigned uintptr_t;
#endif
#ifndef __MES_OFF_T
#define __MES_OFF_T
#undef off_t
typedef long off_t;
#endif
#if __SIZEOF_LONG_LONG__ == 8
#ifndef __MES_OFF64_T
#define __MES_OFF64_T
#undef off64_t
typedef unsigned off64_t;
#endif
#endif // __SIZEOF_LONG_LONG__ == 8
#ifndef __MES_PID_T
#define __MES_PID_T
#undef pid_t
typedef int pid_t;
#endif
#ifndef __PTRDIFF_T
#define __PTRDIFF_T
#ifndef __MES_PTRDIFF_T
#define __MES_PTRDIFF_T
#undef ptrdiff_t
typedef long ptrdiff_t;
#endif
#endif
#ifndef __MES_SIGVAL_T
#define __MES_SIGVAL_T
#undef clock_t
typedef long sigval_t;
#endif
#ifndef __SIZE_T
#define __SIZE_T
#ifndef __MES_SIZE_T
#define __MES_SIZE_T
typedef unsigned size_t;
#endif
#endif
#ifndef __MES_SSIZE_T
#define __MES_SSIZE_T
#undef ssize_t
typedef long ssize_t;
#endif
#ifndef __MES_UID_T
#define __MES_UID_T
#undef uid_t
typedef unsigned uid_t;
#endif
#ifndef __WCHAR_T
#define __WCHAR_T
#ifndef __MES_WCHAR_T
#define __MES_WCHAR_T
#undef wchar_t
typedef int wchar_t;
#endif
#endif
#endif // __M2_TYPES_H

View File

@ -19,7 +19,7 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __MES_SYS_STAT_H
#define __MES_SYS_STAT_H 1lei
#define __MES_SYS_STAT_H 1
#if SYSTEM_LIBC
#undef __MES_SYS_STAT_H
@ -29,60 +29,13 @@
#include <time.h>
#include <sys/types.h>
#include <arch/kernel-stat.h>
#ifndef __MES_MODE_T
#define __MES_MODE_T
typedef int mode_t;
#endif
// *INDENT-OFF*
#if __i386__ || __arm__
struct stat
{
unsigned long st_dev;
unsigned long st_ino;
unsigned short st_mode;
unsigned short st_nlink;
unsigned short st_uid;
unsigned short st_gid;
unsigned long st_rdev;
long st_size; /* Linux: unsigned long; glibc: off_t (i.e. signed) */
unsigned long st_blksize;
unsigned long st_blocks;
time_t st_atime; /* Linux: unsigned long; glibc: time_t */
unsigned long st_atime_usec;
time_t st_mtime; /* Linux: unsigned long; glibc: time_t */
unsigned long st_mtime_usec;
time_t st_ctime; /* Linux: unsigned long; glibc: time_t */
unsigned long st_ctime_usec;
unsigned long __foo0;
unsigned long __foo1;
};
#elif __x86_64__
struct stat
{
unsigned long st_dev;
unsigned long st_ino;
unsigned int st_mode;
unsigned int st_nlink;
unsigned int st_uid;
unsigned int st_gid;
unsigned long st_rdev;
long st_size;
unsigned long st_blksize;
unsigned long st_blocks;
time_t st_atime;
unsigned long st_atime_usec;
time_t st_mtime;
unsigned long st_mtime_usec;
time_t st_ctime;
unsigned long st_ctime_usec;
unsigned long __foo0;
unsigned long __foo1;
};
#endif
// *INDENT-ON*
int chmod (char const *file_name, mode_t mode);
int fstat (int filedes, struct stat *buf);
int mkdir (char const *file_name, mode_t mode);

View File

@ -53,6 +53,7 @@ M2-Planet \
-f lib/mes/fdputc.c \
-f lib/mes/eputc.c \
\
-f include/m2/types.h \
-f include/mes/mes.h \
-f include/mes/builtins.h \
-f include/mes/constants.h \
@ -81,6 +82,8 @@ M2-Planet \
-f lib/mes/fdungetc.c \
-f lib/posix/setenv.c \
-f lib/linux/access.c \
-f include/linux/m2/kernel-stat.h \
-f include/sys/stat.h \
-f lib/m2/chmod.c \
-f lib/linux/ioctl3.c \
-f lib/m2/isatty.c \

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -20,7 +20,7 @@
#include <mes/lib.h>
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
char *
_getcwd (char *buffer, size_t size)

View File

@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <mes/lib.h>
#include <fcntl.h>

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <mes/lib.h>
#include <fcntl.h>

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -20,7 +20,7 @@
#include <mes/lib.h>
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
int
access (char const *file_name, int how)

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -20,7 +20,7 @@
#include <mes/lib.h>
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
long
brk (void *addr)

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
int
chdir (char const *file_name)

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -20,7 +20,7 @@
#include <mes/lib.h>
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <sys/stat.h>
int

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -20,7 +20,7 @@
#include <mes/lib.h>
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <time.h>
int

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <mes/lib.h>
int

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
int
dup (int old)

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
int
dup2 (int old, int new)

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
int
execve (char const *file_name, char *const argv[], char *const env[])

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <stdarg.h>
int

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
int
fork ()

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <sys/stat.h>
int

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
int
fsync (int filedes)

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <sys/types.h>
int

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <unistd.h>
gid_t

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <unistd.h>
uid_t

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <unistd.h>
gid_t

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <unistd.h>
pid_t

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <unistd.h>
pid_t

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <sys/resource.h>
int

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -20,7 +20,7 @@
#include <mes/lib.h>
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <sys/time.h>
int

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <unistd.h>
uid_t

View File

@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <stdarg.h>
#include <sys/ioctl.h>

View File

@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <mes/lib.h>
int

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <unistd.h>
int

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
int
link (char const *old_name, char const *new_name)

View File

@ -20,7 +20,7 @@
#include <mes/lib.h>
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <stdio.h>
#include <sys/types.h>

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <sys/stat.h>
int

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <sys/stat.h>
int

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <sys/stat.h>
int

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <time.h>
#include <sys/time.h>

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <unistd.h>
int

View File

@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <mes/lib.h>
#include <fcntl.h>

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <sys/stat.h>
ssize_t

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <unistd.h>
int

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
int
rmdir (char const *file_name)

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <unistd.h>
int

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <sys/time.h>
#include <unistd.h>

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <unistd.h>
int

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <unistd.h>
#include <signal.h>

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <signal.h>
#include <unistd.h>

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <sys/stat.h>
int

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <unistd.h>
int

View File

@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <time.h>
#include <sys/time.h>
#include <stdlib.h>

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -20,7 +20,7 @@
#include <mes/lib.h>
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
int
unlink (char const *file_name)

View File

@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <sys/types.h>
pid_t

View File

@ -1,6 +1,6 @@
/* -*-comment-start: "//";comment-end:""-*-
* GNU Mes --- Maxwell Equations of Software
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
* Copyright © 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
*
* This file is part of GNU Mes.
*
@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
int
execve (char const *file_name, char **argv, char **env)

View File

@ -18,6 +18,8 @@
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/syscall.h>
#include <arch/syscall.h>
#include <mes/lib.h>
#include <fcntl.h>
#include <stdarg.h>

View File

@ -19,7 +19,7 @@
*/
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <time.h>
long

View File

@ -20,7 +20,7 @@
#include <mes/lib.h>
#include <linux/syscall.h>
#include <syscall.h>
#include <arch/syscall.h>
#include <sys/types.h>
int

View File

@ -1,7 +1,7 @@
#! /bin/sh
# GNU Mes --- Maxwell Equations of Software
# Copyright © 2019,2020,2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
# Copyright © 2019,2020,2022,2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
#
# This file is part of GNU Mes.
#
@ -36,7 +36,9 @@ cat > include/mes/config.h <<EOF
EOF
## Build ##
gcc -g -D HAVE_CONFIG_H=1 -I include \
gcc -g -D HAVE_CONFIG_H=1 \
-I include \
-I include/$mes_kernel/$mes_cpu \
-o out-system-libc/mes \
\
lib/mes/eputs.c \
@ -163,11 +165,15 @@ cat > include/mes/config.h <<EOF
#define MES_VERSION "git"
EOF
mkdir -p include/arch
cp -f include/$mes_kernel/$mes_cpu/kernel-stat.h include/arch
cp -f include/$mes_kernel/$mes_cpu/syscall.h include/arch
## Build ##
compiler=gcc # not configurable
$CC -g -D HAVE_CONFIG_H=1 \
-I include -I include/$mes_kernel/$mes_cpu \
-nostdinc -nostdlib \
-nostdinc -nostdlib \
-fno-builtin -fno-stack-protector \
-o out-mes/mes \
\