diff options
author | Christopher Faylor <me@cgf.cx> | 2005-07-05 03:16:46 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-07-05 03:16:46 +0000 |
commit | 2f9ae2ed94384a3df6687545338e363654dd7d8f (patch) | |
tree | 1e3a8d3c5c555b498bb165b66abac6994ea96127 /winsup/cygwin/fhandler.h | |
parent | 26edeb6a7f6c541a25ee7fa4c201b24fea01cc50 (diff) | |
download | cygnal-2f9ae2ed94384a3df6687545338e363654dd7d8f.tar.gz cygnal-2f9ae2ed94384a3df6687545338e363654dd7d8f.tar.bz2 cygnal-2f9ae2ed94384a3df6687545338e363654dd7d8f.zip |
Change foo (void) to foo () for all c++ functions throughout. Remove all
fhandler_*::dump functions throughout.
* fhandler.h (fhandler_dev_mem::close): Remove pass-through function in favor
of virtual method.
(handler_dev_raw::close): Ditto.
(fhandler_dev_clipboard::fixup_after_exec): New method.
* fhandler_dev_mem.cc (fhandler_dev_mem::close): Eliminate pass through
* fhandler_dev_raw.cc (fhandler_dev_raw::close): Ditto.
* fhandler_clipboard.cc (fhandler_dev_clipboard::close): Don't go to extra
effort when execing.
(fhandler_dev_clipboard::fixup_after_exec): New function.
* fhandler_console.cc (fhandler_console::close): Don't do "extra stuff" when we
know we're execing.
* fhandler_disk_file.cc (fhandler_disk_file::close): Ditto.
* fhandler_dsp.cc (fhandler_dev_dsp::close): Ditto.
* fhandler_fifo.cc (fhandler_fifo.cc::close): Ditto. function in favor of base
function.
* fhandler_random.cc (fhandler_dev_random::close): Ditto.
* fhandler_registry.cc (fhandler_registry::close): Ditto.
* fhandler_tty.cc (fhandler_tty_slave::close): Ditto.
* fhandler_virtual.cc (fhandler_virtual::close): Ditto.
* pinfo.cc (proc_waiter): Remove unneeded hExeced declaration.
* sigproc.cc: Ditto.
* winsup.h (hExeced): Define here.
* fhandler_virtual.cc (fhandler_virtual::fixup_after_exec): Just call close()
to reinitialize things to known state.
Diffstat (limited to 'winsup/cygwin/fhandler.h')
-rw-r--r-- | winsup/cygwin/fhandler.h | 70 |
1 files changed, 27 insertions, 43 deletions
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index cb0f5b196..0165c28ff 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -279,7 +279,7 @@ class fhandler_base virtual int __stdcall ftruncate (_off64_t) __attribute__ ((regparm (2))); virtual int __stdcall link (const char *) __attribute__ ((regparm (2))); virtual int __stdcall utimes (const struct timeval *) __attribute__ ((regparm (2))); - virtual int __stdcall fsync (void) __attribute__ ((regparm (1))); + virtual int __stdcall fsync () __attribute__ ((regparm (1))); virtual int ioctl (unsigned int cmd, void *); virtual int fcntl (int cmd, void *); virtual char const *ttyname () { return get_name (); } @@ -289,7 +289,6 @@ class fhandler_base virtual ssize_t writev (const struct iovec *, int iovcnt, ssize_t tot = -1); virtual _off64_t lseek (_off64_t offset, int whence); virtual int lock (int, struct __flock64 *); - virtual void dump (); virtual int dup (fhandler_base *child); virtual HANDLE mmap (caddr_t *addr, size_t len, DWORD access, @@ -389,16 +388,16 @@ class fhandler_socket: public fhandler_base void af_local_set_secret (char *); void af_local_setblocking (bool &, bool &); void af_local_unsetblocking (bool, bool); - void af_local_set_cred (void); + void af_local_set_cred (); void af_local_copy (fhandler_socket *); - bool af_local_recv_secret (void); - bool af_local_send_secret (void); - bool af_local_recv_cred (void); - bool af_local_send_cred (void); - int af_local_accept (void); + bool af_local_recv_secret (); + bool af_local_send_secret (); + bool af_local_recv_cred (); + bool af_local_send_cred (); + int af_local_accept (); public: - int af_local_connect (void); - void af_local_set_sockpair_cred (void); + int af_local_connect (); + void af_local_set_sockpair_cred (); private: struct _WSAPROTOCOL_INFOA *prot_info_ptr; @@ -576,11 +575,9 @@ class fhandler_dev_raw: public fhandler_base fhandler_dev_raw (); public: - ~fhandler_dev_raw (void); + ~fhandler_dev_raw (); int open (int flags, mode_t mode = 0); - int close (void); - void raw_read (void *ptr, size_t& ulen); int raw_write (const void *ptr, size_t ulen); @@ -617,7 +614,7 @@ class fhandler_dev_tape: public fhandler_dev_raw bool is_rewind_device () { return get_minor () < 128; } unsigned int driveno () { return (unsigned int) get_minor () & 0x7f; } - void drive_init (void); + void drive_init (); inline bool _lock (); inline int unlock (int ret = 0); @@ -626,7 +623,7 @@ class fhandler_dev_tape: public fhandler_dev_raw fhandler_dev_tape (); virtual int open (int flags, mode_t mode = 0); - virtual int close (void); + virtual int close (); void raw_read (void *ptr, size_t& ulen); int raw_write (const void *ptr, size_t ulen); @@ -645,7 +642,7 @@ class fhandler_dev_tape: public fhandler_dev_raw class fhandler_disk_file: public fhandler_base { - void touch_ctime (void); + void touch_ctime (); public: fhandler_disk_file (); @@ -724,7 +721,6 @@ class fhandler_serial: public fhandler_base int tcgetattr (struct termios *t); _off64_t lseek (_off64_t, int) { return 0; } int tcflush (int); - void dump (); int is_tty () { return 1; } void fixup_after_fork (HANDLE parent); void fixup_after_exec (); @@ -1027,7 +1023,6 @@ class fhandler_dev_null: public fhandler_base fhandler_dev_null (); int open (int, mode_t); - void dump (); select_record *select_read (select_record *s); select_record *select_write (select_record *s); select_record *select_except (select_record *s); @@ -1041,8 +1036,6 @@ class fhandler_dev_zero: public fhandler_base int write (const void *ptr, size_t len); void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3))); _off64_t lseek (_off64_t offset, int whence); - - void dump (); }; class fhandler_dev_random: public fhandler_base @@ -1061,10 +1054,8 @@ class fhandler_dev_random: public fhandler_base int write (const void *ptr, size_t len); void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3))); _off64_t lseek (_off64_t offset, int whence); - int close (void); + int close (); int dup (fhandler_base *child); - - void dump (); }; class fhandler_dev_mem: public fhandler_base @@ -1075,13 +1066,12 @@ class fhandler_dev_mem: public fhandler_base public: fhandler_dev_mem (); - ~fhandler_dev_mem (void); + ~fhandler_dev_mem (); int open (int flags, mode_t mode = 0); int write (const void *ptr, size_t ulen); void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3))); _off64_t lseek (_off64_t offset, int whence); - int close (void); int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2))); int dup (fhandler_base *child); @@ -1090,30 +1080,25 @@ class fhandler_dev_mem: public fhandler_base int msync (HANDLE h, caddr_t addr, size_t len, int flags); bool fixup_mmap_after_fork (HANDLE h, DWORD access, int flags, _off64_t offset, DWORD size, void *address); - - void dump (); } ; class fhandler_dev_clipboard: public fhandler_base { + _off64_t pos; + void *membuffer; + size_t msize; + bool eof; public: fhandler_dev_clipboard (); - int is_windows (void) { return 1; } + int is_windows () { return 1; } int open (int flags, mode_t mode = 0); int write (const void *ptr, size_t len); void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3))); _off64_t lseek (_off64_t offset, int whence); - int close (void); + int close (); int dup (fhandler_base *child); - - void dump (); - - private: - _off64_t pos; - void *membuffer; - size_t msize; - bool eof; + void fixup_after_exec (); }; class fhandler_windows: public fhandler_base @@ -1123,13 +1108,13 @@ class fhandler_windows: public fhandler_base int method_; // write method (Post or Send) public: fhandler_windows (); - int is_windows (void) { return 1; } + int is_windows () { return 1; } int open (int flags, mode_t mode = 0); int write (const void *ptr, size_t len); void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3))); int ioctl (unsigned int cmd, void *); _off64_t lseek (_off64_t, int) { return 0; } - int close (void) { return 0; } + int close () { return 0; } void set_close_on_exec (bool val); void fixup_after_fork (HANDLE parent); @@ -1160,9 +1145,8 @@ class fhandler_dev_dsp: public fhandler_base void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3))); int ioctl (unsigned int cmd, void *); _off64_t lseek (_off64_t, int); - int close (void); + int close (); int dup (fhandler_base *child); - void dump (void); void fixup_after_fork (HANDLE parent); void fixup_after_exec (); private: @@ -1194,7 +1178,7 @@ class fhandler_virtual : public fhandler_base _off64_t lseek (_off64_t, int); int dup (fhandler_base *child); int open (int flags, mode_t mode = 0); - int close (void); + int close (); int __stdcall fstat (struct stat *buf) __attribute__ ((regparm (2))); int __stdcall fchmod (mode_t mode) __attribute__ ((regparm (1))); int __stdcall fchown (__uid32_t uid, __gid32_t gid) __attribute__ ((regparm (2))); @@ -1246,7 +1230,7 @@ class fhandler_registry: public fhandler_proc int open (int flags, mode_t mode = 0); int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2))); bool fill_filebuf (); - int close (void); + int close (); }; class pinfo; |