File tree Expand file tree Collapse file tree 7 files changed +21
-3
lines changed Expand file tree Collapse file tree 7 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ TUNE8DBS_EXE = tune8dbs
109109
110110# --- Libraries
111111
112- LDFLAGS = -static - lm -lz
112+ LDFLAGS = -lm -lz -Wl,--wrap=time
113113# LDFLAGS = -static -lm -lz -Wl,-Map,map.out
114114
115115
@@ -125,7 +125,7 @@ CXX = g++
125125DEFS = -DINCLUDE_BOOKTOOL -DTEXT_BASED -DZLIB_STATIC
126126
127127WARNINGS = -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
129129# OPTS = -O4 -s -fomit-frame-pointer -mtune=core2 -falign-functions=32
130130
131131CFLAGS = $(OPTS ) $(WARNINGS ) $(DEFS )
Original file line number Diff line number Diff line change 1111*/
1212
1313
14+ #include "wrap_time.h"
1415
1516#include <stdio.h>
1617#include <stdlib.h>
Original file line number Diff line number Diff line change 1010 Contents:
1111*/
1212
13+ #include "wrap_time.h"
1314
1415
1516#include <assert.h>
Original file line number Diff line number Diff line change 1010 Contents: A small utility which enables the user to browse
1111 an opening book file.
1212*/
13-
13+ #include "wrap_time.h"
1414
1515#include <stdio.h>
1616#include <stdlib.h>
Original file line number Diff line number Diff line change 1313 errors.
1414*/
1515
16+ #include "wrap_time.h"
1617
1718#include <math.h>
1819#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 1212
1313
1414
15+ #include "wrap_time.h"
1516#include <ctype.h>
1617#include <math.h>
1718#include <stdio.h>
You can’t perform that action at this time.
0 commit comments