summaryrefslogtreecommitdiffstats
path: root/libcsoap
diff options
context:
space:
mode:
authorGravatar m0gg2006-12-14 19:36:49 +0000
committerGravatar m0gg2006-12-14 19:36:49 +0000
commit26502adcbd76cbb3886907f6673ba25be21a7856 (patch)
tree9f0e7e9fa30ef2dce08e535a4bfabcee696766ff /libcsoap
parent90ca1cce54c40d2dde3995d1a9d68f9db93c40c9 (diff)
downloadcsoap-26502adcbd76cbb3886907f6673ba25be21a7856.tar.gz
csoap-26502adcbd76cbb3886907f6673ba25be21a7856.tar.bz2
Linux compile fixes
Diffstat (limited to 'libcsoap')
-rw-r--r--libcsoap/soap-addressing.c28
-rw-r--r--libcsoap/soap-fault.c6
-rw-r--r--libcsoap/soap-transport.c6
-rw-r--r--libcsoap/soap-xmlsec.c6
4 files changed, 42 insertions, 4 deletions
diff --git a/libcsoap/soap-addressing.c b/libcsoap/soap-addressing.c
index 8cb11b8..ebe6e66 100644
--- a/libcsoap/soap-addressing.c
+++ b/libcsoap/soap-addressing.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: soap-addressing.c,v 1.9 2006/11/29 11:04:24 m0gg Exp $
+* $Id: soap-addressing.c,v 1.10 2006/12/14 19:36:49 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2006 Heiko Ronsdorf
@@ -45,6 +45,10 @@
#include <string.h>
#endif
+#ifdef HAVE_PTHREAD_H
+#include <pthread.h>
+#endif
+
#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
@@ -66,6 +70,7 @@
#include "soap-server.h"
#include "soap-addressing.h"
+#ifdef HAVE_UUID_CREATE
static const xmlChar *
_soap_addressing_uuid_error(uint32_t status)
{
@@ -117,6 +122,27 @@ _soap_addressing_generate_id(void)
return ret;
}
+#else
+static char *
+_soap_addressing_generate_id(void)
+{
+ char *ret;
+ static long counter = 0;
+ static pthread_mutex_t counter_lock = PTHREAD_MUTEX_INITIALIZER;
+
+ if (!(ret = (char *)malloc(128)))
+ {
+ log_error2("malloc failed (%s)", strerror(errno));
+ return NULL;
+ }
+
+ pthread_mutex_lock(&counter_lock);
+ sprintf("%s/%i", soap_server_get_name(), counter);
+ pthread_mutex_unlock(&counter_lock);
+
+ return ret;
+}
+#endif
static xmlNsPtr
_soap_addressing_get_namespace(xmlNodePtr node)
diff --git a/libcsoap/soap-fault.c b/libcsoap/soap-fault.c
index 4d86d2b..3341f7a 100644
--- a/libcsoap/soap-fault.c
+++ b/libcsoap/soap-fault.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: soap-fault.c,v 1.15 2006/11/25 15:06:57 m0gg Exp $
+* $Id: soap-fault.c,v 1.16 2006/12/14 19:36:49 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -29,6 +29,10 @@
#include <string.h>
#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
#include <libxml/xpath.h>
#include <nanohttp/nanohttp-error.h>
diff --git a/libcsoap/soap-transport.c b/libcsoap/soap-transport.c
index 1c5a7bd..765fa8f 100644
--- a/libcsoap/soap-transport.c
+++ b/libcsoap/soap-transport.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: soap-transport.c,v 1.8 2006/12/06 11:27:21 m0gg Exp $
+* $Id: soap-transport.c,v 1.9 2006/12/14 19:36:49 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2007 Heiko Ronsdorf
@@ -33,6 +33,10 @@
#include <string.h>
#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
diff --git a/libcsoap/soap-xmlsec.c b/libcsoap/soap-xmlsec.c
index e4cadfb..01e5ae0 100644
--- a/libcsoap/soap-xmlsec.c
+++ b/libcsoap/soap-xmlsec.c
@@ -1,5 +1,5 @@
/******************************************************************
-* $Id: soap-xmlsec.c,v 1.7 2006/12/06 11:27:21 m0gg Exp $
+* $Id: soap-xmlsec.c,v 1.8 2006/12/14 19:36:49 m0gg Exp $
*
* CSOAP Project: A SOAP client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -45,6 +45,10 @@
#include <stdlib.h>
#endif
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif