summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/asymptote/util.cc')
-rw-r--r--Build/source/utils/asymptote/util.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/Build/source/utils/asymptote/util.cc b/Build/source/utils/asymptote/util.cc
index 9e307a20800..4ab92050784 100644
--- a/Build/source/utils/asymptote/util.cc
+++ b/Build/source/utils/asymptote/util.cc
@@ -86,7 +86,7 @@ char *StrdupMalloc(string s)
string stripDir(string name)
{
size_t p;
-#ifdef __CYGWIN__
+#ifdef __MSDOS__
p=name.rfind('\\');
if(p < string::npos) name.erase(0,p+1);
#endif
@@ -99,7 +99,7 @@ string stripFile(string name)
{
size_t p;
bool dir=false;
-#ifdef __CYGWIN__
+#ifdef __MSDOS__
p=name.rfind('\\');
if(p < string::npos) {
dir=true;
@@ -344,7 +344,11 @@ void noPath()
char *getPath(char *p)
{
- static size_t size=MAXPATHLEN;
+#ifdef MAXPATHLEN
+ static size_t size = MAXPATHLEN;
+#else
+ static size_t size = 1024;
+#endif
if(!p) p=new(UseGC) char[size];
if(!p) noPath();
else while(getcwd(p,size) == NULL) {
@@ -375,7 +379,7 @@ const char *setPath(const char *s, bool quiet)
void push_command(mem::vector<string>& a, const string& s)
{
a.push_back(s);
-#ifdef __CYGWIN__
+#ifdef __MSDOS__
if(s == "cmd") {
a.push_back("/c");
a.push_back("start");