aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2015-01-20 18:23:20 +0000
committerCorinna Vinschen <corinna@vinschen.de>2015-01-20 18:23:20 +0000
commitd2264bce02974f1035333900234e336abf70affc (patch)
tree1a564647185920406c8e29baf1ef46dfff9cfb17 /winsup/cygwin
parentd63bec588eaa420ec3e227cfadb8577911a17396 (diff)
downloadnewlib-d2264bce02974f1035333900234e336abf70affc.zip
newlib-d2264bce02974f1035333900234e336abf70affc.tar.gz
newlib-d2264bce02974f1035333900234e336abf70affc.tar.bz2
* common.din (sockatmark): Export.
* net.cc (sockatmark): New function. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/common.din1
-rw-r--r--winsup/cygwin/include/cygwin/version.h5
-rw-r--r--winsup/cygwin/net.cc15
-rw-r--r--winsup/cygwin/release/1.7.343
5 files changed, 27 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 7f94cc3..4017e1d 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,9 @@
+2015-01-20 Corinna Vinschen <corinna@vinschen.de>
+
+ * common.din (sockatmark): Export.
+ * net.cc (sockatmark): New function.
+ * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
+
2015-01-19 Corinna Vinschen <corinna@vinschen.de>
* cygserver_ipc.h (ipc_retval): Add default constructor.
diff --git a/winsup/cygwin/common.din b/winsup/cygwin/common.din
index 67c30bb..087e44d 100644
--- a/winsup/cygwin/common.din
+++ b/winsup/cygwin/common.din
@@ -1118,6 +1118,7 @@ sinhf NOSIGFE
siprintf SIGFE
sleep SIGFE
snprintf SIGFE
+sockatmark SIGFE
socket = cygwin_socket SIGFE
socketpair SIGFE
spawnl SIGFE
diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h
index 9062e42..1e7a3b3 100644
--- a/winsup/cygwin/include/cygwin/version.h
+++ b/winsup/cygwin/include/cygwin/version.h
@@ -1,7 +1,7 @@
/* version.h -- Cygwin version numbers and accompanying documentation.
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.
@@ -465,12 +465,13 @@ details. */
fputc_unlocked, fputs_unlocked, fputwc_unlocked, fputws_unlocked,
fread_unlocked, fwrite_unlocked, getwc_unlocked, getwchar_unlocked,
putwc_unlocked, putwchar_unlocked.
+ 284: Export sockatmark.
*/
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
#define CYGWIN_VERSION_API_MAJOR 0
-#define CYGWIN_VERSION_API_MINOR 283
+#define CYGWIN_VERSION_API_MINOR 284
/* There is also a compatibity version number associated with the
shared memory regions. It is incremented when incompatible
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
index 5c4959b..3c485c1 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)
{
diff --git a/winsup/cygwin/release/1.7.34 b/winsup/cygwin/release/1.7.34
index f641793..f9a618c 100644
--- a/winsup/cygwin/release/1.7.34
+++ b/winsup/cygwin/release/1.7.34
@@ -30,6 +30,9 @@ What's new:
fputws_unlocked, fread_unlocked, fwrite_unlocked, getwc_unlocked,
getwchar_unlocked, putwc_unlocked, putwchar_unlocked.
+- New API: sockatmark.
+
+
What changed:
-------------