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 'winsup/cygwin/fhandler.h')
-rw-r--r--winsup/cygwin/fhandler.h24
1 files changed, 9 insertions, 15 deletions
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index 39e1e7573..cad30189f 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -14,8 +14,8 @@ details. */
#include "tty.h"
/* fcntl flags used only internaly. */
-#define O_NOSYMLINK 0x080000
-#define O_DIROPEN 0x100000
+#define O_NOSYMLINK 0x080000
+#define O_DIROPEN 0x100000
/* newlib used to define O_NDELAY differently from O_NONBLOCK. Now it
properly defines both to be the same. Unfortunately, we have to
@@ -36,10 +36,6 @@ details. */
so small. http://cygwin.com/ml/cygwin/2011-03/msg00541.html */
#define DEFAULT_PIPEBUFSIZE PREFERRED_IO_BLKSIZE
-/* Used for fhandler_pipe::create. Use an available flag which will
- never be used in Cygwin for this function. */
-#define PIPE_ADD_PID FILE_FLAG_FIRST_PIPE_INSTANCE
-
extern const char *windows_device_names[];
extern struct __cygwin_perfile *perfile_table;
#define __fmode (*(user_data->fmode_ptr))
@@ -182,8 +178,11 @@ class fhandler_base
HANDLE read_state;
public:
- long inc_refcnt () {return InterlockedIncrement (&_refcnt);}
- long dec_refcnt () {return InterlockedDecrement (&_refcnt);}
+ long refcnt(long i = 0)
+ {
+ debug_only_printf ("%p, %s, i %d, refcnt %ld", this, get_name (), i, _refcnt + i);
+ return _refcnt += i;
+ }
class fhandler_base *archetype;
int usecount;
@@ -558,7 +557,7 @@ class fhandler_socket: public fhandler_base
int open (int flags, mode_t mode = 0);
void __stdcall read (void *ptr, size_t& len) __attribute__ ((regparm (3)));
ssize_t __stdcall readv (const struct iovec *, int iovcnt, ssize_t tot = -1);
- inline ssize_t recv_internal (struct _WSAMSG *wsamsg, bool use_recvmsg) __attribute__ ((regparm (3)));
+ inline ssize_t recv_internal (struct _WSAMSG *wsamsg);
ssize_t recvfrom (void *ptr, size_t len, int flags,
struct sockaddr *from, int *fromlen);
ssize_t recvmsg (struct msghdr *msg, int flags);
@@ -1289,9 +1288,6 @@ class dev_console
bool insert_mode;
int use_mouse;
- bool ext_mouse_mode5;
- bool ext_mouse_mode6;
- bool ext_mouse_mode15;
bool use_focus;
bool raw_win32_keyboard_mode;
@@ -1374,7 +1370,6 @@ private:
ssize_t __stdcall write (const void *ptr, size_t len);
void doecho (const void *str, DWORD len) { (void) write (str, len); }
int close ();
- static bool exists () {return !!GetConsoleCP ();}
int tcflush (int);
int tcsetattr (int a, const struct termios *t);
@@ -1438,7 +1433,6 @@ class fhandler_pty_common: public fhandler_termios
int close ();
_off64_t lseek (_off64_t, int);
- bool bytes_available (DWORD& n);
void set_close_on_exec (bool val);
select_record *select_read (select_stuff *);
select_record *select_write (select_stuff *);
@@ -1555,7 +1549,6 @@ public:
void fixup_after_fork (HANDLE parent);
void fixup_after_exec ();
int tcgetpgrp ();
- void flush_to_slave ();
fhandler_pty_master (void *) {}
~fhandler_pty_master ();
@@ -1721,6 +1714,7 @@ class fhandler_dev_clipboard: public fhandler_base
_off64_t pos;
void *membuffer;
size_t msize;
+ bool eof;
public:
fhandler_dev_clipboard ();
int is_windows () { return 1; }