Delete local function strerror and USE_GETCWD define.

Both are useless after porting mch_dirname to libuv.
This commit is contained in:
Thomas Wienecke
2014-02-26 00:36:01 +01:00
committed by Thiago de Arruda
parent 8437a4c972
commit 82e0636e78
2 changed files with 0 additions and 26 deletions

View File

@@ -1228,22 +1228,6 @@ long mch_get_pid() {
return (long)getpid(); return (long)getpid();
} }
#if !defined(HAVE_STRERROR) && defined(USE_GETCWD)
static char *strerror __ARGS((int));
static char * strerror(int err)
{
extern int sys_nerr;
extern char *sys_errlist[];
static char er[20];
if (err > 0 && err < sys_nerr)
return sys_errlist[err];
sprintf(er, "Error %d", err);
return er;
}
#endif
#if defined(USE_FNAME_CASE) || defined(PROTO) #if defined(USE_FNAME_CASE) || defined(PROTO)
/* /*
* Set the case of the file name, if it already exists. This will cause the * Set the case of the file name, if it already exists. This will cause the

View File

@@ -42,16 +42,6 @@
* Sun defines FILE on SunOS 4.x.x, Solaris has a typedef for FILE * Sun defines FILE on SunOS 4.x.x, Solaris has a typedef for FILE
*/ */
/*
* Using getcwd() is preferred, because it checks for a buffer overflow.
* Don't use getcwd() on systems do use system("sh -c pwd"). There is an
* autoconf check for this.
* Use getcwd() anyway if getwd() isn't present.
*/
#if defined(HAVE_GETCWD) && !(defined(BAD_GETCWD) && defined(HAVE_GETWD))
# define USE_GETCWD
#endif
#ifndef __ARGS #ifndef __ARGS
/* The AIX VisualAge cc compiler defines __EXTENDED__ instead of __STDC__ /* The AIX VisualAge cc compiler defines __EXTENDED__ instead of __STDC__
* because it includes pre-ansi features. */ * because it includes pre-ansi features. */