Raymond Toy pushed to branch issue-446-use-cc-to-get-errno at cmucl / cmucl
Commits:
- 
6ce0be0f
by Raymond Toy at 2025-10-15T07:03:12-07:00
 
2 changed files:
Changes:
| 1 | -BEGIN {
 | 
|
| 2 | -    count = 0
 | 
|
| 3 | -}
 | 
|
| 4 | -  | 
|
| 5 | -# Find anything that matches '#define Efoo value'
 | 
|
| 6 | -/^#define[ \t]+(E[A-Z0-9]+)[ \t]+([A-Z0-9]+).*$/ {
 | 
|
| 7 | -    found = 0
 | 
|
| 8 | -    # Search to see if the current key, $2, is already in the table.
 | 
|
| 9 | -    # If so, we mark it as something to skip.  This happens on Darwin
 | 
|
| 10 | -    # where EOPNTOSUPP is seen twice.  We want the second entry.
 | 
|
| 11 | -    for (key in errno) {
 | 
|
| 12 | -	if (errno[key] == $2) {
 | 
|
| 13 | -	    printf ";; Ignoring dup of %s: old value %s, new value %s\n", $2, value[key], $3;
 | 
|
| 14 | -	    found = 1;
 | 
|
| 15 | -	    skip[key] = 1;
 | 
|
| 16 | -	    break;
 | 
|
| 17 | -       }
 | 
|
| 18 | -    }
 | 
|
| 19 | -    errno[count] = $2;
 | 
|
| 20 | -    value[count] = $3;
 | 
|
| 21 | -    ++count;
 | 
|
| 22 | -}
 | 
|
| 23 | -  | 
|
| 24 | -END {
 | 
|
| 25 | -    for (k = 0; k < count; ++k) {
 | 
|
| 26 | -	printf "%s(def-unix-error %s %s)\n",
 | 
|
| 27 | -	    (skip[k] != 1) ? "": ";; ", errno[k], value[k];
 | 
|
| 28 | -    }
 | 
|
| 29 | -} | 
| ... | ... | @@ -90,7 +90,6 @@ find_errno () | 
| 90 | 90 |  	grep "#define[ \t]\{1,\}E[A-Z0-9]\{1,\}" |
 | 
| 91 | 91 |  	sed 's/#define \(.*\) \(.*\)$/(def-unix-error \1 \2)/' |
 | 
| 92 | 92 |  	sort -n -k 3
 | 
| 93 | -    #awk -f bin/create-def-unix-error.awk ${ERRNO_HEADERS}
 | 
|
| 94 | 93 |  }
 | 
| 95 | 94 | |
| 96 | 95 |  if [ "$UPDATE" = "yes" ]; then
 |