* (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

@@ -288,13 +288,13 @@ class fhandler_base
virtual char const * ttyname () { return get_name(); }
virtual int __stdcall read (void *ptr, size_t len) __attribute__ ((regparm (3)));
virtual int write (const void *ptr, size_t len);
virtual off_t lseek (off_t offset, int whence);
virtual __off32_t lseek (__off32_t offset, int whence);
virtual int lock (int, struct flock *);
virtual void dump ();
virtual int dup (fhandler_base *child);
virtual HANDLE mmap (caddr_t *addr, size_t len, DWORD access,
int flags, off_t off);
int flags, __off32_t off);
virtual int munmap (HANDLE h, caddr_t addr, size_t len);
virtual int msync (HANDLE h, caddr_t addr, size_t len, int flags);
virtual BOOL fixup_mmap_after_fork (HANDLE h, DWORD access, DWORD offset,
@@ -347,8 +347,8 @@ class fhandler_base
virtual void set_eof () {}
virtual DIR *opendir (path_conv& pc);
virtual dirent *readdir (DIR *);
virtual off_t telldir (DIR *);
virtual void seekdir (DIR *, off_t);
virtual __off32_t telldir (DIR *);
virtual void seekdir (DIR *, __off32_t);
virtual void rewinddir (DIR *);
virtual int closedir (DIR *);
};
@@ -382,7 +382,7 @@ class fhandler_socket: public fhandler_base
int ioctl (unsigned int cmd, void *);
int fcntl (int cmd, void *);
off_t lseek (off_t, int) { return 0; }
__off32_t lseek (__off32_t, int) { return 0; }
int close ();
void hclose (HANDLE) {close ();}
int dup (fhandler_base *child);
@@ -417,7 +417,7 @@ class fhandler_pipe: public fhandler_base
unsigned id;
public:
fhandler_pipe (DWORD devtype);
off_t lseek (off_t offset, int whence);
__off32_t lseek (__off32_t offset, int whence);
select_record *select_read (select_record *s);
select_record *select_write (select_record *s);
select_record *select_except (select_record *s);
@@ -489,7 +489,7 @@ class fhandler_dev_floppy: public fhandler_dev_raw
virtual int open (path_conv *, int flags, mode_t mode = 0);
virtual int close (void);
virtual off_t lseek (off_t offset, int whence);
virtual __off32_t lseek (__off32_t offset, int whence);
virtual int ioctl (unsigned int cmd, void *buf);
};
@@ -512,7 +512,7 @@ class fhandler_dev_tape: public fhandler_dev_raw
int open (path_conv *, int flags, mode_t mode = 0);
int close (void);
off_t lseek (off_t offset, int whence);
__off32_t lseek (__off32_t offset, int whence);
int __stdcall fstat (struct stat *buf, path_conv *) __attribute__ ((regparm (3)));
@@ -548,15 +548,15 @@ class fhandler_disk_file: public fhandler_base
int __stdcall fstat (struct stat *buf, path_conv *pc) __attribute__ ((regparm (3)));
int __stdcall fstat_helper (struct stat *buf) __attribute__ ((regparm (2)));
HANDLE mmap (caddr_t *addr, size_t len, DWORD access, int flags, off_t off);
HANDLE mmap (caddr_t *addr, size_t len, DWORD access, int flags, __off32_t off);
int munmap (HANDLE h, caddr_t addr, size_t len);
int msync (HANDLE h, caddr_t addr, size_t len, int flags);
BOOL fixup_mmap_after_fork (HANDLE h, DWORD access, DWORD offset,
DWORD size, void *address);
DIR *opendir (path_conv& pc);
struct dirent *readdir (DIR *);
off_t telldir (DIR *);
void seekdir (DIR *, off_t);
__off32_t telldir (DIR *);
void seekdir (DIR *, __off32_t);
void rewinddir (DIR *);
int closedir (DIR *);
};
@@ -572,8 +572,8 @@ class fhandler_cygdrive: public fhandler_disk_file
fhandler_cygdrive (int unit);
DIR *opendir (path_conv& pc);
struct dirent *readdir (DIR *);
off_t telldir (DIR *);
void seekdir (DIR *, off_t);
__off32_t telldir (DIR *);
void seekdir (DIR *, __off32_t);
void rewinddir (DIR *);
int closedir (DIR *);
int __stdcall fstat (struct stat *buf, path_conv *pc) __attribute__ ((regparm (3)));
@@ -606,7 +606,7 @@ class fhandler_serial: public fhandler_base
int tcflow (int);
int tcsetattr (int a, const struct termios *t);
int tcgetattr (struct termios *t);
off_t lseek (off_t, int) { return 0; }
__off32_t lseek (__off32_t, int) { return 0; }
int tcflush (int);
void dump ();
int is_tty () { return 1; }
@@ -837,7 +837,7 @@ class fhandler_tty_slave: public fhandler_tty_common
int tcflush (int);
int ioctl (unsigned int cmd, void *);
off_t lseek (off_t, int) { return 0; }
__off32_t lseek (__off32_t, int) { return 0; }
select_record *select_read (select_record *s);
int ready_for_read (int fd, DWORD howlong);
};
@@ -864,7 +864,7 @@ class fhandler_pty_master: public fhandler_tty_common
int tcflush (int);
int ioctl (unsigned int cmd, void *);
off_t lseek (off_t, int) { return 0; }
__off32_t lseek (__off32_t, int) { return 0; }
char *ptsname ();
void set_close_on_exec (int val);
@@ -903,7 +903,7 @@ class fhandler_dev_zero: public fhandler_base
int open (path_conv *, int flags, mode_t mode = 0);
int write (const void *ptr, size_t len);
int __stdcall read (void *ptr, size_t len) __attribute__ ((regparm (3)));
off_t lseek (off_t offset, int whence);
__off32_t lseek (__off32_t offset, int whence);
int close (void);
void dump ();
@@ -926,7 +926,7 @@ class fhandler_dev_random: public fhandler_base
int open (path_conv *, int flags, mode_t mode = 0);
int write (const void *ptr, size_t len);
int __stdcall read (void *ptr, size_t len) __attribute__ ((regparm (3)));
off_t lseek (off_t offset, int whence);
__off32_t lseek (__off32_t offset, int whence);
int close (void);
int dup (fhandler_base *child);
@@ -947,12 +947,12 @@ class fhandler_dev_mem: public fhandler_base
int open (path_conv *, int flags, mode_t mode = 0);
int write (const void *ptr, size_t ulen);
int __stdcall read (void *ptr, size_t len) __attribute__ ((regparm (3)));
off_t lseek (off_t offset, int whence);
__off32_t lseek (__off32_t offset, int whence);
int close (void);
int __stdcall fstat (struct stat *buf, path_conv *) __attribute__ ((regparm (3)));
int dup (fhandler_base *child);
HANDLE mmap (caddr_t *addr, size_t len, DWORD access, int flags, off_t off);
HANDLE mmap (caddr_t *addr, size_t len, DWORD access, int flags, __off32_t off);
int munmap (HANDLE h, caddr_t addr, size_t len);
int msync (HANDLE h, caddr_t addr, size_t len, int flags);
BOOL fixup_mmap_after_fork (HANDLE h, DWORD access, DWORD offset,
@@ -969,7 +969,7 @@ class fhandler_dev_clipboard: public fhandler_base
int open (path_conv *, int flags, mode_t mode = 0);
int write (const void *ptr, size_t len);
int __stdcall read (void *ptr, size_t len) __attribute__ ((regparm (3)));
off_t lseek (off_t offset, int whence);
__off32_t lseek (__off32_t offset, int whence);
int close (void);
int dup (fhandler_base *child);
@@ -977,7 +977,7 @@ class fhandler_dev_clipboard: public fhandler_base
void dump ();
private:
off_t pos;
__off32_t pos;
void *membuffer;
size_t msize;
bool eof;
@@ -995,7 +995,7 @@ class fhandler_windows: public fhandler_base
int write (const void *ptr, size_t len);
int __stdcall read (void *ptr, size_t len) __attribute__ ((regparm (3)));
int ioctl (unsigned int cmd, void *);
off_t lseek (off_t, int) { return 0; }
__off32_t lseek (__off32_t, int) { return 0; }
int close (void) { return 0; }
void set_close_on_exec (int val);
@@ -1021,7 +1021,7 @@ class fhandler_dev_dsp : public fhandler_base
int write (const void *ptr, size_t len);
int __stdcall read (void *ptr, size_t len) __attribute__ ((regparm (3)));
int ioctl (unsigned int cmd, void *);
off_t lseek (off_t, int);
__off32_t lseek (__off32_t, int);
int close (void);
int dup (fhandler_base * child);
void dump (void);