diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 7f94cc31e..4017e1d06 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2015-01-20 Corinna Vinschen + + * common.din (sockatmark): Export. + * net.cc (sockatmark): New function. + * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. + 2015-01-19 Corinna Vinschen * cygserver_ipc.h (ipc_retval): Add default constructor. diff --git a/winsup/cygwin/common.din b/winsup/cygwin/common.din index 67c30bb40..087e44d9a 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 9062e42fd..1e7a3b328 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 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) { diff --git a/winsup/cygwin/release/1.7.34 b/winsup/cygwin/release/1.7.34 index f64179379..f9a618c51 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: -------------