summaryrefslogtreecommitdiff
path: root/shell
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
parent06c8108fe5c196aec2888d9b236f595f2bcb1c46 (diff)
Do build and deliver lngconvex on Unix, too
Diffstat (limited to 'shell')
-rw-r--r--shell/prj/build.lst2
-rw-r--r--shell/prj/d.lst1
-rw-r--r--shell/source/tools/lngconvex/lngconvex.cxx23
3 files changed, 24 insertions, 2 deletions
diff --git a/shell/prj/build.lst b/shell/prj/build.lst
index dae761c36d30..fb233e2c44ae 100644
--- a/shell/prj/build.lst
+++ b/shell/prj/build.lst
@@ -10,7 +10,7 @@ sl shell\source\cmdmail nmake - u sl_cmdmail sl
sl shell\source\cmdmail nmake - p sl_cmdmail sl_inc NULL
sl shell\source\all nmake - all sl_all sl_inc NULL
sl shell\source\unix\sysshell nmake - u sl_unix_sysshell sl_all sl_inc NULL
-sl shell\source\tools\lngconvex nmake - w sl_win32_lngconv sl_inc NULL
+sl shell\source\tools\lngconvex nmake - all sl_win32_lngconv sl_inc NULL
sl shell\source\tools\regsvrex nmake - w sl_win32_regsvrex sl_inc NULL
sl shell\source\all\zipfile nmake - w sl_all_zipfile sl_inc NULL
sl shell\source\all\zipfile nmake - p sl_all_zipfile sl_inc NULL
diff --git a/shell/prj/d.lst b/shell/prj/d.lst
index 679b34c83d36..62dfa80d752c 100644
--- a/shell/prj/d.lst
+++ b/shell/prj/d.lst
@@ -19,6 +19,7 @@
..\%__SRC%\bin\gnome-open-url.bin %_DEST%\bin\gnome-open-url.bin
..\%__SRC%\bin\senddoc %_DEST%\bin\senddoc
..\%__SRC%\bin\uri-encode %_DEST%\bin\uri-encode
+..\%__SRC%\bin\lngconvex %_DEST%\bin\lngconvex
..\%__SRC%\misc\*.xml %_DEST%\xml\*.xml
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;
}