[Mobies-commit] [commit] r4331 - in UDM/trunk: include src/UdmDom tests/test_libs
ksmyth at redhat3.isis.vanderbilt.edu
ksmyth at redhat3.isis.vanderbilt.edu
Mon Oct 13 11:25:18 CDT 2014
Author: ksmyth
Date: Mon Oct 13 11:25:18 2014
New Revision: 4331
Log:
Fixes for Ubuntu 14.04 Trusty compile
Modified:
UDM/trunk/include/UdmDom.h
UDM/trunk/src/UdmDom/UdmDom.cpp
UDM/trunk/tests/test_libs/LibsTest.cpp
Modified: UDM/trunk/include/UdmDom.h
==============================================================================
--- UDM/trunk/include/UdmDom.h Fri Oct 10 14:40:37 2014 (r4330)
+++ UDM/trunk/include/UdmDom.h Mon Oct 13 11:25:18 2014 (r4331)
@@ -227,12 +227,11 @@
what += ", in File: ";\
what += e.getSrcFile();\
what += ", in Line: ";\
- char * line_str = new char[20];/*should be enough for 32 bit integers */\
+ char line_str[20] = {};/*should be enough for 32 bit integers */\
if (line_str)\
{\
- sprintf(line_str, "%d", e.getSrcLine());\
+ sprintf(line_str, "%ud", (unsigned int)e.getSrcLine());\
what += line_str;\
- delete [] line_str;\
}\
what += where;\
throw udm_exception(what);\
Modified: UDM/trunk/src/UdmDom/UdmDom.cpp
==============================================================================
--- UDM/trunk/src/UdmDom/UdmDom.cpp Fri Oct 10 14:40:37 2014 (r4330)
+++ UDM/trunk/src/UdmDom/UdmDom.cpp Mon Oct 13 11:25:18 2014 (r4331)
@@ -183,6 +183,7 @@
// Use POSIX strncasecamp on other platforms
#ifndef WIN32
#include <strings.h>
+#include <unistd.h>
#define strnicmp(a, b, n) strncasecmp(a,b,n)
#endif
Modified: UDM/trunk/tests/test_libs/LibsTest.cpp
==============================================================================
--- UDM/trunk/tests/test_libs/LibsTest.cpp Fri Oct 10 14:40:37 2014 (r4330)
+++ UDM/trunk/tests/test_libs/LibsTest.cpp Mon Oct 13 11:25:18 2014 (r4331)
@@ -5,6 +5,10 @@
#endif
UDM_USE_DOM
+#ifndef _WIN32
+#include <unistd.h>
+#endif
+
#include "LibsTest.h"
#include <cppunit/CompilerOutputter.h>
More information about the Mobies-commit
mailing list