diff options
| author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-04-24 21:25:31 -0300 |
|---|---|---|
| committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-07-07 14:10:58 -0300 |
| commit | f13d260190d47bd38c0ae939080001e7bb58bd04 (patch) | |
| tree | b64784f84e80dd326419c079852b1988d84ae8e5 /sysdeps/gnu | |
| parent | b1ccfc061feee9ce616444ded8e1cd5acf9fa97f (diff) | |
| download | glibc-f13d260190d47bd38c0ae939080001e7bb58bd04.tar.xz glibc-f13d260190d47bd38c0ae939080001e7bb58bd04.zip | |
signal: Move sys_errlist to a compat symbol
The symbol is deprecated by strerror since its usage imposes some issues
such as copy relocations.
Its internal name is also changed to _sys_errlist_internal to avoid
static linking usage. The compat code is also refactored by removing
the over enginered errlist-compat.c generation from manual entried and
extra comment token in linker script file. It disantangle the code
generation from manual and simplify both Linux and Hurd compat code.
The definitions from errlist.c are moved to errlist.h and a new test
is added to avoid a new errno entry without an associated one in manual.
Checked on x86_64-linux-gnu and i686-linux-gnu. I also run a check-abi
on all affected platforms.
Tested-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/gnu')
| -rw-r--r-- | sysdeps/gnu/Makefile | 43 | ||||
| -rw-r--r-- | sysdeps/gnu/errlist-compat.awk | 133 | ||||
| -rw-r--r-- | sysdeps/gnu/errlist.awk | 110 | ||||
| -rw-r--r-- | sysdeps/gnu/errlist.c | 1495 | ||||
| -rw-r--r-- | sysdeps/gnu/errlist.h | 799 |
5 files changed, 799 insertions, 1781 deletions
diff --git a/sysdeps/gnu/Makefile b/sysdeps/gnu/Makefile index 97fcb6fb90..9cf34c8ac6 100644 --- a/sysdeps/gnu/Makefile +++ b/sysdeps/gnu/Makefile @@ -15,49 +15,6 @@ # License along with the GNU C Library; if not, see # <https://www.gnu.org/licenses/>. -# Generate the list of strings for errno codes from the section of the -# manual which documents the codes. - -$(..)sysdeps/gnu/errlist.c: $(..)sysdeps/gnu/errlist.awk \ - $(..)manual/errno.texi - $(AWK) -f $^ > $@-tmp -# Make it unwritable so noone will edit it by mistake. - -chmod a-w $@-tmp - mv -f $@-tmp $@ - -ifeq ($(subdir),stdio-common) - -errlist-c = $(firstword $(wildcard $(addsuffix /errlist.c,$(sysdirs) .))) - -libof-errlist-compat = extramodules - -ifeq ($(build-shared),yes) -$(objpfx)errlist-compat.c: $(errlist-c) $(..)sysdeps/gnu/errlist-compat.awk \ - $(common-objpfx)Versions.v.i $(before-compile) -else -$(objpfx)errlist-compat.c: $(errlist-c) $(..)sysdeps/gnu/errlist-compat.awk \ - $(before-compile) -endif - $(make-target-directory) - $(AWK) -v maxerr=`\ - $(CC) -S $(CPPFLAGS) $(CFLAGS) -DEMIT_ERR_MAX $< -o - \ - | sed -n 's/^.*@@@[^0-9]*\([0-9]*\)[^0-9]*@@@.*$$/\1/p'` \ - -f $(..)sysdeps/gnu/errlist-compat.awk \ - $(wildcard $(sysdirs:=/Versions)) > $@T -# Make it unwritable so noone will edit it by mistake. - -chmod a-w $@T - mv -f $@T $@ -$(objpfx)errlist-compat.h: $(objpfx)errlist-compat.c - sed -n '1p;/ERR_MAX/p' $< > $@T - -chmod a-w $@T - mv -f $@T $@ -generated += errlist-compat.c errlist-compat.h - -# This will force the generation above to happy if need be. -$(foreach o,$(object-suffixes) $(object-suffixes:=.d),\ - $(objpfx)errlist$o): $(objpfx)errlist-compat.h -endif - ifeq ($(subdir),login) sysdep_routines += setutxent getutxent endutxent getutxid getutxline \ pututxline utmpxname updwtmpx getutmpx getutmp diff --git a/sysdeps/gnu/errlist-compat.awk b/sysdeps/gnu/errlist-compat.awk deleted file mode 100644 index 07334c63d8..0000000000 --- a/sysdeps/gnu/errlist-compat.awk +++ /dev/null @@ -1,133 +0,0 @@ -# awk script to generate errlist-compat.c -# Copyright (C) 2002-2020 Free Software Foundation, Inc. -# This file is part of the GNU C Library. - -# The GNU C Library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. - -# The GNU C Library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. - -# You should have received a copy of the GNU Lesser General Public -# License along with the GNU C Library; if not, see -# <https://www.gnu.org/licenses/>. - -# -# This script takes the Versions file as input and looks for #errlist-compat -# magic comments, which have the form: -# #errlist-compat NNN -# where NNN is the number of elements in the sys_errlist for that version set. -# We need the awk variable `maxerr' defined to the current size of sys_errlist. -# -# If there is no magic comment matching the current size, we barf. -# Otherwise we generate code (errlist-compat.c) to define all the -# necessary compatibility symbols for older, smaller versions of sys_errlist. -# - -# These two rules catch the Versions file contents. -NF == 2 && $2 == "{" { last_version = $1; next } -$1 == "#errlist-compat" { - # Don't process any further Versions files - ARGC = ARGIND + 1; - cnt = $2 + 0; - if (cnt < 80) { - print "*** this line seems bogus:", $0 > "/dev/stderr"; - exit 1; - } - version[pos + 0] = cnt SUBSEP last_version; - pos++; - if (cnt < highest) { - printf "*** %s #errlist-compat counts are not sorted\n", ARGV[ARGIND]; - exit 1; - } - if (cnt > highest) - highest = cnt; - highest_version = last_version; - next; -} - -END { - if (! highest_version) { - print "/* No sys_errlist/sys_nerr symbols defined on this platform. */"; - exit 0; - } - - count = maxerr + 1; - - if (highest < count) { - printf "*** errlist.c count %d vs Versions sys_errlist@%s count %d\n", \ - count, highest_version, highest > "/dev/stderr"; - exit 1; - } - - lastv = ""; - for (n = 0; n < pos; ++n) { - split(version[n], t, SUBSEP) - v = t[2]; - gsub(/[^A-Z0-9_]/, "_", v); - if (lastv != "") - compat[lastv] = v; - lastv = v; - vcount[v] = t[1]; - } - - print "/* This file was generated by errlist-compat.awk; DO NOT EDIT! */\n"; - print "#include <shlib-compat.h>\n"; - - if (highest > count) { - printf "*** errlist.c count %d inflated to %s count %d (old errno.h?)\n", \ - count, highest_version, highest > "/dev/stderr"; - printf "#define ERR_MAX %d\n\n", highest - 1; - } - - # same regardless of awk's ordering of the associative array. - num_compat_elems = asorti(compat, compat_indices) - for (i = 1; i <= num_compat_elems; i++) { - old = compat_indices[i] - new = compat[old]; - n = vcount[old]; - printf "#if SHLIB_COMPAT (libc, %s, %s)\n", old, new; - printf "# include <bits/wordsize.h>\n"; - printf "extern const char *const __sys_errlist_%s[NERR];\n", old; - printf "const int __sys_nerr_%s = %d;\n", old, n; - printf "declare_symbol_alias (__sys_errlist_%s, _sys_errlist_internal,", \ - old; - printf " object, __WORDSIZE/8*%d)\n", n; - printf "compat_symbol (libc, __sys_errlist_%s, sys_errlist, %s);\n", \ - old, old; - printf "compat_symbol (libc, __sys_nerr_%s, sys_nerr, %s);\n", old, old; - - printf "extern const char *const ___sys_errlist_%s[NERR];\n", old; - printf "extern const int __sys_nerr_%s;\n", old; - printf "declare_symbol_alias (___sys_errlist_%s, _sys_errlist_internal,", \ - old; - printf " object, __WORDSIZE/8*%d)\n", n; - printf "strong_alias (__sys_nerr_%s, ___sys_nerr_%s)\n", old, old; - printf "compat_symbol (libc, ___sys_errlist_%s, _sys_errlist, %s);\n", \ - old, old; - printf "compat_symbol (libc, ___sys_nerr_%s, _sys_nerr, %s);\n", old, old; - printf "#endif\n\n"; - } - - printf "\ -extern const char *const __sys_errlist_internal[NERR];\n\ -extern const int __sys_nerr_internal;\n\ -strong_alias (_sys_errlist_internal, __sys_errlist_internal)\n\ -strong_alias (_sys_nerr_internal, __sys_nerr_internal)\n\ -extern const char *const sys_errlist[NERR];\n\ -versioned_symbol (libc, _sys_errlist_internal, sys_errlist, %s);\n\ -versioned_symbol (libc, __sys_errlist_internal, _sys_errlist, %s);\n\ -versioned_symbol (libc, _sys_nerr_internal, sys_nerr, %s);\n\ -versioned_symbol (libc, __sys_nerr_internal, _sys_nerr, %s);\n", \ - lastv, lastv, lastv, lastv; - - print "\n\ -link_warning (sys_errlist, \"\ -`sys_errlist' is deprecated; use `strerror' or `strerror_r' instead\")\n\ -link_warning (sys_nerr, \"\ -`sys_nerr' is deprecated; use `strerror' or `strerror_r' instead\")"; -} diff --git a/sysdeps/gnu/errlist.awk b/sysdeps/gnu/errlist.awk deleted file mode 100644 index 09f80f5b44..0000000000 --- a/sysdeps/gnu/errlist.awk +++ /dev/null @@ -1,110 +0,0 @@ -# Copyright (C) 1991-2020 Free Software Foundation, Inc. -# This file is part of the GNU C Library. - -# The GNU C Library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. - -# The GNU C Library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. - -# You should have received a copy of the GNU Lesser General Public -# License along with the GNU C Library; if not, see -# <https://www.gnu.org/licenses/>. - -# errno.texi contains lines like: -# @deftypevr Macro int ENOSYS -# @errno{ENOSYS, 78, Function not implemented} -# Descriptive paragraph... -# @end deftypevr - -BEGIN { - - # Here we list the E* names that might be duplicate names for the - # same integer value on some systems. This causes the code below - # to generate ``#if defined (ALIAS) && ALIAS != ORIGINAL'' in the code, - # so the output does not presume that these are in fact aliases. - # We list here all the known potential cases on any system, - # so that the C source we produce will do the right thing based - # on the actual #define'd values it's compiled with. - alias["EWOULDBLOCK"]= "EAGAIN"; - alias["EDEADLOCK"] = "EDEADLK"; - alias["ENOTSUP"] = "EOPNOTSUPP"; - - print "/* This file is generated from errno.texi by errlist.awk. */" - print ""; - print "#include <errno.h>"; - print "#include <libintl.h>"; - print ""; - print "#ifndef ERR_REMAP"; - print "# define ERR_REMAP(n) n"; - print "#endif"; - print ""; - - print "#if !defined EMIT_ERR_MAX && !defined ERRLIST_NO_COMPAT"; - print "# include <errlist-compat.h>"; - print "#endif"; - print "#ifdef ERR_MAX"; - print "# define ERRLIST_SIZE ERR_MAX + 1"; - print "#else" - print "# define ERR_MAX 0"; - print "# define ERRLIST_SIZE"; - print "#endif"; - - print "const char *const _sys_errlist_internal[ERRLIST_SIZE] ="; - print " {"; - print " [0] = N_(\"Success\")," - } - -/^@errno\{/ \ - { - etext = $3; - for (i = 4; i <= NF; ++i) - etext = etext " " $i; - etext = substr(etext, 1, length(etext)-1) - e = substr($1, 8, length($1)-8) - errno = substr($2, 1, length($2)-1) + 0 - if (alias[e]) - printf "#if defined (%s) && %s != %s\n", e, e, alias[e]; - else - printf "#ifdef %s\n", e; - errnoh = 4; - desc=""; - next; - } -errnoh == 4 && $1 == "@end" && $2 == "deftypevr" \ - { - printf "/*%s */\n", desc; - printf " [ERR_REMAP (%s)] = N_(\"%s\"),\n", e, etext; - printf "# if %s > ERR_MAX\n", e; - print "# undef ERR_MAX"; - printf "# define ERR_MAX %s\n", e; - print "# endif"; - print "#endif"; - errnoh = 0; - next; - } -errnoh == 4 \ - { - # This magic tag in C comments gets them copied into libc.pot. - desc = desc "\nTRANS" ($0 != "" ? " " : "") $0; next - } -END { - print " };"; - print ""; - print "#define NERR \\"; - print " (sizeof _sys_errlist_internal / sizeof _sys_errlist_internal [0])"; - print "const int _sys_nerr_internal = NERR;" - print ""; - print "#if IS_IN (libc) && !defined ERRLIST_NO_COMPAT"; - print "# include <errlist-compat.c>"; - print "#endif"; - print ""; - print "#ifdef EMIT_ERR_MAX"; - print "void dummy (void)" - print "{ asm volatile (\" @@@ %0 @@@ \" : : \"i\" (ERR_REMAP (ERR_MAX))); }" - print "#endif"; -} diff --git a/sysdeps/gnu/errlist.c b/sysdeps/gnu/errlist.c deleted file mode 100644 index 77577bf3e1..0000000000 --- a/sysdeps/gnu/errlist.c +++ /dev/null @@ -1,1495 +0,0 @@ -/* This file is generated from errno.texi by errlist.awk. */ - -#include <errno.h> -#include <libintl.h> - -#ifndef ERR_REMAP -# define ERR_REMAP(n) n -#endif - -#if !defined EMIT_ERR_MAX && !defined ERRLIST_NO_COMPAT -# include <errlist-compat.h> -#endif -#ifdef ERR_MAX -# define ERRLIST_SIZE ERR_MAX + 1 -#else -# define ERR_MAX 0 -# define ERRLIST_SIZE -#endif -const char *const _sys_errlist_internal[ERRLIST_SIZE] = - { - [0] = N_("Success"), -#ifdef EPERM -/* -TRANS Only the owner of the file (or other resource) -TRANS or processes with special privileges can perform the operation. */ - [ERR_REMAP (EPERM)] = N_("Operation not permitted"), -# if EPERM > ERR_MAX -# undef ERR_MAX -# define ERR_MAX EPERM -# endif -#endif -#ifdef ENOENT -/* -TRANS This is a ``file doesn't exist'' error -TRANS for ordinary files that are referenced in contexts where they are -TRANS expected to already exist. */ - [ERR_REMAP (ENOENT)] = N_("No such file or directory"), -# if ENOENT > ERR_MAX -# undef ERR_MAX -# define ERR_MAX ENOENT -# endif -#endif -#ifdef ESRCH -/* -TRANS No process matches the specified process ID. */ - [ERR_REMAP (ESRCH)] = N_("No such process"), -# if ESRCH > ERR_MAX -# undef ERR_MAX -# define ERR_MAX ESRCH -# endif -#endif -#ifdef EINTR -/* -TRANS An asynchronous signal occurred and prevented -TRANS completion of the call. When this happens, you should try the call -TRANS again. -TRANS -TRANS You can choose to have functions resume after a signal that is handled, -TRANS rather than failing with @code{EINTR}; see @ref{Interrupted -TRANS Primitives}. */ - [ERR_REMAP (EINTR)] = N_("Interrupted system call"), -# if EINTR > ERR_MAX -# undef ERR_MAX -# define ERR_MAX EINTR -# endif -#endif -#ifdef EIO -/* -TRANS Usually used for physical read or write errors. */ - [ERR_REMAP (EIO)] = N_("Input/output error"), -# if EIO > ERR_MAX -# undef ERR_MAX -# define ERR_MAX EIO -# endif -#endif -#ifdef ENXIO -/* -TRANS The system tried to use the device -TRANS represented by a file you specified, and it couldn't find the device. -TRANS This can mean that the device file was installed incorrectly, or that -TRANS the physical device is missing or not correctly attached to the -TRANS computer. */ - [ERR_REMAP (ENXIO)] = N_("No such device or address"), -# if ENXIO > ERR_MAX -# undef ERR_MAX -# define ERR_MAX ENXIO -# endif -#endif -#ifdef E2BIG -/* -TRANS Used when the arguments passed to a new program -TRANS being executed with one of the @code{exec} functions (@pxref{Executing a -TRANS File}) occupy too much memory space. This condition never arises on -TRANS @gnuhurdsystems{}. */ - [ERR_REMAP (E2BIG)] = N_("Argument list too long"), -# if E2BIG > ERR_MAX -# undef ERR_MAX -# define ERR_MAX E2BIG -# endif -#endif -#ifdef ENOEXEC -/* -TRANS Invalid executable file format. This condition is detected by the -TRANS @code{exec} functions; see @ref{Executing a File}. */ - [ERR_REMAP (ENOEXEC)] = N_("Exec format error"), -# if ENOEXEC > ERR_MAX -# undef ERR_MAX -# define ERR_MAX ENOEXEC -# endif -#endif -#ifdef EBADF -/* -TRANS For example, I/O on a descriptor that has been -TRANS closed or reading from a descriptor open only for writing (or vice -TRANS versa). */ - [ERR_REMAP (EBADF)] = N_("Bad file descriptor"), -# if EBADF > ERR_MAX -# undef ERR_MAX -# define ERR_MAX EBADF -# endif -#endif -#ifdef ECHILD -/* -TRANS This error happens on operations that are -TRANS supposed to manipulate child processes, when there aren't any processes -TRANS to manipulate. */ - [ERR_REMAP (ECHILD)] = N_("No child processes"), -# if ECHILD > ERR_MAX -# undef ERR_MAX -# define ERR_MAX ECHILD -# endif -#endif -#ifdef EDEADLK -/* -TRANS Allocating a system resource would have resulted in a -TRANS deadlock situation. The system does not guarantee that it will notice -TRANS all such situations. This error means you got lucky and the system -TRANS noticed; it might just hang. @xref{File Locks}, for an example. */ - [ERR_REMAP (EDEADLK)] = N_("Resource deadlock avoided"), -# if EDEADLK > ERR_MAX -# undef ERR_MAX -# define ERR_MAX EDEADLK -# endif -#endif -#ifdef ENOMEM -/* -TRANS The system cannot allocate more virtual memory -TRANS because its capacity is full. */ - [ERR_REMAP (ENOMEM)] = N_("Cannot allocate memory"), -# if ENOMEM > ERR_MAX -# undef ERR_MAX -# define ERR_MAX ENOMEM -# endif -#endif -#ifdef EACCES -/* -TRANS The file permissions do not allow the attempted operation. */ - [ERR_REMAP (EACCES)] = N_("Permission denied"), -# if EACCES > ERR_MAX -# undef ERR_MAX -# define ERR_MAX EACCES -# endif -#endif -#ifdef EFAULT -/* -TRANS An invalid pointer was detected. -TRANS On @gnuhurdsystems{}, this error never happens; you get a signal instead. */ - [ERR_REMAP (EFAULT)] = N_("Bad address"), -# if EFAULT > ERR_MAX -# undef ERR_MAX -# define ERR_MAX EFAULT -# endif -#endif -#ifdef ENOTBLK -/* -TRANS A file that isn't a block special file was given in a situation that -TRANS requires one. For example, trying to mount an ordinary file as a file -TRANS system in Unix gives this error. */ - [ERR_REMAP (ENOTBLK)] = N_("Block device required"), -# if ENOTBLK > ERR_MAX -# undef ERR_MAX -# define ERR_MAX ENOTBLK -# endif -#endif -#ifdef EBUSY -/* -TRANS A system resource that can't be shared is already in use. -TRANS For example, if you try to delete a file that is the root of a currently -TRANS mounted filesystem, you get this error. */ - [ERR_REMAP (EBUSY)] = N_("Device or resource busy"), -# if EBUSY > ERR_MAX -# undef ERR_MAX -# define ERR_MAX EBUSY -# endif -#endif -#ifdef EEXIST -/* -TRANS An existing file was specified in a context where it only -TRANS makes sense to specify a new file. */ - [ERR_REMAP (EEXIST)] = N_("File exists"), -# if EEXIST > ERR_MAX -# undef ERR_MAX -# define ERR_MAX EEXIST -# endif -#endif -#ifdef EXDEV -/* -TRANS An attempt to make an improper link across file systems was detected. -TRANS This happens not only when you use @code{link} (@pxref{Hard Links}) but -TRANS also when you rename a file with @code{rename} (@pxref{Renaming Files}). */ - [ERR_REMAP (EXDEV)] = N_("Invalid cross-device link"), -# if EXDEV > ERR_MAX -# undef ERR_MAX -# define ERR_MAX EXDEV -# endif -#endif -#ifdef ENODEV -/* -TRANS The wrong type of device was given to a function that expects a -TRANS particular sort of device. */ - [ERR_REMAP (ENODEV)] = N_("No such device"), -# if ENODEV > ERR_MAX -# undef ERR_MAX -# define ERR_MAX ENODEV -# endif -#endif -#ifdef ENOTDIR -/* -TRANS A file that isn't a directory was specified when a directory is required. */ - [ERR_REMAP (ENOTDIR)] = N_("Not a directory"), -# if ENOTDIR > ERR_MAX -# undef ERR_MAX -# define ERR_MAX ENOTDIR -# endif -#endif -#ifdef EISDIR -/* -TRANS You cannot open a directory for writing, -TRANS or create or remove hard links to it. */ - [ERR_REMAP (EISDIR)] = N_("Is a directory"), -# if EISDIR > ERR_MAX -# undef ERR_MAX -# define ERR_MAX EISDIR -# endif -#endif -#ifdef EINVAL -/* -TRANS This is used to indicate various kinds of problems -TRANS with passing the wrong argument to a library function. */ - [ERR_REMAP (EINVAL)] = N_("Invalid argument"), -# if EINVAL > ERR_MAX -# undef ERR_MAX -# define ERR_MAX EINVAL -# endif -#endif -#ifdef EMFILE -/* -TRANS The current process has too many files open and can't open any more. -TRANS Duplicate descriptors do count toward this limit. -TRANS -TRANS In BSD and GNU, the number of open files is controlled by a resource -TRANS limit that can usually be increased. If you get this error, you might -TRANS want to increase the @code{RLIMIT_NOFILE} limit or make it unlimited; -TRANS @pxref{Limits on Resources}. */ - [ERR_REMAP (EMFILE)] = N_("Too many open files"), -# if EMFILE > ERR_MAX -# undef ERR_MAX -# define ERR_MAX EMFILE -# endif -#endif -#ifdef ENFILE -/* -TRANS There are too many distinct file openings in the entire system. Note -TRANS that any number of linked channels count as just one file opening; see -TRANS @ref{Linked Channels}. This error never occurs on @gnuhurdsystems{}. */ - [ERR_REMAP (ENFILE)] = N_("Too many open files in system"), -# if ENFILE > ERR_MAX -# undef ERR_MAX -# define ERR_MAX ENFILE -# endif -#endif -#ifdef ENOTTY -/* -TRANS Inappropriate I/O control operation, such as trying to set terminal -TRANS modes on an ordinary file. */ - [ERR_REMAP (ENOTTY)] = N_("Inappropriate ioctl for device"), -# if ENOTTY > ERR_MAX -# undef ERR_MAX -# define ERR_MAX ENOTTY -# endif -#endif -#ifdef ETXTBSY -/* -TRANS An attempt to execute a file that is currently open for writing, or -TRANS write to a file that is currently being executed. Often using a -TRANS debugger to run a program is considered having it open for writing and -TRANS will cause this error. (The name stands for ``text file busy''.) This -TRANS is not an error on @gnuhurdsystems{}; the text is copied as necessary. */ - [ERR_REMAP (ETXTBSY)] = N_("Text file busy"), -# if ETXTBSY > ERR_MAX -# undef ERR_MAX -# define ERR_MAX ETXTBSY -# endif -#endif -#ifdef EFBIG -/* -TRANS The size of a file would be larger than allowed by the system. */ - [ERR_REMAP (EFBIG)] = N_("File too large"), -# if EFBIG > ERR_MAX -# undef ERR_MAX -# define ERR_MAX EFBIG -# endif -#endif -#ifdef ENOSPC -/* -TRANS Write operation on a file failed because the -TRANS disk is full. */ - [ERR_REMAP (ENOSPC)] = N_("No space left on device"), -# if ENOSPC > ERR_MAX -# undef ERR_MAX -# define ERR_MAX ENOSPC -# endif -#endif -#ifdef ESPIPE -/* -TRANS Invalid seek operation (such as on a pipe). */ - [ERR_REMAP (ESPIPE)] = N_("Illegal seek"), -# if ESPIPE > ERR_MAX -# undef ERR_MAX -# define ERR_MAX ESPIPE -# endif -#endif -#ifdef EROFS -/* -TRANS An attempt was made to modify something on a read-only file system. */ - [ERR_REMAP (EROFS)] = N_("Read-only file system"), -# if EROFS > ERR_MAX -# undef ERR_MAX -# define ERR_MAX EROFS -# endif -#endif -#ifdef EMLINK -/* -TRANS The link count of a single file would become too large. -TRANS @code{rename} can cause this error if the file being renamed already has -TRANS as many links as it can take (@pxref{Renaming Files}). */ - [ERR_REMAP (EMLINK)] = N_("Too many links"), -# if EMLINK > ERR_MAX -# undef ERR_MAX -# define ERR_MAX EMLINK -# endif -#endif - |
