diff options
author | blazy <blazy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2006-10-20 12:37:13 +0000 |
---|---|---|
committer | blazy <blazy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2006-10-20 12:37:13 +0000 |
commit | ca0c62265eb8cdd5fb0d8a8b34ee77baf3de987e (patch) | |
tree | 50a139db8e2ac51c6ff41f3790ff72aa417ed3be /test/ccured_olden/bh/stdinc.h | |
parent | 43668d9109b1f36329646fd07324d435be6f0050 (diff) | |
download | compcert-ca0c62265eb8cdd5fb0d8a8b34ee77baf3de987e.tar.gz compcert-ca0c62265eb8cdd5fb0d8a8b34ee77baf3de987e.zip |
Ajout du banc de tests de CCured (Olden benchmark suite, cf.
CCured: type-safe retrofitting of legacy code, G.Necula et al.)
rapportCompcert_all.txt liste les erreurs produites par ccomp.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@121 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'test/ccured_olden/bh/stdinc.h')
-rw-r--r-- | test/ccured_olden/bh/stdinc.h | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/test/ccured_olden/bh/stdinc.h b/test/ccured_olden/bh/stdinc.h new file mode 100644 index 00000000..7d0d99f4 --- /dev/null +++ b/test/ccured_olden/bh/stdinc.h @@ -0,0 +1,97 @@ +/****************************************************************************/ +/* STDINC.H: standard include file for C programs. */ +/* */ +/* Copyright (c) 1993 by Joshua E. Barnes, Honolulu, HI. */ +/* It's free because it's yours. */ +/****************************************************************************/ + +/* + * If not already loaded, include stdio.h. + */ + +#ifndef FILE +# include <stdio.h> +#endif + +/* + * STREAM: a tasteful replacement for FILE *. + */ + +typedef FILE *stream; + +/* + * NULL: denotes a pointer to nothing. + */ + +#ifndef NULL +# define NULL 0 +#endif + +/* + * GLOBAL: make something global when declared at file level; a workaround + * for the Strict-Ref/Def-initialization model in ANSI C. Predefine with + * something innocuous (like a comment) to actually allocate the data. + */ + +#ifndef global +# define global extern +#endif + +/* + * LOCAL: make something local when declared at file level. + */ + +#define local static + +/* + * PERMANENT: make data declared within a function static. + */ + +#define permanent static + +/* + * BOOL, TRUE and FALSE: standard names for logical values. + */ + +#ifndef TRUE + typedef short int bool; +# define FALSE 0 +# define TRUE 1 +#endif + +/* + * STRING: for null-terminated character strings. + */ + +typedef char *string; +// sm: this isn't a performance change, it's a boxing crankiness change +#define NULLCHR 0 + +/* + * PROC, IPROC: pointers to procedures and integer-valued functions. + */ + +typedef void (*proc)(); +typedef int (*iproc)(); + +/* + * PI, etc. -- mathematical constants + */ + +#define PI 3.14159265358979323846 +#define TWO_PI 6.28318530717958647693 +#define FOUR_PI 12.56637061435917295385 +#define HALF_PI 1.57079632679489661923 +#define FRTHRD_PI 4.18879020478639098462 + +/* + * ABS: returns the absolute value of its argument + * MAX: returns the argument with the highest value + * MIN: returns the argument with the lowest value + */ + +#define ABS(x) (((x) < 0) ? -(x) : (x)) +#define MAX(x,y) (((x) > (y)) ? (x) : (y)) +#define MIN(x,y) (((x) < (y)) ? (x) : (y)) + + |