scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit 39c51c48ea4d84767fe4cbc900e8cf57ef140dc0
parent 8f26a2000d975f17539e4737c54ea69c01e5ef16
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Tue, 14 Sep 2021 16:33:30 +0200

libc: Remove _sys_nerr

_sys_nerr variable is not needed anymore because there is
a macro with the maximum number of errors that does the
same work.

Diffstat:
Msrc/libc/arch/mkerrstr | 7+------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/libc/arch/mkerrstr b/src/libc/arch/mkerrstr @@ -1,6 +1,4 @@ -#!/bin/sh - -trap 'r=$?; rm -f $$.tmp; exit $r' EXIT HUP INT QUIT TERM +trap 'rm -f $$.tmp' EXIT HUP INT QUIT TERM awk ' /^#define[ \t]*E/{ @@ -9,8 +7,6 @@ awk ' str = str " " $i sub(/^ /, "", str) errstr[$2] = str - if ($3 > max) - max = $3; } END { @@ -20,5 +16,4 @@ END { printf "\t%-20.20s = \"%s\",\n", "[" i "]", errstr[i] print "};" - print "const int _sys_nerr =", max";" }' $@ > $$.tmp && mv $$.tmp _sys_errlist.c