+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.
/* 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.
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
/* 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.
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)
{