* net.cc (sethostname): New function.
* common.din (sethostname): Export
* include/cygwin/version.h (CYGWIN_VERSION_DLL_MAJOR): Bump to 2001.
(CYGWIN_VERSION_DLL_MINOR): Set to 0.
* new-features.xml (ov-new): Rename from ov-new1.7.
(ov-new2.1): Add new section. Document sethostname.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
+2015-06-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * net.cc (sethostname): New function.
+ * common.din (sethostname): Export
+ * include/cygwin/version.h (CYGWIN_VERSION_DLL_MAJOR): Bump to 2001.
+ (CYGWIN_VERSION_DLL_MINOR): Set to 0.
+
2015-06-15 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (LOCK_EVENTS): Don't enter critical section with
sendto = cygwin_sendto SIGFE
setbuf SIGFE
setbuffer SIGFE
+sethostname SIGFE
setdtablesize SIGFE
setegid SIGFE
setenv SIGFE
the Cygwin shared library". This version is used to track important
changes to the DLL and is mainly informative in nature. */
-#define CYGWIN_VERSION_DLL_MAJOR 2000
-#define CYGWIN_VERSION_DLL_MINOR 5
+#define CYGWIN_VERSION_DLL_MAJOR 2001
+#define CYGWIN_VERSION_DLL_MINOR 0
/* Major numbers before CYGWIN_VERSION_DLL_EPOCH are
incompatible. */
return res;
}
+extern "C" int
+sethostname (const char *name, size_t len)
+{
+ WCHAR wname[MAX_COMPUTERNAME_LENGTH + 1];
+
+ sys_mbstowcs (wname, MAX_COMPUTERNAME_LENGTH + 1, name, len);
+ if (!SetComputerNameExW (ComputerNamePhysicalDnsHostname, wname))
+ {
+ __seterrno ();
+ return -1;
+ }
+ return 0;
+}
+
/* exported as gethostbyname: standards? */
extern "C" struct hostent *
cygwin_gethostbyname (const char *name)
What's new:
-----------
+- New API: sethostname.
+
What changed:
-------------
+2015-06-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * new-features.xml (ov-new): Rename from ov-new1.7.
+ (ov-new2.1): Add new section. Document sethostname.
+
2015-06-12 Jon Turney <jon.turney@dronecode.org.uk>
* Makefile.in (install-man, utils2man.stamp): Add rules to build
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-<sect1 id="ov-new1.7"><title>What's new and what changed in Cygwin</title>
+<sect1 id="ov-new"><title>What's new and what changed in Cygwin</title>
+
+<sect2 id="ov-new2.1"><title>What's new and what changed in 2.1</title>
+
+<itemizedlist mark="bullet">
+
+<listitem><para>
+New API: sethostname.
+</para></listitem>
+
+</itemizedlist>
+
+</sect2>
<sect2 id="ov-new2.0"><title>What's new and what changed in 2.0</title>