summaryrefslogtreecommitdiff
path: root/source/api_wrappers/linux
diff options
context:
space:
mode:
authorAleksandar Bozhinovski <aleksandar.bozhinovski@seavus.com>2012-03-09 10:01:30 +0100
committerViktor Mladenovski <viktor.mladenovski@seavus.com>2012-05-25 14:44:41 +0200
commit097f8ed81e50b5efda28c6a2837e75e15b5812e4 (patch)
treeb5bcd77081ef11630a9f77c8cdf8d3e504231a3b /source/api_wrappers/linux
parent682f6b9fbd2f7296b53896b0d534627e7bcf255d (diff)
Build Lcd Lcm .dll under Linux
Build 32-bit and 64-bit LCD and LCM .dll under Linux using mingw cross compiler ST-Ericsson ID: 412641 ST-Ericsson FOSS-OUT ID: STETL-FOSS-OUT-10204 Change-Id: I9dbb0dfb17f1d51b1ee3528e5dae44cb0dc81a87 Change-Id: I814b561c243a56412fdc29f8b046a6a8648bd297 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/47975 Reviewed-by: QABUILD Reviewed-by: QATEST Tested-by: Viktor MLADENOVSKI <viktor.mladenovski@stericsson.com> Reviewed-by: Viktor MLADENOVSKI <viktor.mladenovski@stericsson.com> Reviewed-by: Vlatko PISTOLOV <vlatko.pistolov@seavus.com> Tested-by: Vlatko PISTOLOV <vlatko.pistolov@seavus.com>
Diffstat (limited to 'source/api_wrappers/linux')
-rw-r--r--source/api_wrappers/linux/LinuxApiWrappers.h1
-rw-r--r--source/api_wrappers/linux/OS.cpp30
-rw-r--r--source/api_wrappers/linux/OS.h73
3 files changed, 1 insertions, 103 deletions
diff --git a/source/api_wrappers/linux/LinuxApiWrappers.h b/source/api_wrappers/linux/LinuxApiWrappers.h
index b63b840..b89e42f 100644
--- a/source/api_wrappers/linux/LinuxApiWrappers.h
+++ b/source/api_wrappers/linux/LinuxApiWrappers.h
@@ -15,6 +15,7 @@
#include "CWaitableObject.h"
#include "CWaitableObjectCollection.h"
#include "OS.h"
+#include "String_s.h"
#endif /* _LINUXAPIWRAPPERS_H */
diff --git a/source/api_wrappers/linux/OS.cpp b/source/api_wrappers/linux/OS.cpp
index 6ed6425..aaaa592 100644
--- a/source/api_wrappers/linux/OS.cpp
+++ b/source/api_wrappers/linux/OS.cpp
@@ -2,7 +2,6 @@
* Copyright (C) ST-Ericsson SA 2011
* License terms: 3-clause BSD license
******************************************************************************/
-
#include <time.h>
#include <errno.h>
#include <sys/time.h>
@@ -59,32 +58,3 @@ timespec OS::GetAbsoluteTime(DWORD dwTimeout)
return absolute_time;
}
-
-
-char *strcpy_s(char *dst, size_t _Size, const char *src)
-{
- return strncpy(dst, src, _Size);
-}
-
-int sprintf_s(char *dst, size_t _Size, const char *format, ...)
-{
- va_list l;
- int ReturnValue;
-
- va_start(l, format);
- ReturnValue = vsnprintf(dst, _Size, format, l);
- va_end(l);
-
- return ReturnValue;
-}
-
-char *strncpy_s(char *dst, const char *src, size_t _Size)
-{
- return strncpy(dst, src, _Size);
-}
-
-int _stricmp(const char *s1, const char *s2)
-{
- return strcasecmp(s1, s2);
-}
-
diff --git a/source/api_wrappers/linux/OS.h b/source/api_wrappers/linux/OS.h
index b79c6ea..ad1e7af 100644
--- a/source/api_wrappers/linux/OS.h
+++ b/source/api_wrappers/linux/OS.h
@@ -7,9 +7,6 @@
#define _OS_H
#include <sys/time.h>
#include <stdio.h>
-#include <stdarg.h>
-#include <string.h>
-#include <strings.h>
#include <stdlib.h>
#include "Types.h"
@@ -36,74 +33,4 @@ private:
static DWORD ErrorCode;
};
-
-#define MAX(a, b) ((a) > (b) ? (a) : (b))
-
-/*
- * str manipulation functions used in windows build
- */
-
-char *strcpy_s(char *dst, size_t _Size, const char *src);
-char *strncpy_s(char *dst, const char *src, size_t _Size);
-int _stricmp(const char *s1, const char *s2);
-int sprintf_s(char *dst, size_t _Size, const char *format, ...);
-
-#define _snprintf snprintf
-
-template <size_t _Size>
-char *strcpy_s(char(&dst)[_Size], const char src[])
-{
- return strncpy(dst, src, _Size);
-}
-
-template<size_t _Size>
-int sprintf_s(char(&dst)[_Size], const char *format, ...)
-{
- int ReturnValue;
- va_list l;
- va_start(l, format);
- ReturnValue = vsnprintf(dst, _Size, format, l);
- va_end(l);
- return ReturnValue;
-}
-
-template <size_t _Size>
-char *strcat_s(char(&dst)[_Size], const char src[])
-{
- return strncat(dst, src, _Size);
-}
-
-template <size_t _Size>
-int _ultoa_s(unsigned long value, char(&str)[_Size], int radix)
-{
- switch (radix) {
- case 10:
- return sprintf_s(str, "%ul", value);
-
- case 16:
- return sprintf_s(str, "%ulX", value);
-
- default:
- return -1;
- }
-}
-
-template<size_t _Size>
-int _snprintf_s(char(&dst)[_Size], size_t _MaxCount, const char *format, ...)
-{
- int ReturnValue;
- va_list l;
- va_start(l, format);
- ReturnValue = vsnprintf(dst, MAX(_MaxCount, _Size), format, l);
- va_end(l);
- return ReturnValue;
-}
-
-template<size_t _Size>
-int vsprintf_s(char(&dst)[_Size], const char *format, va_list l)
-{
- return vsnprintf(dst, _Size, format, l);
-}
-
#endif /* _OS_H */
-