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:
authorCorinna Vinschen <corinna@vinschen.de>2015-01-20 21:23:20 +0300
committerCorinna Vinschen <corinna@vinschen.de>2015-01-20 21:23:20 +0300
commitd2264bce02974f1035333900234e336abf70affc (patch)
tree1a564647185920406c8e29baf1ef46dfff9cfb17 /winsup/cygwin/net.cc
parentd63bec588eaa420ec3e227cfadb8577911a17396 (diff)
* common.din (sockatmark): Export.
* net.cc (sockatmark): New function. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
Diffstat (limited to 'winsup/cygwin/net.cc')
-rw-r--r--winsup/cygwin/net.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
index 5c4959bdf..3c485c148 100644
--- a/winsup/cygwin/net.cc
+++ b/winsup/cygwin/net.cc
@@ -1,7 +1,7 @@
/* net.cc: network-related routines.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Red Hat, Inc.
+ 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Red Hat, Inc.
This file is part of Cygwin.
@@ -987,6 +987,19 @@ cygwin_getsockopt (int fd, int level, int optname, void *optval,
return res;
}
+/* POSIX.1-2001 */
+extern "C" int
+sockatmark (int fd)
+{
+ int ret;
+
+ fhandler_socket *fh = get (fd);
+ if (fh && fh->ioctl (SIOCATMARK, &ret) != -1)
+ return ret;
+ return -1;
+}
+
+/* BSD */
extern "C" int
getpeereid (int fd, uid_t *euid, gid_t *egid)
{