Assume rename.

This commit is contained in:
Paul Eggert 2012-07-10 23:09:09 -07:00
parent b747d3f753
commit 57054ddd44
6 changed files with 9 additions and 29 deletions

View file

@ -1,7 +1,7 @@
2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
Assume strerror.
* configure.ac (strerror): Remove check.
Assume rename, strerror.
* configure.ac (rename, strerror): Remove check.
2012-07-11 Glenn Morris <rgm@gnu.org>

View file

@ -137,7 +137,6 @@ HAVE_MOUSE
HAVE_PSTAT_GETDYNAMIC
HAVE_PWD_H
HAVE_RANDOM
HAVE_RENAME
HAVE_RES_INIT
HAVE_RINT
HAVE_RMDIR

View file

@ -1,7 +1,8 @@
2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
Assume perror, strerror.
* CPP-DEFINES (HAVE_PERROR, HAVE_STRERROR, strerror): Remove.
Assume perror, rename, strerror.
* CPP-DEFINES (HAVE_PERROR, HAVE_RENAME, HAVE_STRERROR, strerror):
Remove.
2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>

View file

@ -2708,7 +2708,7 @@ AC_SUBST(BLESSMAIL_TARGET)
AC_CHECK_FUNCS(gethostname \
rename closedir mkdir rmdir getrusage get_current_dir_name \
closedir mkdir rmdir getrusage get_current_dir_name \
lrand48 logb frexp fmod cbrt setsid \
fpathconf select euidaccess getpagesize setlocale \
utimes getrlimit setrlimit setpgid getcwd shutdown getaddrinfo \

View file

@ -1,5 +1,8 @@
2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
Assume rename.
* sysdep.c (rename) [!HAVE_RENAME]: Remove.
Assume perror.
* s/hpux10-20.h (HAVE_PERROR): Remove.
* sysdep.c (perror) [HPUX && !HAVE_PERROR]:

View file

@ -2000,29 +2000,6 @@ getwd (char *pathname)
#endif /* HAVE_GETWD */
/*
* Emulate rename using unlink/link. Note that this is
* only partially correct. Also, doesn't enforce restriction
* that files be of same type (regular->regular, dir->dir, etc).
*/
#ifndef HAVE_RENAME
int
rename (const char *from, const char *to)
{
if (access (from, 0) == 0)
{
unlink (to);
if (link (from, to) == 0)
if (unlink (from) == 0)
return (0);
}
return (-1);
}
#endif
/*
* This function will go away as soon as all the stubs fixed. (fnf)
*/