cmucl-cvs
Threads by month
- ----- 2025 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- 1 participants
- 3169 discussions

[Git][cmucl/cmucl][issue-363-add-version-number] Update cmucl-bsd-os.pot
by Raymond Toy (@rtoy) 13 Feb '25
by Raymond Toy (@rtoy) 13 Feb '25
13 Feb '25
Raymond Toy pushed to branch issue-363-add-version-number at cmucl / cmucl
Commits:
4631d16c by Raymond Toy at 2025-02-13T06:55:33-08:00
Update cmucl-bsd-os.pot
A string has been removed, probably for #261.
- - - - -
1 changed file:
- src/i18n/locale/cmucl-bsd-os.pot
Changes:
=====================================
src/i18n/locale/cmucl-bsd-os.pot
=====================================
@@ -15,10 +15,6 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: src/code/bsd-os.lisp
-msgid "Unix system call getrusage failed: ~A."
-msgstr ""
-
#: src/code/signal.lisp
msgid "Emt instruction"
msgstr ""
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/4631d16cb39f3562fc69baa…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/4631d16cb39f3562fc69baa…
You're receiving this email because of your account on gitlab.common-lisp.net.
1
0

[Git][cmucl/cmucl][issue-363-add-version-number] 2 commits: Clean up according to review comments.
by Raymond Toy (@rtoy) 13 Feb '25
by Raymond Toy (@rtoy) 13 Feb '25
13 Feb '25
Raymond Toy pushed to branch issue-363-add-version-number at cmucl / cmucl
Commits:
6bfaea5c by Raymond Toy at 2025-02-13T05:56:54-08:00
Clean up according to review comments.
- - - - -
6f314bfb by Raymond Toy at 2025-02-13T06:03:20-08:00
Fix typo: it's "elif", not "else if"
- - - - -
1 changed file:
- bin/git-version.sh
Changes:
=====================================
bin/git-version.sh
=====================================
@@ -1,12 +1,10 @@
#!/bin/sh
-# If no, just print out the version. If yes, print out the version as
-# a C file #define.
-
+# If FILE=yes, print out the version as a C file #define. Otherwise,
+# just print the version to stdout and exit.
FILE=""
-while getopts "f" arg
-do
+while getopts "f" arg; do
case $arg in
f) FILE=yes
;;
@@ -15,15 +13,12 @@ done
# Script to determine the cmucl version based on git describe
GIT_HASH="`(git describe --dirty 2>/dev/null || git describe 2>/dev/null)`"
-# echo GIT_HASH = ${GIT_HASH}
-if [ `expr "X${GIT_HASH}" : 'Xsnapshot-[0-9][0-9][0-9][0-9]-[01][0-9]'` != 0 ]; then
+if [ `expr "X$GIT_HASH" : 'Xsnapshot-[0-9][0-9][0-9][0-9]-[01][0-9]'` != 0 ]; then
# The git hash looks like snapshot-yyyy-mm-<stuff>. Remove the
# "snapshot-" part.
- DEFAULT_VERSION=`expr "${GIT_HASH}" : "snapshot-\(.*\)"`
-fi
-
-if [ `expr "X${GIT_HASH}" : 'X[0-9][0-9][a-f]'` != 0 ]; then
+ DEFAULT_VERSION=`expr "$GIT_HASH" : "snapshot-\(.*\)"`
+elif [ `expr "X$GIT_HASH" : 'X[0-9][0-9][a-f]'` != 0 ]; then
# The git hash looks like a release which is 3 hex digits. Use it as is.
DEFAULT_VERSION="${GIT_HASH}"
fi
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/5286ab0f32487ede8be26a…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/5286ab0f32487ede8be26a…
You're receiving this email because of your account on gitlab.common-lisp.net.
1
0

[Git][cmucl/cmucl][master] Forgot to export "STRING-OCTET-COUNT" from STREAM package
by Raymond Toy (@rtoy) 12 Feb '25
by Raymond Toy (@rtoy) 12 Feb '25
12 Feb '25
Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
d80924da by Raymond Toy at 2025-02-12T15:54:22-08:00
Forgot to export "STRING-OCTET-COUNT" from STREAM package
- - - - -
1 changed file:
- src/code/exports.lisp
Changes:
=====================================
src/code/exports.lisp
=====================================
@@ -1782,6 +1782,7 @@
"STRING-TO-OCTETS" "OCTETS-TO-STRING" "*DEFAULT-EXTERNAL-FORMAT*"
"STRING-ENCODE" "STRING-DECODE"
+ "STRING-OCTET-COUNT"
"SET-SYSTEM-EXTERNAL-FORMAT"
"+REPLACEMENT-CHARACTER-CODE+"
"LIST-ALL-EXTERNAL-FORMATS"
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/d80924da88520b316ebc496…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/d80924da88520b316ebc496…
You're receiving this email because of your account on gitlab.common-lisp.net.
1
0

[Git][cmucl/cmucl][issue-363-add-version-number] 2 commits: Update cmucl.pot file
by Raymond Toy (@rtoy) 11 Feb '25
by Raymond Toy (@rtoy) 11 Feb '25
11 Feb '25
Raymond Toy pushed to branch issue-363-add-version-number at cmucl / cmucl
Commits:
969372c2 by Raymond Toy at 2025-02-11T07:20:35-08:00
Update cmucl.pot file
Docstring for -version switch has changed.
- - - - -
5286ab0f by Raymond Toy at 2025-02-11T07:26:47-08:00
Update "target:" search list with correct src dir
With the versioned paths, we need to update the "target:" search-list
in default-site-init.lisp to have the correct path to the sources
using the default tree structure.
- - - - -
2 changed files:
- src/code/default-site-init.lisp
- src/i18n/locale/cmucl.pot
Changes:
=====================================
src/code/default-site-init.lisp
=====================================
@@ -32,13 +32,22 @@
;;; bin/
;;; lib/
;;; cmucl/
-;;; lib/
-;;; lisp*.coore
-;;; man/
-;;; src/
+;;; <version>/
+;;; lib/
+;;; share/
+;;; cmucl/
+;;; <version>/
+;;; src/
+;;; tests/
+;;; man/
+;;; man1/
;;;
;;; If your sources are located somewhere else, change this
;;; accordingly.
-(setf (search-list "target:")
- '("library:../src/"))
+(push (pathname
+ (concatenate 'string
+ "library:../../../../share/cmucl/"
+ lisp::*lisp-implementation-version*
+ "/src/"))
+ (search-list "target:"))
=====================================
src/i18n/locale/cmucl.pot
=====================================
@@ -6209,7 +6209,7 @@ msgid "Same as -help."
msgstr ""
#: src/code/commandline.lisp
-msgid "Prints the cmucl version and exits"
+msgid "Prints the cmucl version and exits, without loading the lisp core."
msgstr ""
#: src/code/commandline.lisp
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/59bbf30e5d503113d44c84…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/59bbf30e5d503113d44c84…
You're receiving this email because of your account on gitlab.common-lisp.net.
1
0

[Git][cmucl/cmucl][issue-365-add-strerror] Correct the description of the contents of the generated file.
by Raymond Toy (@rtoy) 11 Feb '25
by Raymond Toy (@rtoy) 11 Feb '25
11 Feb '25
Raymond Toy pushed to branch issue-365-add-strerror at cmucl / cmucl
Commits:
376d2fa9 by Raymond Toy at 2025-02-10T17:23:49-08:00
Correct the description of the contents of the generated file.
- - - - -
1 changed file:
- bin/create-errno.sh
Changes:
=====================================
bin/create-errno.sh
=====================================
@@ -26,8 +26,7 @@ cat <<EOF
;;;
;;; **********************************************************************
;;;
-;;; This file contains the UNIX low-level support, just enough to run
-;;; CMUCL.
+;;; This file contains the UNIX errno values.
;;;
(in-package "UNIX")
(intl:textdomain "cmucl-unix")
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/376d2fa900dafd906f34b77…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/376d2fa900dafd906f34b77…
You're receiving this email because of your account on gitlab.common-lisp.net.
1
0

[Git][cmucl/cmucl][issue-365-add-strerror] Export more errno symbols for linux
by Raymond Toy (@rtoy) 10 Feb '25
by Raymond Toy (@rtoy) 10 Feb '25
10 Feb '25
Raymond Toy pushed to branch issue-365-add-strerror at cmucl / cmucl
Commits:
f04b033c by Raymond Toy at 2025-02-10T08:57:03-08:00
Export more errno symbols for linux
These are new errno values found by generating unix-errno.lisp. This
gets rid of the warning that the UNIX package exports other symbols.
- - - - -
1 changed file:
- src/code/exports.lisp
Changes:
=====================================
src/code/exports.lisp
=====================================
@@ -553,7 +553,22 @@
"WRITEGRP"
"WRITEOTH"
"XMT1EN"
- ))
+ )
+ ;; Additional errno for linux
+ #+linux
+ (:export
+ "EKEYREJECTED"
+ "EMEDIUMTYPE"
+ "ENOKEY"
+ "ECANCELED"
+ "EOWNERDEAD"
+ "EKEYEXPIRED"
+ "EKEYREVOKED"
+ "ERFKILL"
+ "ENOTRECOVERABLE"
+ "ENOMEDIUM"
+ "EHWPOISON"
+ ))
(defpackage "FORMAT")
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/f04b033c81aaecea0b1e15b…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/f04b033c81aaecea0b1e15b…
You're receiving this email because of your account on gitlab.common-lisp.net.
1
0

[Git][cmucl/cmucl][issue-365-add-strerror] create-errno.sh figures out where the C header files are
by Raymond Toy (@rtoy) 10 Feb '25
by Raymond Toy (@rtoy) 10 Feb '25
10 Feb '25
Raymond Toy pushed to branch issue-365-add-strerror at cmucl / cmucl
Commits:
8fe55d42 by Raymond Toy at 2025-02-10T07:57:03-08:00
create-errno.sh figures out where the C header files are
Instead of having build.sh and cross-build.sh have duplicated code to
figure out where the C header files are, put that bit of code into
create-errno.sh.
Update build.sh and cross-build.sh appropriately.
- - - - -
3 changed files:
- bin/build.sh
- bin/create-errno.sh
- bin/cross-build-world.sh
Changes:
=====================================
bin/build.sh
=====================================
@@ -154,13 +154,7 @@ buildit ()
}
# Create unix-errno.lisp
-case `uname -s` in
- Linux) ERRNO_FILES=/usr/include/asm-generic/errno*.h
- ;;
-esac
-
-#awk -f bin/create-errno.awk ${ERRNO_FILES} > src/code/unix-errno.lisp
-bin/create-errno.sh ${ERRNO_FILES} > src/code/unix-errno.lisp
+bin/create-errno.sh > src/code/unix-errno.lisp
BUILDWORLD="$TOOLDIR/build-world.sh"
BUILD_POT="yes"
=====================================
bin/create-errno.sh
=====================================
@@ -1,9 +1,14 @@
#! /bin/sh
-# Generates the contents of the file code/unix-errno.lisp. The args
-# to this script, if supplied, must be a list of files containing the
-# definitions of all the Unix errno values.
-#
+# Generates the contents of the file code/unix-errno.lisp.
+
+# For each supported OS, ERRNO_FILES should be set to a list of all
+# the files that contain the definitions of the errno values.
+case `uname -s` in
+ Linux) ERRNO_FILES=/usr/include/asm-generic/errno*.h
+ ;;
+esac
+
# The header was copied from code/unix.lisp. This includes all the
# support code for DEF-UNIX-ERROR and for all OSes that don't use the
@@ -251,7 +256,7 @@ EOF
# containing the C definitions.
awk '/^#define[ \t]+(E[A-Z0-9]+)[ \t]+([A-Z0-9]+).*$/ {
printf "(def-unix-error %s %s)\n", $2, $3;
-}' "$@"
+}' ${ERRNO_FILES}
# The tail was also copied from code/unix.lisp. It's needed to tell
# Lisp about the errno values.
=====================================
bin/cross-build-world.sh
=====================================
@@ -85,13 +85,7 @@ then
fi
# Create unix-errno.lisp
-case `uname -s` in
- Linux) ERRNO_FILES=/usr/include/asm-generic/errno*.h
- ;;
-esac
-
-#awk -f bin/create-errno.awk ${ERRNO_FILES} > src/code/unix-errno.lisp
-bin/create-errno.sh ${ERRNO_FILES} > src/code/unix-errno.lisp
+bin/create-errno.sh > src/code/unix-errno.lisp
echo cross boot = $CROSSBOOT
$LISP "$@" -noinit -nositeinit <<EOF
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/8fe55d42337b1c18325bd6c…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/8fe55d42337b1c18325bd6c…
You're receiving this email because of your account on gitlab.common-lisp.net.
1
0

[Git][cmucl/cmucl][issue-365-add-strerror] 2 commits: Remove lisp/create-errno.c
by Raymond Toy (@rtoy) 10 Feb '25
by Raymond Toy (@rtoy) 10 Feb '25
10 Feb '25
Raymond Toy pushed to branch issue-365-add-strerror at cmucl / cmucl
Commits:
1b20dfa0 by Raymond Toy at 2025-02-10T07:38:48-08:00
Remove lisp/create-errno.c
We don't use this file anymore; it's not used.
- - - - -
f17af880 by Raymond Toy at 2025-02-10T07:40:11-08:00
Undo changes to makefile and configs
Since we removed create-errno.c, we can remove all the make rules in
GNUmakefile and Config.x86_linux*.
- - - - -
4 changed files:
- src/lisp/Config.x86_linux
- src/lisp/Config.x86_linux_clang
- src/lisp/GNUmakefile
- − src/lisp/create-errno.c
Changes:
=====================================
src/lisp/Config.x86_linux
=====================================
@@ -14,6 +14,3 @@ OS_LINK_FLAGS = -m32 -rdynamic -Xlinker --export-dynamic -Xlinker -Map -Xlinker
OS_LINK_FLAGS += -Wl,-z,noexecstack
EXEC_FINAL_OBJ = exec-final.o
-
-../code/unix-errno.lisp : create-errno
- ./create-errno /usr/include/asm-generic/errno* | uniq > $@
=====================================
src/lisp/Config.x86_linux_clang
=====================================
@@ -19,6 +19,3 @@ OS_LINK_FLAGS = -m32 -rdynamic -Xlinker --export-dynamic -Xlinker -Map -Xlinker
OS_LINK_FLAGS += -Wl,-z,noexecstack
EXEC_FINAL_OBJ = exec-final.o
-
-../code/unix-errno.lisp : create-errno
- ./create-errno /usr/include/asm-generic/errno* | uniq > $@
=====================================
src/lisp/GNUmakefile
=====================================
@@ -66,9 +66,9 @@ endif
version:
echo 0 > version
-#internals.h internals.inc:
-# @echo "You must run genesis to create internals.h!"
-# @false
+internals.h internals.inc:
+ @echo "You must run genesis to create internals.h!"
+ @false
clean:
$(RM) Depends *.o lisp lisp.nm core lisp.a
@@ -139,7 +139,3 @@ translations-update:
done; done
-# Compile program that creates the unix-error.lisp file. Actual
-# generation of the file is OS-dependent.
-create-errno : create-errno.c
- $(CC) -o $@ $^
=====================================
src/lisp/create-errno.c deleted
=====================================
@@ -1,91 +0,0 @@
-#include <regex.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-struct Err {
- char *name;
- int num;
-#if 0
- char *descr;
-#endif
-} err[256];
-
-int nerr = 0;
-
-regex_t reg;
-
-void match(const char *line) {
- regmatch_t match[3];
- regoff_t len;
-
- if (regexec(®, line, 3, match, 0) == REG_NOMATCH)
- return;
-
- len = match[1].rm_eo - match[1].rm_so;
- err[nerr].name = malloc(len + 1);
- sprintf(err[nerr].name, "%.*s", len, line + match[1].rm_so);
-
- err[nerr].num = atoi(line + match[2].rm_so);
-
-#if 0
- err[nerr].descr = strerror(err[nerr].num);
-#endif
-
- nerr++;
-}
-
-int cmp(const void *a, const void *b) {
- return ((struct Err *)a)->num - ((struct Err *)b)->num;
-}
-
-int main(int argc, char **argv)
-{
- int i;
- FILE *fp;
- char line[1024];
-
- regcomp(®, "^#define[ \t]*(E[A-Z0-9]+)[ \t]*([0-9]+)", REG_EXTENDED);
-
- for (i = 1; i < argc; i++) {
- if ((fp = fopen(argv[i], "r")) == NULL) {
- perror("fopen");
- exit(1);
- }
- while (fgets(line, sizeof(line), fp) != NULL)
- match(line);
- fclose(fp);
- }
-
- qsort(err, nerr, sizeof(*err), cmp);
-
- /*
- * Print out CMUCL-style file header
- */
- puts(";;; -*- Package: UNIX -*-\n\
-;;;\n\
-;;; **********************************************************************\n\
-;;; This code was written as part of the CMU Common Lisp project at\n\
-;;; Carnegie Mellon University, and has been placed in the public domain.\n\
-;;;\n\
-(ext:file-comment\n\
- \"$Header: src/code/unix-errno.lisp $\")\n\
-;;;\n\
-;;; **********************************************************************\n\
-;;;\n\
-;;; This file contains the values of the UNIX errno values.\n\
-;;;\n \
-;;; DO NOT EDIT! This is auto-generated from create-errno.\n\
-;;;\n");
-
- puts("(in-package \"UNIX\")\n");
- for (i = 0; i < nerr; i++) {
-#if 0
- printf("(def-unix-error %s %d \"%s\")\n", err[i].name, err[i].num, err[i].descr);
-#else
- printf("(def-unix-error %s %d)\n", err[i].name, err[i].num);
-#endif
- }
-
- return 0;
-}
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/5e784f728d0699fced6079…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/5e784f728d0699fced6079…
You're receiving this email because of your account on gitlab.common-lisp.net.
1
0

