Yaakov Selkowitz | 26 Mar 06:25 2015
Picon

[PATCH] cygwin: add GNU basename(3)

winsup/cygwin/
* common.din (__gnu_basename): Export.
* path.cc (__gnu_basename): New function.

winsup/doc/
* posix.xml (std-gnu): Add basename.
(std-notes): Add note about two forms of basename.
---
This depends on the newlib patch currently under discussion.

 winsup/cygwin/common.din |  1 +
 winsup/cygwin/path.cc    | 28 ++++++++++++++++++++++++++++
 winsup/doc/posix.xml     |  6 +++++-
 3 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/winsup/cygwin/common.din b/winsup/cygwin/common.din
index 42098ff..f14b331 100644
--- a/winsup/cygwin/common.din
+++ b/winsup/cygwin/common.din
 <at>  <at>  -61,6 +61,7  <at>  <at>  __fsetlocking SIGFE
 __fwritable NOSIGFE
 __fwriting NOSIGFE
 __getreent NOSIGFE
+__gnu_basename NOSIGFE
 __infinity NOSIGFE
 __isinfd NOSIGFE
 __isinff NOSIGFE
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 47c687f..b05333f 100644
--- a/winsup/cygwin/path.cc
(Continue reading)

Jon TURNEY | 13 Mar 15:25 2015
Picon

[PATCH] Fix winsup/doc to install into prefix

By default, docdir and htmldir are defined in terms of prefix, so make sure to
define it, so their values are prefix-relative.

Without this, 'make install' installs the documentation into /share/doc/ unless
configured otherwise.

	* Makefile.in (prefix): Define.
---
 winsup/doc/ChangeLog   | 4 ++++
 winsup/doc/Makefile.in | 1 +
 2 files changed, 5 insertions(+)

diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog
index aefb41e..814e651 100644
--- a/winsup/doc/ChangeLog
+++ b/winsup/doc/ChangeLog
 <at>  <at>  -1,3 +1,7  <at>  <at> 
+2015-03-13  Jon TURNEY  <jon.turney <at> dronecode.org.uk>
+
+	* Makefile.in (prefix): Define.
+
 2015-03-12  Corinna Vinschen  <corinna <at> vinschen.de>

 	* ntsec.xml (ntsec-mapping-nsswitch-desc): Fix typo.
diff --git a/winsup/doc/Makefile.in b/winsup/doc/Makefile.in
index 55fd850..5b2f0ed 100644
--- a/winsup/doc/Makefile.in
+++ b/winsup/doc/Makefile.in
 <at>  <at>  -12,6 +12,7  <at>  <at>  SHELL =  <at> SHELL <at> 
 srcdir =  <at> srcdir <at> 
(Continue reading)

Alexey Pavlov | 12 Mar 19:18 2015
Picon

braces around scalar initializer for type

Building MSYS2 runtime I'm get:

/build2/msys2-runtime/src/msys2-runtime/winsup/cygwin/net.cc:82:56:
error: braces around scalar initializer for type 'u_char {aka unsigned
char}'
 const struct in6_addr in6addr_any = {{IN6ADDR_ANY_INIT}};

                          ^
/build2/msys2-runtime/src/msys2-runtime/winsup/cygwin/net.cc:83:66:
error: braces around scalar initializer for type 'u_char {aka unsigned
char}'
 const struct in6_addr in6addr_loopback = {{IN6ADDR_LOOPBACK_INIT}};

                                               ^
/build2/msys2-runtime/src/msys2-runtime/winsup/cygwin/../Makefile.common:43:
recipe for target 'net.o' failed

So I think next patch can be applied:

From 9c11fcf2fc74601eb48e8060b6575b56be111a02 Mon Sep 17 00:00:00 2001
From: Alexpux <alexey.pawlow <at> gmail.com>
Date: Thu, 12 Mar 2015 14:33:39 +0300
Subject: [PATCH] Fix error "braces around scalar initializer for type"

---
 winsup/cygwin/net.cc                   | 4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
index e06fd52..f9b317c 100644
(Continue reading)

Alexey Pavlov | 12 Mar 18:30 2015
Picon

Fix typo

