File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ File `xc.c` is the original one and `xc-tutor.c` is the one that I make for
6
6
the tutorial step by step.
7
7
8
8
```
9
- gcc -o xc xc.c (you may need the -m32 option on 64bit machines)
9
+ gcc -o xc xc.c
10
10
./xc hello.c
11
11
./xc -s hello.c
12
12
Original file line number Diff line number Diff line change 5
5
#include <stdlib.h>
6
6
#include <memory.h>
7
7
#include <string.h>
8
+ #define int long long // to work with 64bit address
8
9
9
10
int token ; // current token
10
11
int token_val ; // value of current token (mainly for number)
@@ -1251,8 +1252,11 @@ int eval() {
1251
1252
return 0 ;
1252
1253
}
1253
1254
1255
+ #undef int // Mac/clang needs this to compile
1256
+
1254
1257
int main (int argc , char * * argv )
1255
1258
{
1259
+ #define int long long // to work with 64bit address
1256
1260
1257
1261
int i , fd ;
1258
1262
int * tmp ;
Original file line number Diff line number Diff line change 2
2
#include <stdlib.h>
3
3
#include <memory.h>
4
4
#include <string.h>
5
+ #define int long long // to work with 64bit address
5
6
6
7
int debug ; // print the executed instructions
7
8
int assembly ; // print out the assembly and source
@@ -1276,8 +1277,12 @@ int eval() {
1276
1277
}
1277
1278
}
1278
1279
1280
+ #undef int // Mac/clang needs this to compile
1281
+
1279
1282
int main (int argc , char * * argv )
1280
1283
{
1284
+ #define int long long // to work with 64bit address
1285
+
1281
1286
int i , fd ;
1282
1287
int * tmp ;
1283
1288
You can’t perform that action at this time.
0 commit comments