fix tcc
This commit is contained in:
4
ast.c
4
ast.c
@@ -1,10 +1,10 @@
|
|||||||
|
#include "common.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "ast.h"
|
#include "ast.h"
|
||||||
#include "common.h"
|
|
||||||
#include "parser.h"
|
#include "parser.h"
|
||||||
|
|
||||||
#define N 1024
|
#define N 1024
|
||||||
|
|||||||
12
common.h
12
common.h
@@ -1,7 +1,17 @@
|
|||||||
// common.h
|
// common.h — must be included before any system headers.
|
||||||
#ifndef _ZIG0_COMMON_H__
|
#ifndef _ZIG0_COMMON_H__
|
||||||
#define _ZIG0_COMMON_H__
|
#define _ZIG0_COMMON_H__
|
||||||
|
|
||||||
|
// tcc doesn't define __GNUC__, causing glibc to #define __attribute__ to
|
||||||
|
// nothing.
|
||||||
|
#if defined(__TINYC__) && !defined(__GNUC__)
|
||||||
|
#define __GNUC__ 2
|
||||||
|
#define __GNUC_MINOR__ 0
|
||||||
|
#undef __REDIRECT
|
||||||
|
#undef __REDIRECT_NTH
|
||||||
|
#undef __REDIRECT_NTHNL
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
|||||||
2
main.c
2
main.c
@@ -1,3 +1,5 @@
|
|||||||
|
#include "common.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|||||||
3
parser.c
3
parser.c
@@ -1,10 +1,11 @@
|
|||||||
|
#include "common.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "ast.h"
|
#include "ast.h"
|
||||||
#include "common.h"
|
|
||||||
#include "parser.h"
|
#include "parser.h"
|
||||||
|
|
||||||
const AstNodeIndex null_node = 0;
|
const AstNodeIndex null_node = 0;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
|
#include "common.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user