Raymond Toy pushed to branch issue-446-use-cc-to-get-errno at cmucl / cmucl Commits: 483dc418 by Raymond Toy at 2025-11-06T05:54:04-08:00 Apply 7 suggestion(s) to 3 file(s) Co-authored-by: Carl Shapiro <cshapiro@panix.com> - - - - - 3 changed files: - bin/create-errno.sh - bin/errno-default.lisp - src/code/exports.lisp Changes: ===================================== bin/create-errno.sh ===================================== @@ -82,24 +82,22 @@ fi find_errno () { - # Create appropriate DEF-UNIX-ERROR forms by reading header files + # Create appropriate DEFCONSTANT forms by reading the preprocessed output of errno.h # containing the C definitions. This version with cpp works on # Linux, Darwin, and Solaris (with Sun C) to dump the macros - # defined in errno.h. The results are sorted in descending - # numerical order so that aliases are at the end. Sorting is - # important because different Linux systems can have the errno - # values in different orders. + # defined in errno.h. The results are sorted in ascending + # numerical order and aliases follow the original definition. echo '#include <errno.h>' | cpp -dM - | awk "BEGIN { max = 0 } -# Pattern is '#define Efoo number' +# Pattern is '#define EFOO number' /^#define[ \t]+(E[A-Z0-9]+)[ \t]+([0-9]+)/ { errno[\$3] = \$2 max = (\$3 > max) ? \$3 : max } -# Pattern is '#define Efoo Ealias' +# Pattern is '#define EFOO EALIAS' /^#define[ \t]+(E[A-Z0-9]+)[ \t]+(E[A-Z0-9]+)/ { alias[\$3] = \$2 } ===================================== bin/errno-default.lisp ===================================== @@ -11,7 +11,7 @@ (defconstant EBADF 9) (defconstant ECHILD 10) #+bsd(defconstant EDEADLK 11) -#-bsd(defconstant EAGAIN 11 #-linux) +#-bsd(defconstant EAGAIN 11) (defconstant ENOMEM 12) (defconstant EACCES 13) (defconstant EFAULT 14) @@ -36,7 +36,7 @@ ;;; ;;; Math (defconstant EDOM 33) -(defconstant ERANGE 34 #-linux) +(defconstant ERANGE 34) ;;; non-blocking and interrupt i/o (defconstant EWOULDBLOCK 35) ===================================== src/code/exports.lisp ===================================== @@ -31,14 +31,6 @@ (if (find-package "BIGNUM") (rename-package "BIGNUM" "BIGNUM" 'nil) (make-package "BIGNUM" :nicknames 'nil :use nil)) -#+nil -(if (find-package "ERRNO") - (rename-package "ERRNO" "ERRNO" 'nil) - (make-package "ERRNO" :nicknames 'nil :use nil)) -#+nil -(if (find-package "UNIX") - (rename-package "UNIX" "UNIX" 'nil) - (make-package "UNIX" :nicknames 'nil :use nil)) (if (find-package "FORMAT") (rename-package "FORMAT" "FORMAT" 'nil) (make-package "FORMAT" :nicknames 'nil :use nil)) View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/483dc4188ae2efd897b3b5e1... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/483dc4188ae2efd897b3b5e1... You're receiving this email because of your account on gitlab.common-lisp.net.
participants (1)
-
Raymond Toy (@rtoy)