From 9c11fcf2fc74601eb48e8060b6575b56be111a02 Mon Sep 17 00:00:00 2001
From: Alexpux <alexey.pawlow <at> gmail.com>
Date: Thu, 12 Mar 2015 14:33:39 +0300
Subject: [PATCH] Fix typos.

---
 winsup/cygwin/include/cygwin/version.h | 2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/winsup/cygwin/include/cygwin/version.h
b/winsup/cygwin/include/cygwin/version.h
index b46fe24..71d118e 100644
--- a/winsup/cygwin/include/cygwin/version.h
+++ b/winsup/cygwin/include/cygwin/version.h
 <at>  <at>  -467,7 +467,7  <at>  <at>  details. */
            putwc_unlocked, putwchar_unlocked.
       284: Export sockatmark.
       285: Export wcstold.
-      285: Export cabsl, cimagl, creall, finitel, hypotl, sqrtl.
+      286: Export cabsl, cimagl, creall, finitel, hypotl, sqrtl.
       287: Export issetugid.
      */

--

-- 
2.3.0

Jon TURNEY | 12 Mar 15:05 2015
Picon

[PATCH] Improve stackdumps on x86_64


I was looking at the crash reported at [1]. Processing the stackdump gives:

> 0x000000018006ff23    signal_exit                                exceptions.cc:1234
> 0x00000001800713ea    _cygtls::call_signal_handler()             exceptions.cc:1490
> 0x0000000180121d04    sig_send(_pinfo*, siginfo_t&, _cygtls*)    sigproc.cc:714
> 0x000000018011ee5e    _pinfo::kill(siginfo_t&)                   signal.cc:252
> 0x000000018011f32b    kill0                                      signal.cc:303
> 0x000000018011f4fc    raise                                      signal.cc:289
> 0x000000018011f7bf    abort                                      signal.cc:376
> 0x00000001801528c5    dlfree                                     malloc.cc:4762
> 0x00000001800c52b3    free                                       sync.h:36
> 0x000000018011ae5b    ??                                         sigfe.s:43

Which is not entirely helpful.

We can see that an abort signal is being raised inside free, but the 
stacktrace stops at _sigbe, because unwinding that frame requires 
special measures.

Presumably run has some invalid heap use going on, but annoyingly the 
stackdump stops short of identifying the problem line.

Attached is a patch which teaches stack_info::walk() how to unwind these 
frames on x86_64.

Also attached is a small testcase, which currently produces a similar 
stackdump truncated at _sigbe, or with my patch applied:

> 0x0000000180070238    signal_exit                                exceptions.cc:1321
(Continue reading)

Yaakov Selkowitz | 10 Mar 17:26 2015
Picon

[PATCH] cygwin: fix __x86_64__ conditional in stdint.h

Signed-off-by: Yaakov Selkowitz <yselkowi <at> redhat.com>
---
 winsup/cygwin/ChangeLog        | 4 ++++
 winsup/cygwin/include/stdint.h | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 550490a..cd2dbb9 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
 <at>  <at>  -1,3 +1,7  <at>  <at> 
+2015-03-10  Yaakov Selkowitz  <yselkowitz <at> cygwin.com>
+
+	* include/stdint.h: Fix __x86_64__ conditional.
+
 2015-03-05  Corinna Vinschen  <corinna <at> vinschen.de>

 	* tty.h (tty::set_master_ctl_closed): Rename from set_master_closed.
diff --git a/winsup/cygwin/include/stdint.h b/winsup/cygwin/include/stdint.h
index b670884..94b6b76 100644
--- a/winsup/cygwin/include/stdint.h
+++ b/winsup/cygwin/include/stdint.h
 <at>  <at>  -114,7 +114,7  <at>  <at>  typedef unsigned long long uintmax_t;
 #if !defined (__cplusplus) || defined (__STDC_LIMIT_MACROS) \
     || defined (__INSIDE_CYGWIN__)

-#if __x86_64__
+#ifdef __x86_64__
 # define __I64(n) n ## L
 # define __U64(n) n ## UL
(Continue reading)

Jon TURNEY | 19 Feb 14:21 2015
Picon

[PATCH] Compile sigfe.s with CFLAGS


CFLAGS isn't used when compiling the generated file sigfe.s, so if that 
contains -g, it lacks source debugging information.

2015-02-19  Jon TURNEY  <jon.turney <at> dronecode.org.uk>

	* Makefile.in (sigfe.o): Use CFLAGS.

