From 097f8ed81e50b5efda28c6a2837e75e15b5812e4 Mon Sep 17 00:00:00 2001 From: Aleksandar Bozhinovski Date: Fri, 9 Mar 2012 10:01:30 +0100 Subject: 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 Reviewed-by: Viktor MLADENOVSKI Reviewed-by: Vlatko PISTOLOV Tested-by: Vlatko PISTOLOV --- source/utilities/String_s.cpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 source/utilities/String_s.cpp (limited to 'source/utilities/String_s.cpp') diff --git a/source/utilities/String_s.cpp b/source/utilities/String_s.cpp new file mode 100644 index 0000000..c204ec8 --- /dev/null +++ b/source/utilities/String_s.cpp @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright (C) ST-Ericsson SA 2012 + * License terms: 3-clause BSD license + ******************************************************************************/ +#include "String_s.h" + +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); +} + +#ifndef __MINGW32__ +int _stricmp(const char *s1, const char *s2) +{ + return strcasecmp(s1, s2); +} +#endif -- cgit v1.2.3