Raymond Toy pushed to branch issue-446-use-cc-to-get-errno at cmucl / cmucl

Commits:

3 changed files:

Changes:

  • bin/create-errno.sh
    ... ... @@ -82,24 +82,22 @@ fi
    82 82
     
    
    83 83
     find_errno ()
    
    84 84
     {
    
    85
    -    # Create appropriate DEF-UNIX-ERROR forms by reading header files
    
    85
    +    # Create appropriate DEFCONSTANT forms by reading the preprocessed output of errno.h
    
    86 86
         # containing the C definitions.  This version with cpp works on
    
    87 87
         # Linux, Darwin, and Solaris (with Sun C) to dump the macros
    
    88
    -    # defined in errno.h.  The results are sorted in descending
    
    89
    -    # numerical order so that aliases are at the end.  Sorting is
    
    90
    -    # important because different Linux systems can have the errno
    
    91
    -    # values in different orders.
    
    88
    +    # defined in errno.h.  The results are sorted in ascending
    
    89
    +    # numerical order and aliases follow the original definition.
    
    92 90
         echo '#include <errno.h>' |
    
    93 91
     	cpp -dM - |
    
    94 92
     	awk "BEGIN {
    
    95 93
         max = 0
    
    96 94
     }
    
    97
    -# Pattern is '#define Efoo number'
    
    95
    +# Pattern is '#define EFOO number'
    
    98 96
     /^#define[ \t]+(E[A-Z0-9]+)[ \t]+([0-9]+)/ {
    
    99 97
         errno[\$3] = \$2
    
    100 98
         max = (\$3 > max) ? \$3 : max
    
    101 99
     }
    
    102
    -# Pattern is '#define Efoo Ealias'
    
    100
    +# Pattern is '#define EFOO EALIAS'
    
    103 101
     /^#define[ \t]+(E[A-Z0-9]+)[ \t]+(E[A-Z0-9]+)/ {
    
    104 102
         alias[\$3] = \$2
    
    105 103
     }
    

  • bin/errno-default.lisp
    ... ... @@ -11,7 +11,7 @@
    11 11
     (defconstant EBADF 9)
    
    12 12
     (defconstant ECHILD 10)
    
    13 13
     #+bsd(defconstant EDEADLK 11)
    
    14
    -#-bsd(defconstant EAGAIN 11 #-linux)
    
    14
    +#-bsd(defconstant EAGAIN 11)
    
    15 15
     (defconstant ENOMEM 12)
    
    16 16
     (defconstant EACCES 13)
    
    17 17
     (defconstant EFAULT 14)
    
    ... ... @@ -36,7 +36,7 @@
    36 36
     ;;; 
    
    37 37
     ;;; Math
    
    38 38
     (defconstant EDOM 33)
    
    39
    -(defconstant ERANGE 34 #-linux)
    
    39
    +(defconstant ERANGE 34)
    
    40 40
     
    
    41 41
     ;;; non-blocking and interrupt i/o
    
    42 42
     (defconstant EWOULDBLOCK 35)
    

  • src/code/exports.lisp
    ... ... @@ -31,14 +31,6 @@
    31 31
     (if (find-package "BIGNUM")
    
    32 32
         (rename-package "BIGNUM" "BIGNUM" 'nil)
    
    33 33
         (make-package "BIGNUM" :nicknames 'nil :use nil))
    
    34
    -#+nil
    
    35
    -(if (find-package "ERRNO")
    
    36
    -    (rename-package "ERRNO" "ERRNO" 'nil)
    
    37
    -    (make-package "ERRNO" :nicknames 'nil :use nil))
    
    38
    -#+nil
    
    39
    -(if (find-package "UNIX")
    
    40
    -    (rename-package "UNIX" "UNIX" 'nil)
    
    41
    -    (make-package "UNIX" :nicknames 'nil :use nil))
    
    42 34
     (if (find-package "FORMAT")
    
    43 35
         (rename-package "FORMAT" "FORMAT" 'nil)
    
    44 36
         (make-package "FORMAT" :nicknames 'nil :use nil))