File tree 7 files changed +21
-3
lines changed
7 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ TUNE8DBS_EXE = tune8dbs
109
109
110
110
# --- Libraries
111
111
112
- LDFLAGS = -static - lm -lz
112
+ LDFLAGS = -lm -lz -Wl,--wrap=time
113
113
# LDFLAGS = -static -lm -lz -Wl,-Map,map.out
114
114
115
115
@@ -125,7 +125,7 @@ CXX = g++
125
125
DEFS = -DINCLUDE_BOOKTOOL -DTEXT_BASED -DZLIB_STATIC
126
126
127
127
WARNINGS = -Wall -Wcast-align -Wwrite-strings -Wstrict-prototypes -Winline
128
- OPTS = -O4 -s -fomit-frame-pointer -falign-functions=32
128
+ OPTS = -O4 -g -fsanitize=address,undefined -static-libasan -fno-omit-frame-pointer
129
129
# OPTS = -O4 -s -fomit-frame-pointer -mtune=core2 -falign-functions=32
130
130
131
131
CFLAGS = $(OPTS ) $(WARNINGS ) $(DEFS )
Original file line number Diff line number Diff line change 11
11
*/
12
12
13
13
14
+ #include "wrap_time.h"
14
15
15
16
#include <stdio.h>
16
17
#include <stdlib.h>
Original file line number Diff line number Diff line change 10
10
Contents:
11
11
*/
12
12
13
+ #include "wrap_time.h"
13
14
14
15
15
16
#include <assert.h>
Original file line number Diff line number Diff line change 10
10
Contents: A small utility which enables the user to browse
11
11
an opening book file.
12
12
*/
13
-
13
+ #include "wrap_time.h"
14
14
15
15
#include <stdio.h>
16
16
#include <stdlib.h>
Original file line number Diff line number Diff line change 13
13
errors.
14
14
*/
15
15
16
+ #include "wrap_time.h"
16
17
17
18
#include <math.h>
18
19
#include <stdio.h>
Original file line number Diff line number Diff line change
1
+ #ifndef WRAP_TIME_H
2
+ #define WRAP_TIME_H
3
+
4
+ long __wrap_time (long * __timer ) {
5
+ static long time = 100 ;
6
+ time += 1 ;
7
+ long result = time / 100 ;
8
+ if (__timer != 0 ) {
9
+ * __timer = result ;
10
+ }
11
+ return result ;
12
+ }
13
+
14
+ #endif // WRAP_TIME_H
Original file line number Diff line number Diff line change 12
12
13
13
14
14
15
+ #include "wrap_time.h"
15
16
#include <ctype.h>
16
17
#include <math.h>
17
18
#include <stdio.h>
You can’t perform that action at this time.
0 commit comments