2
* See the file LICENSE for redistribution information.
4
* Copyright (c) 1997-2002
5
* Sleepycat Software. All rights reserved.
11
static const char revid[] = "$Id$";
14
#ifndef NO_SYSTEM_INCLUDES
15
#include <sys/types.h>
25
* Rename a file. If flags is non-zero, then errors are OK and we
26
* should not output an error message.
28
* PUBLIC: int __os_rename __P((DB_ENV *,
29
* PUBLIC: const char *, const char *, u_int32_t));
32
__os_rename(dbenv, old, new, flags)
34
const char *old, *new;
40
ret = DB_GLOBAL(j_rename) != NULL ?
41
DB_GLOBAL(j_rename)(old, new) : rename(old, new);
42
} while (ret != 0 && (ret = __os_get_errno()) == EINTR);
44
if (ret != 0 && flags == 0)
45
__db_err(dbenv, "rename %s %s: %s", old, new, strerror(ret));