examples: fix warnings regarding multiple defines
authorMarcel Hollerbach <mail@marcel-hollerbach.de>
Sat, 29 Dec 2018 12:10:14 +0000 (13:10 +0100)
committerShinwoo Kim <cinoo.kim@samsung.com>
Thu, 3 Jan 2019 09:00:26 +0000 (18:00 +0900)
compiling them stand alone still defines the correct definitions

src/examples/eldbus/connect-address.c
src/examples/emotion/emotion_basic_example.c
src/examples/emotion/emotion_border_example.c
src/examples/emotion/emotion_generic_example.c
src/examples/emotion/emotion_generic_subtitle_example.c
src/examples/emotion/emotion_signals_example.c

index 242960e..236a9b6 100644 (file)
@@ -21,8 +21,9 @@
  */
 
 #include <stdlib.h>
-
-#define _GNU_SOURCE
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
 #include <signal.h>
 
 #include "Eldbus.h"
index 0badc5a..8f47004 100644 (file)
@@ -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>
index 12e489b..7a24b8d 100644 (file)
@@ -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>
index 25e3994..0bd722a 100644 (file)
@@ -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>
index d25fabb..07c8973 100644 (file)
@@ -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>
index 5864802..b5dc625 100644 (file)
@@ -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>