mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8207744: Clean up inconsistent use of opendir/closedir versus opendir64/closedir64
Reviewed-by: bsrbnd, mbaesken, bchristi, simonis
This commit is contained in:
parent
091aff1178
commit
67b2c6fc66
7 changed files with 50 additions and 38 deletions
|
@ -50,11 +50,6 @@
|
|||
} while((_result == -1) && (errno == EINTR)); \
|
||||
} while(0)
|
||||
|
||||
#if defined(_ALLBSD_SOURCE)
|
||||
#define dirent64 dirent
|
||||
#define readdir64 readdir
|
||||
#endif
|
||||
|
||||
#if !defined(__solaris__) || defined(__sparcv9) || defined(amd64)
|
||||
#define fileopen fopen
|
||||
#define filegets fgets
|
||||
|
@ -121,7 +116,7 @@ findZoneinfoFile(char *buf, size_t size, const char *dir)
|
|||
{
|
||||
DIR *dirp = NULL;
|
||||
struct stat statbuf;
|
||||
struct dirent64 *dp = NULL;
|
||||
struct dirent *dp = NULL;
|
||||
char *pathname = NULL;
|
||||
int fd = -1;
|
||||
char *dbuf = NULL;
|
||||
|
@ -133,7 +128,7 @@ findZoneinfoFile(char *buf, size_t size, const char *dir)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
while ((dp = readdir64(dirp)) != NULL) {
|
||||
while ((dp = readdir(dirp)) != NULL) {
|
||||
/*
|
||||
* Skip '.' and '..' (and possibly other .* files)
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue