summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2013-10-12 09:55:48 +0300
committerTor Lillqvist <tml@collabora.com>2013-10-12 09:55:48 +0300
commitb680e352546dc614f3b30bbe212e6b415a6a6bf4 (patch)
tree1f3584d8201db2022c5611ec41cc4bb413e5fe13 /basic
parent9097611359d37003c9ac5b253dd592fed17e0aae (diff)
Test WNT instead of the vague UNX
Change-Id: Icacdae592f05bcdcf50223d607976d687e182c96
Diffstat (limited to 'basic')
-rw-r--r--basic/source/comp/parser.cxx6
-rw-r--r--basic/source/runtime/methods.cxx19
2 files changed, 9 insertions, 16 deletions
diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx
index 8ac380f0d65c..6c31a122e26b 100644
--- a/basic/source/comp/parser.cxx
+++ b/basic/source/comp/parser.cxx
@@ -856,10 +856,10 @@ void SbiParser::AddConstants( void )
addStringConst( aPublics, "vbCrLf", "\x0D\x0A" );
addStringConst( aPublics, "vbFormFeed", "\x0C" );
addStringConst( aPublics, "vbLf", "\x0A" );
-#if defined(UNX)
- addStringConst( aPublics, "vbNewLine", "\x0A" );
-#else
+#ifndef WNT
addStringConst( aPublics, "vbNewLine", "\x0D\x0A" );
+#else
+ addStringConst( aPublics, "vbNewLine", "\x0A" );
#endif
addStringConst( aPublics, "vbNullString", "" );
addStringConst( aPublics, "vbTab", "\x09" );
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 4167152bc299..549c56168262 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -79,6 +79,7 @@ using namespace com::sun::star::uno;
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
+#include <errno.h>
SbxVariable* getDefaultProp( SbxVariable* pRef );
@@ -86,11 +87,6 @@ SbxVariable* getDefaultProp( SbxVariable* pRef );
#include <direct.h> // _getdcwd get current work directory, _chdrive
#endif
-#ifdef UNX
-#include <errno.h>
-#include <unistd.h>
-#endif
-
#include <basic/sbobjmod.hxx>
#ifdef WNT
@@ -399,11 +395,6 @@ RTLFUNC(ChrW)
implChr( rPar, bChrW );
}
-
-#ifdef UNX
-#define _PATH_INCR 250
-#endif
-
RTLFUNC(CurDir)
{
(void)pBasic;
@@ -449,9 +440,11 @@ RTLFUNC(CurDir)
}
delete [] pBuffer;
-#elif defined( UNX )
+#else
+
+ const int PATH_INCR = 250;
- int nSize = _PATH_INCR;
+ int nSize = PATH_INCR;
char* pMem;
while( true )
{
@@ -474,7 +467,7 @@ RTLFUNC(CurDir)
return;
}
delete [] pMem;
- nSize += _PATH_INCR;
+ nSize += PATH_INCR;
};
#endif