summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--legacy/eina/configure.ac3
-rw-r--r--legacy/eina/src/include/eina_safety_checks.h6
-rw-r--r--legacy/eina/src/lib/eina_counter.c4
3 files changed, 9 insertions, 4 deletions
diff --git a/legacy/eina/configure.ac b/legacy/eina/configure.ac
index fac5a11c6c..04c9da0fba 100644
--- a/legacy/eina/configure.ac
+++ b/legacy/eina/configure.ac
@@ -298,6 +298,9 @@ case "${host_os}" in
298 *bsd*) 298 *bsd*)
299 EINA_LIBS="${EINA_LIBS} -lrt -lm" 299 EINA_LIBS="${EINA_LIBS} -lrt -lm"
300 ;; 300 ;;
301 *darwin*)
302 EINA_LIBS="${EINA_LIBS} -lm"
303 ;;
301 *) 304 *)
302 EINA_LIBS="${EINA_LIBS} -ldl -lrt -lm" 305 EINA_LIBS="${EINA_LIBS} -ldl -lrt -lm"
303 ;; 306 ;;
diff --git a/legacy/eina/src/include/eina_safety_checks.h b/legacy/eina/src/include/eina_safety_checks.h
index 620eb20930..13e53b3f34 100644
--- a/legacy/eina/src/include/eina_safety_checks.h
+++ b/legacy/eina/src/include/eina_safety_checks.h
@@ -98,19 +98,19 @@
98#else /* no safety checks */ 98#else /* no safety checks */
99 99
100#define EINA_SAFETY_ON_NULL_RETURN(exp) \ 100#define EINA_SAFETY_ON_NULL_RETURN(exp) \
101 do { (void)((exp) == NULL) } while (0) 101 do { (void)((exp) == NULL); } while (0)
102 102
103#define EINA_SAFETY_ON_NULL_RETURN_VAL(exp, val) \ 103#define EINA_SAFETY_ON_NULL_RETURN_VAL(exp, val) \
104 do { if (0 && (exp) == NULL) (void)val; } while (0) 104 do { if (0 && (exp) == NULL) (void)val; } while (0)
105 105
106#define EINA_SAFETY_ON_TRUE_RETURN(exp) \ 106#define EINA_SAFETY_ON_TRUE_RETURN(exp) \
107 do { (void)(exp) } while (0) 107 do { (void)(exp); } while (0)
108 108
109#define EINA_SAFETY_ON_TRUE_RETURN_VAL(exp, val) \ 109#define EINA_SAFETY_ON_TRUE_RETURN_VAL(exp, val) \
110 do { if (0 && (exp)) (void)val; } while (0) 110 do { if (0 && (exp)) (void)val; } while (0)
111 111
112#define EINA_SAFETY_ON_FALSE_RETURN(exp) \ 112#define EINA_SAFETY_ON_FALSE_RETURN(exp) \
113 do { (void)((!exp)) } while (0) 113 do { (void)((!exp)); } while (0)
114 114
115#define EINA_SAFETY_ON_FALSE_RETURN_VAL(exp, val) \ 115#define EINA_SAFETY_ON_FALSE_RETURN_VAL(exp, val) \
116 do { if (0 && !(exp)) (void)val; } while (0) 116 do { if (0 && !(exp)) (void)val; } while (0)
diff --git a/legacy/eina/src/lib/eina_counter.c b/legacy/eina/src/lib/eina_counter.c
index 992e8185b0..3be46a55bf 100644
--- a/legacy/eina/src/lib/eina_counter.c
+++ b/legacy/eina/src/lib/eina_counter.c
@@ -83,8 +83,10 @@ _eina_counter_time_get(Eina_Nano_Time *tp)
83 return clock_gettime(CLOCK_PROCESS_CPUTIME_ID, tp); 83 return clock_gettime(CLOCK_PROCESS_CPUTIME_ID, tp);
84#elif defined(CLOCK_PROF) 84#elif defined(CLOCK_PROF)
85 return clock_gettime(CLOCK_PROF, tp); 85 return clock_gettime(CLOCK_PROF, tp);
86#else 86#elif defined(CLOCK_REALTIME)
87 return clock_gettime(CLOCK_REALTIME, tp); 87 return clock_gettime(CLOCK_REALTIME, tp);
88#else
89 return gettimeofday(tp, NULL);
88#endif 90#endif
89} 91}
90#else 92#else