summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/util.cc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-05-31 00:02:26 +0000
committerKarl Berry <karl@freefriends.org>2012-05-31 00:02:26 +0000
commit19fc9fd9a26973d87fad437ce549ffaba479df54 (patch)
treef40a9d2592b3cf827970c8bf54a1eebf9cc8f9c0 /Build/source/utils/asymptote/util.cc
parent24b3bac312553b2cc61e94fda581aba311967f5c (diff)
asy 2.16 sources
git-svn-id: svn://tug.org/texlive/trunk@26734 c570f23f-e606-0410-a88d-b1316a301751
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");