Skip to content

Commit

Permalink
More changes to prefer getcwd() to get_current_dir_name() #366560
Browse files Browse the repository at this point in the history
  • Loading branch information
jgoerzen committed Jun 17, 2006
1 parent 5216831 commit 6d5f2fd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions gopher/download.c
Expand Up @@ -255,11 +255,11 @@ Download_file(GopherObj *gs)
}
}

#ifdef HAVE_GET_CURRENT_DIR_NAME
curcwd = get_current_dir_name();
#else
#ifdef HAVE_GETCWD
getcwd(curcwd, MAXPATHLEN);
#else
#ifdef HAVE_GET_CURRENT_DIR_NAME
curcwd = get_current_dir_name();
#else
getwd(curcwd);
#endif
Expand Down Expand Up @@ -401,6 +401,9 @@ BuiltinDownload(char *dirname)

GSsetPath(gs, names[choice]);

#ifdef HAVE_GETCWD
getcwd(tmppath,MAXPATHLEN);
#else
#ifdef HAVE_GET_CURRENT_DIR_NAME
tmppath = get_current_dir_name();
if ( sizeof(tmppath) <= (strlen(tmppath) + strlen(names[choice]) + 1) )
Expand All @@ -409,9 +412,6 @@ BuiltinDownload(char *dirname)
CursesErrorMsg("Out of memory");
return;
}
#else
#ifdef HAVE_GETCWD
getcwd(tmppath,MAXPATHLEN);
#else
getwd(tmppath);
#endif
Expand Down

0 comments on commit 6d5f2fd

Please sign in to comment.