From 976a4b97383f977dbc9fca15e5c9e6a72af17ce0 Mon Sep 17 00:00:00 2001 From: Jerome Benoit Date: Sun, 5 Mar 2017 13:55:43 +0100 Subject: [PATCH 1/1] TP3: avoid warning on cygwin Signed-off-by: Jerome Benoit --- TP3/macros.h | 9 +++++++++ TP3/tp3.c | 4 ++++ 2 files changed, 13 insertions(+) create mode 100644 TP3/macros.h diff --git a/TP3/macros.h b/TP3/macros.h new file mode 100644 index 0000000..37b02b8 --- /dev/null +++ b/TP3/macros.h @@ -0,0 +1,9 @@ +#ifndef MACROS_H +#define MACROS_H + +/* definition to expand macro then apply to pragma message */ +#define VALUE_TO_STRING(x) #x +#define VALUE(x) VALUE_TO_STRING(x) +#define VAR_NAME_VALUE(var) #var "=" VALUE(var) + +#endif /* MACROS_h */ diff --git a/TP3/tp3.c b/TP3/tp3.c index 52c2a6e..ffb53c2 100644 --- a/TP3/tp3.c +++ b/TP3/tp3.c @@ -1,4 +1,8 @@ #include +#if __BSD_VISIBLE +#undef __BSD_VISIBLE +#define __BSD_VISIBLE +#endif #include void AfficheTab(int T[], int n) { -- 2.34.1