shim: cleanup c++ refs
This commit is contained in:
parent
58f1c6c527
commit
0ab4d36cb0
|
@ -1,15 +1,15 @@
|
|||
INC = -I../inc
|
||||
CXXFLAGS = -g -Wall -std=gnu11 -D_GNU_SOURCE $(INC) -mssse3
|
||||
CFLAGS = -g -Wall -std=gnu11 -D_GNU_SOURCE $(INC) -mssse3
|
||||
LDFLAGS = -T../base/base.ld -no-pie
|
||||
LD = gcc
|
||||
CC = gcc
|
||||
AR = ar
|
||||
|
||||
ifneq ($(DEBUG),)
|
||||
CXXFLAGS += -DDEBUG -DCCAN_LIST_DEBUG -rdynamic -O0 -ggdb
|
||||
CFLAGS += -DDEBUG -DCCAN_LIST_DEBUG -rdynamic -O0 -ggdb
|
||||
LDFLAGS += -rdynamic
|
||||
else
|
||||
CXXFLAGS += -DNDEBUG -O3
|
||||
CFLAGS += -DNDEBUG -O3
|
||||
endif
|
||||
|
||||
# handy for debugging
|
||||
|
@ -37,9 +37,9 @@ endif
|
|||
# rule to generate a dep file by using the C preprocessor
|
||||
# (see man cpp for details on the -MM and -MT options)
|
||||
%.d: %.c
|
||||
@$(CC) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
|
||||
@$(CC) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@
|
||||
%.o: %.c
|
||||
$(CC) $(CXXFLAGS) -c $< -o $@
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
|
|
|
@ -1,13 +1,7 @@
|
|||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include <runtime/thread.h>
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
int __real_main(int, char **);
|
||||
|
||||
|
|
|
@ -2,13 +2,7 @@
|
|||
#include <dlfcn.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include <runtime/preempt.h>
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define HOOK3(fnname, retType, argType1, argType2, argType3) \
|
||||
retType fnname(argType1 __a1, argType2 __a2, argType3 __a3) \
|
||||
|
|
|
@ -3,15 +3,9 @@
|
|||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include <base/lock.h>
|
||||
#include <runtime/sync.h>
|
||||
#include <runtime/thread.h>
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
BUILD_ASSERT(sizeof(pthread_t) >= sizeof(uintptr_t));
|
||||
|
||||
|
|
|
@ -3,15 +3,9 @@
|
|||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include <base/time.h>
|
||||
#include <runtime/thread.h>
|
||||
#include <runtime/timer.h>
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
int usleep(useconds_t usec)
|
||||
{
|
||||
|
@ -22,7 +16,7 @@ int usleep(useconds_t usec)
|
|||
unsigned int sleep(unsigned int seconds)
|
||||
{
|
||||
timer_sleep(seconds * ONE_SECOND);
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int nanosleep(const struct timespec *req, struct timespec *rem)
|
||||
|
|
|
@ -2,13 +2,7 @@
|
|||
#include <dlfcn.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include <runtime/sync.h>
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
BUILD_ASSERT(sizeof(pthread_barrier_t) >= sizeof(barrier_t));
|
||||
BUILD_ASSERT(sizeof(pthread_mutex_t) >= sizeof(mutex_t));
|
||||
|
|
Loading…
Reference in New Issue