summaryrefslogtreecommitdiff
path: root/shell/source
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@novell.com>2011-06-24 16:39:08 +0300
committerTor Lillqvist <tlillqvist@novell.com>2011-06-24 16:44:08 +0300
commit44f80498068bfdbbea42331374ba0923b1d8a49c (patch)
tree50a3e17f60c74314bdc9c1531853bc95dac1b138 /shell/source
parent06c8108fe5c196aec2888d9b236f595f2bcb1c46 (diff)
Do build and deliver lngconvex on Unix, too
Diffstat (limited to 'shell/source')
-rw-r--r--shell/source/tools/lngconvex/lngconvex.cxx23
1 files changed, 22 insertions, 1 deletions
diff --git a/shell/source/tools/lngconvex/lngconvex.cxx b/shell/source/tools/lngconvex/lngconvex.cxx
index 364ac49ba4bd..d50c808405ea 100644
--- a/shell/source/tools/lngconvex/lngconvex.cxx
+++ b/shell/source/tools/lngconvex/lngconvex.cxx
@@ -33,6 +33,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_shell.hxx"
+#ifdef WNT
#include <tools/presys.h>
#if defined _MSC_VER
#pragma warning(push, 1)
@@ -42,6 +43,15 @@
#pragma warning(pop)
#endif
#include <tools/postsys.h>
+#else
+// From MinGW
+typedef unsigned short WORD;
+#define PRIMARYLANGID(lgid) ((WORD)(lgid) & 0x3ff)
+#define SUBLANGID(lgid) ((WORD)(lgid) >> 10)
+#define LANG_SPANISH 0x0a
+#define SUBLANG_NEUTRAL 0x00
+#define SUBLANG_SPANISH 0x01
+#endif
#define VCL_NEED_BASETSD
@@ -63,6 +73,10 @@
#include <algorithm>
#include <string>
+#ifndef WNT
+#include <cstring>
+#endif
+
namespace /* private */
{
@@ -469,13 +483,20 @@ void start_language_section(
( subLangID == SUBLANG_SPANISH ) )
subLangID = SUBLANG_NEUTRAL;
+#ifdef WNT
_itoa(primLangID, buff, 16);
+#else
+ sprintf(buff, "%x", primLangID);
+#endif
lang_section += std::string("0x") + std::string(buff);
lang_section += std::string(" , ");
+#ifdef WNT
_itoa(subLangID, buff, 16);
-
+#else
+ sprintf(buff, "%x", subLangID);
+#endif
lang_section += std::string("0x") + std::string(buff);
ostream_iter = lang_section;
}