summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2019-01-05 08:52:59 -0600
committerSamuel Holland <samuel@sholland.org>2019-01-05 09:32:21 -0600
commite0eeb7630a38dc6024559e906c44fd50d56b72a5 (patch)
tree5cddf0df73e26f62a0715695facf38609e398cb8
parente97935b9c3b3c745d6264f9fad8afd912dbd366d (diff)
downloadgcompat-e0eeb7630a38dc6024559e906c44fd50d56b72a5.tar.gz
gcompat-e0eeb7630a38dc6024559e906c44fd50d56b72a5.tar.bz2
gcompat-e0eeb7630a38dc6024559e906c44fd50d56b72a5.tar.xz
gcompat-e0eeb7630a38dc6024559e906c44fd50d56b72a5.zip
Makefile: depend on internal.h; format headers
Signed-off-by: Samuel Holland <samuel@sholland.org>
-rw-r--r--Makefile5
-rw-r--r--libgcompat/alias.h4
-rw-r--r--libgcompat/internal.h13
3 files changed, 11 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 934422f..a7437d1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
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}
diff --git a/libgcompat/alias.h b/libgcompat/alias.h
index 3f54672..bb99690 100644
--- a/libgcompat/alias.h
+++ b/libgcompat/alias.h
@@ -1,9 +1,9 @@
#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_ */
diff --git a/libgcompat/internal.h b/libgcompat/internal.h
index 3b08271..a246547 100644
--- a/libgcompat/internal.h
+++ b/libgcompat/internal.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