From 443f5c13b3d4808bf6367da9ecf86c4bca9a3225 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Sat, 29 Dec 2018 13:10:14 +0100 Subject: [PATCH] examples: fix warnings regarding multiple defines compiling them stand alone still defines the correct definitions --- src/examples/eldbus/connect-address.c | 5 +++-- src/examples/emotion/emotion_basic_example.c | 8 ++++++-- src/examples/emotion/emotion_border_example.c | 9 ++++++--- src/examples/emotion/emotion_generic_example.c | 9 ++++++--- src/examples/emotion/emotion_generic_subtitle_example.c | 8 ++++++-- src/examples/emotion/emotion_signals_example.c | 8 ++++++-- 6 files changed, 33 insertions(+), 14 deletions(-) diff --git a/src/examples/eldbus/connect-address.c b/src/examples/eldbus/connect-address.c index 242960e..236a9b6 100644 --- a/src/examples/eldbus/connect-address.c +++ b/src/examples/eldbus/connect-address.c @@ -21,8 +21,9 @@ */ #include - -#define _GNU_SOURCE +#ifndef _GNU_SOURCE +# define _GNU_SOURCE +#endif #include #include "Eldbus.h" diff --git a/src/examples/emotion/emotion_basic_example.c b/src/examples/emotion/emotion_basic_example.c index 0badc5a..8f47004 100644 --- a/src/examples/emotion/emotion_basic_example.c +++ b/src/examples/emotion/emotion_basic_example.c @@ -1,8 +1,12 @@ //Compile with: // gcc -o emotion_basic_example emotion_basic_example.c `pkg-config --libs --cflags emotion evas ecore ecore-evas eo` -#define EFL_BETA_API_SUPPORT -#define EFL_EO_API_SUPPORT +#ifndef EFL_EO_API_SUPPORT +# define EFL_EO_API_SUPPORT +#endif +#ifndef EFL_BETA_API_SUPPORT +# define EFL_BETA_API_SUPPORT +#endif #include #include diff --git a/src/examples/emotion/emotion_border_example.c b/src/examples/emotion/emotion_border_example.c index 12e489b..7a24b8d 100644 --- a/src/examples/emotion/emotion_border_example.c +++ b/src/examples/emotion/emotion_border_example.c @@ -1,8 +1,11 @@ //Compile with: // gcc -o emotion_border_example emotion_border_example.c `pkg-config --libs --cflags emotion evas ecore ecore-evas eina eo` - -#define EFL_EO_API_SUPPORT -#define EFL_BETA_API_SUPPORT +#ifndef EFL_EO_API_SUPPORT +# define EFL_EO_API_SUPPORT +#endif +#ifndef EFL_BETA_API_SUPPORT +# define EFL_BETA_API_SUPPORT +#endif #include #include diff --git a/src/examples/emotion/emotion_generic_example.c b/src/examples/emotion/emotion_generic_example.c index 25e3994..0bd722a 100644 --- a/src/examples/emotion/emotion_generic_example.c +++ b/src/examples/emotion/emotion_generic_example.c @@ -1,8 +1,11 @@ //Compile with: // gcc -o emotion_generic_example emotion_generic_example.c `pkg-config --libs --cflags emotion evas ecore ecore-evas eina eo` - -#define EFL_EO_API_SUPPORT -#define EFL_BETA_API_SUPPORT +#ifndef EFL_EO_API_SUPPORT +# define EFL_EO_API_SUPPORT +#endif +#ifndef EFL_BETA_API_SUPPORT +# define EFL_BETA_API_SUPPORT +#endif #include #include diff --git a/src/examples/emotion/emotion_generic_subtitle_example.c b/src/examples/emotion/emotion_generic_subtitle_example.c index d25fabb..07c8973 100644 --- a/src/examples/emotion/emotion_generic_subtitle_example.c +++ b/src/examples/emotion/emotion_generic_subtitle_example.c @@ -1,8 +1,12 @@ //Compile with: // gcc -o emotion_generic_subtitle_example emotion_generic_subtitle_example.c `pkg-config --libs --cflags emotion evas ecore ecore-evas eo` -#define EFL_EO_API_SUPPORT -#define EFL_BETA_API_SUPPORT +#ifndef EFL_EO_API_SUPPORT +# define EFL_EO_API_SUPPORT +#endif +#ifndef EFL_BETA_API_SUPPORT +# define EFL_BETA_API_SUPPORT +#endif #include #include diff --git a/src/examples/emotion/emotion_signals_example.c b/src/examples/emotion/emotion_signals_example.c index 5864802..b5dc625 100644 --- a/src/examples/emotion/emotion_signals_example.c +++ b/src/examples/emotion/emotion_signals_example.c @@ -1,8 +1,12 @@ //Compile with: // gcc -o emotion_signals_example emotion_signals_example.c `pkg-config --libs --cflags emotion evas ecore ecore-evas eo` -#define EFL_EO_API_SUPPORT -#define EFL_BETA_API_SUPPORT +#ifndef EFL_EO_API_SUPPORT +# define EFL_EO_API_SUPPORT +#endif +#ifndef EFL_BETA_API_SUPPORT +# define EFL_BETA_API_SUPPORT +#endif #include #include -- 2.7.4