From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id SMigF5Mg6mPABAAAbAwnHQ (envelope-from ) for ; Mon, 13 Feb 2023 12:35:47 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id uIrDF5Mg6mN4nwAA9RJhRA (envelope-from ) for ; Mon, 13 Feb 2023 12:35:47 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CEE993765F for ; Mon, 13 Feb 2023 12:35:46 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=NCM6Tajm; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676288147; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=0UZJDmyEB6RJsQ0glkDAB34grqJ5PBn3UrZqgd46P0k=; b=I+ptkAlq+seOXuG8eaRIBInT2Ou9GGzyp29KJEfa0VAZXdLmXsHlZT8tnLVeJGc+0TZDpD 8yKdHSxXkiodiync98OXjW+GSv8PXICgSi1M1gu7wtNAC+DNRQoHlSk9SXx6Uzhxh7rxp4 TuF+2W6UurVBBguapsJcjy4RCxVfvTKHFxsewDy8kvKqxhRhf/P93Hnh54fqVAGuQqkiWn KDYXIqobpCOB61S5S/nP21x9ES7oV3lX7tcIL/dchW8H4SbLlb6VzrMc3X/ye9yMITT5+x rj5MKa0ImPji78bEpjBoUFxuT86GZpiCD/iyeg79fPJINZckawG7ARRjnh7e/Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=NCM6Tajm; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676288147; a=rsa-sha256; cv=none; b=sbQfhJkDuwsg56oblZki59G2D8dpLSltkEeZK9KNZyyD+krYYLyQCeZUmjJlgbi+NBZcVb 6EG07g3rur0HG7i9xHfr+thge6muzLxFjNsMKdJ873TkFjqyo8sQAQYFINyn9PouFhV+G9 fJJCup3jmDigEWn1DPLWCJzzEXDolLV8dpRnIHquYIXWQyTXLif1nlrcg2Tl8hwn0Bw8I2 C4uLlX0eUSIQxovc+8kseRhZWQ4Vg3xcTjQuCUYqaNu05S9vruR3232BbzmDvuqaZ61rrY IUzjISz50QAmK0AkRb4c57dv9nMXhGo2/yTJKR51724GAKCfAB/NPUBSGCYLhw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRX6u-0007lW-6E; Mon, 13 Feb 2023 06:35:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRX6s-0007l4-1g for guix-devel@gnu.org; Mon, 13 Feb 2023 06:35:02 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRX6q-00021R-6P; Mon, 13 Feb 2023 06:35:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=0UZJDmyEB6RJsQ0glkDAB34grqJ5PBn3UrZqgd46P0k=; b=NCM6Tajmb7Rd16dJbTu7 5V59Ip/pRsJuGW9+GaKYavN0EkzBIXKIR4YeEf4Euo8z4ATqezhfiKMY6PtWv5oiQ0spqIPtvU/Ww KC2eX8kD1OKczzlnaRa73Z+RZoa3fZG8zD/R+rzkwOFZ5Bbo7+JuE0pZ2bbni6/D/yKwBqGPi4FrE gaNbXtLpEZQtLLJCkp3KRSj7Fx34nRPVmbMI91tWs9SJPeirzbyVAcQZ9otLrvj6y4KD6iBYpExCt pCB2EDRbP5n8ZD2kkN6/91lfANJRxY/nP8yilwm5enL6F/f+Ak6W9UmyAYFBL1F1OQXYU/3f24ehD DJ0mTCNcx3oRgg==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.janneke.lilypond.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRX6p-00017V-Bg; Mon, 13 Feb 2023 06:34:59 -0500 From: Janneke Nieuwenhuizen To: Andreas Enge Cc: Julien Lepiller , guix-devel@gnu.org Subject: Re: Merging core-updates? Organization: AvatarAcademy.nl References: <20230212100540.2214f16c@sybil.lepiller.eu> <20230212125251.121e02f5@sybil.lepiller.eu> <20230212125806.07e674a8@sybil.lepiller.eu> X-Url: http://AvatarAcademy.nl Date: Mon, 13 Feb 2023 12:34:56 +0100 In-Reply-To: (Andreas Enge's message of "Sun, 12 Feb 2023 18:08:53 +0100") Message-ID: <877cwlztlr.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: X-Migadu-Queue-Id: CEE993765F X-Spam-Score: -9.12 X-Migadu-Spam-Score: -9.12 X-Migadu-Scanner: scn0.migadu.com List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-TUID: GpY8VgUQg/Zp --=-=-= Content-Type: text/plain Andreas Enge writes: > Am Sun, Feb 12, 2023 at 12:58:06PM +0100 schrieb Julien Lepiller: >> And I was able to rebuild (with --check) patch-mesboot. The error looks >> a lot like https://issues.guix.gnu.org/49985. We should fix that indeed >> :) > > Ah indeed, that looks like deal breaking; maybe someone from MES can have > a look? > > What is the magic incantation with double "@@" to build this package? > Ah, here we go, for reference to self: > guix build -e '(@@ (gnu packages commencement) patch-mesboot)' To use stat64 and friends on 32bit, I created the attached patch for GNU Mes and hope to create a 0.24.2 release from https://gitlab.com/janneke/mes/-/tree/wip-stat64 Also, I have update my core-updates branch with preliminary 0.24.2 mes and mes-boot packages here https://gitlab.com/janneke/guix/-/tree/core-updates Just hoping this is also a fix for https://debbugs.gnu.org/41264 https://debbugs.gnu.org/49985 as I haven't been able to reproduce this bug. IWBN if someone could shed more light on that... Greetings, Janneke --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-lib-stat-Use-SYS_stat64-for-32bit-platforms.patch Content-Transfer-Encoding: quoted-printable >From bc1fa57851d360abb161c54dce5339ad9d7af7aa Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Sat, 29 Oct 2022 13:17:58 +0200 Subject: [PATCH] lib: stat: Use SYS_stat64 for 32bit platforms. This fixes . * include/linux/arm/syscall.h (SYS_stat64, SYS_lstat64, SYS_fstat64)[__SIZEOF_LONG_LONG__ =3D=3D 8]: New defines. (SYS_stat, SYS_lstat, SYS_fstat)[__SIZEOF_LONG_LONG__ =3D=3D 8]: Redefine t= hem. * include/linux/x86/syscall.h (SYS_stat64, SYS_lstat64, SYS_fstat64)[__SIZEOF_LONG_LONG__ =3D=3D 8]: New defines. (SYS_stat, SYS_lstat, SYS_fstat)[__SIZEOF_LONG_LONG__ =3D=3D 8]: Redefine t= hem. * 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 include///*.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 include// 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. --- .gitignore | 19 ++++ build-aux/GNUmakefile.in | 11 ++- build-aux/bootstrap.sh.in | 4 +- build-aux/build.sh.in | 11 ++- build-aux/install.sh.in | 3 +- configure | 7 ++ configure.sh | 4 + include/gnu/x86/kernel-stat.h | 25 ++++++ include/linux/arm/kernel-stat.h | 79 +++++++++++++++++ include/linux/arm/syscall.h | 19 ++++ include/linux/m2/kernel-stat.h | 47 ++++++++++ include/linux/x86/kernel-stat.h | 79 +++++++++++++++++ include/linux/x86/syscall.h | 20 ++++- include/linux/x86_64/kernel-stat.h | 51 +++++++++++ include/m2/types.h | 138 +++++++++++++++++++++++++++++ include/sys/stat.h | 51 +---------- kaem.run | 3 + lib/linux/_getcwd.c | 4 +- lib/linux/_open3.c | 2 +- lib/linux/_read.c | 4 +- lib/linux/access.c | 4 +- lib/linux/brk.c | 4 +- lib/linux/chdir.c | 4 +- lib/linux/chmod.c | 4 +- lib/linux/clock_gettime.c | 4 +- lib/linux/close.c | 4 +- lib/linux/dup.c | 4 +- lib/linux/dup2.c | 4 +- lib/linux/execve.c | 4 +- lib/linux/fcntl.c | 4 +- lib/linux/fork.c | 4 +- lib/linux/fstat.c | 4 +- lib/linux/fsync.c | 4 +- lib/linux/getdents.c | 4 +- lib/linux/getegid.c | 4 +- lib/linux/geteuid.c | 4 +- lib/linux/getgid.c | 4 +- lib/linux/getpid.c | 4 +- lib/linux/getppid.c | 4 +- lib/linux/getrusage.c | 4 +- lib/linux/gettimeofday.c | 4 +- lib/linux/getuid.c | 4 +- lib/linux/ioctl.c | 2 +- lib/linux/ioctl3.c | 2 +- lib/linux/kill.c | 4 +- lib/linux/link.c | 4 +- lib/linux/lseek.c | 2 +- lib/linux/lstat.c | 4 +- lib/linux/mkdir.c | 4 +- lib/linux/mknod.c | 4 +- lib/linux/nanosleep.c | 4 +- lib/linux/pipe.c | 4 +- lib/linux/read.c | 2 +- lib/linux/readlink.c | 4 +- lib/linux/rename.c | 4 +- lib/linux/rmdir.c | 4 +- lib/linux/setgid.c | 4 +- lib/linux/settimer.c | 4 +- lib/linux/setuid.c | 4 +- lib/linux/signal.c | 4 +- lib/linux/sigprogmask.c | 4 +- lib/linux/stat.c | 4 +- lib/linux/symlink.c | 4 +- lib/linux/time.c | 2 +- lib/linux/unlink.c | 4 +- lib/linux/waitpid.c | 2 +- lib/m2/execve.c | 4 +- lib/m2/open.c | 2 + lib/m2/time.c | 2 +- lib/m2/waitpid.c | 2 +- simple.sh | 12 ++- 71 files changed, 617 insertions(+), 158 deletions(-) create mode 100644 include/gnu/x86/kernel-stat.h create mode 100644 include/linux/arm/kernel-stat.h create mode 100644 include/linux/m2/kernel-stat.h create mode 100644 include/linux/x86/kernel-stat.h create mode 100644 include/linux/x86_64/kernel-stat.h create mode 100644 include/m2/types.h diff --git a/.gitignore b/.gitignore index 58cb2afb..72ba34d8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,21 @@ +# GNU Mes --- Maxwell Equations of Software +# Copyright =C2=A9 2016,2017,2019,2020,2022 Jan (janneke) Nieuwenhuizen +# +# 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 . + *- *~ .#* @@ -117,6 +135,7 @@ /doc/images/gcc-mesboot-graph.pdf /doc/web/ /config.sh +/include/arch /include/mes/config.h /gcc-lib /mescc-lib diff --git a/build-aux/GNUmakefile.in b/build-aux/GNUmakefile.in index d74e9f99..c3304192 100644 --- a/build-aux/GNUmakefile.in +++ b/build-aux/GNUmakefile.in @@ -85,17 +85,26 @@ PHONY_TARGETS:=3D\ =20 .PHONY: $(PHONY_TARGETS) =20 +X86_ARCH_HEADERS =3D $(wildcard $(scrdest)include/linux/x86/*.h) +ARCH_HEADERS =3D $(X86_ARCH_HEADERS:$(srcdest)include/linux/x86/%=3Dinclud= e/arch/%) + default: all =20 all: doc =20 doc: build =20 -build: +build: | $(ARCH_HEADERS) $(SHELL) build.sh =20 src/${program_prefix}mes: build =20 +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} diff --git a/build-aux/bootstrap.sh.in b/build-aux/bootstrap.sh.in index b2d56c50..a2451d02 100644 --- a/build-aux/bootstrap.sh.in +++ b/build-aux/bootstrap.sh.in @@ -50,7 +50,7 @@ srcdest=3D../${srcdest} ln -sf ${srcdest}mes . ln -sf ${srcdest}module . ln -sf ${srcdest}src . -AM_CPPFLAGS=3D"-D HAVE_CONFIG_H=3D1 -I ${srcdest}include -I ${srcdest}incl= ude/$mes_kernel/$mes_cpu" +AM_CPPFLAGS=3D"-D HAVE_CONFIG_H=3D1 -I ${srcdest}include -I ../include -I = include" AM_CFLAGS=3D"-L ${srcdest}lib" =20 mkdir -p $mes_cpu-mes @@ -108,7 +108,7 @@ $AR crD $mes_cpu-mes/libc+tcc.a $objects =20 cd .. srcdest=3D -CPPFLAGS=3D"-D HAVE_CONFIG_H=3D1 -I ${srcdest}include -I ${srcdest}include= /$mes_kernel/$mes_cpu" +AM_CPPFLAGS=3D"-D HAVE_CONFIG_H=3D1 -I ${srcdest}include -I ../include -I = include" AM_CFLAGS=3D"-L ${srcdest}lib" =20 objects=3D diff --git a/build-aux/build.sh.in b/build-aux/build.sh.in index f4a6a264..3f356e10 100644 --- a/build-aux/build.sh.in +++ b/build-aux/build.sh.in @@ -66,9 +66,8 @@ fi AM_CPPFLAGS=3D" -D HAVE_CONFIG_H=3D1 -I ${srcdest}lib --I include -I ${srcdest}include --I ${srcdest}include/$mes_kernel/$mes_cpu +-I ../include " if test $mes_kernel =3D gnu; then AM_CPPFLAGS=3D"$AM_CPPFLAGS @@ -93,9 +92,9 @@ fi AM_CPPFLAGS=3D" -D HAVE_CONFIG_H=3D1 -I ${srcdest}lib --I include -I ${srcdest}include --I ${srcdest}include/$mes_kernel/$mes_cpu +-I ../include +-I include " if test "$compiler" !=3D bootstrap; then ${SHELL} ${srcdest}build-aux/build-mes.sh @@ -137,9 +136,9 @@ fi AM_CPPFLAGS=3D" -D HAVE_CONFIG_H=3D1 -I ${srcdest}lib --I include -I ${srcdest}include --I ${srcdest}include/$mes_kernel/$mes_cpu +-I ../include +-I include " compiler=3Dmescc AR=3D${MESAR-"${srcdest}pre-inst-env mesar"} diff --git a/build-aux/install.sh.in b/build-aux/install.sh.in index 340faf5f..f3a69229 100644 --- a/build-aux/install.sh.in +++ b/build-aux/install.sh.in @@ -1,7 +1,7 @@ #! @SHELL@ =20 # GNU Mes --- Maxwell Equations of Software -# Copyright =C2=A9 2017,2018,2019 Jan (janneke) Nieuwenhuizen +# Copyright =C2=A9 2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen # # 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 $DEST= DIR$libdir if test -z "$srcdest"; then diff --git a/configure b/configure index b02e75bf..98467094 100755 --- a/configure +++ b/configure @@ -707,6 +707,13 @@ See \"Porting GNU Mes\" in the manual, or try --with-c= ourage\n" mes-system) #define MES_VERSION \"" VERSION "\" "))))) (substitute (string-append srcdest "build-aux/config.make.in") pai= rs #: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"))) =20 (let ((make (and=3D> (file-name "make" deps) basename))) (display (string-append " diff --git a/configure.sh b/configure.sh index 51d99b6f..f182530e 100755 --- a/configure.sh +++ b/configure.sh @@ -271,6 +271,10 @@ cat >> include/mes/config.h < + * + * 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 . + */ +#ifndef __MES_GNU_X86_KERNEL_STAT_H +#define __MES_GNU_X86_KERNEL_STAT_H 1 + +#include + +#endif // __MES_GNU_X86_KERNEL_STAT_H diff --git a/include/linux/arm/kernel-stat.h b/include/linux/arm/kernel-sta= t.h new file mode 100644 index 00000000..79dc48ec --- /dev/null +++ b/include/linux/arm/kernel-stat.h @@ -0,0 +1,79 @@ +/* -*-comment-start: "//";comment-end:""-*- + * GNU Mes --- Maxwell Equations of Software + * Copyright =C2=A9 2017,2022 Jan (janneke) Nieuwenhuizen + * + * 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 . + */ +#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 + +#if __SIZEOF_LONG_LONG__ !=3D 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__ =3D=3D 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__ =3D=3D 8 + +#endif // __MES_LINUX_ARM_KERNEL_STAT_H diff --git a/include/linux/arm/syscall.h b/include/linux/arm/syscall.h index b04ff039..ca9f1f97 100644 --- a/include/linux/arm/syscall.h +++ b/include/linux/arm/syscall.h @@ -109,4 +109,23 @@ #define SYS_readlink 0x55 #define SYS_mknod 0x0e =20 +#if __SIZEOF_LONG_LONG__ =3D=3D 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__ =3D=3D 8 + #endif /* __MES_LINUX_ARM_SYSCALL_H */ diff --git a/include/linux/m2/kernel-stat.h b/include/linux/m2/kernel-stat.h new file mode 100644 index 00000000..c446bdbc --- /dev/null +++ b/include/linux/m2/kernel-stat.h @@ -0,0 +1,47 @@ +/* -*-comment-start: "//";comment-end:""-*- + * GNU Mes --- Maxwell Equations of Software + * Copyright =C2=A9 2022 Jan (janneke) Nieuwenhuizen + * + * 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 . + */ +#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 */ diff --git a/include/linux/x86/kernel-stat.h b/include/linux/x86/kernel-sta= t.h new file mode 100644 index 00000000..997fadc7 --- /dev/null +++ b/include/linux/x86/kernel-stat.h @@ -0,0 +1,79 @@ +/* -*-comment-start: "//";comment-end:""-*- + * GNU Mes --- Maxwell Equations of Software + * Copyright =C2=A9 2017,2022 Jan (janneke) Nieuwenhuizen + * + * 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 . + */ +#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 + +#if __SIZEOF_LONG_LONG__ !=3D 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__ =3D=3D 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__ =3D=3D 8 + +#endif // __MES_LINUX_X86_KERNEL_STAT_H diff --git a/include/linux/x86/syscall.h b/include/linux/x86/syscall.h index 01c46a35..d849c175 100644 --- a/include/linux/x86/syscall.h +++ b/include/linux/x86/syscall.h @@ -75,7 +75,6 @@ #define SYS_stat 0x6a =20 /* 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 =20 +#if __SIZEOF_LONG_LONG__ =3D=3D 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__ =3D=3D 8 + #endif /* __MES_LINUX_X86_SYSCALL_H */ diff --git a/include/linux/x86_64/kernel-stat.h b/include/linux/x86_64/kern= el-stat.h new file mode 100644 index 00000000..fdb15946 --- /dev/null +++ b/include/linux/x86_64/kernel-stat.h @@ -0,0 +1,51 @@ +/* -*-comment-start: "//";comment-end:""-*- + * GNU Mes --- Maxwell Equations of Software + * Copyright =C2=A9 2017,2022 Jan (janneke) Nieuwenhuizen + * + * 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 . + */ +#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 diff --git a/include/m2/types.h b/include/m2/types.h new file mode 100644 index 00000000..c5547f5c --- /dev/null +++ b/include/m2/types.h @@ -0,0 +1,138 @@ +/* -*-comment-start: "//";comment-end:""-*- + * GNU Mes --- Maxwell Equations of Software + * Copyright =C2=A9 2017,2022,2023 Jan (janneke) Nieuwenhuizen + * + * 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 . + */ +#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__ =3D=3D 8 +#ifndef __MES_INO64_T +#define __MES_INO64_T +#undef ino64_t +typedef unsigned ino64_t; +#endif +#endif // __SIZEOF_LONG_LONG__ =3D=3D 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__ =3D=3D 8 +#ifndef __MES_OFF64_T +#define __MES_OFF64_T +#undef off64_t +typedef unsigned off64_t; +#endif +#endif // __SIZEOF_LONG_LONG__ =3D=3D 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 diff --git a/include/sys/stat.h b/include/sys/stat.h index 0aefa286..fbcee2f1 100644 --- a/include/sys/stat.h +++ b/include/sys/stat.h @@ -19,7 +19,7 @@ * along with GNU Mes. If not, see . */ #ifndef __MES_SYS_STAT_H -#define __MES_SYS_STAT_H 1lei +#define __MES_SYS_STAT_H 1 =20 #if SYSTEM_LIBC #undef __MES_SYS_STAT_H @@ -29,60 +29,13 @@ =20 #include #include +#include =20 #ifndef __MES_MODE_T #define __MES_MODE_T typedef int mode_t; #endif =20 -// *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. sign= ed) */ - 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); diff --git a/kaem.run b/kaem.run index 3c78e39a..1d8df90b 100644 --- a/kaem.run +++ b/kaem.run @@ -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 \ diff --git a/lib/linux/_getcwd.c b/lib/linux/_getcwd.c index 85153cb1..10eb270e 100644 --- a/lib/linux/_getcwd.c +++ b/lib/linux/_getcwd.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <= janneke@gnu.org> * * This file is part of GNU Mes. * @@ -20,7 +20,7 @@ =20 #include #include -#include +#include =20 char * _getcwd (char *buffer, size_t size) diff --git a/lib/linux/_open3.c b/lib/linux/_open3.c index 3072f9bf..cfad689a 100644 --- a/lib/linux/_open3.c +++ b/lib/linux/_open3.c @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include #include =20 diff --git a/lib/linux/_read.c b/lib/linux/_read.c index 6c5ff42f..c5a34abc 100644 --- a/lib/linux/_read.c +++ b/lib/linux/_read.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <= janneke@gnu.org> * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include #include =20 diff --git a/lib/linux/access.c b/lib/linux/access.c index 805e8f01..ceb18595 100644 --- a/lib/linux/access.c +++ b/lib/linux/access.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <= janneke@gnu.org> * * This file is part of GNU Mes. * @@ -20,7 +20,7 @@ =20 #include #include -#include +#include =20 int access (char const *file_name, int how) diff --git a/lib/linux/brk.c b/lib/linux/brk.c index 586bd7e1..3517850c 100644 --- a/lib/linux/brk.c +++ b/lib/linux/brk.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <= janneke@gnu.org> * * This file is part of GNU Mes. * @@ -20,7 +20,7 @@ =20 #include #include -#include +#include =20 long brk (void *addr) diff --git a/lib/linux/chdir.c b/lib/linux/chdir.c index ada7feec..aed98378 100644 --- a/lib/linux/chdir.c +++ b/lib/linux/chdir.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include =20 int chdir (char const *file_name) diff --git a/lib/linux/chmod.c b/lib/linux/chmod.c index 1feabec5..a6d74a43 100644 --- a/lib/linux/chmod.c +++ b/lib/linux/chmod.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <= janneke@gnu.org> * * This file is part of GNU Mes. * @@ -20,7 +20,7 @@ =20 #include #include -#include +#include #include =20 int diff --git a/lib/linux/clock_gettime.c b/lib/linux/clock_gettime.c index 051dba33..63753ef8 100644 --- a/lib/linux/clock_gettime.c +++ b/lib/linux/clock_gettime.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -20,7 +20,7 @@ =20 #include #include -#include +#include #include =20 int diff --git a/lib/linux/close.c b/lib/linux/close.c index e25e8318..490b4881 100644 --- a/lib/linux/close.c +++ b/lib/linux/close.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <= janneke@gnu.org> * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include =20 int diff --git a/lib/linux/dup.c b/lib/linux/dup.c index 9237ef97..b954d3de 100644 --- a/lib/linux/dup.c +++ b/lib/linux/dup.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <= janneke@gnu.org> * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include =20 int dup (int old) diff --git a/lib/linux/dup2.c b/lib/linux/dup2.c index ef996273..9a0752e3 100644 --- a/lib/linux/dup2.c +++ b/lib/linux/dup2.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <= janneke@gnu.org> * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include =20 int dup2 (int old, int new) diff --git a/lib/linux/execve.c b/lib/linux/execve.c index 51c8b4ff..7cb02e20 100644 --- a/lib/linux/execve.c +++ b/lib/linux/execve.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <= janneke@gnu.org> * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include =20 int execve (char const *file_name, char *const argv[], char *const env[]) diff --git a/lib/linux/fcntl.c b/lib/linux/fcntl.c index e10e7348..85a167ae 100644 --- a/lib/linux/fcntl.c +++ b/lib/linux/fcntl.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include =20 int diff --git a/lib/linux/fork.c b/lib/linux/fork.c index 1f5c25fc..d07050bf 100644 --- a/lib/linux/fork.c +++ b/lib/linux/fork.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <= janneke@gnu.org> * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include =20 int fork () diff --git a/lib/linux/fstat.c b/lib/linux/fstat.c index 19d3f6a9..f4965776 100644 --- a/lib/linux/fstat.c +++ b/lib/linux/fstat.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include =20 int diff --git a/lib/linux/fsync.c b/lib/linux/fsync.c index 0eef6db4..ba75088d 100644 --- a/lib/linux/fsync.c +++ b/lib/linux/fsync.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <= janneke@gnu.org> * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include =20 int fsync (int filedes) diff --git a/lib/linux/getdents.c b/lib/linux/getdents.c index 5ebafa45..03717710 100644 --- a/lib/linux/getdents.c +++ b/lib/linux/getdents.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include =20 int diff --git a/lib/linux/getegid.c b/lib/linux/getegid.c index 5ad2f2c6..2fb8098f 100644 --- a/lib/linux/getegid.c +++ b/lib/linux/getegid.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include =20 gid_t diff --git a/lib/linux/geteuid.c b/lib/linux/geteuid.c index 4fcf9fd1..62d2da47 100644 --- a/lib/linux/geteuid.c +++ b/lib/linux/geteuid.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include =20 uid_t diff --git a/lib/linux/getgid.c b/lib/linux/getgid.c index 4402b528..48fd3579 100644 --- a/lib/linux/getgid.c +++ b/lib/linux/getgid.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include =20 gid_t diff --git a/lib/linux/getpid.c b/lib/linux/getpid.c index 9cab47ae..73cb74b6 100644 --- a/lib/linux/getpid.c +++ b/lib/linux/getpid.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include =20 pid_t diff --git a/lib/linux/getppid.c b/lib/linux/getppid.c index 7eea4539..49d472ba 100644 --- a/lib/linux/getppid.c +++ b/lib/linux/getppid.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include =20 pid_t diff --git a/lib/linux/getrusage.c b/lib/linux/getrusage.c index 2a789949..174d4c0b 100644 --- a/lib/linux/getrusage.c +++ b/lib/linux/getrusage.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include =20 int diff --git a/lib/linux/gettimeofday.c b/lib/linux/gettimeofday.c index 495f059f..ed4e336f 100644 --- a/lib/linux/gettimeofday.c +++ b/lib/linux/gettimeofday.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -20,7 +20,7 @@ =20 #include #include -#include +#include #include =20 int diff --git a/lib/linux/getuid.c b/lib/linux/getuid.c index e6edd257..d5ca3a50 100644 --- a/lib/linux/getuid.c +++ b/lib/linux/getuid.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include =20 uid_t diff --git a/lib/linux/ioctl.c b/lib/linux/ioctl.c index 0e6e14ac..27547c68 100644 --- a/lib/linux/ioctl.c +++ b/lib/linux/ioctl.c @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include #include =20 diff --git a/lib/linux/ioctl3.c b/lib/linux/ioctl3.c index 3f759d06..7990b8b7 100644 --- a/lib/linux/ioctl3.c +++ b/lib/linux/ioctl3.c @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include =20 int diff --git a/lib/linux/kill.c b/lib/linux/kill.c index 4298a9db..f04424fb 100644 --- a/lib/linux/kill.c +++ b/lib/linux/kill.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include =20 int diff --git a/lib/linux/link.c b/lib/linux/link.c index cf8dec32..e2d66912 100644 --- a/lib/linux/link.c +++ b/lib/linux/link.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include =20 int link (char const *old_name, char const *new_name) diff --git a/lib/linux/lseek.c b/lib/linux/lseek.c index f71af59f..c72a75cf 100644 --- a/lib/linux/lseek.c +++ b/lib/linux/lseek.c @@ -20,7 +20,7 @@ =20 #include #include -#include +#include #include #include =20 diff --git a/lib/linux/lstat.c b/lib/linux/lstat.c index 039de0e1..feebc6cb 100644 --- a/lib/linux/lstat.c +++ b/lib/linux/lstat.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include =20 int diff --git a/lib/linux/mkdir.c b/lib/linux/mkdir.c index 53188888..59319329 100644 --- a/lib/linux/mkdir.c +++ b/lib/linux/mkdir.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include =20 int diff --git a/lib/linux/mknod.c b/lib/linux/mknod.c index 8339f7a6..24a9b0c7 100644 --- a/lib/linux/mknod.c +++ b/lib/linux/mknod.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include =20 int diff --git a/lib/linux/nanosleep.c b/lib/linux/nanosleep.c index bc838a4f..a5e2a044 100644 --- a/lib/linux/nanosleep.c +++ b/lib/linux/nanosleep.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include #include =20 diff --git a/lib/linux/pipe.c b/lib/linux/pipe.c index 0ed4c23e..f6b3689a 100644 --- a/lib/linux/pipe.c +++ b/lib/linux/pipe.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include =20 int diff --git a/lib/linux/read.c b/lib/linux/read.c index efd25744..d91f81b2 100644 --- a/lib/linux/read.c +++ b/lib/linux/read.c @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include #include =20 diff --git a/lib/linux/readlink.c b/lib/linux/readlink.c index 9990b50f..96443273 100644 --- a/lib/linux/readlink.c +++ b/lib/linux/readlink.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include =20 ssize_t diff --git a/lib/linux/rename.c b/lib/linux/rename.c index 492c734d..762c3093 100644 --- a/lib/linux/rename.c +++ b/lib/linux/rename.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include =20 int diff --git a/lib/linux/rmdir.c b/lib/linux/rmdir.c index 7c096832..5d4c0f49 100644 --- a/lib/linux/rmdir.c +++ b/lib/linux/rmdir.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <= janneke@gnu.org> * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include =20 int rmdir (char const *file_name) diff --git a/lib/linux/setgid.c b/lib/linux/setgid.c index 5512c622..13399c2e 100644 --- a/lib/linux/setgid.c +++ b/lib/linux/setgid.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include =20 int diff --git a/lib/linux/settimer.c b/lib/linux/settimer.c index a66240f1..7247c8a0 100644 --- a/lib/linux/settimer.c +++ b/lib/linux/settimer.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include #include =20 diff --git a/lib/linux/setuid.c b/lib/linux/setuid.c index 5157dcae..d5e2ae76 100644 --- a/lib/linux/setuid.c +++ b/lib/linux/setuid.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include =20 int diff --git a/lib/linux/signal.c b/lib/linux/signal.c index 11174be9..23cf106d 100644 --- a/lib/linux/signal.c +++ b/lib/linux/signal.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include #include =20 diff --git a/lib/linux/sigprogmask.c b/lib/linux/sigprogmask.c index c0326a28..4b0bb8eb 100644 --- a/lib/linux/sigprogmask.c +++ b/lib/linux/sigprogmask.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include #include =20 diff --git a/lib/linux/stat.c b/lib/linux/stat.c index d8f4465b..df0022aa 100644 --- a/lib/linux/stat.c +++ b/lib/linux/stat.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <= janneke@gnu.org> * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include =20 int diff --git a/lib/linux/symlink.c b/lib/linux/symlink.c index 53f99fb7..4e4084d2 100644 --- a/lib/linux/symlink.c +++ b/lib/linux/symlink.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2018,2019,2022 Jan (janneke) Nieuwenhuizen * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include =20 int diff --git a/lib/linux/time.c b/lib/linux/time.c index f4931970..53c92052 100644 --- a/lib/linux/time.c +++ b/lib/linux/time.c @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include #include #include diff --git a/lib/linux/unlink.c b/lib/linux/unlink.c index 03713e64..9f204b5f 100644 --- a/lib/linux/unlink.c +++ b/lib/linux/unlink.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <= janneke@gnu.org> * * This file is part of GNU Mes. * @@ -20,7 +20,7 @@ =20 #include #include -#include +#include =20 int unlink (char const *file_name) diff --git a/lib/linux/waitpid.c b/lib/linux/waitpid.c index 693e3dfa..bb89c692 100644 --- a/lib/linux/waitpid.c +++ b/lib/linux/waitpid.c @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include =20 pid_t diff --git a/lib/m2/execve.c b/lib/m2/execve.c index 7fe7c9ba..1f078c3d 100644 --- a/lib/m2/execve.c +++ b/lib/m2/execve.c @@ -1,6 +1,6 @@ /* -*-comment-start: "//";comment-end:""-*- * GNU Mes --- Maxwell Equations of Software - * Copyright =C2=A9 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen + * Copyright =C2=A9 2016,2017,2018,2019,2022 Jan (janneke) Nieuwenhuizen <= janneke@gnu.org> * * This file is part of GNU Mes. * @@ -19,7 +19,7 @@ */ =20 #include -#include +#include =20 int execve (char const *file_name, char **argv, char **env) diff --git a/lib/m2/open.c b/lib/m2/open.c index 3d3fe4dc..ee5513e7 100644 --- a/lib/m2/open.c +++ b/lib/m2/open.c @@ -18,6 +18,8 @@ * along with GNU Mes. If not, see . */ =20 +#include +#include #include #include #include diff --git a/lib/m2/time.c b/lib/m2/time.c index c589de85..7f43cdad 100644 --- a/lib/m2/time.c +++ b/lib/m2/time.c @@ -19,7 +19,7 @@ */ =20 #include -#include +#include #include =20 long diff --git a/lib/m2/waitpid.c b/lib/m2/waitpid.c index a3d98d1d..5cd18d98 100644 --- a/lib/m2/waitpid.c +++ b/lib/m2/waitpid.c @@ -20,7 +20,7 @@ =20 #include #include -#include +#include #include =20 int diff --git a/simple.sh b/simple.sh index ce0ec375..fc5ac371 100755 --- a/simple.sh +++ b/simple.sh @@ -1,7 +1,7 @@ #! /bin/sh =20 # GNU Mes --- Maxwell Equations of Software -# Copyright =C2=A9 2019,2020,2022 Jan (janneke) Nieuwenhuizen +# Copyright =C2=A9 2019,2020,2022,2023 Jan (janneke) Nieuwenhuizen # # This file is part of GNU Mes. # @@ -36,7 +36,9 @@ cat > include/mes/config.h < include/mes/config.h < | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com --=-=-=--