Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/search/hash.c')
-rw-r--r--newlib/libc/search/hash.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/newlib/libc/search/hash.c b/newlib/libc/search/hash.c
index 997acb3f6..0301fc03f 100644
--- a/newlib/libc/search/hash.c
+++ b/newlib/libc/search/hash.c
@@ -141,9 +141,9 @@ _DEFUN(__hash_open, (file, flags, mode, info, dflags),
new_table = 0;
if (!file || (flags & O_TRUNC) ||
#ifdef __USE_INTERNAL_STAT64
- (_stat64(file, &statbuf) && (errno == ENOENT))) {
+ (stat64(file, &statbuf) && (errno == ENOENT))) {
#else
- (_stat(file, &statbuf) && (errno == ENOENT))) {
+ (stat(file, &statbuf) && (errno == ENOENT))) {
#endif
if (errno == ENOENT)
errno = 0; /* Just in case someone looks at errno */
@@ -157,9 +157,9 @@ _DEFUN(__hash_open, (file, flags, mode, info, dflags),
a new .db file, then reinitialize the database */
if ((flags & O_CREAT) &&
#ifdef __USE_INTERNAL_STAT64
- _fstat64(hashp->fp, &statbuf) == 0 && statbuf.st_size == 0)
+ fstat64(hashp->fp, &statbuf) == 0 && statbuf.st_size == 0)
#else
- _fstat(hashp->fp, &statbuf) == 0 && statbuf.st_size == 0)
+ fstat(hashp->fp, &statbuf) == 0 && statbuf.st_size == 0)
#endif
new_table = 1;
@@ -316,11 +316,7 @@ init_hash(hashp, file, info)
const char *file;
const HASHINFO *info;
{
-#ifdef __USE_INTERNAL_STAT64
- struct stat64 statbuf;
-#else
struct stat statbuf;
-#endif
int nelem;
nelem = 1;
@@ -339,9 +335,9 @@ init_hash(hashp, file, info)
/* Fix bucket size to be optimal for file system */
if (file != NULL) {
#ifdef __USE_INTERNAL_STAT64
- if (_stat64(file, &statbuf))
+ if (stat64(file, &statbuf))
#else
- if (_stat(file, &statbuf))
+ if (stat(file, &statbuf))
#endif
return (NULL);
hashp->BSIZE = statbuf.st_blksize;