diff options
author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2008-10-16 21:33:25 +0000 |
---|---|---|
committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2008-10-16 21:33:25 +0000 |
commit | 08c80ab93443a8dee1c13dd4a62274265b04d12b (patch) | |
tree | 37172a2dd1fc552b6d9331d386b895ea2e320ea9 /lasso | |
parent | 4b007b73e1d7bec23dfb234e733c1f7d6cdc87c8 (diff) | |
download | lasso-08c80ab93443a8dee1c13dd4a62274265b04d12b.tar.gz lasso-08c80ab93443a8dee1c13dd4a62274265b04d12b.tar.xz lasso-08c80ab93443a8dee1c13dd4a62274265b04d12b.zip |
Add substitute code for g_strcmp0
Diffstat (limited to 'lasso')
-rw-r--r-- | lasso/lasso.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lasso/lasso.c b/lasso/lasso.c index aa6241df..0ec5d16f 100644 --- a/lasso/lasso.c +++ b/lasso/lasso.c @@ -29,6 +29,7 @@ **/ #include <stdlib.h> /* getenv */ +#include <string.h> /* strcmp */ #include <xmlsec/xmlsec.h> #include <xmlsec/crypto.h> #include <libxslt/xslt.h> @@ -72,6 +73,21 @@ DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) } #endif +#if (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 16) +static int g_strcmp0(const char *str1, const char *str2) { + if (str1 == NULL && str2 == NULL) { + return 0; + } + if (str1 == NULL) { + return -1; + } + if (str2 == NULL) { + return 1; + } + return strcmp(str1, str2); +} +#endif + #include "types.c" /** |