bug#21114: [PATCH 1/4] Fix the rule to check for new signals and errors
* .gitignore (/libguile/*.NEW): New pattern. * libguile/Makefile.am (chknew-E chknew-SIG): Remove the line continuation after the targets, and include numbers in the recipe's signal/error regexp to catch names like E2BIG. --- This patch series makes a few updates to the generation of the lists of signal and error signals. This first one makes the chknew targets work again. GNU Make says there is no such target without this. .gitignore | 1 + libguile/Makefile.am | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 6375f2b..3a2f743 100644 --- a/.gitignore +++ b/.gitignore @@ -160,6 +160,7 @@ INSTALL /test-suite/standalone/test-scm-values /test-suite/standalone/test-scm-to-latin1-string /test-suite/standalone/test-scm-c-bind-keyword-arguments +/libguile/*.NEW /libguile/vm-operations.h /test-suite/standalone/test-foreign-object-c /test-suite/standalone/test-srfi-4 diff --git a/libguile/Makefile.am b/libguile/Makefile.am index 8302a18..dfa3be0 100644 --- a/libguile/Makefile.am +++ b/libguile/Makefile.am @@ -815,13 +815,13 @@ MKDEP = gcc -M -MG $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) # Write $(srcdir)/cpp-{E,SIG}.syms.NEW if there are any not-yet-seen # ("new" to us) E* or SIG* symbols in or , respectively. -chknew-E chknew-SIG: \ +chknew-E chknew-SIG: @bit=`echo $@ | sed s/^chknew-//` ; \ old="$(srcdir)/cpp-$$bit.syms" ;\ echo "#include <$${bit}.h>" \ | sed 's/E/errno/;s/SIG/signal/' \ | gcc -dM -E - \ -| sed 's/^#define //;/^'$$bit'[A-Z][A-Z]*/!d;s/ .*//' \ +| sed 's/^#define //;/^'$$bit'[0-9A-Z][0-9A-Z]*/!d;s/ .*//'\ | sort | diff -u $$old - | sed '1,2d;/^+/!d;s/^.//'\ > TMP ;\ if [ -s TMP ] ; then new="$$old.NEW" ; \ -- 2.1.0
bug#21115: [PATCH 2/4] Add new Linux error definitions
* libguile/cpp-E.syms (EHWPOISON, ERFKILL): New definitions. --- When I tested the changes on a Linux-based system, there were some new error definitions. This adds them to the list. libguile/cpp-E.syms | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libguile/cpp-E.syms b/libguile/cpp-E.syms index 3fbcbfe..3d3b0c3 100644 --- a/libguile/cpp-E.syms +++ b/libguile/cpp-E.syms @@ -33,6 +33,7 @@ EFAULT EFBIG EHOSTDOWN EHOSTUNREACH +EHWPOISON EIDRM EILSEQ EINPROGRESS @@ -112,6 +113,7 @@ EREMCHG EREMOTE EREMOTEIO ERESTART +ERFKILL EROFS ESHUTDOWN ESOCKTNOSUPPORT -- 2.1.0
bug#21116: [PATCH 3/4] Add Hurd signal and error definitions
* libguile/cpp-E.syms (EAUTH, EBACKGROUND): New definitions. (EBADRPC, ED, EDIED, EFTYPE, EGRATUITOUS, EGREGIOUS): Likewise. (EIEIO, ENEEDAUTH, EPROCLIM, EPROCUNAVAIL): Likewise. (EPROGMISMATCH, EPROGUNAVAIL, ERPCMISMATCH): Likewise. * libguile/cpp-SIG.syms (SIGEMT, SIGEV_MAX_SIZE): Likewise. (SIGEV_PAD_SIZE, SIGINFO, SIGLOST): Likewise. --- This adds all error and signal symbols found on Hurd. Their comments follow. #define EAUTH _HURD_ERRNO (80)/* Authentication error */ #define EBACKGROUND _HURD_ERRNO (100)/* Inappropriate operation for background process */ #define EBADRPC _HURD_ERRNO (72)/* RPC struct is bad */ #define ED _HURD_ERRNO (102)/* ? */ #define EDIED _HURD_ERRNO (101)/* Translator died */ #define EFTYPE _HURD_ERRNO (79)/* Inappropriate file type or format */ #define EGRATUITOUS _HURD_ERRNO (105)/* Gratuitous error */ #define EGREGIOUS _HURD_ERRNO (103)/* You really blew it this time */ #define EIEIO _HURD_ERRNO (104)/* Computer bought the farm */ #define ENEEDAUTH _HURD_ERRNO (81)/* Need authenticator */ #define EPROCLIM_HURD_ERRNO (67)/* Too many processes */ #define EPROCUNAVAIL_HURD_ERRNO (76)/* RPC bad procedure for program */ #define EPROGMISMATCH _HURD_ERRNO (75)/* RPC program version wrong */ #define EPROGUNAVAIL_HURD_ERRNO (74)/* RPC program not available */ #define ERPCMISMATCH_HURD_ERRNO (73)/* RPC version wrong */ #define SIGEMT 7 /* EMT trap (4.2 BSD). */ #define SIGINFO 29 /* Information request (4.4 BSD). */ #define SIGLOST 32 /* Resource lost (Sun); server died (GNU). */ /* Structure to transport application-defined values with signals. */ # define SIGEV_MAX_SIZE 64 # define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE / sizeof (int)) - 3) libguile/cpp-E.syms | 15 +++ libguile/cpp-SIG.syms | 5 + 2 files changed, 20 insertions(+) diff --git a/libguile/cpp-E.syms b/libguile/cpp-E.syms index 3d3b0c3..53302fe 100644 --- a/libguile/cpp-E.syms +++ b/libguile/cpp-E.syms @@ -6,11 +6,14 @@ EADV EAFNOSUPPORT EAGAIN EALREADY +EAUTH +EBACKGROUND EBADE EBADF EBADFD EBADMSG EBADR +EBADRPC EBADRQC EBADSLT EBFONT @@ -22,19 +25,25 @@ ECOMM ECONNABORTED ECONNREFUSED ECONNRESET +ED EDEADLK EDEADLOCK EDESTADDRREQ +EDIED EDOM EDOTDOT EDQUOT EEXIST EFAULT EFBIG +EFTYPE +EGRATUITOUS +EGREGIOUS EHOSTDOWN EHOSTUNREACH EHWPOISON EIDRM +EIEIO EILSEQ EINPROGRESS EINTR @@ -64,6 +73,7 @@ EMSGSIZE EMULTIHOP ENAMETOOLONG ENAVAIL +ENEEDAUTH ENETDOWN ENETRESET ENETUNREACH @@ -105,6 +115,10 @@ EOWNERDEAD EPERM EPFNOSUPPORT EPIPE +EPROCLIM +EPROCUNAVAIL +EPROGMISMATCH +EPROGUNAVAIL EPROTO EPROTONOSUPPORT EPROTOTYPE @@ -115,6 +129,7 @@ EREMOTEIO ERESTART ERFKILL EROFS +ERPCMISMATCH ESHUTDOWN ESOCKTNOSUPPORT ESPIPE diff --git a/libguile/cpp-SIG.syms b/libguile/cpp-SIG.syms index bc57376..2a619ce 100644 --- a/libguile/cpp-SIG.syms +++ b/libguile/cpp-SIG.syms @@ -5,17 +5,22 @@ SIGBUS SIGCHLD SIGCLD SIGCONT +SIGEMT +SIGEV_MAX_SIZE SIGEV_NONE +SIGEV_PAD_SIZE SIGEV_SIGNAL SIGEV_THREAD SIGEV_THREAD_ID SIGFPE SIGHUP SIGILL +SIGINFO SIGINT SIGIO SIGIOT SIGKILL +SIGLOST SIGPIPE SIGPOLL SIGPROF -- 2.1.0
bug#21117: [PATCH 4/4] Remove sigevent structure value definitions
* libguile/Makefile.am (chknew-E chknew-SIG): Anchor the end of the signal/error name pattern to only match alphanumeric symbols. * libguile/cpp-SIG.syms (SIGEV_MAX_SIZE, SIGEV_NONE): Remove. (SIGEV_PAD_SIZE, SIGEV_SIGNAL, SIGEV_THREAD): Likewise. (SIGEV_THREAD_ID): Likewise. --- I'm assuming those sigevent structure values weren't intended to have their definitions included with signals. This patch removes them and adds stricter name matching to the regexp. libguile/Makefile.am | 2 +- libguile/cpp-SIG.syms | 6 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/libguile/Makefile.am b/libguile/Makefile.am index dfa3be0..851799a 100644 --- a/libguile/Makefile.am +++ b/libguile/Makefile.am @@ -821,7 +821,7 @@ chknew-E chknew-SIG: echo "#include <$${bit}.h>" \ | sed 's/E/errno/;s/SIG/signal/' \ | gcc -dM -E - \ -| sed 's/^#define //;/^'$$bit'[0-9A-Z][0-9A-Z]*/!d;s/ .*//'\ +| sed 's/^#define //;/^'$$bit'[0-9A-Z][0-9A-Z]* /!d;s/ .*//' \ | sort | diff -u $$old - | sed '1,2d;/^+/!d;s/^.//'\ > TMP ;\ if [ -s TMP ] ; then new="$$old.NEW" ; \ diff --git a/libguile/cpp-SIG.syms b/libguile/cpp-SIG.syms index 2a619ce..728a294 100644 --- a/libguile/cpp-SIG.syms +++ b/libguile/cpp-SIG.syms @@ -6,12 +6,6 @@ SIGCHLD SIGCLD SIGCONT SIGEMT -SIGEV_MAX_SIZE -SIGEV_NONE -SIGEV_PAD_SIZE -SIGEV_SIGNAL -SIGEV_THREAD -SIGEV_THREAD_ID SIGFPE SIGHUP SIGILL -- 2.1.0