summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-01-12 15:22:45 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-01-12 15:22:45 (GMT)
commit6d0622c0bb8f0e52589c82252f2cc1eb847ad9bf (patch)
treecbb87d3447f0972fe61d7db8454804035d4f1184
parent9e7e73725c20fbc95dccd9c1477a4d7c907be321 (diff)
downloaduscxml-6d0622c0bb8f0e52589c82252f2cc1eb847ad9bf.zip
uscxml-6d0622c0bb8f0e52589c82252f2cc1eb847ad9bf.tar.gz
uscxml-6d0622c0bb8f0e52589c82252f2cc1eb847ad9bf.tar.bz2
Started to fix Windows compilation issues
-rw-r--r--.gitignore2
-rw-r--r--config.h.in3
-rw-r--r--contrib/cmake/FunctionExists.cmake2
-rw-r--r--contrib/cmake/HeaderExists.cmake2
-rwxr-xr-xcontrib/local/compress_and_upload_deps.sh14
-rw-r--r--src/uscxml/URL.cpp4
-rw-r--r--src/uscxml/concurrency/tinythread.cpp7
-rw-r--r--src/uscxml/concurrency/tinythread.h2
8 files changed, 27 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore
index 18c09fc..402fed2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,5 @@ contrib/prebuilt/android*
package/linux*
package/darwin*
package/windows*
+
+*.tgz
diff --git a/config.h.in b/config.h.in
index 4bd5a5a..333b8a0 100644
--- a/config.h.in
+++ b/config.h.in
@@ -56,4 +56,7 @@
#cmakedefine SWI_FOUND
#cmakedefine OPENSCENEGRAPH_FOUND
+/** Header files we found */
+#cmakedefine HAS_UNISTD_H
+
#endif \ No newline at end of file
diff --git a/contrib/cmake/FunctionExists.cmake b/contrib/cmake/FunctionExists.cmake
new file mode 100644
index 0000000..d2877a1
--- /dev/null
+++ b/contrib/cmake/FunctionExists.cmake
@@ -0,0 +1,2 @@
+include(CheckFunctionExists)
+CHECK_FUNCTION_EXISTS(strndup HAS_STRNDUP)
diff --git a/contrib/cmake/HeaderExists.cmake b/contrib/cmake/HeaderExists.cmake
new file mode 100644
index 0000000..09eabbe
--- /dev/null
+++ b/contrib/cmake/HeaderExists.cmake
@@ -0,0 +1,2 @@
+include(CheckIncludeFile)
+CHECK_INCLUDE_FILE(unistd.h HAS_UNISTD_H)
diff --git a/contrib/local/compress_and_upload_deps.sh b/contrib/local/compress_and_upload_deps.sh
index 641219d..9f64118 100755
--- a/contrib/local/compress_and_upload_deps.sh
+++ b/contrib/local/compress_and_upload_deps.sh
@@ -22,11 +22,17 @@ if [ ! -d $1 ]; then
exit
fi
-PLATFORM=`basename $1`
VERSION=$2
cd ../prebuilt
-tar cvzf uscxml-prebuilt-${PLATFORM}.tgz ${PLATFORM}
-scp uscxml-prebuilt-${PLATFORM}.tgz ${UMUNDO_PREBUILT_HOST}/${VERSION}
-rm uscxml-prebuilt-${PLATFORM}.tgz \ No newline at end of file
+PLATFORMS=`find . -maxdepth 1 -type d -regex ./[^\.].*`
+for FILE in ${PLATFORMS}; do
+ PLATFORM=`basename $FILE`
+ if [ "$PLATFORM" != "include" ]; then
+ echo $FILE
+ tar cvzf uscxml-prebuilt-${PLATFORM}.tgz ${FILE}
+ scp uscxml-prebuilt-${PLATFORM}.tgz ${UMUNDO_PREBUILT_HOST}/${VERSION}
+ rm uscxml-prebuilt-${PLATFORM}.tgz
+ fi
+done \ No newline at end of file
diff --git a/src/uscxml/URL.cpp b/src/uscxml/URL.cpp
index 4461308..592c0c6 100644
--- a/src/uscxml/URL.cpp
+++ b/src/uscxml/URL.cpp
@@ -17,8 +17,12 @@
#include "uscxml/Common.h"
#include "URL.h"
+#include "uscxml/config.h"
+
#include <cstdlib> // mkstemp
+#ifdef HAS_UNISTD_H
#include <unistd.h> // mkstemp legacy
+#endif
namespace uscxml {
diff --git a/src/uscxml/concurrency/tinythread.cpp b/src/uscxml/concurrency/tinythread.cpp
index 56363b7..4a99259 100644
--- a/src/uscxml/concurrency/tinythread.cpp
+++ b/src/uscxml/concurrency/tinythread.cpp
@@ -31,15 +31,14 @@ freely, subject to the following restrictions:
#include <process.h>
#endif
-
namespace tthread {
-uint64_t timeStamp() {
- uint64_t time = 0;
+unsigned long long int timeStamp() {
+ unsigned long long int time = 0;
#ifdef WIN32
FILETIME tv;
GetSystemTimeAsFileTime(&tv);
- time = (((uint64_t) tv.dwHighDateTime) << 32) + tv.dwLowDateTime;
+ time = (((unsigned long long int) tv.dwHighDateTime) << 32) + tv.dwLowDateTime;
time /= 10000;
#else
struct timeval tv;
diff --git a/src/uscxml/concurrency/tinythread.h b/src/uscxml/concurrency/tinythread.h
index 537cc04..aa8335b 100644
--- a/src/uscxml/concurrency/tinythread.h
+++ b/src/uscxml/concurrency/tinythread.h
@@ -152,7 +152,7 @@ freely, subject to the following restrictions:
/// the std::mutex class.
namespace tthread {
-uint64_t timeStamp();
+unsigned long long int timeStamp();
/// Mutex class.
/// This is a mutual exclusion object for synchronizing access to shared