* (child_info.h, cygheap.h, dcrt0.cc, dir.cc, fhandler.cc, fhandler.h,

fhandler_clipboard.cc, fhandler_disk_file.cc, fhandler_dsp.cc,
	fhandler_floppy.cc, fhandler_mem.cc, fhandler_random.cc,
	fhandler_tape.cc, fhandler_zero.cc, grp.cc, mmap.cc, passwd.cc,
	pinfo.cc, pinfo.h, pipe.cc, sec_acl.cc, sec_helper.cc, security.cc,
	security.h, spawn.cc, syscalls.cc, thread.h, uinfo.cc, winsup.h):
	Change usage of uid_t to __uid16_t, gid_t to __gid16_t and
	off_t to __off32_t throughout.  Use INVALID_UID, INVALID_GID and
	INVALID_SEEK instead casting -1 to the appropriate type.
	* winsup.h: Define INVALID_UID, INVALID_GID and INVALID_SEEK.
	* include/cygwin/acl.h: Define internal __aclent16_t and __aclent32_t
	types.  Don't declare acl functions when compiling Cygwin.
	* include/cygwin/grp.h: Declare getgrgid() and getgrnam() with
	correct types for internal usage.
This commit is contained in:
Corinna Vinschen
2002-02-10 13:38:51 +00:00
parent a505db6554
commit de4e0d3001
32 changed files with 231 additions and 189 deletions

View File

@@ -65,8 +65,8 @@ fhandler_disk_file::fstat (struct stat *buf, path_conv *pc)
{
int res = -1;
int oret;
uid_t uid;
gid_t gid;
__uid16_t uid;
__gid16_t gid;
int open_flags = O_RDONLY | O_BINARY | O_DIROPEN;
if (!pc)
@@ -455,7 +455,7 @@ fhandler_disk_file::lock (int cmd, struct flock *fl)
startpos = 0;
break;
case SEEK_CUR:
if ((off_t) (startpos = lseek (0, SEEK_CUR)) == (off_t)-1)
if ((__off32_t) (startpos = lseek (0, SEEK_CUR)) == ILLEGAL_SEEK)
return -1;
break;
case SEEK_END:
@@ -714,14 +714,14 @@ fhandler_disk_file::readdir (DIR *dir)
return res;
}
off_t
__off32_t
fhandler_disk_file::telldir (DIR *dir)
{
return dir->__d_position;
}
void
fhandler_disk_file::seekdir (DIR *dir, off_t loc)
fhandler_disk_file::seekdir (DIR *dir, __off32_t loc)
{
rewinddir (dir);
while (loc > dir->__d_position)
@@ -818,14 +818,14 @@ fhandler_cygdrive::readdir (DIR *dir)
return dir->__d_dirent;
}
off_t
__off32_t
fhandler_cygdrive::telldir (DIR *dir)
{
return fhandler_disk_file::telldir (dir);
}
void
fhandler_cygdrive::seekdir (DIR *dir, off_t loc)
fhandler_cygdrive::seekdir (DIR *dir, __off32_t loc)
{
if (!iscygdrive_root ())
return fhandler_disk_file::seekdir (dir, loc);