Fix: perform lazy initialization of getenv common lib
[lttng-ust.git] / include / lttng / ust-utils.h
index 23d1a07c01081aa55e7279c86d6915b495c271f2..2a65dd5364ef21e996ea7c05d17dff9a09887e8f 100644 (file)
  *
  * Returns true if the type of @type is signed.
  */
-#define lttng_ust_is_signed_type(type)           ((type) -1 < (type) 1)
+#if defined(__cplusplus)
+#define lttng_ust_is_signed_type(type) (std::is_signed<type>::value)
+#else
+#define lttng_ust_is_signed_type(type) ((type) -1 < (type) 1)
+#endif
 
 
 /**
@@ -42,6 +46,7 @@
 #define lttng_ust_is_integer_type(type) \
                (__builtin_types_compatible_p(type, _Bool) || \
                __builtin_types_compatible_p(type, char) || \
+               __builtin_types_compatible_p(type, signed char) || \
                __builtin_types_compatible_p(type, unsigned char) || \
                __builtin_types_compatible_p(type, short) || \
                __builtin_types_compatible_p(type, unsigned short) || \
This page took 0.024144 seconds and 4 git commands to generate.