[Git][cmucl/cmucl][issue-365-add-strerror] 8 commits: Update release notes with more closed issues.
by Raymond Toy (@rtoy) 10 Feb '25
by Raymond Toy (@rtoy) 10 Feb '25
10 Feb '25
Raymond Toy pushed to branch issue-365-add-strerror at cmucl / cmucl
Commits:
bf461224 by Raymond Toy at 2025-01-29T13:59:15-08:00
Update release notes with more closed issues.
- - - - -
fd391099 by Raymond Toy at 2025-01-31T14:39:40+00:00
Fix #367: Add method to count number of octets to encode a string
- - - - -
12e15d8b by Raymond Toy at 2025-01-31T14:39:40+00:00
Merge branch 'issue-367-count-octets-for-encoding' into 'master'
Fix #367: Add method to count number of octets to encode a string
Closes #367
See merge request cmucl/cmucl!264
- - - - -
739de261 by Raymond Toy at 2025-01-31T06:57:45-08:00
Update release notes to add issue 367
- - - - -
59c0efb2 by Raymond Toy at 2025-02-09T13:29:05-08:00
Merge branch 'master' into issue-365-add-strerror
- - - - -
a6792e50 by Raymond Toy at 2025-02-09T15:19:31-08:00
Remove errno stuff from unix.lisp and move it to unix-errno.lisp
So, all the stuff related to errno in unix.lisp has been moved to
src/code/unix-errno.lisp. This file is auto-generated in build.sh and
cross-build.sh. The new file bin/create-errno.awk is the script that
generates the file. It contains all of the errno stuff from
unix.lisp so that other OSes are supported. But it generates
appropriate `def-unix-error` forms on Linux.
- - - - -
2f9a0e54 by Raymond Toy at 2025-02-10T07:28:15-08:00
Use shell script to create unix-errno.lisp
Instead of embedding the header and tail of unix-errno.lisp in the awk
script, use a shell script to print out the header and tail. We embed
the fairly simple awk script into the shell script.
Update the build scripts to use this new shell script.
- - - - -
5e784f72 by Raymond Toy at 2025-02-10T07:29:56-08:00
Remove create-errno.awk
This has all been subsumed by the scripts create-errno.sh.
- - - - -
26 changed files:
- .gitlab-ci.yml
- bin/build.sh
- + bin/create-errno.sh
- bin/cross-build-world.sh
- + src/bootfiles/21e/boot-2024-08.lisp
- src/code/exports.lisp
- src/code/extfmts.lisp
- src/code/unix.lisp
- src/general-info/release-21f.md
- src/i18n/locale/cmucl-unix.pot
- src/i18n/locale/cmucl.pot
- src/pcl/simple-streams/external-formats/ascii.lisp
- src/pcl/simple-streams/external-formats/euc-kr.lisp
- src/pcl/simple-streams/external-formats/iso8859-1.lisp
- src/pcl/simple-streams/external-formats/iso8859-2.lisp
- src/pcl/simple-streams/external-formats/mac-roman.lisp
- src/pcl/simple-streams/external-formats/utf-16-be.lisp
- src/pcl/simple-streams/external-formats/utf-16-le.lisp
- src/pcl/simple-streams/external-formats/utf-16.lisp
- src/pcl/simple-streams/external-formats/utf-32-be.lisp
- src/pcl/simple-streams/external-formats/utf-32-le.lisp
- src/pcl/simple-streams/external-formats/utf-32.lisp
- src/pcl/simple-streams/external-formats/utf-8.lisp
- src/tools/worldbuild.lisp
- src/tools/worldcom.lisp
- + tests/external-formats.lisp
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -1,7 +1,7 @@
variables:
download_url: "https://common-lisp.net/project/cmucl/downloads/snapshots/2024/08"
version: "2024-08-x86"
- bootstrap: ""
+ bootstrap: "-B boot-2024-08"
stages:
=====================================
bin/build.sh
=====================================
@@ -153,6 +153,15 @@ buildit ()
fi
}
+# Create unix-errno.lisp
+case `uname -s` in
+ Linux) ERRNO_FILES=/usr/include/asm-generic/errno*.h
+ ;;
+esac
+
+#awk -f bin/create-errno.awk ${ERRNO_FILES} > src/code/unix-errno.lisp
+bin/create-errno.sh ${ERRNO_FILES} > src/code/unix-errno.lisp
+
BUILDWORLD="$TOOLDIR/build-world.sh"
BUILD_POT="yes"
UPDATE_TRANS=
@@ -204,19 +213,6 @@ fi
echo base = $BASE
-# Determine if we need to generate unix-errno.lisp
-
-# Set to "yes" if we auto-generate code/unix-errno.lisp.
-GEN_ERRNO=
-
-case `uname -s` in
- # Add more cases as we support more OSes
- Linux)
- GEN_ERRNO=yes
- ;;
-esac
-
-
bootfiles_dir=$SRCDIR/bootfiles/$version
if [ -n "$bootfiles" ]; then
for file in $bootfiles; do
=====================================
bin/create-errno.sh
=====================================
@@ -0,0 +1,264 @@
+#! /bin/sh
+
+# Generates the contents of the file code/unix-errno.lisp. The args
+# to this script, if supplied, must be a list of files containing the
+# definitions of all the Unix errno values.
+#
+
+# The header was copied from code/unix.lisp. This includes all the
+# support code for DEF-UNIX-ERROR and for all OSes that don't use the
+# awk script to create the DEF-UNIX-ERROR forms.
+#
+cat <<EOF
+;;; -*- Package: UNIX -*-
+;;;
+;;; **********************************************************************
+;;; This code was written as part of the CMU Common Lisp project at
+;;; Carnegie Mellon University, and has been placed in the public domain.
+;;;
+(ext:file-comment
+ "$Header: src/code/unix-errno.lisp $")
+;;;
+;;; **********************************************************************
+;;;
+;;; This file contains the UNIX low-level support, just enough to run
+;;; CMUCL.
+;;;
+(in-package "UNIX")
+(intl:textdomain "cmucl-unix")
+
+;;;; Errno stuff.
+(eval-when (compile eval)
+
+(defparameter *compiler-unix-errors* nil)
+
+(defmacro def-unix-error (name number &optional description)
+ "Define a constant named Name corresponding to the Unix errno value
+ Number. A description of the errno is optional in Description."
+ \`(progn
+ (eval-when (compile eval)
+ (push (cons ,number ,description) *compiler-unix-errors*))
+ (defconstant ,name ,number ,description)
+ (export ',name)))
+
+(defmacro emit-unix-errors ()
+ (let* ((max (apply #'max (mapcar #'car *compiler-unix-errors*)))
+ (array (make-array (1+ max) :initial-element nil)))
+ (dolist (error *compiler-unix-errors*)
+ (setf (svref array (car error)) (cdr error)))
+ \`(progn
+ (defvar *unix-errors* ',array)
+ (declaim (simple-vector *unix-errors*)))))
+
+) ;eval-when
+
+;;;
+;;; From <errno.h>
+;;;
+(def-unix-error ESUCCESS 0 _N"Successful")
+#-linux
+(progn
+(def-unix-error EPERM 1 _N"Operation not permitted")
+(def-unix-error ENOENT 2 _N"No such file or directory")
+(def-unix-error ESRCH 3 _N"No such process")
+(def-unix-error EINTR 4 _N"Interrupted system call")
+(def-unix-error EIO 5 _N"I/O error")
+(def-unix-error ENXIO 6 _N"Device not configured")
+(def-unix-error E2BIG 7 _N"Arg list too long")
+(def-unix-error ENOEXEC 8 _N"Exec format error")
+(def-unix-error EBADF 9 _N"Bad file descriptor")
+(def-unix-error ECHILD 10 _N"No child process")
+)
+#+bsd(def-unix-error EDEADLK 11 _N"Resource deadlock avoided")
+#-(or bsd linux) (def-unix-error EAGAIN 11 #-linux _N"No more processes" #+linux _N"Try again")
+#-linux
+(progn
+(def-unix-error ENOMEM 12 _N"Out of memory")
+(def-unix-error EACCES 13 _N"Permission denied")
+(def-unix-error EFAULT 14 _N"Bad address")
+(def-unix-error ENOTBLK 15 _N"Block device required")
+(def-unix-error EBUSY 16 _N"Device or resource busy")
+(def-unix-error EEXIST 17 _N"File exists")
+(def-unix-error EXDEV 18 _N"Cross-device link")
+(def-unix-error ENODEV 19 _N"No such device")
+(def-unix-error ENOTDIR 20 _N"Not a director")
+(def-unix-error EISDIR 21 _N"Is a directory")
+(def-unix-error EINVAL 22 _N"Invalid argument")
+(def-unix-error ENFILE 23 _N"File table overflow")
+(def-unix-error EMFILE 24 _N"Too many open files")
+(def-unix-error ENOTTY 25 _N"Inappropriate ioctl for device")
+(def-unix-error ETXTBSY 26 _N"Text file busy")
+(def-unix-error EFBIG 27 _N"File too large")
+(def-unix-error ENOSPC 28 _N"No space left on device")
+(def-unix-error ESPIPE 29 _N"Illegal seek")
+(def-unix-error EROFS 30 _N"Read-only file system")
+(def-unix-error EMLINK 31 _N"Too many links")
+(def-unix-error EPIPE 32 _N"Broken pipe")
+;;;
+;;; Math
+(def-unix-error EDOM 33 _N"Numerical argument out of domain")
+(def-unix-error ERANGE 34 #-linux _N"Result too large" #+linux _N"Math result not representable")
+)
+;;;
+#-(or linux svr4)
+(progn
+;;; non-blocking and interrupt i/o
+(def-unix-error EWOULDBLOCK 35 _N"Operation would block")
+#-bsd(def-unix-error EDEADLK 35 _N"Operation would block") ; Ditto
+#+bsd(def-unix-error EAGAIN 35 _N"Resource temporarily unavailable")
+(def-unix-error EINPROGRESS 36 _N"Operation now in progress")
+(def-unix-error EALREADY 37 _N"Operation already in progress")
+;;;
+;;; ipc/network software
+(def-unix-error ENOTSOCK 38 _N"Socket operation on non-socket")
+(def-unix-error EDESTADDRREQ 39 _N"Destination address required")
+(def-unix-error EMSGSIZE 40 _N"Message too long")
+(def-unix-error EPROTOTYPE 41 _N"Protocol wrong type for socket")
+(def-unix-error ENOPROTOOPT 42 _N"Protocol not available")
+(def-unix-error EPROTONOSUPPORT 43 _N"Protocol not supported")
+(def-unix-error ESOCKTNOSUPPORT 44 _N"Socket type not supported")
+(def-unix-error EOPNOTSUPP 45 _N"Operation not supported on socket")
+(def-unix-error EPFNOSUPPORT 46 _N"Protocol family not supported")
+(def-unix-error EAFNOSUPPORT 47 _N"Address family not supported by protocol family")
+(def-unix-error EADDRINUSE 48 _N"Address already in use")
+(def-unix-error EADDRNOTAVAIL 49 _N"Can't assign requested address")
+;;;
+;;; operational errors
+(def-unix-error ENETDOWN 50 _N"Network is down")
+(def-unix-error ENETUNREACH 51 _N"Network is unreachable")
+(def-unix-error ENETRESET 52 _N"Network dropped connection on reset")
+(def-unix-error ECONNABORTED 53 _N"Software caused connection abort")
+(def-unix-error ECONNRESET 54 _N"Connection reset by peer")
+(def-unix-error ENOBUFS 55 _N"No buffer space available")
+(def-unix-error EISCONN 56 _N"Socket is already connected")
+(def-unix-error ENOTCONN 57 _N"Socket is not connected")
+(def-unix-error ESHUTDOWN 58 _N"Can't send after socket shutdown")
+(def-unix-error ETOOMANYREFS 59 _N"Too many references: can't splice")
+(def-unix-error ETIMEDOUT 60 _N"Connection timed out")
+(def-unix-error ECONNREFUSED 61 _N"Connection refused")
+;;;
+(def-unix-error ELOOP 62 _N"Too many levels of symbolic links")
+(def-unix-error ENAMETOOLONG 63 _N"File name too long")
+;;;
+(def-unix-error EHOSTDOWN 64 _N"Host is down")
+(def-unix-error EHOSTUNREACH 65 _N"No route to host")
+(def-unix-error ENOTEMPTY 66 _N"Directory not empty")
+;;;
+;;; quotas & resource
+(def-unix-error EPROCLIM 67 _N"Too many processes")
+(def-unix-error EUSERS 68 _N"Too many users")
+(def-unix-error EDQUOT 69 _N"Disc quota exceeded")
+;;;
+;;; CMU RFS
+(def-unix-error ELOCAL 126 _N"namei should continue locally")
+(def-unix-error EREMOTE 127 _N"namei was handled remotely")
+;;;
+;;; VICE
+(def-unix-error EVICEERR 70 _N"Remote file system error _N")
+(def-unix-error EVICEOP 71 _N"syscall was handled by Vice")
+)
+#+svr4
+(progn
+(def-unix-error ENOMSG 35 _N"No message of desired type")
+(def-unix-error EIDRM 36 _N"Identifier removed")
+(def-unix-error ECHRNG 37 _N"Channel number out of range")
+(def-unix-error EL2NSYNC 38 _N"Level 2 not synchronized")
+(def-unix-error EL3HLT 39 _N"Level 3 halted")
+(def-unix-error EL3RST 40 _N"Level 3 reset")
+(def-unix-error ELNRNG 41 _N"Link number out of range")
+(def-unix-error EUNATCH 42 _N"Protocol driver not attached")
+(def-unix-error ENOCSI 43 _N"No CSI structure available")
+(def-unix-error EL2HLT 44 _N"Level 2 halted")
+(def-unix-error EDEADLK 45 _N"Deadlock situation detected/avoided")
+(def-unix-error ENOLCK 46 _N"No record locks available")
+(def-unix-error ECANCELED 47 _N"Error 47")
+(def-unix-error ENOTSUP 48 _N"Error 48")
+(def-unix-error EBADE 50 _N"Bad exchange descriptor")
+(def-unix-error EBADR 51 _N"Bad request descriptor")
+(def-unix-error EXFULL 52 _N"Message tables full")
+(def-unix-error ENOANO 53 _N"Anode table overflow")
+(def-unix-error EBADRQC 54 _N"Bad request code")
+(def-unix-error EBADSLT 55 _N"Invalid slot")
+(def-unix-error EDEADLOCK 56 _N"File locking deadlock")
+(def-unix-error EBFONT 57 _N"Bad font file format")
+(def-unix-error ENOSTR 60 _N"Not a stream device")
+(def-unix-error ENODATA 61 _N"No data available")
+(def-unix-error ETIME 62 _N"Timer expired")
+(def-unix-error ENOSR 63 _N"Out of stream resources")
+(def-unix-error ENONET 64 _N"Machine is not on the network")
+(def-unix-error ENOPKG 65 _N"Package not installed")
+(def-unix-error EREMOTE 66 _N"Object is remote")
+(def-unix-error ENOLINK 67 _N"Link has been severed")
+(def-unix-error EADV 68 _N"Advertise error")
+(def-unix-error ESRMNT 69 _N"Srmount error")
+(def-unix-error ECOMM 70 _N"Communication error on send")
+(def-unix-error EPROTO 71 _N"Protocol error")
+(def-unix-error EMULTIHOP 74 _N"Multihop attempted")
+(def-unix-error EBADMSG 77 _N"Not a data message")
+(def-unix-error ENAMETOOLONG 78 _N"File name too long")
+(def-unix-error EOVERFLOW 79 _N"Value too large for defined data type")
+(def-unix-error ENOTUNIQ 80 _N"Name not unique on network")
+(def-unix-error EBADFD 81 _N"File descriptor in bad state")
+(def-unix-error EREMCHG 82 _N"Remote address changed")
+(def-unix-error ELIBACC 83 _N"Can not access a needed shared library")
+(def-unix-error ELIBBAD 84 _N"Accessing a corrupted shared library")
+(def-unix-error ELIBSCN 85 _N".lib section in a.out corrupted")
+(def-unix-error ELIBMAX 86 _N"Attempting to link in more shared libraries than system limit")
+(def-unix-error ELIBEXEC 87 _N"Can not exec a shared library directly")
+(def-unix-error EILSEQ 88 _N"Error 88")
+(def-unix-error ENOSYS 89 _N"Operation not applicable")
+(def-unix-error ELOOP 90 _N"Number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS")
+(def-unix-error ERESTART 91 _N"Error 91")
+(def-unix-error ESTRPIPE 92 _N"Error 92")
+(def-unix-error ENOTEMPTY 93 _N"Directory not empty")
+(def-unix-error EUSERS 94 _N"Too many users")
+(def-unix-error ENOTSOCK 95 _N"Socket operation on non-socket")
+(def-unix-error EDESTADDRREQ 96 _N"Destination address required")
+(def-unix-error EMSGSIZE 97 _N"Message too long")
+(def-unix-error EPROTOTYPE 98 _N"Protocol wrong type for socket")
+(def-unix-error ENOPROTOOPT 99 _N"Option not supported by protocol")
+(def-unix-error EPROTONOSUPPORT 120 _N"Protocol not supported")
+(def-unix-error ESOCKTNOSUPPORT 121 _N"Socket type not supported")
+(def-unix-error EOPNOTSUPP 122 _N"Operation not supported on transport endpoint")
+(def-unix-error EPFNOSUPPORT 123 _N"Protocol family not supported")
+(def-unix-error EAFNOSUPPORT 124 _N"Address family not supported by protocol family")
+(def-unix-error EADDRINUSE 125 _N"Address already in use")
+(def-unix-error EADDRNOTAVAIL 126 _N"Cannot assign requested address")
+(def-unix-error ENETDOWN 127 _N"Network is down")
+(def-unix-error ENETUNREACH 128 _N"Network is unreachable")
+(def-unix-error ENETRESET 129 _N"Network dropped connection because of reset")
+(def-unix-error ECONNABORTED 130 _N"Software caused connection abort")
+(def-unix-error ECONNRESET 131 _N"Connection reset by peer")
+(def-unix-error ENOBUFS 132 _N"No buffer space available")
+(def-unix-error EISCONN 133 _N"Transport endpoint is already connected")
+(def-unix-error ENOTCONN 134 _N"Transport endpoint is not connected")
+(def-unix-error ESHUTDOWN 143 _N"Cannot send after socket shutdown")
+(def-unix-error ETOOMANYREFS 144 _N"Too many references: cannot splice")
+(def-unix-error ETIMEDOUT 145 _N"Connection timed out")
+(def-unix-error ECONNREFUSED 146 _N"Connection refused")
+(def-unix-error EHOSTDOWN 147 _N"Host is down")
+(def-unix-error EHOSTUNREACH 148 _N"No route to host")
+(def-unix-error EWOULDBLOCK 11 _N"Resource temporarily unavailable")
+(def-unix-error EALREADY 149 _N"Operation already in progress")
+(def-unix-error EINPROGRESS 150 _N"Operation now in progress")
+(def-unix-error ESTALE 151 _N"Stale NFS file handle")
+)
+
+;;; Auto-generated forms, if any.
+EOF
+
+# Create appropriate DEF-UNIX-ERROR forms by reading header files
+# containing the C definitions.
+awk '/^#define[ \t]+(E[A-Z0-9]+)[ \t]+([A-Z0-9]+).*$/ {
+ printf "(def-unix-error %s %s)\n", $2, $3;
+}' "$@"
+
+# The tail was also copied from code/unix.lisp. It's needed to tell
+# Lisp about the errno values.
+cat <<EOF
+;;; End auto-generated forms, if any.
+
+;;;
+;;; And now for something completely different ...
+(emit-unix-errors)
+EOF
=====================================
bin/cross-build-world.sh
=====================================
@@ -59,16 +59,6 @@ CROSS="`echo $2 | sed 's:/*$::'`"
SCRIPT="$3"
LISP="${4:-lisp}"
-# Determine if we need to generate unix-errno.lisp
-# Set to "yes" if we auto-generate code/unix-errno.lisp.
-GEN_ERRNO=
-case `uname -s` in
- # Add more cases as we support more OSes
- Linux)
- GEN_ERRNO=yes
- ;;
-esac
-
if [ -z "$BOOTSTRAP" ]; then
CROSSBOOT="$TARGET/cross-bootstrap.lisp"
else
@@ -94,10 +84,14 @@ then
sed "s:^src:$CROSS:g" | xargs mkdir
fi
-if [ "$GEN_ERRNO" = "yes" ]; then
- # Generate code/unix-errno.lisp
- $MAKE -C $TARGET/lisp ../code/unix-errno.lisp
-fi
+# Create unix-errno.lisp
+case `uname -s` in
+ Linux) ERRNO_FILES=/usr/include/asm-generic/errno*.h
+ ;;
+esac
+
+#awk -f bin/create-errno.awk ${ERRNO_FILES} > src/code/unix-errno.lisp
+bin/create-errno.sh ${ERRNO_FILES} > src/code/unix-errno.lisp
echo cross boot = $CROSSBOOT
$LISP "$@" -noinit -nositeinit <<EOF
=====================================
src/bootfiles/21e/boot-2024-08.lisp
=====================================
@@ -0,0 +1,10 @@
+;; Bootstrap file for the ef-octet-count changes. Just need to change
+;; the value of +ef-max+
+
+(in-package "STREAM")
+
+(handler-bind
+ ((error (lambda (c)
+ (declare (ignore c))
+ (invoke-restart 'continue))))
+ (defconstant +ef-max+ 14))
=====================================
src/code/exports.lisp
=====================================
@@ -1456,7 +1456,8 @@
(name
'("STRING-TO-OCTETS" "OCTETS-TO-STRING" "*DEFAULT-EXTERNAL-FORMAT*"
"STRING-ENCODE" "STRING-DECODE" "SET-SYSTEM-EXTERNAL-FORMAT"
- "LIST-ALL-EXTERNAL-FORMATS" "DESCRIBE-EXTERNAL-FORMAT"))
+ "LIST-ALL-EXTERNAL-FORMATS" "DESCRIBE-EXTERNAL-FORMAT"
+ "STRING-OCTET-COUNT"))
(intern name "STREAM"))
(defpackage "EXTENSIONS"
=====================================
src/code/extfmts.lisp
=====================================
@@ -19,7 +19,8 @@
string-encode string-decode set-system-external-format
+replacement-character-code+
list-all-external-formats
- describe-external-format))
+ describe-external-format
+ string-octet-count))
(defvar *default-external-format*
:utf-8
@@ -52,6 +53,7 @@
flush ; flush state
copy-state ; copy state
osc ; octets to string, counted
+ oc ; number of octets to encode string
max)
;; Unicode replacement character U+FFFD
@@ -96,6 +98,11 @@
(copy-state nil :type (or null function) :read-only t)
(cache nil :type (or null simple-vector))
;;
+ ;; Function to count the number of octets needed to encode a
+ ;; codepoint. Basically like code-to-octets, except we return the
+ ;; number of octets needed instead of the octets themselves.
+ (octet-count #'%efni :type (or null function) :read-only t)
+ ;;
;; Minimum number of octets needed to form a codepoint
(min 1 :type kernel:index :read-only t)
;;
@@ -126,7 +133,8 @@
(setf (gethash (ef-name ef) *external-formats*) ef))
(declaim (inline ef-octets-to-code ef-code-to-octets ef-flush-state ef-copy-state
- ef-cache ef-min-octets ef-max-octets))
+ ef-cache ef-min-octets ef-max-octets
+ ef-octet-count))
(defun ef-octets-to-code (ef)
(efx-octets-to-code (ef-efx ef)))
@@ -143,6 +151,9 @@
(defun ef-cache (ef)
(efx-cache (ef-efx ef)))
+(defun ef-octet-count (ef)
+ (efx-octet-count (ef-efx ef)))
+
(defun ef-min-octets (ef)
(efx-min (ef-efx ef)))
@@ -166,7 +177,7 @@
;;; DEFINE-EXTERNAL-FORMAT -- Public
;;;
;;; name (&key base min max size documentation) (&rest slots) octets-to-code
-;;; code-to-octets flush-state copy-state
+;;; code-to-octets flush-state copy-state octet-count
;;;
;;; Define a new external format. If base is specified, then an
;;; external format is defined that is based on a previously defined
@@ -228,6 +239,15 @@
;;; This should probably be a deep copy so that if the original
;;; state is modified, the copy is not.
;;;
+;;; octet-count (code state error &rest vars)
+;;; Defines a form to determine the number of octets needed to
+;;; encode the given CODE using the external format. This is
+;;; essentially the same as CODE-TO-OCTETS, except the encoding is
+;;; not saved anywhere. ERROR is the same as in CODE-TO-OCTETS.
+;;;
+;;; This should return one value: the number of octets needed to
+;;; encode the given code.
+;;;
;;; Note: external-formats work on code-points, not
;;; characters, so that the entire 31 bit ISO-10646 range can be
;;; used internally regardless of the size of a character recognized
@@ -238,7 +258,7 @@
(defmacro define-external-format (name (&key base min max size (documentation ""))
(&rest slots)
&optional octets-to-code code-to-octets
- flush-state copy-state)
+ flush-state copy-state octet-count)
(let* ((tmp (gensym))
(min (or min size 1))
(max (or max size 6))
@@ -282,7 +302,17 @@
(declare (ignorable ,state))
(let (,@',slotb
,@(loop for var in vars collect `(,var (gensym))))
- ,body))))
+ ,body)))
+ (octet-count ((code state error &rest vars) body)
+ `(lambda (,',tmp ,state ,error)
+ (declare (ignorable ,state ,error)
+ (optimize (ext:inhibit-warnings 3)))
+ (let (,@',slotb
+ (,code ',code)
+ ,@(loop for var in vars collect `(,var (gensym))))
+ `(let ((,',code (the lisp:codepoint ,,',tmp)))
+ (declare (ignorable ,',code))
+ ,,body)))))
(%intern-ef (make-external-format ,name
,(if base
`(ef-efx (find-external-format ,(ef-name base)))
@@ -291,7 +321,8 @@
:flush-state ,flush-state
:copy-state ,copy-state
:cache (make-array +ef-max+
- :initial-element nil)
+ :initial-element nil)
+ :octet-count ,octet-count
:min ,(min min max)
:max ,(max min max)))
nil
@@ -688,7 +719,20 @@ character and illegal outputs are replaced by a question mark.")
(intl:gettext "Cannot output codepoint #x~X to ISO8859-1 stream")
,code 1))
#x3F)
- ,code))))
+ ,code)))
+ ()
+ ()
+ (octet-count (code state error)
+ `(if (> ,code 255)
+ (if ,error
+ (locally
+ ;; No warnings about fdefinition
+ (declare (optimize (ext:inhibit-warnings 3)))
+ (funcall ,error
+ (intl:gettext "Cannot output codepoint #x~X to ISO8859-1 stream")
+ ,code 1))
+ 1)
+ 1)))
;;; OCTETS-TO-CODEPOINT, CODEPOINT-TO-OCTETS -- Semi-Public
;;;
@@ -709,6 +753,10 @@ character and illegal outputs are replaced by a question mark.")
(let ((ef (find-external-format external-format)))
(funcall (ef-code-to-octets ef) code state output error)))
+(defmacro count-codepoint-octets (external-format code state &optional error)
+ (let ((ef (find-external-format external-format)))
+ (funcall (ef-octet-count ef) code state error)))
+
(defvar *ef-base* +ef-max+)
@@ -878,6 +926,42 @@ character and illegal outputs are replaced by a question mark.")
(when f
(funcall f state))))
+(defmacro octet-count (external-format char state &optional error)
+ (let ((nchar (gensym))
+ (nstate (gensym))
+ (count-it (gensym))
+ (ch (gensym)))
+ `(let ((,nchar ,char)
+ (,nstate ,state))
+ (when (null ,nstate) (setq ,nstate (setf ,state (cons nil nil))))
+ (if (lisp::surrogatep (char-code ,nchar) :high)
+ (setf (car ,nstate) ,nchar)
+ (flet ((,count-it (,ch)
+ (count-codepoint-octets ,external-format ,ch (cdr ,nstate) ,error)))
+ (if (car ,nstate)
+ (prog1
+ (,count-it (if (lisp::surrogatep (char-code ,nchar) :low)
+ (surrogates-to-codepoint (car ,nstate) ,nchar)
+ (if ,error
+ (locally
+ (declare (optimize (ext:inhibit-warnings 3)))
+ (funcall ,error
+ (intl:gettext "Cannot convert invalide surrogate #~x~X to character")
+ ,nchar))
+ +replacement-character-code+)))
+ (setf (car ,nstate) nil))
+ ;; A lone trailing (low surrogate gets replaced with
+ ;; the replacement character.
+ (,count-it (if (lisp::surrogatep (char-code ,nchar) :low)
+ (if ,error
+ (locally
+ (declare (optimize (ext:inhibit-warnings 3)))
+ (funcall ,error
+ (intl:gettext "Cannot convert lone trailing surrogate #x~X to character")
+ ,nchar))
+ +replacement-character-code+)
+ (char-code ,nchar)))))))))
+
(def-ef-macro ef-string-to-octets (extfmt lisp::lisp +ef-max+ +ef-so+)
`(lambda (string start end buffer buffer-start buffer-end error bufferp
&aux (ptr buffer-start) (state nil) (last-octet buffer-start))
@@ -1071,6 +1155,31 @@ character and illegal outputs are replaced by a question mark.")
(values (if stringp string (lisp::shrink-vector string pos)) (- pos s-start) last-octet new-state))))
+(def-ef-macro ef-string-octet-count (extfmt lisp::lisp +ef-max+ +ef-oc+)
+ `(lambda (string start end error &aux (total 0) (state nil))
+ (dotimes (i (- end start) total)
+ (incf total
+ (octet-count ,extfmt (schar string (+ start i)) state error)))))
+
+(defun string-octet-count (string &key (start 0) end (external-format :default) error)
+ "Compute the number of octets needed to convert String using the
+ specified External-format. The string is bound by Start (defaulting
+ to 0) and End (defaulting to the end of the string)."
+ (let ((composing-format-p
+ ;; Determine is the external format is a composing format
+ ;; which we determine by seeing that the name of the format
+ ;; is a cons. Probably not the best way.
+ (consp (ef-name (find-external-format external-format)))))
+ ;; We currently don't know how to get just the number of octets
+ ;; when a composing external format is used. As a workaround, use
+ ;; STRING-TO-OCTETS to find the number of octets.
+ (if composing-format-p
+ (nth-value 1
+ (string-to-octets string :start start :end end
+ :external-format external-format))
+ (lisp::with-array-data ((string string) (start start) (end end))
+ (funcall (ef-string-octet-count external-format)
+ string start end error)))))
(def-ef-macro ef-encode (extfmt lisp::lisp +ef-max+ +ef-en+)
`(lambda (string start end result error &aux (ptr 0) (state nil))
@@ -1186,10 +1295,11 @@ character and illegal outputs are replaced by a question mark.")
(#.+ef-so+ (%ef-string-to-octets ef))
(#.+ef-en+ (%ef-encode ef))
(#.+ef-de+ (%ef-decode ef))
- (#.+ef-osc+ (%ef-octets-to-string-counted ef))))
+ (#.+ef-osc+ (%ef-octets-to-string-counted ef))
+ (#.+ef-oc+ (%ef-octet-count ef))))
`(setf (aref (ef-cache (find-external-format ,(ef-name ef))) ,slot)
,(subst (ef-name ef) ef
- (function-lambda-expression (aref (ef-cache ef) slot))))))
+ (function-lambda-expression (aref (ef-cache ef) slot)))))))
;;; Builtin external formats.
@@ -1307,7 +1417,17 @@ replacement character.")
((< ,code #x800) (utf8 ,code 1))
((< ,code #x10000) (utf8 ,code 2))
((< ,code #x110000) (utf8 ,code 3))
- (t (error "How did this happen? Codepoint U+~X is illegal" ,code))))))
+ (t (error "How did this happen? Codepoint U+~X is illegal" ,code)))))
+ ()
+ ()
+ (octet-count (code state error)
+ `(locally
+ (declare (optimize (ext:inhibit-warnings 3)))
+ (cond ((< ,code #x80) 1)
+ ((< ,code #x800) 2)
+ ((< ,code #x10000) 3)
+ ((< ,code #x110000) 4)
+ (t (error "How did this happen? Codepoint U+~X is illegal" ,code))))))
(define-external-format :ascii (:size 1 :documentation
"US ASCII 7-bit encoding. Illegal input sequences are replaced with
@@ -1333,4 +1453,14 @@ replaced with a question mark.")
(declare (optimize (ext:inhibit-warnings 3)))
(funcall ,error "Cannot output codepoint #x~X to ASCII stream" ,code))
#x3F)
- ,code))))
+ ,code)))
+ ()
+ ()
+ (octet-count (code state error)
+ `(if (> ,code #x7f)
+ (if ,error
+ (locally
+ (declare (optimize (ext:inhibit-warnings 3)))
+ (funcall ,error "Cannot output codepoint #x~X to ASCII stream" ,code))
+ 1)
+ 1)))
=====================================
src/code/unix.lisp
=====================================
@@ -1736,228 +1736,6 @@
(t
(subseq dst 0 dst-len)))))
-;;;; Errno stuff.
-
-(eval-when (compile eval)
-
-(defparameter *compiler-unix-errors* nil)
-
-(defmacro def-unix-error (name number &optional description)
- "Define a constant named Name corresponding to the Unix errno value
- Number. A description of the errno is optional in Description."
- `(progn
- (eval-when (compile eval)
- (push (cons ,number ,description) *compiler-unix-errors*))
- (defconstant ,name ,number ,description)
- (export ',name)))
-
-#-linux
-(defmacro emit-unix-errors ()
- (let* ((max (apply #'max (mapcar #'car *compiler-unix-errors*)))
- (array (make-array (1+ max) :initial-element nil)))
- (dolist (error *compiler-unix-errors*)
- (setf (svref array (car error)) (cdr error)))
- `(progn
- (defvar *unix-errors* ',array)
- (declaim (simple-vector *unix-errors*)))))
-
-) ;eval-when
-
-;;; For Linux, the def-unix-error forms are auto-generated and are not
-;;; defined here.
-#-linux
-(progn
-;;;
-;;; From <errno.h>
-;;;
-(def-unix-error ESUCCESS 0 _N"Successful")
-(def-unix-error EPERM 1 _N"Operation not permitted")
-(def-unix-error ENOENT 2 _N"No such file or directory")
-(def-unix-error ESRCH 3 _N"No such process")
-(def-unix-error EINTR 4 _N"Interrupted system call")
-(def-unix-error EIO 5 _N"I/O error")
-(def-unix-error ENXIO 6 _N"Device not configured")
-(def-unix-error E2BIG 7 _N"Arg list too long")
-(def-unix-error ENOEXEC 8 _N"Exec format error")
-(def-unix-error EBADF 9 _N"Bad file descriptor")
-(def-unix-error ECHILD 10 _N"No child process")
-#+bsd(def-unix-error EDEADLK 11 _N"Resource deadlock avoided")
-#-bsd(def-unix-error EAGAIN 11 #-linux _N"No more processes" #+linux _N"Try again")
-(def-unix-error ENOMEM 12 _N"Out of memory")
-(def-unix-error EACCES 13 _N"Permission denied")
-(def-unix-error EFAULT 14 _N"Bad address")
-(def-unix-error ENOTBLK 15 _N"Block device required")
-(def-unix-error EBUSY 16 _N"Device or resource busy")
-(def-unix-error EEXIST 17 _N"File exists")
-(def-unix-error EXDEV 18 _N"Cross-device link")
-(def-unix-error ENODEV 19 _N"No such device")
-(def-unix-error ENOTDIR 20 _N"Not a director")
-(def-unix-error EISDIR 21 _N"Is a directory")
-(def-unix-error EINVAL 22 _N"Invalid argument")
-(def-unix-error ENFILE 23 _N"File table overflow")
-(def-unix-error EMFILE 24 _N"Too many open files")
-(def-unix-error ENOTTY 25 _N"Inappropriate ioctl for device")
-(def-unix-error ETXTBSY 26 _N"Text file busy")
-(def-unix-error EFBIG 27 _N"File too large")
-(def-unix-error ENOSPC 28 _N"No space left on device")
-(def-unix-error ESPIPE 29 _N"Illegal seek")
-(def-unix-error EROFS 30 _N"Read-only file system")
-(def-unix-error EMLINK 31 _N"Too many links")
-(def-unix-error EPIPE 32 _N"Broken pipe")
-;;;
-;;; Math
-(def-unix-error EDOM 33 _N"Numerical argument out of domain")
-(def-unix-error ERANGE 34 #-linux _N"Result too large" #+linux _N"Math result not representable")
-;;;
-#-(or linux svr4)
-(progn
-;;; non-blocking and interrupt i/o
-(def-unix-error EWOULDBLOCK 35 _N"Operation would block")
-#-bsd(def-unix-error EDEADLK 35 _N"Operation would block") ; Ditto
-#+bsd(def-unix-error EAGAIN 35 _N"Resource temporarily unavailable")
-(def-unix-error EINPROGRESS 36 _N"Operation now in progress")
-(def-unix-error EALREADY 37 _N"Operation already in progress")
-;;;
-;;; ipc/network software
-(def-unix-error ENOTSOCK 38 _N"Socket operation on non-socket")
-(def-unix-error EDESTADDRREQ 39 _N"Destination address required")
-(def-unix-error EMSGSIZE 40 _N"Message too long")
-(def-unix-error EPROTOTYPE 41 _N"Protocol wrong type for socket")
-(def-unix-error ENOPROTOOPT 42 _N"Protocol not available")
-(def-unix-error EPROTONOSUPPORT 43 _N"Protocol not supported")
-(def-unix-error ESOCKTNOSUPPORT 44 _N"Socket type not supported")
-(def-unix-error EOPNOTSUPP 45 _N"Operation not supported on socket")
-(def-unix-error EPFNOSUPPORT 46 _N"Protocol family not supported")
-(def-unix-error EAFNOSUPPORT 47 _N"Address family not supported by protocol family")
-(def-unix-error EADDRINUSE 48 _N"Address already in use")
-(def-unix-error EADDRNOTAVAIL 49 _N"Can't assign requested address")
-;;;
-;;; operational errors
-(def-unix-error ENETDOWN 50 _N"Network is down")
-(def-unix-error ENETUNREACH 51 _N"Network is unreachable")
-(def-unix-error ENETRESET 52 _N"Network dropped connection on reset")
-(def-unix-error ECONNABORTED 53 _N"Software caused connection abort")
-(def-unix-error ECONNRESET 54 _N"Connection reset by peer")
-(def-unix-error ENOBUFS 55 _N"No buffer space available")
-(def-unix-error EISCONN 56 _N"Socket is already connected")
-(def-unix-error ENOTCONN 57 _N"Socket is not connected")
-(def-unix-error ESHUTDOWN 58 _N"Can't send after socket shutdown")
-(def-unix-error ETOOMANYREFS 59 _N"Too many references: can't splice")
-(def-unix-error ETIMEDOUT 60 _N"Connection timed out")
-(def-unix-error ECONNREFUSED 61 _N"Connection refused")
-;;;
-(def-unix-error ELOOP 62 _N"Too many levels of symbolic links")
-(def-unix-error ENAMETOOLONG 63 _N"File name too long")
-;;;
-(def-unix-error EHOSTDOWN 64 _N"Host is down")
-(def-unix-error EHOSTUNREACH 65 _N"No route to host")
-(def-unix-error ENOTEMPTY 66 _N"Directory not empty")
-;;;
-;;; quotas & resource
-(def-unix-error EPROCLIM 67 _N"Too many processes")
-(def-unix-error EUSERS 68 _N"Too many users")
-(def-unix-error EDQUOT 69 _N"Disc quota exceeded")
-;;;
-;;; CMU RFS
-(def-unix-error ELOCAL 126 _N"namei should continue locally")
-(def-unix-error EREMOTE 127 _N"namei was handled remotely")
-;;;
-;;; VICE
-(def-unix-error EVICEERR 70 _N"Remote file system error _N")
-(def-unix-error EVICEOP 71 _N"syscall was handled by Vice")
-)
-#+svr4
-(progn
-(def-unix-error ENOMSG 35 _N"No message of desired type")
-(def-unix-error EIDRM 36 _N"Identifier removed")
-(def-unix-error ECHRNG 37 _N"Channel number out of range")
-(def-unix-error EL2NSYNC 38 _N"Level 2 not synchronized")
-(def-unix-error EL3HLT 39 _N"Level 3 halted")
-(def-unix-error EL3RST 40 _N"Level 3 reset")
-(def-unix-error ELNRNG 41 _N"Link number out of range")
-(def-unix-error EUNATCH 42 _N"Protocol driver not attached")
-(def-unix-error ENOCSI 43 _N"No CSI structure available")
-(def-unix-error EL2HLT 44 _N"Level 2 halted")
-(def-unix-error EDEADLK 45 _N"Deadlock situation detected/avoided")
-(def-unix-error ENOLCK 46 _N"No record locks available")
-(def-unix-error ECANCELED 47 _N"Error 47")
-(def-unix-error ENOTSUP 48 _N"Error 48")
-(def-unix-error EBADE 50 _N"Bad exchange descriptor")
-(def-unix-error EBADR 51 _N"Bad request descriptor")
-(def-unix-error EXFULL 52 _N"Message tables full")
-(def-unix-error ENOANO 53 _N"Anode table overflow")
-(def-unix-error EBADRQC 54 _N"Bad request code")
-(def-unix-error EBADSLT 55 _N"Invalid slot")
-(def-unix-error EDEADLOCK 56 _N"File locking deadlock")
-(def-unix-error EBFONT 57 _N"Bad font file format")
-(def-unix-error ENOSTR 60 _N"Not a stream device")
-(def-unix-error ENODATA 61 _N"No data available")
-(def-unix-error ETIME 62 _N"Timer expired")
-(def-unix-error ENOSR 63 _N"Out of stream resources")
-(def-unix-error ENONET 64 _N"Machine is not on the network")
-(def-unix-error ENOPKG 65 _N"Package not installed")
-(def-unix-error EREMOTE 66 _N"Object is remote")
-(def-unix-error ENOLINK 67 _N"Link has been severed")
-(def-unix-error EADV 68 _N"Advertise error")
-(def-unix-error ESRMNT 69 _N"Srmount error")
-(def-unix-error ECOMM 70 _N"Communication error on send")
-(def-unix-error EPROTO 71 _N"Protocol error")
-(def-unix-error EMULTIHOP 74 _N"Multihop attempted")
-(def-unix-error EBADMSG 77 _N"Not a data message")
-(def-unix-error ENAMETOOLONG 78 _N"File name too long")
-(def-unix-error EOVERFLOW 79 _N"Value too large for defined data type")
-(def-unix-error ENOTUNIQ 80 _N"Name not unique on network")
-(def-unix-error EBADFD 81 _N"File descriptor in bad state")
-(def-unix-error EREMCHG 82 _N"Remote address changed")
-(def-unix-error ELIBACC 83 _N"Can not access a needed shared library")
-(def-unix-error ELIBBAD 84 _N"Accessing a corrupted shared library")
-(def-unix-error ELIBSCN 85 _N".lib section in a.out corrupted")
-(def-unix-error ELIBMAX 86 _N"Attempting to link in more shared libraries than system limit")
-(def-unix-error ELIBEXEC 87 _N"Can not exec a shared library directly")
-(def-unix-error EILSEQ 88 _N"Error 88")
-(def-unix-error ENOSYS 89 _N"Operation not applicable")
-(def-unix-error ELOOP 90 _N"Number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS")
-(def-unix-error ERESTART 91 _N"Error 91")
-(def-unix-error ESTRPIPE 92 _N"Error 92")
-(def-unix-error ENOTEMPTY 93 _N"Directory not empty")
-(def-unix-error EUSERS 94 _N"Too many users")
-(def-unix-error ENOTSOCK 95 _N"Socket operation on non-socket")
-(def-unix-error EDESTADDRREQ 96 _N"Destination address required")
-(def-unix-error EMSGSIZE 97 _N"Message too long")
-(def-unix-error EPROTOTYPE 98 _N"Protocol wrong type for socket")
-(def-unix-error ENOPROTOOPT 99 _N"Option not supported by protocol")
-(def-unix-error EPROTONOSUPPORT 120 _N"Protocol not supported")
-(def-unix-error ESOCKTNOSUPPORT 121 _N"Socket type not supported")
-(def-unix-error EOPNOTSUPP 122 _N"Operation not supported on transport endpoint")
-(def-unix-error EPFNOSUPPORT 123 _N"Protocol family not supported")
-(def-unix-error EAFNOSUPPORT 124 _N"Address family not supported by protocol family")
-(def-unix-error EADDRINUSE 125 _N"Address already in use")
-(def-unix-error EADDRNOTAVAIL 126 _N"Cannot assign requested address")
-(def-unix-error ENETDOWN 127 _N"Network is down")
-(def-unix-error ENETUNREACH 128 _N"Network is unreachable")
-(def-unix-error ENETRESET 129 _N"Network dropped connection because of reset")
-(def-unix-error ECONNABORTED 130 _N"Software caused connection abort")
-(def-unix-error ECONNRESET 131 _N"Connection reset by peer")
-(def-unix-error ENOBUFS 132 _N"No buffer space available")
-(def-unix-error EISCONN 133 _N"Transport endpoint is already connected")
-(def-unix-error ENOTCONN 134 _N"Transport endpoint is not connected")
-(def-unix-error ESHUTDOWN 143 _N"Cannot send after socket shutdown")
-(def-unix-error ETOOMANYREFS 144 _N"Too many references: cannot splice")
-(def-unix-error ETIMEDOUT 145 _N"Connection timed out")
-(def-unix-error ECONNREFUSED 146 _N"Connection refused")
-(def-unix-error EHOSTDOWN 147 _N"Host is down")
-(def-unix-error EHOSTUNREACH 148 _N"No route to host")
-(def-unix-error EWOULDBLOCK 11 _N"Resource temporarily unavailable")
-(def-unix-error EALREADY 149 _N"Operation already in progress")
-(def-unix-error EINPROGRESS 150 _N"Operation now in progress")
-(def-unix-error ESTALE 151 _N"Stale NFS file handle")
-)
-
-;;;
-;;; And now for something completely different ...
-(emit-unix-errors)
-)
-
(def-alien-routine ("os_get_errno" unix-get-errno) int)
(def-alien-routine ("os_set_errno" unix-set-errno) int (newvalue int))
(defun unix-errno () (unix-get-errno))
=====================================
src/general-info/release-21f.md
=====================================
@@ -30,6 +30,7 @@ public domain.
* ANSI compliance fixes:
* Bug fixes:
* Gitlab tickets:
+ * ~~#135~~ `(unix-namestring ".")` returns "" instead of "."
* ~~#154~~ piglatin translation does not work anymore
* ~~#171~~ Readably print `(make-pathname :name :unspecfic)`
* ~~#180~~ Move `get-page-size` to C
@@ -52,6 +53,7 @@ public domain.
available for Hemlock
* ~~#261~~ Remove `get-system-info` from "bsd-os.lisp"
* ~~#268~~ Can't clone ansi-test repo on Mac OS CI box
+ * ~~#262~~ [arch_skip_inst invalid code -55]
* ~~#265~~ CI for mac os is broken
* ~~#266~~ Support "~user" in namestrings
* ~~#269~~ Add function to get user's home directory
@@ -77,17 +79,42 @@ public domain.
* ~~#299~~ Enable xoroshiro assembly routine
* ~~#303~~ Variable `*assert-not-standard-readtable*` defined but
not used.
+ * ~~#309~~ obj_run_linker does unnecessary allocations
* ~~#312~~ Compiler error building motif server on Fedora 40
* ~~#314~~ tanh incorrect for large args
* ~~#316~~ Support roundtrip character casing
* ~~#320~~ Motif variant not defaulted for `x86_linux_clang` config
* ~~#321~~ Rename Motif Config.x86 to Config.linux
* ~~#323~~ Make string casing functions compliant
+ * ~~#327~~ Fix up weird CLRLF and LF line terminators in the same file
* ~~#329~~ Fix compiler warnings in os.lisp
* ~~#330~~ Fix typos in unicode.lisp
* ~~#333~~ `load` doesn't accept generalized boolean for
`:if-does-not-exist` arg
+ * ~~#338~~ Solaris/x86 build
+ * ~~#336~~ Clean up some compiler notes
+ * ~~#337~~ Cross-compile from x86 (linux) to x86 fails
+ * ~~#339~~ Solaris/x86 `nl_langinfo` returns "646"
+ * ~~#340~~ Use `+ascii-limit+` instead of `#x7f` in srctran.lisp
+ for consistency
+ * ~~#341~~ Update version feature in cross-compile script
+ * ~~#342~~ Add CI job to run gcc static analyer
+ * ~~#348~~ Solaris/x86: u_int64_t vs uint64_t
+ * ~~#347~~ Solaris/x86: Update cross-compile script
+ * ~~#350~~ Export warnings on Solaris
+ * ~~#351~~ Solaris does not recognize `-E` option for grep
+ * ~~#352~~ Always use bzip2 compression for tarballs
+ * ~~#353~~ Automatically use gtar on Solaris when making a distribution
+ * ~~#354~~ Check that executables can be created in CI
+ * ~~#356~~ Return value from `vm::x87-floating-point-modes` should
+ have status word in low part of result
+ * ~~#357~~ Solaris needs limits.h to get `PATH_MAX` in elf.c
+ * ~~#360~~ Adding site-init file
* ~~#361~~ Add herald item to mention where to report issues
+ * ~~#362~~ Simplify "library:" search-list
+ * ~~#364~~ Add interface to `mkdtemp` and `mkstemp`
+ * ~~#367~~ Add stream:string-count-octets to count octets in a string
+ * ~~#369~~ Improve docstring for `unix::unix-setlocale`
* Other changes:
* Improvements to the PCL implementation of CLOS:
* Changes to building procedure:
=====================================
src/i18n/locale/cmucl-unix.pot
=====================================
@@ -15,1267 +15,1173 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: src/code/unix.lisp
-msgid ""
-"The encoding to use for converting a namestring to a string that can\n"
-" be used by the operations system. It must be a valid\n"
-" external-format name or :NULL. :NULL means the string\n"
-" is passed as is to the operating system. The operating system will\n"
-" get the low 8 bits of each UTF-16 code unit of the string."
-msgstr ""
-
-#: src/code/unix.lisp
-msgid "Syscall ~A failed: ~A"
-msgstr ""
-
-#: src/code/unix.lisp
-msgid "Test for read permission"
-msgstr ""
-
-#: src/code/unix.lisp
-msgid "Class not yet defined: ~S"
-msgstr ""
-
-#: src/code/unix.lisp
-msgid "Test for write permission"
-msgstr ""
-
-#: src/code/unix.lisp
-msgid "Test for execute permission"
-msgstr ""
-
-#: src/code/unix.lisp
-msgid "Test for presence of file"
-msgstr ""
-
-#: src/code/unix.lisp
-msgid ""
-"Given a file path (a string) and one of four constant modes,\n"
-" unix-access returns T if the file is accessible with that\n"
-" mode and NIL if not. It also returns an errno value with\n"
-" NIL which determines why the file was not accessible.\n"
-"\n"
-" The access modes are:\n"
-" r_ok Read permission.\n"
-" w_ok Write permission.\n"
-" x_ok Execute permission.\n"
-" f_ok Presence of file."
-msgstr ""
-
-#: src/code/unix.lisp
+#: src/code/unix-errno.lisp
msgid ""
-"Given a file path string, unix-chdir changes the current working \n"
-" directory to the one specified."
-msgstr ""
-
-#: src/code/unix.lisp
-msgid "Set user ID on execution"
-msgstr ""
-
-#: src/code/unix.lisp
-msgid "Set group ID on execution"
-msgstr ""
-
-#: src/code/unix.lisp
-msgid "Save text image after execution"
-msgstr ""
-
-#: src/code/unix.lisp
-msgid "Read by owner"
-msgstr ""
-
-#: src/code/unix.lisp
-msgid "Write by owner"
-msgstr ""
-
-#: src/code/unix.lisp
-msgid "Execute (search directory) by owner"
-msgstr ""
-
-#: src/code/unix.lisp
-msgid "Read by group"
+"Define a constant named Name corresponding to the Unix errno value\n"
+" Number. A description of the errno is optional in Description."
msgstr ""
-#: src/code/unix.lisp
-msgid "Write by group"
-msgstr ""
-
-#: src/code/unix.lisp
-msgid "Execute (search directory) by group"
-msgstr ""
-
-#: src/code/unix.lisp
-msgid "Read by others"
-msgstr ""
-
-#: src/code/unix.lisp
-msgid "Write by others"
-msgstr ""
-
-#: src/code/unix.lisp
-msgid "Execute (search directory) by others"
-msgstr ""
-
-#: src/code/unix.lisp
-msgid ""
-"Given a file path string and a constant mode, unix-chmod changes the\n"
-" permission mode for that file to the one specified. The new mode\n"
-" can be created by logically OR'ing the following:\n"
-"\n"
-" setuidexec Set user ID on execution.\n"
-" setgidexec Set group ID on execution.\n"
-" savetext Save text image after execution.\n"
-" readown Read by owner.\n"
-" writeown Write by owner.\n"
-" execown Execute (search directory) by owner.\n"
-" readgrp Read by group.\n"
-" writegrp Write by group.\n"
-" execgrp Execute (search directory) by group.\n"
-" readoth Read by others.\n"
-" writeoth Write by others.\n"
-" execoth Execute (search directory) by others.\n"
-" \n"
-" Thus #o444 and (logior unix:readown unix:readgrp unix:readoth)\n"
-" are equivalent for 'mode. The octal-base is familar to Unix users.\n"
-"\n"
-" It returns T on successfully completion; NIL and an error number\n"
-" otherwise."
-msgstr ""
-
-#: src/code/unix.lisp
-msgid ""
-"Given an integer file descriptor and a mode (the same as those\n"
-" used for unix-chmod), unix-fchmod changes the permission mode\n"
-" for that file to the one specified. T is returned if the call\n"
-" was successful."
-msgstr ""
-
-#: src/code/unix.lisp
-msgid "set the file pointer"
-msgstr ""
-
-#: src/code/unix.lisp
-msgid "increment the file pointer"
+#: src/code/unix-errno.lisp
+msgid "Successful"
msgstr ""
-#: src/code/unix.lisp
-msgid "extend the file size"
+#: src/code/unix-errno.lisp
+msgid "Operation not permitted"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"Unix-lseek accepts a file descriptor and moves the file pointer ahead\n"
-" a certain offset for that file. Whence can be any of the following:\n"
-"\n"
-" l_set Set the file pointer.\n"
-" l_incr Increment the file pointer.\n"
-" l_xtnd Extend the file size.\n"
-" _N"
+#: src/code/unix-errno.lisp
+msgid "No such file or directory"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"UNIX-LSEEK accepts a file descriptor and moves the file pointer ahead\n"
-" a certain OFFSET for that file. WHENCE can be any of the following:\n"
-"\n"
-" l_set Set the file pointer.\n"
-" l_incr Increment the file pointer.\n"
-" l_xtnd Extend the file size.\n"
-" "
+#: src/code/unix-errno.lisp
+msgid "No such process"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"Unix-mkdir creates a new directory with the specified name and mode.\n"
-" (Same as those for unix-chmod.) It returns T upon success, otherwise\n"
-" NIL and an error number."
+#: src/code/unix-errno.lisp
+msgid "Interrupted system call"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"Unix-unlink removes the directory entry for the named file.\n"
-" NIL and an error code is returned if the call fails."
+#: src/code/unix-errno.lisp
+msgid "I/O error"
msgstr ""
-#: src/code/unix.lisp
-msgid "Read-only flag."
+#: src/code/unix-errno.lisp
+msgid "Device not configured"
msgstr ""
-#: src/code/unix.lisp
-msgid "Write-only flag."
+#: src/code/unix-errno.lisp
+msgid "Arg list too long"
msgstr ""
-#: src/code/unix.lisp
-msgid "Read-write flag."
+#: src/code/unix-errno.lisp
+msgid "Exec format error"
msgstr ""
-#: src/code/unix.lisp
-msgid "Non-blocking I/O"
+#: src/code/unix-errno.lisp
+msgid "Bad file descriptor"
msgstr ""
-#: src/code/unix.lisp
-msgid "Append flag."
+#: src/code/unix-errno.lisp
+msgid "No child process"
msgstr ""
-#: src/code/unix.lisp
-msgid "Create if nonexistant flag."
+#: src/code/unix-errno.lisp
+msgid "Resource deadlock avoided"
msgstr ""
-#: src/code/unix.lisp
-msgid "Truncate flag."
+#: src/code/unix-errno.lisp
+msgid "No more processes"
msgstr ""
-#: src/code/unix.lisp
-msgid "Error if already exists."
+#: src/code/unix-errno.lisp
+msgid "Try again"
msgstr ""
-#: src/code/unix.lisp
-msgid "Don't assign controlling tty"
+#: src/code/unix-errno.lisp
+msgid "Out of memory"
msgstr ""
-#: src/code/unix.lisp
-msgid "Non-blocking mode"
+#: src/code/unix-errno.lisp
+msgid "Permission denied"
msgstr ""
-#: src/code/unix.lisp
-msgid "Synchronous writes (on ext2)"
+#: src/code/unix-errno.lisp
+msgid "Bad address"
msgstr ""
-#: src/code/unix.lisp
-msgid "Asynchronous I/O"
+#: src/code/unix-errno.lisp
+msgid "Block device required"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"Unix-open opens the file whose pathname is specified by path\n"
-" for reading and/or writing as specified by the flags argument.\n"
-" The flags argument can be:\n"
-"\n"
-" o_rdonly Read-only flag.\n"
-" o_wronly Write-only flag.\n"
-" o_rdwr Read-and-write flag.\n"
-" o_append Append flag.\n"
-" o_creat Create-if-nonexistant flag.\n"
-" o_trunc Truncate-to-size-0 flag.\n"
-"\n"
-" If the o_creat flag is specified, then the file is created with\n"
-" a permission of argument mode if the file doesn't exist. An\n"
-" integer file descriptor is returned by unix-open."
+#: src/code/unix-errno.lisp
+msgid "Device or resource busy"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"Unix-close takes an integer file descriptor as an argument and\n"
-" closes the file associated with it. T is returned upon successful\n"
-" completion, otherwise NIL and an error number."
+#: src/code/unix-errno.lisp
+msgid "File exists"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"Unix-creat accepts a file name and a mode (same as those for\n"
-" unix-chmod) and creates a file by that name with the specified\n"
-" permission mode. It returns a file descriptor on success,\n"
-" or NIL and an error number otherwise.\n"
-"\n"
-" This interface is made obsolete by UNIX-OPEN."
+#: src/code/unix-errno.lisp
+msgid "Cross-device link"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"Unix-dup duplicates an existing file descriptor (given as the\n"
-" argument) and return it. If FD is not a valid file descriptor, NIL\n"
-" and an error number are returned."
+#: src/code/unix-errno.lisp
+msgid "No such device"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"Unix-dup2 duplicates an existing file descriptor just as unix-dup\n"
-" does only the new value of the duplicate descriptor may be requested\n"
-" through the second argument. If a file already exists with the\n"
-" requested descriptor number, it will be closed and the number\n"
-" assigned to the duplicate."
+#: src/code/unix-errno.lisp
+msgid "Not a director"
msgstr ""
-#: src/code/unix.lisp
-msgid "Duplicate a file descriptor"
+#: src/code/unix-errno.lisp
+msgid "Is a directory"
msgstr ""
-#: src/code/unix.lisp
-msgid "Get file desc. flags"
+#: src/code/unix-errno.lisp
+msgid "Invalid argument"
msgstr ""
-#: src/code/unix.lisp
-msgid "Set file desc. flags"
+#: src/code/unix-errno.lisp
+msgid "File table overflow"
msgstr ""
-#: src/code/unix.lisp
-msgid "Get file flags"
+#: src/code/unix-errno.lisp
+msgid "Too many open files"
msgstr ""
-#: src/code/unix.lisp
-msgid "Set file flags"
+#: src/code/unix-errno.lisp
+msgid "Inappropriate ioctl for device"
msgstr ""
-#: src/code/unix.lisp
-msgid "Get owner"
+#: src/code/unix-errno.lisp
+msgid "Text file busy"
msgstr ""
-#: src/code/unix.lisp
-msgid "Get lock"
+#: src/code/unix-errno.lisp
+msgid "File too large"
msgstr ""
-#: src/code/unix.lisp
-msgid "Set owner"
+#: src/code/unix-errno.lisp
+msgid "No space left on device"
msgstr ""
-#: src/code/unix.lisp
-msgid "Set lock"
+#: src/code/unix-errno.lisp
+msgid "Illegal seek"
msgstr ""
-#: src/code/unix.lisp
-msgid "Set lock, wait for release"
+#: src/code/unix-errno.lisp
+msgid "Read-only file system"
msgstr ""
-#: src/code/unix.lisp
-msgid "Non-blocking reads"
+#: src/code/unix-errno.lisp
+msgid "Too many links"
msgstr ""
-#: src/code/unix.lisp
-msgid "Append on each write"
+#: src/code/unix-errno.lisp
+msgid "Broken pipe"
msgstr ""
-#: src/code/unix.lisp
-msgid "Signal pgrp when data ready"
+#: src/code/unix-errno.lisp
+msgid "Numerical argument out of domain"
msgstr ""
-#: src/code/unix.lisp
-msgid "Create if nonexistant"
+#: src/code/unix-errno.lisp
+msgid "Result too large"
msgstr ""
-#: src/code/unix.lisp
-msgid "Truncate to zero length"
+#: src/code/unix-errno.lisp
+msgid "Math result not representable"
msgstr ""
-#: src/code/unix.lisp
-msgid "Error if already created"
+#: src/code/unix-errno.lisp
+msgid "Operation would block"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"Unix-fcntl manipulates file descriptors according to the\n"
-" argument CMD which can be one of the following:\n"
-"\n"
-" F-DUPFD Duplicate a file descriptor.\n"
-" F-GETFD Get file descriptor flags.\n"
-" F-SETFD Set file descriptor flags.\n"
-" F-GETFL Get file flags.\n"
-" F-SETFL Set file flags.\n"
-" F-GETOWN Get owner.\n"
-" F-SETOWN Set owner.\n"
-"\n"
-" The flags that can be specified for F-SETFL are:\n"
-"\n"
-" FNDELAY Non-blocking reads.\n"
-" FAPPEND Append on each write.\n"
-" FASYNC Signal pgrp when data ready.\n"
-" FCREAT Create if nonexistant.\n"
-" FTRUNC Truncate to zero length.\n"
-" FEXCL Error if already created.\n"
-" "
+#: src/code/unix-errno.lisp
+msgid "Resource temporarily unavailable"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"Unix-pipe sets up a unix-piping mechanism consisting of\n"
-" an input pipe and an output pipe. Unix-Pipe returns two\n"
-" values: if no error occurred the first value is the pipe\n"
-" to be read from and the second is can be written to. If\n"
-" an error occurred the first value is NIL and the second\n"
-" the unix error code."
+#: src/code/unix-errno.lisp
+msgid "Operation now in progress"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"Unix-read attempts to read from the file described by fd into\n"
-" the buffer buf until it is full. Len is the length of the buffer.\n"
-" The number of bytes actually read is returned or NIL and an error\n"
-" number if an error occured."
+#: src/code/unix-errno.lisp
+msgid "Operation already in progress"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"UNIX-READ attempts to read from the file described by fd into\n"
-" the buffer buf until it is full. Len is the length of the buffer.\n"
-" The number of bytes actually read is returned or NIL and an error\n"
-" number if an error occured."
+#: src/code/unix-errno.lisp
+msgid "Socket operation on non-socket"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"Unix-readlink invokes the readlink system call on the file name\n"
-" specified by the simple string path. It returns up to two values:\n"
-" the contents of the symbolic link if the call is successful, or\n"
-" NIL and the Unix error number."
+#: src/code/unix-errno.lisp
+msgid "Destination address required"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"Unix-rename renames the file with string name1 to the string\n"
-" name2. NIL and an error code is returned if an error occured."
+#: src/code/unix-errno.lisp
+msgid "Message too long"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"Unix-rmdir attempts to remove the directory name. NIL and\n"
-" an error number is returned if an error occured."
+#: src/code/unix-errno.lisp
+msgid "Protocol wrong type for socket"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"Unix-write attempts to write a character buffer (buf) of length\n"
-" len to the file described by the file descriptor fd. NIL and an\n"
-" error is returned if the call is unsuccessful."
+#: src/code/unix-errno.lisp
+msgid "Protocol not available"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"Define an ioctl command. If the optional ARG and PARM-TYPE are given\n"
-" then ioctl argument size and direction are included as for ioctls defined\n"
-" by _IO, _IOR, _IOW, or _IOWR. If DEV is a character then the ioctl type\n"
-" is the characters code, else DEV may be an integer giving the type."
+#: src/code/unix-errno.lisp
+msgid "Protocol not supported"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"Unix-ioctl performs a variety of operations on open i/o\n"
-" descriptors. See the UNIX Programmer's Manual for more\n"
-" information."
+#: src/code/unix-errno.lisp
+msgid "Socket type not supported"
msgstr ""
-#: src/code/unix.lisp
-msgid "Get terminal attributes."
+#: src/code/unix-errno.lisp
+msgid "Operation not supported on socket"
msgstr ""
-#: src/code/unix.lisp
-msgid "Set terminal attributes."
+#: src/code/unix-errno.lisp
+msgid "Protocol family not supported"
msgstr ""
-#: src/code/unix.lisp
-msgid "Get terminal output speed."
+#: src/code/unix-errno.lisp
+msgid "Address family not supported by protocol family"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"Unix-getuid returns the real user-id associated with the\n"
-" current process."
+#: src/code/unix-errno.lisp
+msgid "Address already in use"
msgstr ""
-#: src/code/unix.lisp
-msgid "Unix-gethostname returns the name of the host machine as a string."
+#: src/code/unix-errno.lisp
+msgid "Can't assign requested address"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"Unix-gethostid returns a 32-bit integer which provides unique\n"
-" identification for the host machine."
+#: src/code/unix-errno.lisp
+msgid "Network is down"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"Unix-exit terminates the current process with an optional\n"
-" error code. If successful, the call doesn't return. If\n"
-" unsuccessful, the call returns NIL and an error number."
+#: src/code/unix-errno.lisp
+msgid "Network is unreachable"
msgstr ""
-#: src/code/unix.lisp
-msgid "Size of control character vector."
+#: src/code/unix-errno.lisp
+msgid "Network dropped connection on reset"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"Unix-stat retrieves information about the specified\n"
-" file returning them in the form of multiple values. If the call\n"
-" fails, then NIL and an error number is returned. If the call\n"
-" succeeds, then T is returned in addition to the following values\n"
-" from the stat struct st:\n"
-"\n"
-" st_dev Device ID\n"
-" st_ino File serial number\n"
-" st_mode Mode of file\n"
-" st_nlink Number of hard links to the file\n"
-" st_uid User ID\n"
-" st_gid Group ID\n"
-" st_rdev Device ID (if file is character or block special)\n"
-" st_atime Last data access time, in sec\n"
-" st_mtime Last data modification time, in sec\n"
-" st_ctime Last file status change time, in sec\n"
-" st_blksize Preferred I/O block size\n"
-" st_blocks Number of blocks allocated. (Block size is implementation"
-" dependent.)\n"
-""
+#: src/code/unix-errno.lisp
+msgid "Software caused connection abort"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"Unix-fstat is similar to unix-stat except the file is specified\n"
-" by the file descriptor fd. If the call fails, then NIL and an\n"
-" error number is returned. If the call succeeds, then T is returned\n"
-" in addition to the following values from the stat struct st:\n"
-"\n"
-" st_dev Device ID\n"
-" st_ino File serial number\n"
-" st_mode Mode of file\n"
-" st_nlink Number of hard links to the file\n"
-" st_uid User ID\n"
-" st_gid Group ID\n"
-" st_rdev Device ID (if file is character or block special)\n"
-" st_atime Last data access time, in sec\n"
-" st_mtime Last data modification time, in sec\n"
-" st_ctime Last file status change time, in sec\n"
-" st_blksize Preferred I/O block size\n"
-" st_blocks Number of blocks allocated. (Block size is implementation"
-" dependent.)\n"
-""
+#: src/code/unix-errno.lisp
+msgid "Connection reset by peer"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"Unix-lstat is similar to unix-stat except the specified\n"
-" file must be a symbolic link. If the call fails, then NIL and an\n"
-" error number is returned. If the call succeeds, then T is returned\n"
-" in addition to the following values from the stat struct st:\n"
-"\n"
-" st_dev Device ID\n"
-" st_ino File serial number\n"
-" st_mode Mode of file\n"
-" st_nlink Number of hard links to the file\n"
-" st_uid User ID\n"
-" st_gid Group ID\n"
-" st_rdev Device ID (if file is character or block special)\n"
-" st_atime Last data access time, in sec\n"
-" st_mtime Last data modification time, in sec\n"
-" st_ctime Last file status change time, in sec\n"
-" st_blksize Preferred I/O block size\n"
-" st_blocks Number of blocks allocated. (Block size is implementation"
-" dependent.)\n"
-""
+#: src/code/unix-errno.lisp
+msgid "No buffer space available"
msgstr ""
-#: src/code/unix.lisp
-msgid "The calling process."
+#: src/code/unix-errno.lisp
+msgid "Socket is already connected"
msgstr ""
-#: src/code/unix.lisp
-msgid "Terminated child processes."
+#: src/code/unix-errno.lisp
+msgid "Socket is not connected"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"Like call getrusage, but return only the system and user time, and returns\n"
-" the seconds and microseconds as separate values."
+#: src/code/unix-errno.lisp
+msgid "Can't send after socket shutdown"
msgstr ""
-#: src/code/unix.lisp
-msgid ""
-"Unix-getrusage returns information about the resource usage\n"
-" of the process specified by who. Who can be either the\n"
-" current process (rusage_self) or all of the terminated\n"
-" child processes (rusage_children). NIL and an error number\n"
-" is returned if the call fails."
+#: src/code/unix-errno.lisp
+msgid "Too many references: can't splice"
msgstr ""
-#: src/code/unix.lisp
-msgid "These bits determine file type."
+#: src/code/unix-errno.lisp
+msgid "Connection timed out"
msgstr ""
-#: src/code/unix.lisp
-msgid "Directory"
+#: src/code/unix-errno.lisp
+msgid "Connection refused"
msgstr ""
-#: src/code/unix.lisp
-msgid "Character device"
+#: src/code/unix-errno.lisp
+msgid "Too many levels of symbolic links"
msgstr ""
-#: src/code/unix.lisp
-msgid "FIFO"
+#: src/code/unix-errno.lisp
+msgid "File name too long"
msgstr ""
-#: src/code/unix.lisp
-msgid "Block device"
+#: src/code/unix-errno.lisp
+msgid "Host is down"
msgstr ""
-#: src/code/unix.lisp
-msgid "Regular file"
+#: src/code/unix-errno.lisp
+msgid "No route to host"
msgstr ""
-#: src/code/unix.lisp
-msgid "Symbolic link."
+#: src/code/unix-errno.lisp
+msgid "Directory not empty"
msgstr ""
-#: src/code/unix.lisp
-msgid "Socket."
+#: src/code/unix-errno.lisp
+msgid "Too many processes"
msgstr ""
-#: src/code/unix.lisp
-msgid "Returns either :file, :directory, :link, :special, or NIL."
+#: src/code/unix-errno.lisp
+msgid "Too many users"
msgstr ""
-#: src/code/unix.lisp
-msgid "Returns the pathname with all symbolic links resolved."
+#: src/code/unix-errno.lisp
+msgid "Disc quota exceeded"
msgstr ""
-#: src/code/unix.lisp
-msgid "Error reading link ~S: ~S"
+#: src/code/unix-errno.lisp
+msgid "namei should continue locally"
msgstr ""
-#: src/code/unix.lisp
-msgid "Successful"
+#: src/code/unix-errno.lisp
+msgid "namei was handled remotely"
msgstr ""
-#: src/code/unix.lisp
-msgid "Operation not permitted"
+#: src/code/unix-errno.lisp
+msgid "Remote file system error _N"
msgstr ""
-#: src/code/unix.lisp
-msgid "No such file or directory"
+#: src/code/unix-errno.lisp
+msgid "syscall was handled by Vice"
msgstr ""
-#: src/code/unix.lisp
-msgid "No such process"
+#: src/code/unix-errno.lisp
+msgid "No message of desired type"
msgstr ""
-#: src/code/unix.lisp
-msgid "Interrupted system call"
+#: src/code/unix-errno.lisp
+msgid "Identifier removed"
msgstr ""
-#: src/code/unix.lisp
-msgid "I/O error"
+#: src/code/unix-errno.lisp
+msgid "Channel number out of range"
msgstr ""
-#: src/code/unix.lisp
-msgid "Device not configured"
+#: src/code/unix-errno.lisp
+msgid "Level 2 not synchronized"
msgstr ""
-#: src/code/unix.lisp
-msgid "Arg list too long"
+#: src/code/unix-errno.lisp
+msgid "Level 3 halted"
msgstr ""
-#: src/code/unix.lisp
-msgid "Exec format error"
+#: src/code/unix-errno.lisp
+msgid "Level 3 reset"
msgstr ""
-#: src/code/unix.lisp
-msgid "Bad file descriptor"
+#: src/code/unix-errno.lisp
+msgid "Link number out of range"
msgstr ""
-#: src/code/unix.lisp
-msgid "No child process"
+#: src/code/unix-errno.lisp
+msgid "Protocol driver not attached"
msgstr ""
-#: src/code/unix.lisp
-msgid "Resource deadlock avoided"
+#: src/code/unix-errno.lisp
+msgid "No CSI structure available"
msgstr ""
-#: src/code/unix.lisp
-msgid "No more processes"
+#: src/code/unix-errno.lisp
+msgid "Level 2 halted"
msgstr ""
-#: src/code/unix.lisp
-msgid "Try again"
+#: src/code/unix-errno.lisp
+msgid "Deadlock situation detected/avoided"
msgstr ""
-#: src/code/unix.lisp
-msgid "Out of memory"
+#: src/code/unix-errno.lisp
+msgid "No record locks available"
msgstr ""
-#: src/code/unix.lisp
-msgid "Permission denied"
+#: src/code/unix-errno.lisp
+msgid "Error 47"
msgstr ""
-#: src/code/unix.lisp
-msgid "Bad address"
+#: src/code/unix-errno.lisp
+msgid "Error 48"
msgstr ""
-#: src/code/unix.lisp
-msgid "Block device required"
+#: src/code/unix-errno.lisp
+msgid "Bad exchange descriptor"
msgstr ""
-#: src/code/unix.lisp
-msgid "Device or resource busy"
+#: src/code/unix-errno.lisp
+msgid "Bad request descriptor"
msgstr ""
-#: src/code/unix.lisp
-msgid "File exists"
+#: src/code/unix-errno.lisp
+msgid "Message tables full"
msgstr ""
-#: src/code/unix.lisp
-msgid "Cross-device link"
+#: src/code/unix-errno.lisp
+msgid "Anode table overflow"
msgstr ""
-#: src/code/unix.lisp
-msgid "No such device"
+#: src/code/unix-errno.lisp
+msgid "Bad request code"
msgstr ""
-#: src/code/unix.lisp
-msgid "Not a director"
+#: src/code/unix-errno.lisp
+msgid "Invalid slot"
msgstr ""
-#: src/code/unix.lisp
-msgid "Is a directory"
+#: src/code/unix-errno.lisp
+msgid "File locking deadlock"
msgstr ""
-#: src/code/unix.lisp
-msgid "Invalid argument"
+#: src/code/unix-errno.lisp
+msgid "Bad font file format"
msgstr ""
-#: src/code/unix.lisp
-msgid "File table overflow"
+#: src/code/unix-errno.lisp
+msgid "Not a stream device"
msgstr ""
-#: src/code/unix.lisp
-msgid "Too many open files"
+#: src/code/unix-errno.lisp
+msgid "No data available"
msgstr ""
-#: src/code/unix.lisp
-msgid "Inappropriate ioctl for device"
+#: src/code/unix-errno.lisp
+msgid "Timer expired"
msgstr ""
-
-#: src/code/unix.lisp
-msgid "Text file busy"
+
+#: src/code/unix-errno.lisp
+msgid "Out of stream resources"
msgstr ""
-#: src/code/unix.lisp
-msgid "File too large"
+#: src/code/unix-errno.lisp
+msgid "Machine is not on the network"
msgstr ""
-#: src/code/unix.lisp
-msgid "No space left on device"
+#: src/code/unix-errno.lisp
+msgid "Package not installed"
msgstr ""
-#: src/code/unix.lisp
-msgid "Illegal seek"
+#: src/code/unix-errno.lisp
+msgid "Object is remote"
msgstr ""
-#: src/code/unix.lisp
-msgid "Read-only file system"
+#: src/code/unix-errno.lisp
+msgid "Link has been severed"
msgstr ""
-#: src/code/unix.lisp
-msgid "Too many links"
+#: src/code/unix-errno.lisp
+msgid "Advertise error"
msgstr ""
-#: src/code/unix.lisp
-msgid "Broken pipe"
+#: src/code/unix-errno.lisp
+msgid "Srmount error"
msgstr ""
-#: src/code/unix.lisp
-msgid "Numerical argument out of domain"
+#: src/code/unix-errno.lisp
+msgid "Communication error on send"
msgstr ""
-#: src/code/unix.lisp
-msgid "Result too large"
+#: src/code/unix-errno.lisp
+msgid "Protocol error"
msgstr ""
-#: src/code/unix.lisp
-msgid "Math result not representable"
+#: src/code/unix-errno.lisp
+msgid "Multihop attempted"
msgstr ""
-#: src/code/unix.lisp
-msgid "Operation would block"
+#: src/code/unix-errno.lisp
+msgid "Not a data message"
msgstr ""
-#: src/code/unix.lisp
-msgid "Resource temporarily unavailable"
+#: src/code/unix-errno.lisp
+msgid "Value too large for defined data type"
msgstr ""
-#: src/code/unix.lisp
-msgid "Operation now in progress"
+#: src/code/unix-errno.lisp
+msgid "Name not unique on network"
msgstr ""
-#: src/code/unix.lisp
-msgid "Operation already in progress"
+#: src/code/unix-errno.lisp
+msgid "File descriptor in bad state"
msgstr ""
-#: src/code/unix.lisp
-msgid "Socket operation on non-socket"
+#: src/code/unix-errno.lisp
+msgid "Remote address changed"
msgstr ""
-#: src/code/unix.lisp
-msgid "Destination address required"
+#: src/code/unix-errno.lisp
+msgid "Can not access a needed shared library"
msgstr ""
-#: src/code/unix.lisp
-msgid "Message too long"
+#: src/code/unix-errno.lisp
+msgid "Accessing a corrupted shared library"
msgstr ""
-#: src/code/unix.lisp
-msgid "Protocol wrong type for socket"
+#: src/code/unix-errno.lisp
+msgid ".lib section in a.out corrupted"
msgstr ""
-#: src/code/unix.lisp
-msgid "Protocol not available"
+#: src/code/unix-errno.lisp
+msgid "Attempting to link in more shared libraries than system limit"
msgstr ""
-#: src/code/unix.lisp
-msgid "Protocol not supported"
+#: src/code/unix-errno.lisp
+msgid "Can not exec a shared library directly"
msgstr ""
-#: src/code/unix.lisp
-msgid "Socket type not supported"
+#: src/code/unix-errno.lisp
+msgid "Error 88"
msgstr ""
-#: src/code/unix.lisp
-msgid "Operation not supported on socket"
+#: src/code/unix-errno.lisp
+msgid "Operation not applicable"
msgstr ""
-#: src/code/unix.lisp
-msgid "Protocol family not supported"
+#: src/code/unix-errno.lisp
+msgid ""
+"Number of symbolic links encountered during path name traversal exceeds "
+"MAXSYMLINKS"
msgstr ""
-#: src/code/unix.lisp
-msgid "Address family not supported by protocol family"
+#: src/code/unix-errno.lisp
+msgid "Error 91"
msgstr ""
-#: src/code/unix.lisp
-msgid "Address already in use"
+#: src/code/unix-errno.lisp
+msgid "Error 92"
msgstr ""
-#: src/code/unix.lisp
-msgid "Can't assign requested address"
+#: src/code/unix-errno.lisp
+msgid "Option not supported by protocol"
msgstr ""
-#: src/code/unix.lisp
-msgid "Network is down"
+#: src/code/unix-errno.lisp
+msgid "Operation not supported on transport endpoint"
msgstr ""
-#: src/code/unix.lisp
-msgid "Network is unreachable"
+#: src/code/unix-errno.lisp
+msgid "Cannot assign requested address"
msgstr ""
-#: src/code/unix.lisp
-msgid "Network dropped connection on reset"
+#: src/code/unix-errno.lisp
+msgid "Network dropped connection because of reset"
msgstr ""
-#: src/code/unix.lisp
-msgid "Software caused connection abort"
+#: src/code/unix-errno.lisp
+msgid "Transport endpoint is already connected"
msgstr ""
-#: src/code/unix.lisp
-msgid "Connection reset by peer"
+#: src/code/unix-errno.lisp
+msgid "Transport endpoint is not connected"
msgstr ""
-#: src/code/unix.lisp
-msgid "No buffer space available"
+#: src/code/unix-errno.lisp
+msgid "Cannot send after socket shutdown"
msgstr ""
-#: src/code/unix.lisp
-msgid "Socket is already connected"
+#: src/code/unix-errno.lisp
+msgid "Too many references: cannot splice"
msgstr ""
-#: src/code/unix.lisp
-msgid "Socket is not connected"
+#: src/code/unix-errno.lisp
+msgid "Stale NFS file handle"
msgstr ""
#: src/code/unix.lisp
-msgid "Can't send after socket shutdown"
+msgid ""
+"The encoding to use for converting a namestring to a string that can\n"
+" be used by the operations system. It must be a valid\n"
+" external-format name or :NULL. :NULL means the string\n"
+" is passed as is to the operating system. The operating system will\n"
+" get the low 8 bits of each UTF-16 code unit of the string."
msgstr ""
#: src/code/unix.lisp
-msgid "Too many references: can't splice"
+msgid "Syscall ~A failed: ~A"
msgstr ""
#: src/code/unix.lisp
-msgid "Connection timed out"
+msgid "Test for read permission"
msgstr ""
#: src/code/unix.lisp
-msgid "Connection refused"
+msgid "Class not yet defined: ~S"
msgstr ""
#: src/code/unix.lisp
-msgid "Too many levels of symbolic links"
+msgid "Test for write permission"
msgstr ""
#: src/code/unix.lisp
-msgid "File name too long"
+msgid "Test for execute permission"
msgstr ""
#: src/code/unix.lisp
-msgid "Host is down"
+msgid "Test for presence of file"
msgstr ""
#: src/code/unix.lisp
-msgid "No route to host"
+msgid ""
+"Given a file path (a string) and one of four constant modes,\n"
+" unix-access returns T if the file is accessible with that\n"
+" mode and NIL if not. It also returns an errno value with\n"
+" NIL which determines why the file was not accessible.\n"
+"\n"
+" The access modes are:\n"
+" r_ok Read permission.\n"
+" w_ok Write permission.\n"
+" x_ok Execute permission.\n"
+" f_ok Presence of file."
msgstr ""
#: src/code/unix.lisp
-msgid "Directory not empty"
+msgid ""
+"Given a file path string, unix-chdir changes the current working \n"
+" directory to the one specified."
msgstr ""
#: src/code/unix.lisp
-msgid "Too many processes"
+msgid "Set user ID on execution"
msgstr ""
#: src/code/unix.lisp
-msgid "Too many users"
+msgid "Set group ID on execution"
msgstr ""
#: src/code/unix.lisp
-msgid "Disc quota exceeded"
+msgid "Save text image after execution"
msgstr ""
#: src/code/unix.lisp
-msgid "namei should continue locally"
+msgid "Read by owner"
msgstr ""
#: src/code/unix.lisp
-msgid "namei was handled remotely"
+msgid "Write by owner"
msgstr ""
#: src/code/unix.lisp
-msgid "Remote file system error _N"
+msgid "Execute (search directory) by owner"
msgstr ""
#: src/code/unix.lisp
-msgid "syscall was handled by Vice"
+msgid "Read by group"
msgstr ""
#: src/code/unix.lisp
-msgid "No message of desired type"
+msgid "Write by group"
msgstr ""
#: src/code/unix.lisp
-msgid "Identifier removed"
+msgid "Execute (search directory) by group"
msgstr ""
#: src/code/unix.lisp
-msgid "Channel number out of range"
+msgid "Read by others"
msgstr ""
#: src/code/unix.lisp
-msgid "Level 2 not synchronized"
+msgid "Write by others"
msgstr ""
#: src/code/unix.lisp
-msgid "Level 3 halted"
+msgid "Execute (search directory) by others"
msgstr ""
#: src/code/unix.lisp
-msgid "Level 3 reset"
+msgid ""
+"Given a file path string and a constant mode, unix-chmod changes the\n"
+" permission mode for that file to the one specified. The new mode\n"
+" can be created by logically OR'ing the following:\n"
+"\n"
+" setuidexec Set user ID on execution.\n"
+" setgidexec Set group ID on execution.\n"
+" savetext Save text image after execution.\n"
+" readown Read by owner.\n"
+" writeown Write by owner.\n"
+" execown Execute (search directory) by owner.\n"
+" readgrp Read by group.\n"
+" writegrp Write by group.\n"
+" execgrp Execute (search directory) by group.\n"
+" readoth Read by others.\n"
+" writeoth Write by others.\n"
+" execoth Execute (search directory) by others.\n"
+" \n"
+" Thus #o444 and (logior unix:readown unix:readgrp unix:readoth)\n"
+" are equivalent for 'mode. The octal-base is familar to Unix users.\n"
+"\n"
+" It returns T on successfully completion; NIL and an error number\n"
+" otherwise."
msgstr ""
#: src/code/unix.lisp
-msgid "Link number out of range"
+msgid ""
+"Given an integer file descriptor and a mode (the same as those\n"
+" used for unix-chmod), unix-fchmod changes the permission mode\n"
+" for that file to the one specified. T is returned if the call\n"
+" was successful."
msgstr ""
#: src/code/unix.lisp
-msgid "Protocol driver not attached"
+msgid "set the file pointer"
msgstr ""
#: src/code/unix.lisp
-msgid "No CSI structure available"
+msgid "increment the file pointer"
msgstr ""
#: src/code/unix.lisp
-msgid "Level 2 halted"
+msgid "extend the file size"
msgstr ""
#: src/code/unix.lisp
-msgid "Deadlock situation detected/avoided"
+msgid ""
+"Unix-lseek accepts a file descriptor and moves the file pointer ahead\n"
+" a certain offset for that file. Whence can be any of the following:\n"
+"\n"
+" l_set Set the file pointer.\n"
+" l_incr Increment the file pointer.\n"
+" l_xtnd Extend the file size.\n"
+" _N"
msgstr ""
#: src/code/unix.lisp
-msgid "No record locks available"
+msgid ""
+"UNIX-LSEEK accepts a file descriptor and moves the file pointer ahead\n"
+" a certain OFFSET for that file. WHENCE can be any of the following:\n"
+"\n"
+" l_set Set the file pointer.\n"
+" l_incr Increment the file pointer.\n"
+" l_xtnd Extend the file size.\n"
+" "
msgstr ""
#: src/code/unix.lisp
-msgid "Error 47"
+msgid ""
+"Unix-mkdir creates a new directory with the specified name and mode.\n"
+" (Same as those for unix-chmod.) It returns T upon success, otherwise\n"
+" NIL and an error number."
msgstr ""
#: src/code/unix.lisp
-msgid "Error 48"
+msgid ""
+"Unix-unlink removes the directory entry for the named file.\n"
+" NIL and an error code is returned if the call fails."
msgstr ""
#: src/code/unix.lisp
-msgid "Bad exchange descriptor"
+msgid "Read-only flag."
msgstr ""
#: src/code/unix.lisp
-msgid "Bad request descriptor"
+msgid "Write-only flag."
msgstr ""
#: src/code/unix.lisp
-msgid "Message tables full"
+msgid "Read-write flag."
msgstr ""
#: src/code/unix.lisp
-msgid "Anode table overflow"
+msgid "Non-blocking I/O"
msgstr ""
#: src/code/unix.lisp
-msgid "Bad request code"
+msgid "Append flag."
msgstr ""
#: src/code/unix.lisp
-msgid "Invalid slot"
+msgid "Create if nonexistant flag."
msgstr ""
#: src/code/unix.lisp
-msgid "File locking deadlock"
+msgid "Truncate flag."
msgstr ""
#: src/code/unix.lisp
-msgid "Bad font file format"
+msgid "Error if already exists."
msgstr ""
#: src/code/unix.lisp
-msgid "Not a stream device"
+msgid "Don't assign controlling tty"
msgstr ""
#: src/code/unix.lisp
-msgid "No data available"
+msgid "Non-blocking mode"
msgstr ""
#: src/code/unix.lisp
-msgid "Timer expired"
+msgid "Synchronous writes (on ext2)"
msgstr ""
#: src/code/unix.lisp
-msgid "Out of stream resources"
+msgid "Asynchronous I/O"
msgstr ""
#: src/code/unix.lisp
-msgid "Machine is not on the network"
+msgid ""
+"Unix-open opens the file whose pathname is specified by path\n"
+" for reading and/or writing as specified by the flags argument.\n"
+" The flags argument can be:\n"
+"\n"
+" o_rdonly Read-only flag.\n"
+" o_wronly Write-only flag.\n"
+" o_rdwr Read-and-write flag.\n"
+" o_append Append flag.\n"
+" o_creat Create-if-nonexistant flag.\n"
+" o_trunc Truncate-to-size-0 flag.\n"
+"\n"
+" If the o_creat flag is specified, then the file is created with\n"
+" a permission of argument mode if the file doesn't exist. An\n"
+" integer file descriptor is returned by unix-open."
msgstr ""
#: src/code/unix.lisp
-msgid "Package not installed"
+msgid ""
+"Unix-close takes an integer file descriptor as an argument and\n"
+" closes the file associated with it. T is returned upon successful\n"
+" completion, otherwise NIL and an error number."
msgstr ""
#: src/code/unix.lisp
-msgid "Object is remote"
+msgid ""
+"Unix-creat accepts a file name and a mode (same as those for\n"
+" unix-chmod) and creates a file by that name with the specified\n"
+" permission mode. It returns a file descriptor on success,\n"
+" or NIL and an error number otherwise.\n"
+"\n"
+" This interface is made obsolete by UNIX-OPEN."
msgstr ""
#: src/code/unix.lisp
-msgid "Link has been severed"
+msgid ""
+"Unix-dup duplicates an existing file descriptor (given as the\n"
+" argument) and return it. If FD is not a valid file descriptor, NIL\n"
+" and an error number are returned."
msgstr ""
#: src/code/unix.lisp
-msgid "Advertise error"
+msgid ""
+"Unix-dup2 duplicates an existing file descriptor just as unix-dup\n"
+" does only the new value of the duplicate descriptor may be requested\n"
+" through the second argument. If a file already exists with the\n"
+" requested descriptor number, it will be closed and the number\n"
+" assigned to the duplicate."
msgstr ""
#: src/code/unix.lisp
-msgid "Srmount error"
+msgid "Duplicate a file descriptor"
msgstr ""
#: src/code/unix.lisp
-msgid "Communication error on send"
+msgid "Get file desc. flags"
msgstr ""
#: src/code/unix.lisp
-msgid "Protocol error"
+msgid "Set file desc. flags"
msgstr ""
#: src/code/unix.lisp
-msgid "Multihop attempted"
+msgid "Get file flags"
msgstr ""
#: src/code/unix.lisp
-msgid "Not a data message"
+msgid "Set file flags"
msgstr ""
#: src/code/unix.lisp
-msgid "Value too large for defined data type"
+msgid "Get owner"
msgstr ""
#: src/code/unix.lisp
-msgid "Name not unique on network"
+msgid "Get lock"
msgstr ""
#: src/code/unix.lisp
-msgid "File descriptor in bad state"
+msgid "Set owner"
msgstr ""
#: src/code/unix.lisp
-msgid "Remote address changed"
+msgid "Set lock"
msgstr ""
#: src/code/unix.lisp
-msgid "Can not access a needed shared library"
+msgid "Set lock, wait for release"
msgstr ""
#: src/code/unix.lisp
-msgid "Accessing a corrupted shared library"
+msgid "Non-blocking reads"
msgstr ""
#: src/code/unix.lisp
-msgid ".lib section in a.out corrupted"
+msgid "Append on each write"
msgstr ""
#: src/code/unix.lisp
-msgid "Attempting to link in more shared libraries than system limit"
+msgid "Signal pgrp when data ready"
msgstr ""
#: src/code/unix.lisp
-msgid "Can not exec a shared library directly"
+msgid "Create if nonexistant"
msgstr ""
#: src/code/unix.lisp
-msgid "Error 88"
+msgid "Truncate to zero length"
msgstr ""
#: src/code/unix.lisp
-msgid "Operation not applicable"
+msgid "Error if already created"
msgstr ""
#: src/code/unix.lisp
msgid ""
-"Number of symbolic links encountered during path name traversal exceeds "
-"MAXSYMLINKS"
-msgstr ""
-
-#: src/code/unix.lisp
-msgid "Error 91"
+"Unix-fcntl manipulates file descriptors according to the\n"
+" argument CMD which can be one of the following:\n"
+"\n"
+" F-DUPFD Duplicate a file descriptor.\n"
+" F-GETFD Get file descriptor flags.\n"
+" F-SETFD Set file descriptor flags.\n"
+" F-GETFL Get file flags.\n"
+" F-SETFL Set file flags.\n"
+" F-GETOWN Get owner.\n"
+" F-SETOWN Set owner.\n"
+"\n"
+" The flags that can be specified for F-SETFL are:\n"
+"\n"
+" FNDELAY Non-blocking reads.\n"
+" FAPPEND Append on each write.\n"
+" FASYNC Signal pgrp when data ready.\n"
+" FCREAT Create if nonexistant.\n"
+" FTRUNC Truncate to zero length.\n"
+" FEXCL Error if already created.\n"
+" "
msgstr ""
#: src/code/unix.lisp
-msgid "Error 92"
+msgid ""
+"Unix-pipe sets up a unix-piping mechanism consisting of\n"
+" an input pipe and an output pipe. Unix-Pipe returns two\n"
+" values: if no error occurred the first value is the pipe\n"
+" to be read from and the second is can be written to. If\n"
+" an error occurred the first value is NIL and the second\n"
+" the unix error code."
msgstr ""
#: src/code/unix.lisp
-msgid "Option not supported by protocol"
+msgid ""
+"Unix-read attempts to read from the file described by fd into\n"
+" the buffer buf until it is full. Len is the length of the buffer.\n"
+" The number of bytes actually read is returned or NIL and an error\n"
+" number if an error occured."
msgstr ""
#: src/code/unix.lisp
-msgid "Operation not supported on transport endpoint"
+msgid ""
+"UNIX-READ attempts to read from the file described by fd into\n"
+" the buffer buf until it is full. Len is the length of the buffer.\n"
+" The number of bytes actually read is returned or NIL and an error\n"
+" number if an error occured."
msgstr ""
#: src/code/unix.lisp
-msgid "Cannot assign requested address"
+msgid ""
+"Unix-readlink invokes the readlink system call on the file name\n"
+" specified by the simple string path. It returns up to two values:\n"
+" the contents of the symbolic link if the call is successful, or\n"
+" NIL and the Unix error number."
msgstr ""
#: src/code/unix.lisp
-msgid "Network dropped connection because of reset"
+msgid ""
+"Unix-rename renames the file with string name1 to the string\n"
+" name2. NIL and an error code is returned if an error occured."
msgstr ""
#: src/code/unix.lisp
-msgid "Transport endpoint is already connected"
+msgid ""
+"Unix-rmdir attempts to remove the directory name. NIL and\n"
+" an error number is returned if an error occured."
msgstr ""
#: src/code/unix.lisp
-msgid "Transport endpoint is not connected"
+msgid ""
+"Unix-write attempts to write a character buffer (buf) of length\n"
+" len to the file described by the file descriptor fd. NIL and an\n"
+" error is returned if the call is unsuccessful."
msgstr ""
#: src/code/unix.lisp
-msgid "Cannot send after socket shutdown"
+msgid ""
+"Define an ioctl command. If the optional ARG and PARM-TYPE are given\n"
+" then ioctl argument size and direction are included as for ioctls defined\n"
+" by _IO, _IOR, _IOW, or _IOWR. If DEV is a character then the ioctl type\n"
+" is the characters code, else DEV may be an integer giving the type."
msgstr ""
#: src/code/unix.lisp
-msgid "Too many references: cannot splice"
+msgid ""
+"Unix-ioctl performs a variety of operations on open i/o\n"
+" descriptors. See the UNIX Programmer's Manual for more\n"
+" information."
msgstr ""
#: src/code/unix.lisp
-msgid "Stale NFS file handle"
+msgid "Get terminal attributes."
msgstr ""
#: src/code/unix.lisp
-msgid "Resource deadlock would occur"
+msgid "Set terminal attributes."
msgstr ""
#: src/code/unix.lisp
-msgid "Function not implemented"
+msgid "Get terminal output speed."
msgstr ""
#: src/code/unix.lisp
-msgid "Too many symbolic links encountered"
+msgid ""
+"Unix-getuid returns the real user-id associated with the\n"
+" current process."
msgstr ""
#: src/code/unix.lisp
-msgid "Invalid exchange"
+msgid "Unix-gethostname returns the name of the host machine as a string."
msgstr ""
#: src/code/unix.lisp
-msgid "Invalid request descriptor"
+msgid ""
+"Unix-gethostid returns a 32-bit integer which provides unique\n"
+" identification for the host machine."
msgstr ""
#: src/code/unix.lisp
-msgid "Exchange full"
+msgid ""
+"Unix-exit terminates the current process with an optional\n"
+" error code. If successful, the call doesn't return. If\n"
+" unsuccessful, the call returns NIL and an error number."
msgstr ""
#: src/code/unix.lisp
-msgid "No anode"
+msgid "Size of control character vector."
msgstr ""
#: src/code/unix.lisp
-msgid "Invalid request code"
+msgid ""
+"Unix-stat retrieves information about the specified\n"
+" file returning them in the form of multiple values. If the call\n"
+" fails, then NIL and an error number is returned. If the call\n"
+" succeeds, then T is returned in addition to the following values\n"
+" from the stat struct st:\n"
+"\n"
+" st_dev Device ID\n"
+" st_ino File serial number\n"
+" st_mode Mode of file\n"
+" st_nlink Number of hard links to the file\n"
+" st_uid User ID\n"
+" st_gid Group ID\n"
+" st_rdev Device ID (if file is character or block special)\n"
+" st_atime Last data access time, in sec\n"
+" st_mtime Last data modification time, in sec\n"
+" st_ctime Last file status change time, in sec\n"
+" st_blksize Preferred I/O block size\n"
+" st_blocks Number of blocks allocated. (Block size is implementation"
+" dependent.)\n"
+""
msgstr ""
#: src/code/unix.lisp
-msgid "File locking deadlock error"
+msgid ""
+"Unix-fstat is similar to unix-stat except the file is specified\n"
+" by the file descriptor fd. If the call fails, then NIL and an\n"
+" error number is returned. If the call succeeds, then T is returned\n"
+" in addition to the following values from the stat struct st:\n"
+"\n"
+" st_dev Device ID\n"
+" st_ino File serial number\n"
+" st_mode Mode of file\n"
+" st_nlink Number of hard links to the file\n"
+" st_uid User ID\n"
+" st_gid Group ID\n"
+" st_rdev Device ID (if file is character or block special)\n"
+" st_atime Last data access time, in sec\n"
+" st_mtime Last data modification time, in sec\n"
+" st_ctime Last file status change time, in sec\n"
+" st_blksize Preferred I/O block size\n"
+" st_blocks Number of blocks allocated. (Block size is implementation"
+" dependent.)\n"
+""
msgstr ""
#: src/code/unix.lisp
-msgid "Device not a stream"
+msgid ""
+"Unix-lstat is similar to unix-stat except the specified\n"
+" file must be a symbolic link. If the call fails, then NIL and an\n"
+" error number is returned. If the call succeeds, then T is returned\n"
+" in addition to the following values from the stat struct st:\n"
+"\n"
+" st_dev Device ID\n"
+" st_ino File serial number\n"
+" st_mode Mode of file\n"
+" st_nlink Number of hard links to the file\n"
+" st_uid User ID\n"
+" st_gid Group ID\n"
+" st_rdev Device ID (if file is character or block special)\n"
+" st_atime Last data access time, in sec\n"
+" st_mtime Last data modification time, in sec\n"
+" st_ctime Last file status change time, in sec\n"
+" st_blksize Preferred I/O block size\n"
+" st_blocks Number of blocks allocated. (Block size is implementation"
+" dependent.)\n"
+""
msgstr ""
#: src/code/unix.lisp
-msgid "Out of streams resources"
+msgid "The calling process."
msgstr ""
#: src/code/unix.lisp
-msgid "RFS specific error"
+msgid "Terminated child processes."
msgstr ""
#: src/code/unix.lisp
-msgid "Attempting to link in too many shared libraries"
+msgid ""
+"Like call getrusage, but return only the system and user time, and returns\n"
+" the seconds and microseconds as separate values."
msgstr ""
#: src/code/unix.lisp
-msgid "Cannot exec a shared library directly"
+msgid ""
+"Unix-getrusage returns information about the resource usage\n"
+" of the process specified by who. Who can be either the\n"
+" current process (rusage_self) or all of the terminated\n"
+" child processes (rusage_children). NIL and an error number\n"
+" is returned if the call fails."
msgstr ""
#: src/code/unix.lisp
-msgid "Illegal byte sequence"
+msgid "These bits determine file type."
msgstr ""
#: src/code/unix.lisp
-msgid "Interrupted system call should be restarted _N"
+msgid "Directory"
msgstr ""
#: src/code/unix.lisp
-msgid "Streams pipe error"
+msgid "Character device"
msgstr ""
#: src/code/unix.lisp
-msgid "Address family not supported by protocol"
+msgid "FIFO"
msgstr ""
#: src/code/unix.lisp
-msgid "Cannot send after transport endpoint shutdown"
+msgid "Block device"
msgstr ""
#: src/code/unix.lisp
-msgid "Structure needs cleaning"
+msgid "Regular file"
msgstr ""
#: src/code/unix.lisp
-msgid "Not a XENIX named type file"
+msgid "Symbolic link."
msgstr ""
#: src/code/unix.lisp
-msgid "No XENIX semaphores available"
+msgid "Socket."
msgstr ""
#: src/code/unix.lisp
-msgid "Is a named type file"
+msgid "Returns either :file, :directory, :link, :special, or NIL."
msgstr ""
#: src/code/unix.lisp
-msgid "Remote I/O error"
+msgid "Returns the pathname with all symbolic links resolved."
msgstr ""
#: src/code/unix.lisp
-msgid "Quota exceeded"
+msgid "Error reading link ~S: ~S"
msgstr ""
#: src/code/unix.lisp
@@ -1284,10 +1190,6 @@ msgid ""
" UNIX system call."
msgstr ""
-#: src/code/unix.lisp
-msgid "Unknown error [~d]"
-msgstr ""
-
#: src/code/unix.lisp
msgid ""
"Perform the UNIX select(2) system call.\n"
@@ -1419,8 +1321,8 @@ msgstr ""
#: src/code/unix.lisp
msgid ""
-"Set all the categories of the locale from the values of the\n"
-" environment variables using setlocale(LC_ALL, \"\").\n"
+"Set all the categories of the locale according to the values of\n"
+" the environment variables by calling setlocale(LC_ALL, \"\").\n"
"\n"
" Returns 0 on success and -1 if setlocale failed."
msgstr ""
@@ -1436,3 +1338,24 @@ msgstr ""
msgid "Get the codeset from the locale"
msgstr ""
+#: src/code/unix.lisp
+msgid ""
+"Generates a unique temporary file name from TEMPLATE, and creates\n"
+" and opens the file. On success, the corresponding file descriptor\n"
+" and name of the file is returned.\n"
+"\n"
+" The last six characters of the template must be \"XXXXXX\"."
+msgstr ""
+
+#: src/code/unix.lisp
+msgid ""
+"Generate a uniquely named temporary directory from Template,\n"
+" which must have \"XXXXXX\" as the last six characters. The\n"
+" directory is created with permissions 0700. The name of the\n"
+" directory is returned."
+msgstr ""
+
+#: src/code/unix.lisp
+msgid "Returns a string that describes the error code Errno"
+msgstr ""
+
=====================================
src/i18n/locale/cmucl.pot
=====================================
@@ -9300,6 +9300,13 @@ msgid ""
" external format."
msgstr ""
+#: src/code/extfmts.lisp
+msgid ""
+"Compute the number of octets needed to convert String using the\n"
+" specified External-format. The string is bound by Start (defaulting\n"
+" to 0) and End (defaulting to the end of the string)."
+msgstr ""
+
#: src/code/extfmts.lisp
msgid ""
"Encode the given String using External-Format and return a new\n"
=====================================
src/pcl/simple-streams/external-formats/ascii.lisp
=====================================
@@ -33,5 +33,15 @@ replaced with a question mark.")
(declare (optimize (ext:inhibit-warnings 3)))
(funcall ,error "Cannot output codepoint #x~X to ASCII stream" ,code))
#x3F)
- ,code))))
+ ,code)))
+ ()
+ ()
+ (octet-count (code state error)
+ `(if (> ,code #x7f)
+ (if ,error
+ (locally
+ (declare (optimize (ext:inhibit-warnings 3)))
+ (funcall ,error "Cannot output codepoint #x~X to ASCII stream" ,code))
+ 1)
+ 1)))
=====================================
src/pcl/simple-streams/external-formats/euc-kr.lisp
=====================================
@@ -1007,4 +1007,16 @@ character and illegal outputs are replaced by a question mark.")
(t
(if ,error
(funcall ,error "Cannot output codepoint #x~X to EUC-KR format." ,code)
- (,output #X3f))))))))
+ (,output #X3f)))))))
+ ()
+ ()
+ (octet-count (code state error present)
+ `(if (<= ,code #x7f)
+ 1
+ (let ((,present (get-inverse ,itable ,code)))
+ (cond (,present
+ 2)
+ (t
+ (if ,error
+ (funcall ,error "Cannot output codepoint #x~X to EUC-KR format." ,code)
+ 1)))))))
=====================================
src/pcl/simple-streams/external-formats/iso8859-1.lisp
=====================================
@@ -31,4 +31,17 @@ character and illegal outputs are replaced by a question mark.")
(funcall ,error "Cannot output codepoint #x~X to ISO8859-1 stream"
,code 1))
#x3F)
- ,code))))
+ ,code)))
+ ()
+ ()
+ (octet-count (code state error)
+ `(if (> ,code 255)
+ (if ,error
+ (locally
+ ;; No warnings about fdefinition
+ (declare (optimize (ext:inhibit-warnings 3)))
+ (funcall ,error
+ (intl:gettext "Cannot output codepoint #x~X to ISO8859-1 stream")
+ ,code 1))
+ 1)
+ 1)))
=====================================
src/pcl/simple-streams/external-formats/iso8859-2.lisp
=====================================
@@ -47,4 +47,19 @@ character and illegal outputs are replaced by a question mark.")
(declare (optimize (ext:inhibit-warnings 3)))
(funcall ,error "Cannot output codepoint #x~X to ISO8859-2 stream"
,code))
- #x3F)))))))
+ #x3F))))))
+ ()
+ ()
+ (octet-count (code state error present)
+ `(if (< ,code 160)
+ 1
+ (let ((,present (get-inverse ,itable ,code)))
+ (if ,present
+ 1
+ (if ,error
+ (locally
+ ;; No warnings about fdefinition
+ (declare (optimize (ext:inhibit-warnings 3)))
+ (funcall ,error "Cannot output codepoint #x~X to ISO8859-2 stream"
+ ,code))
+ 1))))))
=====================================
src/pcl/simple-streams/external-formats/mac-roman.lisp
=====================================
@@ -49,4 +49,19 @@ character and illegal outputs are replaced by a question mark.")
(declare (optimize (ext:inhibit-warnings 3)))
(funcall ,error "Cannot output codepoint #x~X to MAC-ROMAN stream"
,code))
- #x3F)))))))
+ #x3F))))))
+ ()
+ ()
+ (octet-count (code state error present)
+ `(if (< ,code 128)
+ 1
+ (let ((,present (get-inverse ,itable ,code)))
+ (if ,present
+ 1
+ (if ,error
+ (locally
+ ;; No warnings about fdefinition
+ (declare (optimize (ext:inhibit-warnings 3)))
+ (funcall ,error "Cannot output codepoint #x~X to MAC-ROMAN stream"
+ ,code))
+ 1))))))
=====================================
src/pcl/simple-streams/external-formats/utf-16-be.lisp
=====================================
@@ -110,4 +110,12 @@ Unicode replacement character.")
(copy-state (state)
;; The state is either NIL or a codepoint, so nothing really
;; special is needed to copy it.
- `(progn ,state)))
+ `(progn ,state))
+ (octet-count (code state error)
+ `(cond ((< ,code #x10000)
+ 2)
+ ((< ,code #x110000)
+ 4)
+ (t
+ ;; Replacement character is 2 octets
+ 2))))
=====================================
src/pcl/simple-streams/external-formats/utf-16-le.lisp
=====================================
@@ -111,4 +111,12 @@ Unicode replacement character.")
(copy-state (state)
;; The state is either NIL or a codepoint, so nothing really
;; special is needed.
- `(progn ,state)))
+ `(progn ,state))
+ (octet-count (code state error)
+ `(cond ((< ,code #x10000)
+ 2)
+ ((< ,code #x110000)
+ 4)
+ (t
+ ;; Replacement character is 2 octets
+ 2))))
=====================================
src/pcl/simple-streams/external-formats/utf-16.lisp
=====================================
@@ -156,4 +156,18 @@ Unicode replacement character.")
,c))))))
(copy-state (state)
;; The state is list. Copy it
- `(copy-list ,state)))
+ `(copy-list ,state))
+ (octet-count (code state error)
+ `(let ((bom-count 0))
+ (unless ,state
+ ;; Output BOM
+ (setf bom-count 2)
+ (setf ,state t))
+ (+ bom-count
+ (cond ((< ,code #x10000)
+ 2)
+ ((< ,code #x110000)
+ 4)
+ (t
+ ;; Replacement character is 2 octets
+ 2))))))
=====================================
src/pcl/simple-streams/external-formats/utf-32-be.lisp
=====================================
@@ -61,4 +61,18 @@ Unicode replacement character.")
,code))
+replacement-character-code+)))
(t
- (out ,code))))))
+ (out ,code)))))
+ ()
+ ()
+ (octet-count (code state error)
+ `(cond ((lisp::surrogatep ,code)
+ (if ,error
+ (locally
+ ;; No warnings about fdefinition
+ (declare (optimize (ext:inhibit-warnings 3)))
+ (funcall ,error "Surrogate code #x~4,'0X is illegal for UTF32 output"
+ ,code))
+ ;; Replacement character is 2 octets
+ 2))
+ (t
+ 4))))
=====================================
src/pcl/simple-streams/external-formats/utf-32-le.lisp
=====================================
@@ -62,4 +62,18 @@ Unicode replacement character.")
,code))
+replacement-character-code+)))
(t
- (out ,code))))))
+ (out ,code)))))
+ ()
+ ()
+ (octet-count (code state error)
+ `(cond ((lisp::surrogatep ,code)
+ (if ,error
+ (locally
+ ;; No warnings about fdefinition
+ (declare (optimize (ext:inhibit-warnings 3)))
+ (funcall ,error "Surrogate code #x~4,'0X is illegal for UTF32 output"
+ ,code))
+ ;; Replacement character is 2 octets
+ 2))
+ (t
+ 4))))
=====================================
src/pcl/simple-streams/external-formats/utf-32.lisp
=====================================
@@ -114,4 +114,20 @@ Unicode replacement character.")
nil
(copy-state (state)
;; The state is either NIL or T, so we can just return that.
- `(progn ,state)))
+ `(progn ,state))
+ (octet-count (code state error)
+ `(let ((bom-count 0))
+ (unless ,state
+ (setf bom-count 4)
+ (setf ,state t))
+ (cond ((lisp::surrogatep ,code)
+ (if ,error
+ (locally
+ ;; No warnings about fdefinition
+ (declare (optimize (ext:inhibit-warnings 3)))
+ (funcall ,error "Surrogate code #x~4,'0X is illegal for UTF32 output"
+ ,code))
+ ;; Replacement character is 2 octets
+ (+ 2 bom-count)))
+ (t
+ (+ 4 bom-count))))))
=====================================
src/pcl/simple-streams/external-formats/utf-8.lisp
=====================================
@@ -127,4 +127,14 @@ replacement character.")
((< ,code #x800) (utf8 ,code 1))
((< ,code #x10000) (utf8 ,code 2))
((< ,code #x110000) (utf8 ,code 3))
- (t (error "How did this happen? Codepoint U+~X is illegal" ,code))))))
+ (t (error "How did this happen? Codepoint U+~X is illegal" ,code)))))
+ ()
+ ()
+ (octet-count (code state error)
+ `(locally
+ (declare (optimize (ext:inhibit-warnings 3)))
+ (cond ((< ,code #x80) 1)
+ ((< ,code #x800) 2)
+ ((< ,code #x10000) 3)
+ ((< ,code #x110000) 4)
+ (t (error "How did this happen? Codepoint U+~X is illegal" ,code))))))
=====================================
src/tools/worldbuild.lisp
=====================================
@@ -135,11 +135,8 @@
"target:code/alieneval"
"target:code/c-call"
"target:code/sap"
+ "target:code/unix-errno"
"target:code/unix"
- ,@(when (or (c:backend-featurep :linux))
- ;; This is currently only available for some OSes. Ideally,
- ;; it should be available for all OSes.
- '("target:code/unix-errno"))
,@(when (c:backend-featurep :mach)
'("target:code/mach"
"target:code/mach-os"))
=====================================
src/tools/worldcom.lisp
=====================================
@@ -162,11 +162,8 @@
(comf "target:code/string")
(comf "target:code/mipsstrops")
+(comf "target:code/unix-errno" :proceed t)
(comf "target:code/unix" :proceed t)
-(when (or (c:backend-featurep :linux))
- ;; This is currently only available for some OSes. Ideally, it
- ;; should be available for all OSes.
- (comf "target:code/unix-errno" :proceed t))
(when (c:backend-featurep :mach)
(comf "target:code/mach")
=====================================
tests/external-formats.lisp
=====================================
@@ -0,0 +1,135 @@
+;;; Tests for external formats
+
+(defpackage :external-formats-tests
+ (:use :cl :lisp-unit))
+
+(in-package "EXTERNAL-FORMATS-TESTS")
+
+(defparameter *test-iso8859-1*
+ (let ((rs (kernel::make-random-object :state (kernel::init-random-state 27182828))))
+ (lisp::codepoints-string
+ (loop for k from 0 below 1000
+ collect (random 256 rs))))
+ "Random test string with ISO8859-1 characters")
+
+(defparameter *test-unicode*
+ (let ((rs (kernel::make-random-object :state (kernel::init-random-state 27182828))))
+ (lisp::codepoints-string
+ (loop for k from 0 below 1000
+ collect (random 20000 rs))))
+ "Random test string with codepoints below 20000")
+
+
+
+(defmacro test-octet-count (string format)
+ "Test that STRING-OCTET-COUNT returns the correct number of octets"
+ ;; We expect STRING-OCTET-COUNT returns the same number of octets
+ ;; that are produced by STRING-TO-OCTETS.
+ `(multiple-value-bind (octets count converted)
+ (stream:string-to-octets ,string :external-format ,format)
+ ;; While we're at it, make sure that the length of the octet
+ ;; buffer matches returned count. And make sure we converted all
+ ;; the characters in the string.
+ (assert-equal (length octets) count)
+ (assert-equal (length ,string) converted)
+ ;; Finally, make sure that STRING-OCTET-COUNT returns the same
+ ;; number of octets from STRING-TO-OCTETS.
+ (assert-equal (length octets)
+ (stream::string-octet-count ,string :external-format ,format))))
+
+(define-test octet-count.iso8859-1
+ (:tag :octet-count)
+ (test-octet-count *test-iso8859-1* :iso8859-1))
+
+(define-test octet-count.ascii
+ (:tag :octet-count)
+ (test-octet-count *test-iso8859-1* :ascii))
+
+(define-test octet-count.ascii.error
+ (:tag :octet-count)
+ (assert-error 'simple-error
+ (stream::string-octet-count *test-iso8859-1*
+ :external-format :ascii
+ :error 'error)))
+
+(define-test octet-count.utf-8
+ (:tag :octet-count)
+ (test-octet-count *test-unicode* :utf-8))
+
+(define-test octet-count.utf-16
+ (:tag :octet-count)
+ (test-octet-count *test-unicode* :utf-16))
+
+(define-test octet-count.utf-16-be
+ (:tag :octet-count)
+ (test-octet-count *test-unicode* :utf-16-be))
+
+(define-test octet-count.utf-16-le
+ (:tag :octet-count)
+ (test-octet-count *test-unicode* :utf-16-le))
+
+(define-test octet-count.utf-32
+ (:tag :octet-count)
+ (test-octet-count *test-unicode* :utf-32))
+
+(define-test octet-count.utf-32-le
+ (:tag :octet-count)
+ (test-octet-count *test-unicode* :utf-32-le))
+
+(define-test octet-count.utf-32-le
+ (:tag :octet-count)
+ (test-octet-count *test-unicode* :utf-32-le))
+
+(define-test octet-count.euc-kr
+ (:tag :octet-count)
+ (test-octet-count *test-unicode* :euc-kr))
+
+(define-test octet-count.iso8859-2
+ (:tag :octet-count)
+ (test-octet-count *test-iso8859-1* :iso8859-2))
+
+(define-test octet-count.iso8859-3
+ (:tag :octet-count)
+ (test-octet-count *test-iso8859-1* :iso8859-3))
+
+(define-test octet-count.iso8859-4
+ (:tag :octet-count)
+ (test-octet-count *test-iso8859-1* :iso8859-4))
+
+(define-test octet-count.iso8859-5
+ (:tag :octet-count)
+ (test-octet-count *test-iso8859-1* :iso8859-5))
+
+(define-test octet-count.iso8859-6
+ (:tag :octet-count)
+ (test-octet-count *test-iso8859-1* :iso8859-6))
+
+(define-test octet-count.iso8859-7
+ (:tag :octet-count)
+ (test-octet-count *test-iso8859-1* :iso8859-7))
+
+(define-test octet-count.iso8859-8
+ (:tag :octet-count)
+ (test-octet-count *test-iso8859-1* :iso8859-8))
+
+(define-test octet-count.iso8859-10
+ (:tag :octet-count)
+ (test-octet-count *test-iso8859-1* :iso8859-10))
+
+(define-test octet-count.iso8859-13
+ (:tag :octet-count)
+ (test-octet-count *test-iso8859-1* :iso8859-13))
+
+(define-test octet-count.iso8859-14
+ (:tag :octet-count)
+ (test-octet-count *test-iso8859-1* :iso8859-14))
+
+(define-test octet-count.iso8859-15
+ (:tag :octet-count)
+ (test-octet-count *test-iso8859-1* :iso8859-15))
+
+(define-test octet-count.mac-roman
+ (:tag :octet-count)
+ (test-octet-count *test-iso8859-1* :mac-roman))
+
+
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/fe12bd37f104f2df482629…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/fe12bd37f104f2df482629…
You're receiving this email because of your account on gitlab.common-lisp.net.
1
0

[Git][cmucl/cmucl][issue-365-add-strerror-with-generated-unix-errno] 2 commits: Use shell script to create unix-errno.lisp
by Raymond Toy (@rtoy) 10 Feb '25
by Raymond Toy (@rtoy) 10 Feb '25
10 Feb '25
Raymond Toy pushed to branch issue-365-add-strerror-with-generated-unix-errno at cmucl / cmucl
Commits:
2f9a0e54 by Raymond Toy at 2025-02-10T07:28:15-08:00
Use shell script to create unix-errno.lisp
Instead of embedding the header and tail of unix-errno.lisp in the awk
script, use a shell script to print out the header and tail. We embed
the fairly simple awk script into the shell script.
Update the build scripts to use this new shell script.
- - - - -
5e784f72 by Raymond Toy at 2025-02-10T07:29:56-08:00
Remove create-errno.awk
This has all been subsumed by the scripts create-errno.sh.
- - - - -
4 changed files:
- bin/build.sh
- − bin/create-errno.awk
- + bin/create-errno.sh
- bin/cross-build-world.sh
Changes:
=====================================
bin/build.sh
=====================================
@@ -159,7 +159,8 @@ case `uname -s` in
;;
esac
-awk -f bin/create-errno.awk ${ERRNO_FILES} > src/code/unix-errno.lisp
+#awk -f bin/create-errno.awk ${ERRNO_FILES} > src/code/unix-errno.lisp
+bin/create-errno.sh ${ERRNO_FILES} > src/code/unix-errno.lisp
BUILDWORLD="$TOOLDIR/build-world.sh"
BUILD_POT="yes"
=====================================
bin/create-errno.awk deleted
=====================================
@@ -1,248 +0,0 @@
-BEGIN {
- print ";;; -*- Package: UNIX -*-\n\
-;;;\n\
-;;; **********************************************************************\n\
-;;; This code was written as part of the CMU Common Lisp project at\n\
-;;; Carnegie Mellon University, and has been placed in the public domain.\n\
-;;;\n\
-(ext:file-comment\n\
- \"$Header: src/code/unix-errno.lisp $\")\n\
-;;;\n\
-;;; **********************************************************************\n\
-;;;\n\
-;;; This file contains the UNIX low-level support, just enough to run\n\
-;;; CMUCL.\n\
-;;;\n\
-(in-package \"UNIX\")\n\
-(intl:textdomain \"cmucl-unix\")\n\
-\n\
-;;;; Errno stuff.\n\
-(eval-when (compile eval)\n\
-\n\
-(defparameter *compiler-unix-errors* nil)\n\
-\n\
-(defmacro def-unix-error (name number &optional description)\n\
- \"Define a constant named Name corresponding to the Unix errno value\n\
- Number. A description of the errno is optional in Description.\"\n\
- `(progn\n\
- (eval-when (compile eval)\n\
- (push (cons ,number ,description) *compiler-unix-errors*))\n\
- (defconstant ,name ,number ,description)\n\
- (export ',name)))\n\
-\n\
-(defmacro emit-unix-errors ()\n\
- (let* ((max (apply #'max (mapcar #'car *compiler-unix-errors*)))\n\
- (array (make-array (1+ max) :initial-element nil)))\n\
- (dolist (error *compiler-unix-errors*)\n\
- (setf (svref array (car error)) (cdr error)))\n\
- `(progn\n\
- (defvar *unix-errors* ',array)\n\
- (declaim (simple-vector *unix-errors*)))))\n\
-\n\
-) ;eval-when\n\
-\n\
-;;; \n\
-;;; From <errno.h>\n\
-;;; \n\
-(def-unix-error ESUCCESS 0 _N\"Successful\")\n\
-#-linux\n\
-(progn\n\
-(def-unix-error EPERM 1 _N\"Operation not permitted\")\n\
-(def-unix-error ENOENT 2 _N\"No such file or directory\")\n\
-(def-unix-error ESRCH 3 _N\"No such process\")\n\
-(def-unix-error EINTR 4 _N\"Interrupted system call\")\n\
-(def-unix-error EIO 5 _N\"I/O error\")\n\
-(def-unix-error ENXIO 6 _N\"Device not configured\")\n\
-(def-unix-error E2BIG 7 _N\"Arg list too long\")\n\
-(def-unix-error ENOEXEC 8 _N\"Exec format error\")\n\
-(def-unix-error EBADF 9 _N\"Bad file descriptor\")\n\
-(def-unix-error ECHILD 10 _N\"No child process\")\n\
-)\n\
-#+bsd(def-unix-error EDEADLK 11 _N\"Resource deadlock avoided\")\n\
-#-bsd(def-unix-error EAGAIN 11 #-linux _N\"No more processes\" #+linux _N\"Try again\")\n\
-#-linux\n\
-(progn\n\
-(def-unix-error ENOMEM 12 _N\"Out of memory\")\n\
-(def-unix-error EACCES 13 _N\"Permission denied\")\n\
-(def-unix-error EFAULT 14 _N\"Bad address\")\n\
-(def-unix-error ENOTBLK 15 _N\"Block device required\")\n\
-(def-unix-error EBUSY 16 _N\"Device or resource busy\")\n\
-(def-unix-error EEXIST 17 _N\"File exists\")\n\
-(def-unix-error EXDEV 18 _N\"Cross-device link\")\n\
-(def-unix-error ENODEV 19 _N\"No such device\")\n\
-(def-unix-error ENOTDIR 20 _N\"Not a director\")\n\
-(def-unix-error EISDIR 21 _N\"Is a directory\")\n\
-(def-unix-error EINVAL 22 _N\"Invalid argument\")\n\
-(def-unix-error ENFILE 23 _N\"File table overflow\")\n\
-(def-unix-error EMFILE 24 _N\"Too many open files\")\n\
-(def-unix-error ENOTTY 25 _N\"Inappropriate ioctl for device\")\n\
-(def-unix-error ETXTBSY 26 _N\"Text file busy\")\n\
-(def-unix-error EFBIG 27 _N\"File too large\")\n\
-(def-unix-error ENOSPC 28 _N\"No space left on device\")\n\
-(def-unix-error ESPIPE 29 _N\"Illegal seek\")\n\
-(def-unix-error EROFS 30 _N\"Read-only file system\")\n\
-(def-unix-error EMLINK 31 _N\"Too many links\")\n\
-(def-unix-error EPIPE 32 _N\"Broken pipe\")\n\
-;;; \n\
-;;; Math\n\
-(def-unix-error EDOM 33 _N\"Numerical argument out of domain\")\n\
-(def-unix-error ERANGE 34 #-linux _N\"Result too large\" #+linux _N\"Math result not representable\")\n\
-)\n\
-;;; \n\
-#-(or linux svr4)\n\
-(progn\n\
-;;; non-blocking and interrupt i/o\n\
-(def-unix-error EWOULDBLOCK 35 _N\"Operation would block\")\n\
-#-bsd(def-unix-error EDEADLK 35 _N\"Operation would block\") ; Ditto\n\
-#+bsd(def-unix-error EAGAIN 35 _N\"Resource temporarily unavailable\")\n\
-(def-unix-error EINPROGRESS 36 _N\"Operation now in progress\")\n\
-(def-unix-error EALREADY 37 _N\"Operation already in progress\")\n\
-;;;\n\
-;;; ipc/network software\n\
-(def-unix-error ENOTSOCK 38 _N\"Socket operation on non-socket\")\n\
-(def-unix-error EDESTADDRREQ 39 _N\"Destination address required\")\n\
-(def-unix-error EMSGSIZE 40 _N\"Message too long\")\n\
-(def-unix-error EPROTOTYPE 41 _N\"Protocol wrong type for socket\")\n\
-(def-unix-error ENOPROTOOPT 42 _N\"Protocol not available\")\n\
-(def-unix-error EPROTONOSUPPORT 43 _N\"Protocol not supported\")\n\
-(def-unix-error ESOCKTNOSUPPORT 44 _N\"Socket type not supported\")\n\
-(def-unix-error EOPNOTSUPP 45 _N\"Operation not supported on socket\")\n\
-(def-unix-error EPFNOSUPPORT 46 _N\"Protocol family not supported\")\n\
-(def-unix-error EAFNOSUPPORT 47 _N\"Address family not supported by protocol family\")\n\
-(def-unix-error EADDRINUSE 48 _N\"Address already in use\")\n\
-(def-unix-error EADDRNOTAVAIL 49 _N\"Can't assign requested address\")\n\
-;;;\n\
-;;; operational errors\n\
-(def-unix-error ENETDOWN 50 _N\"Network is down\")\n\
-(def-unix-error ENETUNREACH 51 _N\"Network is unreachable\")\n\
-(def-unix-error ENETRESET 52 _N\"Network dropped connection on reset\")\n\
-(def-unix-error ECONNABORTED 53 _N\"Software caused connection abort\")\n\
-(def-unix-error ECONNRESET 54 _N\"Connection reset by peer\")\n\
-(def-unix-error ENOBUFS 55 _N\"No buffer space available\")\n\
-(def-unix-error EISCONN 56 _N\"Socket is already connected\")\n\
-(def-unix-error ENOTCONN 57 _N\"Socket is not connected\")\n\
-(def-unix-error ESHUTDOWN 58 _N\"Can't send after socket shutdown\")\n\
-(def-unix-error ETOOMANYREFS 59 _N\"Too many references: can't splice\")\n\
-(def-unix-error ETIMEDOUT 60 _N\"Connection timed out\")\n\
-(def-unix-error ECONNREFUSED 61 _N\"Connection refused\")\n\
-;;; \n\
-(def-unix-error ELOOP 62 _N\"Too many levels of symbolic links\")\n\
-(def-unix-error ENAMETOOLONG 63 _N\"File name too long\")\n\
-;;; \n\
-(def-unix-error EHOSTDOWN 64 _N\"Host is down\")\n\
-(def-unix-error EHOSTUNREACH 65 _N\"No route to host\")\n\
-(def-unix-error ENOTEMPTY 66 _N\"Directory not empty\")\n\
-;;; \n\
-;;; quotas & resource \n\
-(def-unix-error EPROCLIM 67 _N\"Too many processes\")\n\
-(def-unix-error EUSERS 68 _N\"Too many users\")\n\
-(def-unix-error EDQUOT 69 _N\"Disc quota exceeded\")\n\
-;;;\n\
-;;; CMU RFS\n\
-(def-unix-error ELOCAL 126 _N\"namei should continue locally\")\n\
-(def-unix-error EREMOTE 127 _N\"namei was handled remotely\")\n\
-;;;\n\
-;;; VICE\n\
-(def-unix-error EVICEERR 70 _N\"Remote file system error _N\")\n\
-(def-unix-error EVICEOP 71 _N\"syscall was handled by Vice\")\n\
-)\n\
-#+svr4\n\
-(progn\n\
-(def-unix-error ENOMSG 35 _N\"No message of desired type\")\n\
-(def-unix-error EIDRM 36 _N\"Identifier removed\")\n\
-(def-unix-error ECHRNG 37 _N\"Channel number out of range\")\n\
-(def-unix-error EL2NSYNC 38 _N\"Level 2 not synchronized\")\n\
-(def-unix-error EL3HLT 39 _N\"Level 3 halted\")\n\
-(def-unix-error EL3RST 40 _N\"Level 3 reset\")\n\
-(def-unix-error ELNRNG 41 _N\"Link number out of range\")\n\
-(def-unix-error EUNATCH 42 _N\"Protocol driver not attached\")\n\
-(def-unix-error ENOCSI 43 _N\"No CSI structure available\")\n\
-(def-unix-error EL2HLT 44 _N\"Level 2 halted\")\n\
-(def-unix-error EDEADLK 45 _N\"Deadlock situation detected/avoided\")\n\
-(def-unix-error ENOLCK 46 _N\"No record locks available\")\n\
-(def-unix-error ECANCELED 47 _N\"Error 47\")\n\
-(def-unix-error ENOTSUP 48 _N\"Error 48\")\n\
-(def-unix-error EBADE 50 _N\"Bad exchange descriptor\")\n\
-(def-unix-error EBADR 51 _N\"Bad request descriptor\")\n\
-(def-unix-error EXFULL 52 _N\"Message tables full\")\n\
-(def-unix-error ENOANO 53 _N\"Anode table overflow\")\n\
-(def-unix-error EBADRQC 54 _N\"Bad request code\")\n\
-(def-unix-error EBADSLT 55 _N\"Invalid slot\")\n\
-(def-unix-error EDEADLOCK 56 _N\"File locking deadlock\")\n\
-(def-unix-error EBFONT 57 _N\"Bad font file format\")\n\
-(def-unix-error ENOSTR 60 _N\"Not a stream device\")\n\
-(def-unix-error ENODATA 61 _N\"No data available\")\n\
-(def-unix-error ETIME 62 _N\"Timer expired\")\n\
-(def-unix-error ENOSR 63 _N\"Out of stream resources\")\n\
-(def-unix-error ENONET 64 _N\"Machine is not on the network\")\n\
-(def-unix-error ENOPKG 65 _N\"Package not installed\")\n\
-(def-unix-error EREMOTE 66 _N\"Object is remote\")\n\
-(def-unix-error ENOLINK 67 _N\"Link has been severed\")\n\
-(def-unix-error EADV 68 _N\"Advertise error\")\n\
-(def-unix-error ESRMNT 69 _N\"Srmount error\")\n\
-(def-unix-error ECOMM 70 _N\"Communication error on send\")\n\
-(def-unix-error EPROTO 71 _N\"Protocol error\")\n\
-(def-unix-error EMULTIHOP 74 _N\"Multihop attempted\")\n\
-(def-unix-error EBADMSG 77 _N\"Not a data message\")\n\
-(def-unix-error ENAMETOOLONG 78 _N\"File name too long\")\n\
-(def-unix-error EOVERFLOW 79 _N\"Value too large for defined data type\")\n\
-(def-unix-error ENOTUNIQ 80 _N\"Name not unique on network\")\n\
-(def-unix-error EBADFD 81 _N\"File descriptor in bad state\")\n\
-(def-unix-error EREMCHG 82 _N\"Remote address changed\")\n\
-(def-unix-error ELIBACC 83 _N\"Can not access a needed shared library\")\n\
-(def-unix-error ELIBBAD 84 _N\"Accessing a corrupted shared library\")\n\
-(def-unix-error ELIBSCN 85 _N\".lib section in a.out corrupted\")\n\
-(def-unix-error ELIBMAX 86 _N\"Attempting to link in more shared libraries than system limit\")\n\
-(def-unix-error ELIBEXEC 87 _N\"Can not exec a shared library directly\")\n\
-(def-unix-error EILSEQ 88 _N\"Error 88\")\n\
-(def-unix-error ENOSYS 89 _N\"Operation not applicable\")\n\
-(def-unix-error ELOOP 90 _N\"Number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS\")\n\
-(def-unix-error ERESTART 91 _N\"Error 91\")\n\
-(def-unix-error ESTRPIPE 92 _N\"Error 92\")\n\
-(def-unix-error ENOTEMPTY 93 _N\"Directory not empty\")\n\
-(def-unix-error EUSERS 94 _N\"Too many users\")\n\
-(def-unix-error ENOTSOCK 95 _N\"Socket operation on non-socket\")\n\
-(def-unix-error EDESTADDRREQ 96 _N\"Destination address required\")\n\
-(def-unix-error EMSGSIZE 97 _N\"Message too long\")\n\
-(def-unix-error EPROTOTYPE 98 _N\"Protocol wrong type for socket\")\n\
-(def-unix-error ENOPROTOOPT 99 _N\"Option not supported by protocol\")\n\
-(def-unix-error EPROTONOSUPPORT 120 _N\"Protocol not supported\")\n\
-(def-unix-error ESOCKTNOSUPPORT 121 _N\"Socket type not supported\")\n\
-(def-unix-error EOPNOTSUPP 122 _N\"Operation not supported on transport endpoint\")\n\
-(def-unix-error EPFNOSUPPORT 123 _N\"Protocol family not supported\")\n\
-(def-unix-error EAFNOSUPPORT 124 _N\"Address family not supported by protocol family\")\n\
-(def-unix-error EADDRINUSE 125 _N\"Address already in use\")\n\
-(def-unix-error EADDRNOTAVAIL 126 _N\"Cannot assign requested address\")\n\
-(def-unix-error ENETDOWN 127 _N\"Network is down\")\n\
-(def-unix-error ENETUNREACH 128 _N\"Network is unreachable\")\n\
-(def-unix-error ENETRESET 129 _N\"Network dropped connection because of reset\")\n\
-(def-unix-error ECONNABORTED 130 _N\"Software caused connection abort\")\n\
-(def-unix-error ECONNRESET 131 _N\"Connection reset by peer\")\n\
-(def-unix-error ENOBUFS 132 _N\"No buffer space available\")\n\
-(def-unix-error EISCONN 133 _N\"Transport endpoint is already connected\")\n\
-(def-unix-error ENOTCONN 134 _N\"Transport endpoint is not connected\")\n\
-(def-unix-error ESHUTDOWN 143 _N\"Cannot send after socket shutdown\")\n\
-(def-unix-error ETOOMANYREFS 144 _N\"Too many references: cannot splice\")\n\
-(def-unix-error ETIMEDOUT 145 _N\"Connection timed out\")\n\
-(def-unix-error ECONNREFUSED 146 _N\"Connection refused\")\n\
-(def-unix-error EHOSTDOWN 147 _N\"Host is down\")\n\
-(def-unix-error EHOSTUNREACH 148 _N\"No route to host\")\n\
-(def-unix-error EWOULDBLOCK 11 _N\"Resource temporarily unavailable\")\n\
-(def-unix-error EALREADY 149 _N\"Operation already in progress\")\n\
-(def-unix-error EINPROGRESS 150 _N\"Operation now in progress\")\n\
-(def-unix-error ESTALE 151 _N\"Stale NFS file handle\")\n\
-)\n\
-";
-}
-
-/^#define[ \t]+(E[A-Z0-9]+)[ \t]+([A-Z0-9]+).*$/ {
- printf "(def-unix-error %s %s)\n", $2, $3;
-}
-
-END {
- print "\n\n;;;\n\
-;;; And now for something completely different ...\n\
-(emit-unix-errors)\n\
-"
-}
-
=====================================
bin/create-errno.sh
=====================================
@@ -0,0 +1,264 @@
+#! /bin/sh
+
+# Generates the contents of the file code/unix-errno.lisp. The args
+# to this script, if supplied, must be a list of files containing the
+# definitions of all the Unix errno values.
+#
+
+# The header was copied from code/unix.lisp. This includes all the
+# support code for DEF-UNIX-ERROR and for all OSes that don't use the
+# awk script to create the DEF-UNIX-ERROR forms.
+#
+cat <<EOF
+;;; -*- Package: UNIX -*-
+;;;
+;;; **********************************************************************
+;;; This code was written as part of the CMU Common Lisp project at
+;;; Carnegie Mellon University, and has been placed in the public domain.
+;;;
+(ext:file-comment
+ "$Header: src/code/unix-errno.lisp $")
+;;;
+;;; **********************************************************************
+;;;
+;;; This file contains the UNIX low-level support, just enough to run
+;;; CMUCL.
+;;;
+(in-package "UNIX")
+(intl:textdomain "cmucl-unix")
+
+;;;; Errno stuff.
+(eval-when (compile eval)
+
+(defparameter *compiler-unix-errors* nil)
+
+(defmacro def-unix-error (name number &optional description)
+ "Define a constant named Name corresponding to the Unix errno value
+ Number. A description of the errno is optional in Description."
+ \`(progn
+ (eval-when (compile eval)
+ (push (cons ,number ,description) *compiler-unix-errors*))
+ (defconstant ,name ,number ,description)
+ (export ',name)))
+
+(defmacro emit-unix-errors ()
+ (let* ((max (apply #'max (mapcar #'car *compiler-unix-errors*)))
+ (array (make-array (1+ max) :initial-element nil)))
+ (dolist (error *compiler-unix-errors*)
+ (setf (svref array (car error)) (cdr error)))
+ \`(progn
+ (defvar *unix-errors* ',array)
+ (declaim (simple-vector *unix-errors*)))))
+
+) ;eval-when
+
+;;;
+;;; From <errno.h>
+;;;
+(def-unix-error ESUCCESS 0 _N"Successful")
+#-linux
+(progn
+(def-unix-error EPERM 1 _N"Operation not permitted")
+(def-unix-error ENOENT 2 _N"No such file or directory")
+(def-unix-error ESRCH 3 _N"No such process")
+(def-unix-error EINTR 4 _N"Interrupted system call")
+(def-unix-error EIO 5 _N"I/O error")
+(def-unix-error ENXIO 6 _N"Device not configured")
+(def-unix-error E2BIG 7 _N"Arg list too long")
+(def-unix-error ENOEXEC 8 _N"Exec format error")
+(def-unix-error EBADF 9 _N"Bad file descriptor")
+(def-unix-error ECHILD 10 _N"No child process")
+)
+#+bsd(def-unix-error EDEADLK 11 _N"Resource deadlock avoided")
+#-(or bsd linux) (def-unix-error EAGAIN 11 #-linux _N"No more processes" #+linux _N"Try again")
+#-linux
+(progn
+(def-unix-error ENOMEM 12 _N"Out of memory")
+(def-unix-error EACCES 13 _N"Permission denied")
+(def-unix-error EFAULT 14 _N"Bad address")
+(def-unix-error ENOTBLK 15 _N"Block device required")
+(def-unix-error EBUSY 16 _N"Device or resource busy")
+(def-unix-error EEXIST 17 _N"File exists")
+(def-unix-error EXDEV 18 _N"Cross-device link")
+(def-unix-error ENODEV 19 _N"No such device")
+(def-unix-error ENOTDIR 20 _N"Not a director")
+(def-unix-error EISDIR 21 _N"Is a directory")
+(def-unix-error EINVAL 22 _N"Invalid argument")
+(def-unix-error ENFILE 23 _N"File table overflow")
+(def-unix-error EMFILE 24 _N"Too many open files")
+(def-unix-error ENOTTY 25 _N"Inappropriate ioctl for device")
+(def-unix-error ETXTBSY 26 _N"Text file busy")
+(def-unix-error EFBIG 27 _N"File too large")
+(def-unix-error ENOSPC 28 _N"No space left on device")
+(def-unix-error ESPIPE 29 _N"Illegal seek")
+(def-unix-error EROFS 30 _N"Read-only file system")
+(def-unix-error EMLINK 31 _N"Too many links")
+(def-unix-error EPIPE 32 _N"Broken pipe")
+;;;
+;;; Math
+(def-unix-error EDOM 33 _N"Numerical argument out of domain")
+(def-unix-error ERANGE 34 #-linux _N"Result too large" #+linux _N"Math result not representable")
+)
+;;;
+#-(or linux svr4)
+(progn
+;;; non-blocking and interrupt i/o
+(def-unix-error EWOULDBLOCK 35 _N"Operation would block")
+#-bsd(def-unix-error EDEADLK 35 _N"Operation would block") ; Ditto
+#+bsd(def-unix-error EAGAIN 35 _N"Resource temporarily unavailable")
+(def-unix-error EINPROGRESS 36 _N"Operation now in progress")
+(def-unix-error EALREADY 37 _N"Operation already in progress")
+;;;
+;;; ipc/network software
+(def-unix-error ENOTSOCK 38 _N"Socket operation on non-socket")
+(def-unix-error EDESTADDRREQ 39 _N"Destination address required")
+(def-unix-error EMSGSIZE 40 _N"Message too long")
+(def-unix-error EPROTOTYPE 41 _N"Protocol wrong type for socket")
+(def-unix-error ENOPROTOOPT 42 _N"Protocol not available")
+(def-unix-error EPROTONOSUPPORT 43 _N"Protocol not supported")
+(def-unix-error ESOCKTNOSUPPORT 44 _N"Socket type not supported")
+(def-unix-error EOPNOTSUPP 45 _N"Operation not supported on socket")
+(def-unix-error EPFNOSUPPORT 46 _N"Protocol family not supported")
+(def-unix-error EAFNOSUPPORT 47 _N"Address family not supported by protocol family")
+(def-unix-error EADDRINUSE 48 _N"Address already in use")
+(def-unix-error EADDRNOTAVAIL 49 _N"Can't assign requested address")
+;;;
+;;; operational errors
+(def-unix-error ENETDOWN 50 _N"Network is down")
+(def-unix-error ENETUNREACH 51 _N"Network is unreachable")
+(def-unix-error ENETRESET 52 _N"Network dropped connection on reset")
+(def-unix-error ECONNABORTED 53 _N"Software caused connection abort")
+(def-unix-error ECONNRESET 54 _N"Connection reset by peer")
+(def-unix-error ENOBUFS 55 _N"No buffer space available")
+(def-unix-error EISCONN 56 _N"Socket is already connected")
+(def-unix-error ENOTCONN 57 _N"Socket is not connected")
+(def-unix-error ESHUTDOWN 58 _N"Can't send after socket shutdown")
+(def-unix-error ETOOMANYREFS 59 _N"Too many references: can't splice")
+(def-unix-error ETIMEDOUT 60 _N"Connection timed out")
+(def-unix-error ECONNREFUSED 61 _N"Connection refused")
+;;;
+(def-unix-error ELOOP 62 _N"Too many levels of symbolic links")
+(def-unix-error ENAMETOOLONG 63 _N"File name too long")
+;;;
+(def-unix-error EHOSTDOWN 64 _N"Host is down")
+(def-unix-error EHOSTUNREACH 65 _N"No route to host")
+(def-unix-error ENOTEMPTY 66 _N"Directory not empty")
+;;;
+;;; quotas & resource
+(def-unix-error EPROCLIM 67 _N"Too many processes")
+(def-unix-error EUSERS 68 _N"Too many users")
+(def-unix-error EDQUOT 69 _N"Disc quota exceeded")
+;;;
+;;; CMU RFS
+(def-unix-error ELOCAL 126 _N"namei should continue locally")
+(def-unix-error EREMOTE 127 _N"namei was handled remotely")
+;;;
+;;; VICE
+(def-unix-error EVICEERR 70 _N"Remote file system error _N")
+(def-unix-error EVICEOP 71 _N"syscall was handled by Vice")
+)
+#+svr4
+(progn
+(def-unix-error ENOMSG 35 _N"No message of desired type")
+(def-unix-error EIDRM 36 _N"Identifier removed")
+(def-unix-error ECHRNG 37 _N"Channel number out of range")
+(def-unix-error EL2NSYNC 38 _N"Level 2 not synchronized")
+(def-unix-error EL3HLT 39 _N"Level 3 halted")
+(def-unix-error EL3RST 40 _N"Level 3 reset")
+(def-unix-error ELNRNG 41 _N"Link number out of range")
+(def-unix-error EUNATCH 42 _N"Protocol driver not attached")
+(def-unix-error ENOCSI 43 _N"No CSI structure available")
+(def-unix-error EL2HLT 44 _N"Level 2 halted")
+(def-unix-error EDEADLK 45 _N"Deadlock situation detected/avoided")
+(def-unix-error ENOLCK 46 _N"No record locks available")
+(def-unix-error ECANCELED 47 _N"Error 47")
+(def-unix-error ENOTSUP 48 _N"Error 48")
+(def-unix-error EBADE 50 _N"Bad exchange descriptor")
+(def-unix-error EBADR 51 _N"Bad request descriptor")
+(def-unix-error EXFULL 52 _N"Message tables full")
+(def-unix-error ENOANO 53 _N"Anode table overflow")
+(def-unix-error EBADRQC 54 _N"Bad request code")
+(def-unix-error EBADSLT 55 _N"Invalid slot")
+(def-unix-error EDEADLOCK 56 _N"File locking deadlock")
+(def-unix-error EBFONT 57 _N"Bad font file format")
+(def-unix-error ENOSTR 60 _N"Not a stream device")
+(def-unix-error ENODATA 61 _N"No data available")
+(def-unix-error ETIME 62 _N"Timer expired")
+(def-unix-error ENOSR 63 _N"Out of stream resources")
+(def-unix-error ENONET 64 _N"Machine is not on the network")
+(def-unix-error ENOPKG 65 _N"Package not installed")
+(def-unix-error EREMOTE 66 _N"Object is remote")
+(def-unix-error ENOLINK 67 _N"Link has been severed")
+(def-unix-error EADV 68 _N"Advertise error")
+(def-unix-error ESRMNT 69 _N"Srmount error")
+(def-unix-error ECOMM 70 _N"Communication error on send")
+(def-unix-error EPROTO 71 _N"Protocol error")
+(def-unix-error EMULTIHOP 74 _N"Multihop attempted")
+(def-unix-error EBADMSG 77 _N"Not a data message")
+(def-unix-error ENAMETOOLONG 78 _N"File name too long")
+(def-unix-error EOVERFLOW 79 _N"Value too large for defined data type")
+(def-unix-error ENOTUNIQ 80 _N"Name not unique on network")
+(def-unix-error EBADFD 81 _N"File descriptor in bad state")
+(def-unix-error EREMCHG 82 _N"Remote address changed")
+(def-unix-error ELIBACC 83 _N"Can not access a needed shared library")
+(def-unix-error ELIBBAD 84 _N"Accessing a corrupted shared library")
+(def-unix-error ELIBSCN 85 _N".lib section in a.out corrupted")
+(def-unix-error ELIBMAX 86 _N"Attempting to link in more shared libraries than system limit")
+(def-unix-error ELIBEXEC 87 _N"Can not exec a shared library directly")
+(def-unix-error EILSEQ 88 _N"Error 88")
+(def-unix-error ENOSYS 89 _N"Operation not applicable")
+(def-unix-error ELOOP 90 _N"Number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS")
+(def-unix-error ERESTART 91 _N"Error 91")
+(def-unix-error ESTRPIPE 92 _N"Error 92")
+(def-unix-error ENOTEMPTY 93 _N"Directory not empty")
+(def-unix-error EUSERS 94 _N"Too many users")
+(def-unix-error ENOTSOCK 95 _N"Socket operation on non-socket")
+(def-unix-error EDESTADDRREQ 96 _N"Destination address required")
+(def-unix-error EMSGSIZE 97 _N"Message too long")
+(def-unix-error EPROTOTYPE 98 _N"Protocol wrong type for socket")
+(def-unix-error ENOPROTOOPT 99 _N"Option not supported by protocol")
+(def-unix-error EPROTONOSUPPORT 120 _N"Protocol not supported")
+(def-unix-error ESOCKTNOSUPPORT 121 _N"Socket type not supported")
+(def-unix-error EOPNOTSUPP 122 _N"Operation not supported on transport endpoint")
+(def-unix-error EPFNOSUPPORT 123 _N"Protocol family not supported")
+(def-unix-error EAFNOSUPPORT 124 _N"Address family not supported by protocol family")
+(def-unix-error EADDRINUSE 125 _N"Address already in use")
+(def-unix-error EADDRNOTAVAIL 126 _N"Cannot assign requested address")
+(def-unix-error ENETDOWN 127 _N"Network is down")
+(def-unix-error ENETUNREACH 128 _N"Network is unreachable")
+(def-unix-error ENETRESET 129 _N"Network dropped connection because of reset")
+(def-unix-error ECONNABORTED 130 _N"Software caused connection abort")
+(def-unix-error ECONNRESET 131 _N"Connection reset by peer")
+(def-unix-error ENOBUFS 132 _N"No buffer space available")
+(def-unix-error EISCONN 133 _N"Transport endpoint is already connected")
+(def-unix-error ENOTCONN 134 _N"Transport endpoint is not connected")
+(def-unix-error ESHUTDOWN 143 _N"Cannot send after socket shutdown")
+(def-unix-error ETOOMANYREFS 144 _N"Too many references: cannot splice")
+(def-unix-error ETIMEDOUT 145 _N"Connection timed out")
+(def-unix-error ECONNREFUSED 146 _N"Connection refused")
+(def-unix-error EHOSTDOWN 147 _N"Host is down")
+(def-unix-error EHOSTUNREACH 148 _N"No route to host")
+(def-unix-error EWOULDBLOCK 11 _N"Resource temporarily unavailable")
+(def-unix-error EALREADY 149 _N"Operation already in progress")
+(def-unix-error EINPROGRESS 150 _N"Operation now in progress")
+(def-unix-error ESTALE 151 _N"Stale NFS file handle")
+)
+
+;;; Auto-generated forms, if any.
+EOF
+
+# Create appropriate DEF-UNIX-ERROR forms by reading header files
+# containing the C definitions.
+awk '/^#define[ \t]+(E[A-Z0-9]+)[ \t]+([A-Z0-9]+).*$/ {
+ printf "(def-unix-error %s %s)\n", $2, $3;
+}' "$@"
+
+# The tail was also copied from code/unix.lisp. It's needed to tell
+# Lisp about the errno values.
+cat <<EOF
+;;; End auto-generated forms, if any.
+
+;;;
+;;; And now for something completely different ...
+(emit-unix-errors)
+EOF
=====================================
bin/cross-build-world.sh
=====================================
@@ -90,7 +90,8 @@ case `uname -s` in
;;
esac
-awk -f bin/create-errno.awk ${ERRNO_FILES} > src/code/unix-errno.lisp
+#awk -f bin/create-errno.awk ${ERRNO_FILES} > src/code/unix-errno.lisp
+bin/create-errno.sh ${ERRNO_FILES} > src/code/unix-errno.lisp
echo cross boot = $CROSSBOOT
$LISP "$@" -noinit -nositeinit <<EOF
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/a6792e5033f63c9688e0fd…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/a6792e5033f63c9688e0fd…
You're receiving this email because of your account on gitlab.common-lisp.net.
1
0