aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/definitions.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/definitions.h')
-rw-r--r--src/libstrongswan/definitions.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/libstrongswan/definitions.h b/src/libstrongswan/definitions.h
index c9ef066c1..f3e0cc690 100644
--- a/src/libstrongswan/definitions.h
+++ b/src/libstrongswan/definitions.h
@@ -59,16 +59,25 @@
#error "BYTE_ORDER must be defined"
#endif
+/**
+ * Default length for various auxiliary text buffers
+ */
+#define BUF_LEN 512
+
+/**
+ * Macro compares to strings for equality
+ */
+#define streq(x,y) (strcmp(x, y) == 0)
/**
* Macro gives back larger of two values.
*/
-#define max(x,y) (x > y ? x : y)
+#define max(x,y) ((x) > (y) ? (x):(y))
/**
* Macro gives back smaller of two values.
*/
-#define min(x,y) (x < y ? x : y)
+#define min(x,y) ((x) < (y) ? (x):(y))
/**
* Debug macro to follow control flow