Aufgrund eines Security Updates wird GitLab heute zwischen 14:30 und 15:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to a security update GitLab will be temporarily unavailable between 2:30 and 3 today.

Commit c684d74b authored by Fabian Schlieper's avatar Fabian Schlieper

odroid changes

parent fc7518ee
......@@ -116,6 +116,10 @@ set( ITABaseSources
if( WIN32 )
list( APPEND ITABaseHeader "include/ITAHPT.h" "include/ITAMutex.h" "include/ITATimer.h" )
list( APPEND ITABaseSources "src/ITAHPT.cpp" "src/ITAMutex.cpp" "src/ITATimer.cpp" )
else( WIN32)
add_definitions( -DUSE_SIMPLEINI )
list( APPEND ITABaseSources "src/ITAPosixRealtimeClock.cpp" "src/simpleini/SimpleIni.h" "src/simpleini/ConvertUTF.h" "src/simpleini/ConvertUTF.c" )
list( APPEND ITABaseSources "src/ITAConfigUtilsSimpleIniImpl.cpp" )
endif( WIN32 )
......@@ -162,15 +166,10 @@ if( VPCRE_FOUND AND ITA_BASE_WITH_REGULAR_EXPRESSIONS )
list( APPEND ITABaseSources "src/ITAConfigUtils.cpp" "src/ITAStringUtilsPCRE.cpp" )
add_definitions( -DPCRE_STATIC )
else( VPCRE_FOUND AND ITA_BASE_WITH_REGULAR_EXPRESSIONS )
list( APPEND ITABaseSources "src/ITAStringUtils.cpp" )
list( APPEND ITABaseSources "src/ITAConfigUtils.cpp" "src/ITAStringUtils.cpp" )
endif( VPCRE_FOUND AND ITA_BASE_WITH_REGULAR_EXPRESSIONS )
if( VSIMPLEINI_FOUND AND ITA_BASE_WITH_CONFIG_SIMPLE_INI )
if( NOT ITA_BASE_WITH_REGULAR_EXPRESSIONS )
message( FATAL_ERROR "ITABase old config implementation requires regular expressions. Please activate." )
endif( NOT ITA_BASE_WITH_REGULAR_EXPRESSIONS )
list( APPEND ITABaseSources "src/ITAConfigUtilsSimpleIniImpl.cpp" )
endif( VSIMPLEINI_FOUND AND ITA_BASE_WITH_CONFIG_SIMPLE_INI )
if( ITA_BASE_WITH_CONFIG_OLD_IMPL AND NOT ITA_BASE_WITH_CONFIG_SIMPLE_INI )
if( NOT ITA_BASE_WITH_REGULAR_EXPRESSIONS )
......@@ -197,6 +196,10 @@ else( NOT ITA_CORE_LIBS_BUILD_STATIC )
endif( NOT ITA_CORE_LIBS_BUILD_STATIC )
if( NOT WIN32 )
add_definitions( -std=gnu++11 )
endif()
# linker
add_library( ITABase ${ITABaseHeader} ${ITABaseSources} )
target_link_libraries( ITABase ${VISTA_USE_PACKAGE_LIBRARIES} )
......
......@@ -201,6 +201,12 @@ ITA_BASE_API std::string INIFileReadString(const std::string& sINIFilename,
const std::string& sKey,
std::string sDefaultValue="");
//! Mit Kommas getrennte Liste von Strings aus INI-Datei lesen
ITA_BASE_API std::vector<std::string> INIFileReadStringList(const std::string& sINIFilename,
const std::string& sSection,
const std::string& sKey,
char cSeparator=',');
//! Mit Kommas getrennte Liste von int-Werten aus INI-Datei lesen und in template Enum-Typ konvertieren
template <typename TEnum>
std::vector<TEnum> INIFileReadEnumList(const std::string& sINIFilename,
......@@ -241,11 +247,7 @@ ITA_BASE_API std::vector<double> INIFileReadDoubleList(const std::string& sINIFi
const std::string& sKey,
char cSeparator=',');
//! Mit Kommas getrennte Liste von Strings aus INI-Datei lesen
ITA_BASE_API std::vector<std::string> INIFileReadStringList(const std::string& sINIFilename,
const std::string& sSection,
const std::string& sKey,
char cSeparator=',');
/* +-----------------------------------------------------------------------------------------+
* | |
......
......@@ -134,8 +134,7 @@ template <class T> void ITABufferedDataLogger<T>::log(const T& oLogItem) {
m_vLogItems.push_back(oLogItem);
}
template <class T> void ITABufferedDataLogger<T>::store(std::string sFilename)
{
template <class T> void ITABufferedDataLogger<T>::store(const std::string& sFilename) {
std::ofstream os(sFilename.c_str(), std::ios::out | std::ios::trunc | std::ios::binary);
if (!os.is_open())
ITA_EXCEPT1(IO_ERROR, std::string("Could not create log output file \"") + sFilename + std::string("\""));
......
......@@ -27,7 +27,13 @@
#endif
#include <string>
#ifdef WIN32
#include <windows.h>
#else
#include <stdio.h>
#include <linux/types.h>
#define __int64 int64_t
#endif
// Definition des Datentyps für Timerticks
typedef __int64 ITATimerTicks;
......
......@@ -26,7 +26,7 @@
#include <string>
#include <vector>
#include <sstream>
// Konvertierungsklasse
class ITA_BASE_API ITAConversion
......
......@@ -5,7 +5,7 @@
#include <iomanip>
#include <iostream>
#include <sstream>
#include <algorithm>
#include <ITAStringUtils.h>
......
......@@ -90,10 +90,8 @@ void atomic_read32(volatile void* src, void* dest) {
*((int32_t*) dest) = __sync_val_compare_and_swap((volatile int32_t*) src, 0, 0);
}
bool atomic_cas32(volatile void* dest, void* expected_value, void* new_value)
{
return __sync_bool_compare_and_swap( &dest, expected_value, new_value );
//return __sync_bool_compare_and_swap( (volatile int32_t*)dest, (int32_t*)expected_value, (int32_t*)new_value );
bool atomic_cas32(volatile void* dest, void* expected_value, void* new_value) {
return __sync_bool_compare_and_swap((volatile int32_t*)dest, *(int32_t*)expected_value, *(int32_t*)new_value);
}
int atomic_inc_int(volatile int* dest) {
......
......@@ -18,7 +18,7 @@ std::string toString( ITAQuantization eQuantization )
std::string toString( ITADomain eDomain )
{
return ( eDomain == ITADomain::ITA_TIME_DOMAIN ? "Zeitbereich" : "Frequenzbereich" );
return ( eDomain == ITADomain::ITA_TIME_DOMAIN ? "time domain" : "frequency domain" );
}
void print( const ITAAudiofileProperties& props )
......
#include <ITAConfigUtils.h>
#include <ITAException.h>
#include <ITAFilesystemUtils.h>
#include <ITAFileSystemUtils.h>
#include <ITAStringUtils.h>
#include <cstdlib>
......
......@@ -21,9 +21,9 @@
#ifdef USE_SIMPLEINI
#include <ITAException.h>
#include <ITAFilesystemUtils.h>
#include <ITAFileSystemUtils.h>
#include "../3rdParty/SimpleIni/SimpleIni.h"
#include "simpleini/SimpleIni.h"
//
//// Bugfix (fwe): Falls kein Pfad und nur ein Dateinamen angebenen ist, muss .\ vorne angeh�ngt werden
......
......@@ -18,8 +18,10 @@
class ITACriticalSectionPosixImpl : public ITACriticalSectionImpl {
public:
ITACriticalSectionPosixImpl() : mutex(PTHREAD_MUTEX_INITIALIZER) {
pthread_mutexattr_init(&mutexattr);
pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_RECURSIVE_NP);
pthread_mutex_init(&mutex, &mutexattr);
pthread_mutexattr_destroy( &mutexattr );
}
~ITACriticalSectionPosixImpl() {
......
......@@ -93,7 +93,7 @@ void SetThreadName(long lThreadID, const char* szThreadName) {
void DEBUG_PRINTF(const char * format, ... ) {
va_list args;
va_start(args, format);
printf(format, args);
vprintf(format, args);
va_end(args);
}
#endif // Linux
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment