bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=3be5126b35dd6dea017bec4a3e2420bd535c54f7
commit 3be5126b35dd6dea017bec4a3e2420bd535c54f7 Author: Marcel Hollerbach <[email protected]> Date: Sat Dec 29 13:10:14 2018 +0100 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 242960ea3d..236a9b69ea 100644 --- a/src/examples/eldbus/connect-address.c +++ b/src/examples/eldbus/connect-address.c @@ -21,8 +21,9 @@ */ #include <stdlib.h> - -#define _GNU_SOURCE +#ifndef _GNU_SOURCE +# define _GNU_SOURCE +#endif #include <signal.h> #include "Eldbus.h" diff --git a/src/examples/emotion/emotion_basic_example.c b/src/examples/emotion/emotion_basic_example.c index 0badc5a34a..8f470041a7 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 <Eo.h> #include <Ecore.h> diff --git a/src/examples/emotion/emotion_border_example.c b/src/examples/emotion/emotion_border_example.c index 12e489b046..7a24b8dae5 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 <Ecore.h> #include <Ecore_Evas.h> diff --git a/src/examples/emotion/emotion_generic_example.c b/src/examples/emotion/emotion_generic_example.c index 25e39948d5..0bd722a0cd 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 <Ecore.h> #include <Ecore_Evas.h> diff --git a/src/examples/emotion/emotion_generic_subtitle_example.c b/src/examples/emotion/emotion_generic_subtitle_example.c index d25fabb09f..07c8973641 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 <Ecore.h> #include <Ecore_Evas.h> diff --git a/src/examples/emotion/emotion_signals_example.c b/src/examples/emotion/emotion_signals_example.c index 5864802bef..b5dc6257c7 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 <Ecore.h> #include <Ecore_Evas.h> --
