summaryrefslogtreecommitdiff
path: root/src/libstrongswan/utils.h
diff options
context:
space:
mode:
authorRené Mayrhofer <rene@mayrhofer.eu.org>2011-03-05 09:29:19 +0100
committerRené Mayrhofer <rene@mayrhofer.eu.org>2011-03-05 09:29:19 +0100
commit365e71f706b40c32173fa06c6feaac48c1527520 (patch)
tree54fa72a914d18c9430eaa54f3de4a2d4419198af /src/libstrongswan/utils.h
parent5d7669b7b3563c50b3c86903e0a49373d597b8a0 (diff)
parent568905f488e63e28778f87ac0e38d845f45bae79 (diff)
downloadvyos-strongswan-365e71f706b40c32173fa06c6feaac48c1527520.tar.gz
vyos-strongswan-365e71f706b40c32173fa06c6feaac48c1527520.zip
Fixed merge, don't know why this didn't happen automatically - maybe a leftover from the svn->git conversion
Diffstat (limited to 'src/libstrongswan/utils.h')
-rw-r--r--src/libstrongswan/utils.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/libstrongswan/utils.h b/src/libstrongswan/utils.h
index 35d3bebd1..e07af53aa 100644
--- a/src/libstrongswan/utils.h
+++ b/src/libstrongswan/utils.h
@@ -57,7 +57,11 @@
#define streq(x,y) (strcmp(x, y) == 0)
/**
+<<<<<<< HEAD
* Macro compares two strings for equality
+=======
+ * Macro compares two strings for equality, length limited
+>>>>>>> upstream/4.5.1
*/
#define strneq(x,y,len) (strncmp(x, y, len) == 0)
@@ -67,6 +71,19 @@
#define strcaseeq(x,y) (strcasecmp(x, y) == 0)
/**
+<<<<<<< HEAD
+=======
+ * Macro compares two strings for equality ignoring case, length limited
+ */
+#define strncaseeq(x,y,len) (strncasecmp(x, y, len) == 0)
+
+/**
+ * NULL-safe strdup variant
+ */
+#define strdupnull(x) ({ char *_x = x; _x ? strdup(_x) : NULL; })
+
+/**
+>>>>>>> upstream/4.5.1
* Macro compares two binary blobs for equality
*/
#define memeq(x,y,len) (memcmp(x, y, len) == 0)
@@ -382,6 +399,14 @@ bool return_true();
bool return_false();
/**
+<<<<<<< HEAD
+=======
+ * returns FAILED
+ */
+status_t return_failed();
+
+/**
+>>>>>>> upstream/4.5.1
* Write a 16-bit host order value in network order to an unaligned address.
*
* @param host host order 16-bit value