aboutsummaryrefslogtreecommitdiffstats
path: root/src/sysdep.c
diff options
context:
space:
mode:
authorPaul Eggert2012-07-10 23:09:09 -0700
committerPaul Eggert2012-07-10 23:09:09 -0700
commit57054ddd444bd1702f2bcc08321d3ed3a644448e (patch)
tree0d4c61ece563b3fd27b39e4fc062092d83398cca /src/sysdep.c
parentb747d3f7535fe324b0ea21d53c4f84970335022a (diff)
downloademacs-57054ddd444bd1702f2bcc08321d3ed3a644448e.tar.gz
emacs-57054ddd444bd1702f2bcc08321d3ed3a644448e.zip
Assume rename.
Diffstat (limited to 'src/sysdep.c')
-rw-r--r--src/sysdep.c23
1 files changed, 0 insertions, 23 deletions
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