Remove old "assert.h" in mach/proto/ncg

*Important:*  You must "make clean" after checking out this commit,
because the build had copied the old "assert.h" to several places in
obj/.  If you don't "make clean", then the compiler finds the old
"assert.h" before libc <assert.h>, and the build fails because this
commit removes badassertion() in subr.c.  After "make clean", the
compiler finds libc <assert.h> and the build succeeds.
This commit is contained in:
George Koehler 2017-11-11 19:35:48 -05:00
parent ac4cbd735e
commit 98b27dd505
14 changed files with 22 additions and 33 deletions

View file

@ -1,12 +0,0 @@
/*
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
/* $Id$ */
#undef NDEBUG
#ifndef NDEBUG
#define assert(x) if(!(x)) badassertion("x",__FILE__,__LINE__)
#else
#define assert(x) /* nothing */
#endif

View file

@ -11,7 +11,15 @@ definerule("build_ncg",
name = e.name.."/headers", name = e.name.."/headers",
srcs = {}, srcs = {},
hdrs = { hdrs = {
"mach/proto/ncg/*.h", "mach/proto/ncg/data.h",
"mach/proto/ncg/equiv.h",
"mach/proto/ncg/glosym.h",
"mach/proto/ncg/label.h",
"mach/proto/ncg/param.h",
"mach/proto/ncg/regvar.h",
"mach/proto/ncg/result.h",
"mach/proto/ncg/state.h",
"mach/proto/ncg/types.h",
"mach/"..e.arch.."/ncg/mach.c", "mach/"..e.arch.."/ncg/mach.c",
"mach/"..e.arch.."/ncg/*.h", "mach/"..e.arch.."/ncg/*.h",
} }

View file

@ -2,9 +2,9 @@
static char rcsid[] = "$Id$"; static char rcsid[] = "$Id$";
#endif #endif
#include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include "assert.h"
#include "param.h" #include "param.h"
#include "tables.h" #include "tables.h"
#include "types.h" #include "types.h"

View file

@ -2,10 +2,10 @@
static char rcsid[] = "$Id$"; static char rcsid[] = "$Id$";
#endif #endif
#include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "assert.h"
#include "param.h" #include "param.h"
#include "tables.h" #include "tables.h"
#include "types.h" #include "types.h"

View file

@ -2,9 +2,9 @@
static char rcsid[] = "$Id$"; static char rcsid[] = "$Id$";
#endif #endif
#include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include "assert.h"
#include "equiv.h" #include "equiv.h"
#include "param.h" #include "param.h"
#include "tables.h" #include "tables.h"

View file

@ -2,10 +2,10 @@
static char rcsid2[] = "$Id$"; static char rcsid2[] = "$Id$";
#endif #endif
#include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "assert.h"
#include <em_spec.h> #include <em_spec.h>
#include <em_pseu.h> #include <em_pseu.h>
#include <em_flag.h> #include <em_flag.h>

View file

@ -2,7 +2,7 @@
static char rcsid[] = "$Id$"; static char rcsid[] = "$Id$";
#endif #endif
#include "assert.h" #include <assert.h>
#include <stdio.h> #include <stdio.h>
#include "param.h" #include "param.h"
#include "tables.h" #include "tables.h"

View file

@ -2,9 +2,9 @@
static char rcsid[] = "$Id$"; static char rcsid[] = "$Id$";
#endif #endif
#include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include "assert.h"
#include "param.h" #include "param.h"
#include "tables.h" #include "tables.h"
#include "types.h" #include "types.h"

View file

@ -2,11 +2,11 @@
static char rcsid[] = "$Id$"; static char rcsid[] = "$Id$";
#endif #endif
#include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <em_spec.h> #include <em_spec.h>
#include <em_flag.h> #include <em_flag.h>
#include "assert.h"
#include "param.h" #include "param.h"
#include "tables.h" #include "tables.h"
#include "types.h" #include "types.h"

View file

@ -2,9 +2,9 @@
static char rcsid[] = "$Id$"; static char rcsid[] = "$Id$";
#endif #endif
#include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include "assert.h"
#include "param.h" #include "param.h"
#include "tables.h" #include "tables.h"
#include "types.h" #include "types.h"

View file

@ -1,6 +1,6 @@
#include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include "assert.h"
#include "param.h" #include "param.h"
#include "tables.h" #include "tables.h"

View file

@ -2,9 +2,9 @@
static char rcsid[] = "$Id$"; static char rcsid[] = "$Id$";
#endif #endif
#include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include "assert.h"
#include "param.h" #include "param.h"
#include "tables.h" #include "tables.h"
#include "types.h" #include "types.h"

View file

@ -2,9 +2,9 @@
static char rcsid[] = "$Id$"; static char rcsid[] = "$Id$";
#endif #endif
#include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include "assert.h"
#include "param.h" #include "param.h"
#include "tables.h" #include "tables.h"
#include "types.h" #include "types.h"

View file

@ -2,10 +2,10 @@
static char rcsid[] = "$Id$"; static char rcsid[] = "$Id$";
#endif #endif
#include <assert.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "assert.h"
#include "param.h" #include "param.h"
#include "tables.h" #include "tables.h"
#include "types.h" #include "types.h"
@ -712,11 +712,4 @@ ruletrace() {
i--; i--;
} }
} }
#endif #endif /* TABLEDEBUG */
#ifndef NDEBUG
badassertion(asstr,file,line) char *asstr, *file; {
fatal("\"%s\", line %d:Assertion \"%s\" failed",file,line,asstr);
}
#endif