[PATCH 4/4] winsup/utils: port getconf to 64-bit

2016-04-01 Thread Yaakov Selkowitz
The available specifications obviously differ on 32-bit and 64-bit, as already handled in . Signed-off-by: Yaakov Selkowitz --- winsup/utils/getconf.c | 35 +++ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git

[PATCH 3/4] cygwin: update sysconf for new features

2016-04-01 Thread Yaakov Selkowitz
POSIX spawn and thread barriers have since been added. Also fix a typo in _POSIX2_C_DEV (result is the same). Signed-off-by: Yaakov Selkowitz --- winsup/cygwin/sysconf.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/sysconf.cc

[PATCH 2/4] cygwin/math: make isinf functions signed

2016-04-01 Thread Yaakov Selkowitz
glibc returns -1 for negative infinity: http://man7.org/linux/man-pages/man3/isinfl.3.html https://sourceware.org/bugzilla/show_bug.cgi?id=15367 Signed-off-by: Yaakov Selkowitz --- winsup/cygwin/math/isinf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[PATCH 1/4] Feature test macros overhaul: Cygwin pthread.h

2016-04-01 Thread Yaakov Selkowitz
As a Cygwin-specific header, there is no need to guard functions based on capability macros. Instead, guard several blocks based on additions or removals in later versions of POSIX.1, along with a few which are only XSI or GNU extensions. Signed-off-by: Yaakov Selkowitz ---

[RFC PATCH v3] Refactor to avoid nonnull checks on "this" pointer.

2016-04-01 Thread Peter Foley
G++ 6.0 asserts that the "this" pointer is non-null for member functions. Refactor methods that check if this is non-null to resolve this. Signed-off-by: Peter Foley --- Just wanted to make sure that this approach looked good before I fix all the problematic files.

Re: [PATCH] Add without-library-checks

2016-04-01 Thread Corinna Vinschen
On Apr 1 09:31, Peter Foley wrote: > On Fri, Apr 1, 2016 at 8:16 AM, Corinna Vinschen > wrote: > > Can we please fold the --without-mingw-progs and --without-library-checks > > into a single option? Given the task is basically the same, the option > > name should

Re: [PATCH v2] Refactor to avoid nonnull checks on "this" pointer.

2016-04-01 Thread Peter Foley
On Fri, Apr 1, 2016 at 11:10 AM, Corinna Vinschen wrote: > As I mentioned in my first reply, I'd prefer if the callers check the > pointer explicitly. Changing the methods to static methods seems ... > wrong. Ugly, if you don't mind me saying so. Fair enough, I'll

Re: [PATCH v2] Refactor to avoid nonnull checks on "this" pointer.

2016-04-01 Thread Corinna Vinschen
On Apr 1 09:34, Peter Foley wrote: > On Fri, Apr 1, 2016 at 9:12 AM, Yaakov Selkowitz > wrote: > > See https://gcc.gnu.org/gcc-6/porting_to.html, section named "Optimizations > > remove null pointer checks for this". > > If there's an better way to do this, I'm all ears.

Re: [PATCH v2] Refactor to avoid nonnull checks on "this" pointer.

2016-04-01 Thread Corinna Vinschen
On Apr 1 08:12, Yaakov Selkowitz wrote: > On 2016-04-01 07:13, Corinna Vinschen wrote: > >On Mar 31 12:18, Peter Foley wrote: > >>G++ 6.0 asserts that the "this" pointer is non-null for member functions. > >>Refactor methods that check if this is non-null to be static where > >>necessary, and

Re: [PATCH v2] Refactor to avoid nonnull checks on "this" pointer.

2016-04-01 Thread Peter Foley
On Fri, Apr 1, 2016 at 9:12 AM, Yaakov Selkowitz wrote: > See https://gcc.gnu.org/gcc-6/porting_to.html, section named "Optimizations > remove null pointer checks for this". If there's an better way to do this, I'm all ears. However, it seems to come down to either making

Re: [PATCH] Add without-library-checks

2016-04-01 Thread Peter Foley
On Fri, Apr 1, 2016 at 8:16 AM, Corinna Vinschen wrote: > Can we please fold the --without-mingw-progs and --without-library-checks > into a single option? Given the task is basically the same, the option > name should reflect something along the lines of

Re: [PATCH v2] Refactor to avoid nonnull checks on "this" pointer.

2016-04-01 Thread Yaakov Selkowitz
On 2016-04-01 07:13, Corinna Vinschen wrote: On Mar 31 12:18, Peter Foley wrote: G++ 6.0 asserts that the "this" pointer is non-null for member functions. Refactor methods that check if this is non-null to be static where necessary, and remove the check where it is unnecessary. No, sorry, but

Re: [PATCH 1/4] Remove leftover cruft from config.h.in

2016-04-01 Thread Corinna Vinschen
On Mar 31 14:04, Peter Foley wrote: > HAVE_BUILTIN_MEMTEST and AC_ALLOCA were removed in 4bd8eb7d1b. > Cleanup leftover references. > Use the 3-arg form of AC_DEFINE. > MALLOC_DEBUG and NEWVFORK haven't been defined since 2008 > (46162537516c5e5fbb). Remove all references to tem. > Don't use

Re: [PATCH 4/6] forkables: Protect fork against dll-, exe-updates.

2016-04-01 Thread Corinna Vinschen
On Mar 30 21:12, Michael Haubenwallner wrote: > On 03/30/2016 09:04 PM, Yaakov Selkowitz wrote: > > On 2016-03-30 13:53, Michael Haubenwallner wrote: > >> To support in-cygwin package managers, the fork() implementation must > >> not rely on .exe and .dll files to stay in their original location,

Re: [PATCH 0/6] Protect fork() against dll- and exe-updates.

2016-04-01 Thread Corinna Vinschen
On Mar 30 11:55, Daniel Colascione wrote: > > > On 03/30/2016 11:53 AM, Michael Haubenwallner wrote: > > Hi, > > > > this is the updated and split series of patches to use hardlinks > > for creating the child process by fork(), in reply to > >

Re: [PATCH] Add without-library-checks

2016-04-01 Thread Corinna Vinschen
On Mar 31 12:33, Peter Foley wrote: > When cross-compiling a toolchan targeting cygwin, building cygwin1.dll > requires libgcc. > However, building libgcc requires the cygwin headers to be > installed. > Configuring cygwin requries the mingw-crt libraries, which require the > cygwin headers to be

Re: [PATCH v2] Refactor to avoid nonnull checks on "this" pointer.

2016-04-01 Thread Corinna Vinschen
On Mar 31 12:18, Peter Foley wrote: > G++ 6.0 asserts that the "this" pointer is non-null for member functions. > Refactor methods that check if this is non-null to be static where > necessary, and remove the check where it is unnecessary. No, sorry, but now. Converting all affected functions to