Index: cygwin/Makefile.in
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/Makefile.in,v
retrieving revision 1.278
diff -u -u -p -r1.278 Makefile.in
--- cygwin/Makefile.in	28 Jan 2015 11:43:06 -0000	1.278
+++ cygwin/Makefile.in	19 Feb 2015 13:12:11 -0000
 <at>  <at>  -710,7 +710,7  <at>  <at>  sigfe.s: $(DEF_FILE)
 	[ -s $ <at>  ] && touch $ <at> 

 sigfe.o: sigfe.s
-	$(CC) -c -o $ <at>  $<
+	$(CC) ${CFLAGS} -c -o $ <at>  $<

 ctags: CTAGS
 tags:  CTAGS
Pierre A. Humblet | 23 Jan 03:05 2015
Picon

[PATCH] Add-on to gethostbyname2

Add-on to gethostbyname2, as discussed previously on main list.
The diff is also attached.

Pierre

2015-01-22  Pierre A. Humblet <pierre <at> phumblet.no-ip.org>

         * net.cc (cygwin_inet_pton): Declare.
         (gethostby_specials): New function.
         (gethostby_helper): Change returned addrtype in 4-to-6 case.
         (gethostbyname2): Call gethostby_specials.

cvs diff -up net.cc
Index: net.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/net.cc,v
retrieving revision 1.322
diff -u -p -r1.322 net.cc
--- net.cc      20 Jan 2015 18:23:19 -0000      1.322
+++ net.cc      23 Jan 2015 00:02:22 -0000
 <at>  <at>  -72,6 +72,7  <at>  <at>  extern "C"
    int __stdcall rcmd (char **ahost, unsigned short inport, char *locuser,
                       char *remuser, char *cmd, SOCKET * fd2p);
    int sscanf (const char *, const char *, ...);
+  int cygwin_inet_pton(int, const char *, void *);
    int cygwin_inet_aton(const char *, struct in_addr *);
    const char *cygwin_inet_ntop (int, const void *, char *, socklen_t);
    int dn_length1(const unsigned char *, const unsigned char *,
 <at>  <at>  -1168,6 +1169,97  <at>  <at>  memcpy4to6 (char *dst, const u_char *src
    memcpy (dst + 12, src, NS_INADDRSZ);
(Continue reading)

Yaakov Selkowitz | 18 Dec 18:21 2014

[PATCH] spelling fix for struct passwd

This field is spelled pw_passwd on Linux, and I haven't found a 
different spelling on other platforms (it is not mandated by POSIX). 
Patch attached.

--
Yaakov

Attachment (doc-ntsec-passwd.patch): text/x-patch, 730 bytes
Yaakov Selkowitz | 18 Dec 17:13 2014

[PATCH] Export new stdio and stdio_ext functions

These patches export the BSD, GNU, and Solaris stdio extensions (27 in 
total) recently added to newlib.

--
Yaakov
Attachment (cygwin-stdio-new.patch): text/x-patch, 4306 bytes
Attachment (doc-stdio-new.patch): text/x-patch, 3469 bytes
Yaakov Selkowitz | 5 Dec 04:08 2014

[PATCH] qsort_r (pending newlib patch)

Attached.

--
Yaakov
2014-12-04  Yaakov Selkowitz  <yselkowitz <at> ...>

	doc/
	* new-features.xml (ov-new1.7.34): Document qsort_r and __bsd_qsort_r.
	* posix.xml (std-bsd): Add qsort_r.
	(std-gnu): Ditto.
	(std-notes): Add section for qsort_r.

	cygwin/
	* common.din (__bsd_qsort_r): Add.
	(qsort_r): Add.
	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.

Index: doc/new-features.xml
===================================================================
RCS file: /cvs/src/src/winsup/doc/new-features.xml,v
retrieving revision 1.36
diff -u -p -r1.36 new-features.xml
--- doc/new-features.xml	13 Nov 2014 13:10:26 -0000	1.36
+++ doc/new-features.xml	5 Dec 2014 01:22:25 -0000
 <at>  <at>  -36,6 +36,10  <at>  <at>  are supposed to work.  Finally implement
 getfacl(1)/setfacl(1) accordingly.
 </para></listitem>

(Continue reading)


Gmane