From: Jerome Benoit Date: Sun, 5 Mar 2017 12:55:43 +0000 (+0100) Subject: TP3: avoid warning on cygwin X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=976a4b97383f977dbc9fca15e5c9e6a72af17ce0;p=Algorithmic_C.git TP3: avoid warning on cygwin Signed-off-by: Jerome Benoit --- 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) {