aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/sysdep.c23
2 files changed, 3 insertions, 23 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 749bc12328c..7b47636969e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
12012-07-11 Paul Eggert <eggert@cs.ucla.edu> 12012-07-11 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 Assume rename.
4 * sysdep.c (rename) [!HAVE_RENAME]: Remove.
5
3 Assume perror. 6 Assume perror.
4 * s/hpux10-20.h (HAVE_PERROR): Remove. 7 * s/hpux10-20.h (HAVE_PERROR): Remove.
5 * sysdep.c (perror) [HPUX && !HAVE_PERROR]: 8 * sysdep.c (perror) [HPUX && !HAVE_PERROR]:
diff --git a/src/sysdep.c b/src/sysdep.c
index 4bbe939dd74..274e000e9f3 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -2001,29 +2001,6 @@ getwd (char *pathname)
2001#endif /* HAVE_GETWD */ 2001#endif /* HAVE_GETWD */
2002 2002
2003/* 2003/*
2004 * Emulate rename using unlink/link. Note that this is
2005 * only partially correct. Also, doesn't enforce restriction
2006 * that files be of same type (regular->regular, dir->dir, etc).
2007 */
2008
2009#ifndef HAVE_RENAME
2010
2011int
2012rename (const char *from, const char *to)
2013{
2014 if (access (from, 0) == 0)
2015 {
2016 unlink (to);
2017 if (link (from, to) == 0)
2018 if (unlink (from) == 0)
2019 return (0);
2020 }
2021 return (-1);
2022}
2023
2024#endif
2025
2026/*
2027 * This function will go away as soon as all the stubs fixed. (fnf) 2004 * This function will go away as soon as all the stubs fixed. (fnf)
2028 */ 2005 */
2029 2006