Commit e0eeb763 authored by Samuel Holland's avatar Samuel Holland

Makefile: depend on internal.h; format headers

Signed-off-by: Samuel Holland's avatarSamuel Holland <samuel@sholland.org>
parent e97935b9
LIBGCOMPAT_INCLUDE = \
libgcompat/alias.h
libgcompat/alias.h \
libgcompat/internal.h
LIBGCOMPAT_SRC = \
libgcompat/ctype.c \
libgcompat/cxx_thread.c \
......@@ -72,7 +73,7 @@ clean:
rm -f libgcompat/*.o loader/*.o ${LIBGCOMPAT_NAME} ${LOADER_NAME}
format:
clang-format -i ${LIBGCOMPAT_SRC} ${LOADER_SRC}
clang-format -i ${LIBGCOMPAT_INCLUDE} ${LIBGCOMPAT_SRC} ${LOADER_SRC}
install: all
install -D -m755 ${LIBGCOMPAT_NAME} ${DESTDIR}/${LIBGCOMPAT_PATH}
......
#ifndef _ALIAS_H_
#define _ALIAS_H_
#define alias(old, new) \
#define alias(old, new) \
extern __typeof(old) new __attribute__((__alias__(#old)))
#define weak_alias(old, new) \
#define weak_alias(old, new) \
extern __typeof(old) new __attribute__((weak, __alias__(#old)))
#endif /* _ALIAS_H_ */
......@@ -3,12 +3,11 @@
void GCOMPAT__panic(const char *fmt, ...) __attribute__((noreturn));
#define GCOMPAT__assert_with_reason(chk, ...) \
do { \
if (!(chk)) { \
GCOMPAT__panic(__VA_ARGS__); \
} \
} \
while(0);
#define GCOMPAT__assert_with_reason(chk, ...) \
do { \
if (!(chk)) { \
GCOMPAT__panic(__VA_ARGS__); \
} \
} while (0);
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment