Re: gcc / gfortran 5.x

2017-11-27 Thread Keith Christian
Yaakov,

To help Hans a bit, do we know is the Wayback Machine still working
(I've never used it.)

Or, Hans could keep a gfortran 5.x system around, or roll back the
latest Cygwin updates until he's had a chance to as you say, fix the
code.

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: gcc / gfortran 5.x

2017-11-27 Thread Achim Gratz
LMH writes:
> You can have as many cygwin installations on your system as you want, just 
> name the
> root folder and install folder something different for each one. There are 
> potential
> problems if you try to run more than one version at the same time.

As long as they don't see each other via PATH or try to run daemons on
the same port you'll have no trouble running them all in parallel.

> I start the older cygwin terminals using a .bat file that configures the 
> /cygwin/bin
> PATH environment variable for the version of cygwin I are running.

Well, I'd rather suggest to modify system settings and create a system
or user variable CYGWIN_NOWINPATH=1.  That keeps the Windows PATH out of
Cygwin entirely, if you need to graft something back that you need, you
can do that in Cygwin by inspecting $ORIGINAL_PATH.  Provide a shortcut
to mintty in each of your Cygwin installations that uses the respective
installation directory as the CWD and have it start a login shell; you
need to use an absolute path, so '/usr/bin/bash -l'.  You might want to
give each shortcut a different foreground/background color in mintty so
you can tell them apart more easily.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: gcc / gfortran 5.x

2017-11-27 Thread Marco Atzeri

On 27/11/2017 20:29, Keith Christian wrote:

Yaakov,

To help Hans a bit, do we know is the Wayback Machine still working
(I've never used it.)


http://www.crouchingtigerhiddenfruitbat.org/Cygwin/timemachine.html


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: gcc / gfortran 5.x

2017-11-27 Thread LMH
Hans Horn wrote:
> Group,
> 
> I noticed that cywgin's gcc/gfortran has moved whole sale to gcc 6.4.
> How can I get the latest release of the 5.x branch (32 and 64bit) back?
> I'm trying to build a legacy suite of programs that I know builds under 5.x, 
> but
> fails miserably under 6.4.
> 
> Thanks,
> H.
> 
> 
> -- 
> Problem reports:   http://cygwin.com/problems.html
> FAQ:   http://cygwin.com/faq/
> Documentation: http://cygwin.com/docs.html
> Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
> 
> 

I keep older cygwin installations around to support code that won't compiler on 
newer
compilers and doesn't use any newer language features. This code often isn't 
worth
the expenditure to bring up to date. As long as the compiled binaries still run 
on
current systems, the code won't get updated unless the update is a minor fix.

You can have as many cygwin installations on your system as you want, just name 
the
root folder and install folder something different for each one. There are 
potential
problems if you try to run more than one version at the same time. I have had
different answers on this but I don't do it in case there may be problems that 
aren't
evident.

I start the older cygwin terminals using a .bat file that configures the 
/cygwin/bin
PATH environment variable for the version of cygwin I are running.

The .bat file looks like,

@echo off

:: remove "C:\cygwin\bin" from PATH
set "PATH=;%PATH%;"
set "PATH=%PATH:;;=;%"
set "PATH=;%PATH:;C:\cygwin\bin;=;%;"
set "PATH=%PATH:;;=%"

:: create a local environment variable for the alternate cygwin version 
(cygwin2)
set "PATH=C:\cygwin2\bin;%PATH%"
start "" /b C:\cygwin2\bin\mintty.exe -i /Cygwin-Terminal.ico -

I leave this .bat file in the install directory for the alternate cygwin and 
have a
shortcut on my desktop that runs the bat file. When I want to start an alternate
version of cygwin, I just click on the icon I want. I also have modified the 
terminal
settings so that the background color of the bash window is different for each
version I have installed. That reminds me of what version of cygwin I am in.

If this is something you really need, like everything else, keep a backup copy 
of the
cygwin root directory and install directory. The time machine site has worked 
for me
in the past, but it was very slow. You probably will want to download using 
wget and
be prepared to leave going it all day.

LMH





--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: [ANNOUNCEMENT] Cygnal 2.8.99.97.

2017-11-27 Thread Kaz Kylheku

On 23.11.2017 22:00, Brian Inglis wrote:
Sorry, it was not obvious to me that this was *NOT* an official 
announcement,

Cygnal is *NOT* a Cygwin package,
and should *NOT* have been posted with that subject prefix:
that post is deceptive.


I used [ANNOUNCEMENT] simply because I saw the tag on other 
announcements.


Some people might have filters based on this exact subject line tag;
inventing a different, similar tag would evade those filters, possibly
to someone's chagrin.

I apologize to people who were curious about this, yet then disappointed
to discover that it's something other than a program that they can just
install under Cygwin and then use. Also, sorry if I broke any automated
process which relies on these specially formatted subject lines matching
official packages.

I will remember to refrain from using the tag in the future.
(which could easily be well over a year from now; whenever is the next
time I sync up with Cygwin mainline.)


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: gcc / gfortran 5.x

2017-11-27 Thread Achim Gratz
Hans Horn writes:
> I noticed that cywgin's gcc/gfortran has moved whole sale to gcc 6.4.
> How can I get the latest release of the 5.x branch (32 and 64bit)
> back?

Use the Cygwin Time Machine, some other post had the link.

> I'm trying to build a legacy suite of programs that I know builds
> under 5.x, but fails miserably under 6.4.

Been there, done that.  In general, trying to freeze the compilation
environment is a losing proposition and it's better to fix up the
sources instead.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Issues hiding /dev virtual directory from SFTP users

2017-11-27 Thread Andrey Repin
Greetings, snorth...@moog.com!

> Hello,

> I am trying to get sftp secured using OpenSSH.  I have been able to jail
> the users to their home directory and remove the cygdrive virtual directory
> from showing but I have been unable to get the /dev virtual directory
> removed from the users when they SFTP.  In the past I have been able to just
> add "/dev /null none bind" to the fstab file but that no longer works.

> Can anyone suggest how I may be able to accomplish this with CYGWIN_NT-6.3 
> and openssh 7.6p 1-1 ?

If you jail the user to their home directory, they shouldn't be able to see
the Cygwin root in first place.
I don't understand your issue.


-- 
With best regards,
Andrey Repin
Tuesday, November 28, 2017 02:58:54

Sorry for my terrible english...


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Issues hiding /dev virtual directory from SFTP users

2017-11-27 Thread snorthrop
Hello,

I am trying to get sftp secured using OpenSSH.  I have been able to jail the 
users to their home directory and remove the cygdrive virtual directory from 
showing but I have been unable to get the /dev virtual directory removed from 
the users when they SFTP.  In the past I have been able to just add "/dev /null 
none bind" to the fstab file but that no longer works.

Can anyone suggest how I may be able to accomplish this with CYGWIN_NT-6.3 and 
openssh 7.6p 1-1 ?

Regards,

Shad 


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



[ANNOUNCEMENT] mesa 17.2.6-1

2017-11-27 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* dri-drivers-17.2.6-1
* libglapi0-17.2.6-1
* libGL1-17.2.6-1
* libGL-devel-17.2.6-1
* libOSMesa8-17.2.6-1
* libOSMesa-devel-17.2.6-1
* libEGL1-17.2.6-1
* libEGL-devel-17.2.6-1
* libGLESv2_2-17.2.6-1
* libGLESv2-devel-17.2.6-1
* windowsdriproto-17.2.6-1

Mesa is an open-source implementation of the OpenGL, OpenGL ES, and EGL 
specifications for rendering interactive 3D graphics.

Complete documentation on OpenGL usage and configuration can be found here:

http://x.cygwin.com/docs/ug/using-glx.html

This is an update to the latest upstream release:

https://www.mesa3d.org/relnotes/17.2.5.html
https://www.mesa3d.org/relnotes/17.2.6.html

--
Yaakov

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: sort utility goes berzerk (x86_64)

2017-11-27 Thread Houder

On 2017-11-25 14:23, Houder wrote:

Hi,

Anyone seeing this as well? sort goes berzerk on my system when piped 
into

head (or less) when it is fed with a 'specially prepared' input file.

 - only happens on x86_64
 - does not happen for 'LC_COLLATE=C sort tt | head'

'specially prepared' input file? (see bottom of post).


Anyone ** NOT ** seeing this?

Henri

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



[newlib-cygwin] cygwin: convert most #ifndef __x86_64__ to #ifdef __i386__

2017-11-27 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=76f06705be30663cf823170fe66c9560c9d24566

commit 76f06705be30663cf823170fe66c9560c9d24566
Author: Corinna Vinschen 
Date:   Mon Nov 27 14:36:06 2017 +0100

cygwin: convert most #ifndef __x86_64__ to #ifdef __i386__

Address the real offender

Signed-off-by: Corinna Vinschen 

Diff:
---
 winsup/cygwin/autoload.cc|  8 +--
 winsup/cygwin/dcrt0.cc   | 10 ++--
 winsup/cygwin/dlfcn.cc   |  4 +-
 winsup/cygwin/dll_init.cc| 10 ++--
 winsup/cygwin/dll_init.h |  4 +-
 winsup/cygwin/environ.cc |  2 +-
 winsup/cygwin/exception.h|  6 +-
 winsup/cygwin/exceptions.cc  |  4 +-
 winsup/cygwin/external.cc|  2 +-
 winsup/cygwin/fcntl.cc   |  8 +--
 winsup/cygwin/globals.cc |  8 +--
 winsup/cygwin/grp.cc |  8 +--
 winsup/cygwin/include/a.out.h|  2 +-
 winsup/cygwin/include/cygwin/grp.h   |  2 +-
 winsup/cygwin/include/cygwin/stat.h  |  2 +-
 winsup/cygwin/include/sys/cygwin.h   |  6 +-
 winsup/cygwin/include/sys/dirent.h   |  8 +--
 winsup/cygwin/lib/_cygwin_crt0_common.cc |  4 +-
 winsup/cygwin/miscfuncs.cc   |  2 +-
 winsup/cygwin/mmap.cc|  8 +--
 winsup/cygwin/passwd.cc  |  8 +--
 winsup/cygwin/path.cc|  8 +--
 winsup/cygwin/sec_acl.cc | 28 -
 winsup/cygwin/security.h |  2 +-
 winsup/cygwin/syscalls.cc| 98 
 winsup/cygwin/uinfo.cc   | 24 
 winsup/cygwin/winsup.h   |  4 +-
 27 files changed, 140 insertions(+), 140 deletions(-)

diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc
index 02d2e67..349f5e7 100644
--- a/winsup/cygwin/autoload.cc
+++ b/winsup/cygwin/autoload.cc
@@ -401,7 +401,7 @@ __attribute__ ((used, noinline)) static two_addr_t
 std_dll_init ()
 #endif
 {
-#ifndef __x86_64__
+#ifdef __i386__
   struct func_info *func = (struct func_info *) __builtin_return_address (0);
 #endif
   struct dll_info *dll = func->dll;
@@ -453,7 +453,7 @@ std_dll_init ()
 
   InterlockedDecrement (>here);
 
-#ifndef __x86_64__
+#ifdef __i386__
   /* Kludge alert.  Redirects the return address to dll_chain. */
   uintptr_t *volatile frame = (uintptr_t *) __builtin_frame_address (0);
   frame[1] = (uintptr_t) dll_chain;
@@ -480,7 +480,7 @@ wsock_init ()
  See the git log for a description. */
   static WSADATA NO_COPY wsadata;
   static LONG NO_COPY here = -1L;
-#ifndef __x86_64__
+#ifdef __i386__
   struct func_info *func = (struct func_info *) __builtin_return_address (0);
 #endif
   struct dll_info *dll = func->dll;
@@ -514,7 +514,7 @@ wsock_init ()
}
 }
 
-#ifndef __x86_64__
+#ifdef __i386__
   /* Kludge alert.  Redirects the return address to dll_chain. */
   uintptr_t *volatile frame = (uintptr_t *) __builtin_frame_address (0);
   frame[1] = (uintptr_t) dll_chain;
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index ea6adcb..af5eaac 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -390,7 +390,7 @@ check_sanity_and_sync (per_process *p)
 api_fatal ("cygwin DLL and APP are out of sync -- API version mismatch %u 
> %u",
   p->api_major, cygwin_version.api_major);
 
-#ifndef __x86_64__
+#ifdef __i386__
   /* This is a kludge to work around a version of _cygwin_common_crt0
  which overwrote the cxx_malloc field with the local DLL copy.
  Hilarity ensues if the DLL is not loaded while the process
@@ -712,7 +712,7 @@ init_windows_system_directory ()
api_fatal ("can't find windows system directory");
   windows_system_directory[windows_system_directory_length++] = L'\\';
   windows_system_directory[windows_system_directory_length] = L'\0';
-#ifndef __x86_64__
+#ifdef __i386__
   system_wow64_directory_length =
GetSystemWow64DirectoryW (system_wow64_directory, MAX_PATH);
   if (system_wow64_directory_length)
@@ -720,7 +720,7 @@ init_windows_system_directory ()
  system_wow64_directory[system_wow64_directory_length++] = L'\\';
  system_wow64_directory[system_wow64_directory_length] = L'\0';
}
-#endif /* !__x86_64__ */
+#endif /* __i386__ */
 }
 }
 
@@ -1103,14 +1103,14 @@ dll_crt0 (per_process *uptr)
 extern "C" void
 cygwin_dll_init ()
 {
-#ifndef __x86_64__
+#ifdef __i386__
   static char **envp;
 #endif
   static int _fmode;
 
   user_data->magic_biscuit = sizeof (per_process);
 
-#ifndef __x86_64__
+#ifdef __i386__
   user_data->envptr = 
 #endif
   user_data->fmode_ptr = &_fmode;
diff --git a/winsup/cygwin/dlfcn.cc b/winsup/cygwin/dlfcn.cc
index 5b21b32..7ef7dfd 100644
--- a/winsup/cygwin/dlfcn.cc
+++ b/winsup/cygwin/dlfcn.cc
@@ -273,7 +273,7 @@ dlopen (const 

[newlib-cygwin] cygwin: improve tags generation

2017-11-27 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=bc14f1c17487244f9a3c0fccd3400788635a0d48

commit bc14f1c17487244f9a3c0fccd3400788635a0d48
Author: Corinna Vinschen 
Date:   Mon Nov 27 13:38:43 2017 +0100

cygwin: improve tags generation

Signed-off-by: Corinna Vinschen 

Diff:
---
 winsup/cygwin/Makefile.in | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in
index add1de0..bc45208 100644
--- a/winsup/cygwin/Makefile.in
+++ b/winsup/cygwin/Makefile.in
@@ -774,7 +774,10 @@ sigfe.o: sigfe.s $(srcdir)/$(TLSOFFSETS_H)
 ctags: CTAGS
 tags:  CTAGS
 CTAGS:
-   -cd $(srcdir) && ctags -R --regex-C++='/^([a-zA-Z0-9_]*::[a-zA-Z0-9_]*) 
/\1/f/' .
+   -cd $(srcdir) && \
+   ctags -R --c++-kinds=+p --fields=+iaS --extra=+q \
+   --regex-C++='/EXPORT_ALIAS *\([[a-zA-Z0-9_]*, *([a-zA-Z0-9_]*)\)/\1/' \
+   @newlib_headers@ .
 
 deps:=${wildcard *.d}
 ifneq (,$(deps))


[newlib-cygwin] cygwin: cleanup fhandler_socket::release_events

2017-11-27 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=9789cdffde8bd365ca8fa94e924c870fa043e28a

commit 9789cdffde8bd365ca8fa94e924c870fa043e28a
Author: Corinna Vinschen 
Date:   Mon Nov 27 13:38:21 2017 +0100

cygwin: cleanup fhandler_socket::release_events

Signed-off-by: Corinna Vinschen 

Diff:
---
 winsup/cygwin/fhandler_socket.cc | 16 +---
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc
index b8e684f..cc75b97 100644
--- a/winsup/cygwin/fhandler_socket.cc
+++ b/winsup/cygwin/fhandler_socket.cc
@@ -801,14 +801,16 @@ fhandler_socket::wait_for_events (const long event_mask, 
const DWORD flags)
 void
 fhandler_socket::release_events ()
 {
-  HANDLE evt = wsock_evt;
-  HANDLE mtx = wsock_mtx;
+  if (WaitForSingleObject (wsock_mtx, INFINITE) != WAIT_FAILED)
+{
+  HANDLE evt = wsock_evt;
+  HANDLE mtx = wsock_mtx;
 
-  LOCK_EVENTS;
-  wsock_evt = wsock_mtx = NULL;
-  } ReleaseMutex (mtx);/* == UNLOCK_EVENTS, but note using local mtx 
here. */
-  NtClose (evt);
-  NtClose (mtx);
+  wsock_evt = wsock_mtx = NULL;
+  ReleaseMutex (mtx);
+  NtClose (evt);
+  NtClose (mtx);
+}
 }
 
 /* Called from net.cc:fdsock() if a freshly created socket is not


Re: [PATCH setup, v2] site.cc, site.h: code cleanup

2017-11-27 Thread Jon Turney

On 24/11/2017 17:29, Ken Brown wrote:

Remove site_list_type::init(), which was introduced to work around a
problem with gcc-2.95.

Add a bool member 'from_mirrors_lst' to the site_list_type class.  Use
it to distinguish mirrors listed in mirrors.lst from user-added sites.
This replaces the (undocumented) use of
site_list_type::servername.size() for this purpose.

When registerSavedSite is called on a URL that's already in
'all_site_list', add the version from 'all_site_list' to 'site_list'
rather than adding a temporary version that contains no information
other than the URL.

Similarly, if the user adds a site that was already in
'all_site_list', don't replace the existent version with the new one
(which contains only the URL).
---
  site.cc | 42 ++
  site.h  |  9 +
  2 files changed, 23 insertions(+), 28 deletions(-)


Please apply.


[ITA] lcms2-2.9-1

2017-11-27 Thread Ken Brown

My cygport file is attached.

Package files
=

D=http://sanibeltranquility.com/cygwin
${D}/x86/release/lcms2/lcms2-2.9-1-src.tar.xz
${D}/x86/release/lcms2/lcms2-2.9-1.hint
${D}/x86/release/lcms2/lcms2-2.9-1.tar.xz
${D}/x86/release/lcms2/lcms2-debuginfo/lcms2-debuginfo-2.9-1.hint
${D}/x86/release/lcms2/lcms2-debuginfo/lcms2-debuginfo-2.9-1.tar.xz
${D}/x86/release/lcms2/liblcms2_2/liblcms2_2-2.9-1.hint
${D}/x86/release/lcms2/liblcms2_2/liblcms2_2-2.9-1.tar.xz
${D}/x86/release/lcms2/liblcms2-devel/liblcms2-devel-2.9-1.hint
${D}/x86/release/lcms2/liblcms2-devel/liblcms2-devel-2.9-1.tar.xz
${D}/x86_64/release/lcms2/lcms2-2.9-1-src.tar.xz
${D}/x86_64/release/lcms2/lcms2-2.9-1.hint
${D}/x86_64/release/lcms2/lcms2-2.9-1.tar.xz
${D}/x86_64/release/lcms2/lcms2-debuginfo/lcms2-debuginfo-2.9-1.hint
${D}/x86_64/release/lcms2/lcms2-debuginfo/lcms2-debuginfo-2.9-1.tar.xz
${D}/x86_64/release/lcms2/liblcms2_2/liblcms2_2-2.9-1.hint
${D}/x86_64/release/lcms2/liblcms2_2/liblcms2_2-2.9-1.tar.xz
${D}/x86_64/release/lcms2/liblcms2-devel/liblcms2-devel-2.9-1.hint
${D}/x86_64/release/lcms2/liblcms2-devel/liblcms2-devel-2.9-1.tar.xz

Ken

NAME="lcms2"
VERSION=2.9
RELEASE=1
CATEGORY="Graphics Libs"
SUMMARY="Little color management engine"
DESCRIPTION="Little CMS intends to be a small-footprint color management engine,
with special focus on accuracy and performance.  It uses the
International Color Consortium standard (ICC), which is the modern
standard when regarding to color management.  The ICC specification is
widely used and is referred to in many International and other
de-facto standards."

HOMEPAGE="http://littlecms.com/;
SRC_URI="mirror://sourceforge/lcms/${PV}/${P}.tar.gz"

DEPEND="libjpeg-devel libtiff-devel zlib-devel"

abi=2
PKG_NAMES="${PN} lib${PN}_${abi} lib${PN}-devel"
lcms2_SUMMARY="${SUMMARY} (utilities)"
lcms2_CONTENTS="
  usr/bin/*.exe
  usr/share/
"

liblcms2_2_SUMMARY="${SUMMARY} (runtime)"
liblcms2_2_CONTENTS="usr/bin/cyg${PN}-${abi}.dll"

liblcms2_devel_SUMMARY="${SUMMARY} (development)"
liblcms2_devel_CATEGORY="Devel ${CATEGORY}"
liblcms2_devel_CONTENTS="
  usr/include/
  usr/lib/lib*
  usr/lib/pkgconfig/
"

DOCS="doc/*.pdf"

# 'make check' relies on LD_LIBRARY_PATH, which is not supported on
# Cygwin.  As a result, it reports a version mismatch.  But all tests
# pass if 'cygport lcms2.cygport test' is run after the built lcms2 is
# installed.


Re: [PATCH setup] Don't write garbage into the "extrakeys" user setting

2017-11-27 Thread Ken Brown

On 11/27/2017 4:35 PM, Ken Brown wrote:

The ExtraKeysSetting destructor called UserSettings::set() on a string
that was terminated by LF instead of NUL.  This led to garbage at the
end of the "extrakeys" setting that was written into setup.rc.  Fix
this by replacing the final LF by NUL before calling set().


Disregard this for now.  I've just discovered some further issues 
involving "extrakeys", and I'd like to fix them all at once.


Ken



[PATCH] Feature test macros overhaul: Cygwin limits.h, part 2

2017-11-27 Thread Yaakov Selkowitz
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html
https://sourceware.org/ml/newlib/2017/msg01133.html

Signed-off-by: Yaakov Selkowitz 
---
 winsup/cygwin/include/limits.h | 30 --
 1 file changed, 28 insertions(+), 2 deletions(-)

diff --git a/winsup/cygwin/include/limits.h b/winsup/cygwin/include/limits.h
index cf3c8d04d..fe1b8b493 100644
--- a/winsup/cygwin/include/limits.h
+++ b/winsup/cygwin/include/limits.h
@@ -24,6 +24,7 @@ details. */
 #undef CHAR_BIT
 #define CHAR_BIT __CHAR_BIT__
 
+#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200809
 /* Number of bits in a `long'.  */
 #undef LONG_BIT
 #define LONG_BIT (__SIZEOF_LONG__ * __CHAR_BIT__)
@@ -31,6 +32,7 @@ details. */
 /* Number of bits in a `int'.  */
 #undef WORD_BIT
 #define WORD_BIT (__SIZEOF_INT__ * __CHAR_BIT__)
+#endif /* __XSI_VISIBLE || __POSIX_VISIBLE >= 200809 */
 
 /* Maximum length of a multibyte character.  */
 #ifndef MB_LEN_MAX
@@ -118,6 +120,7 @@ details. */
 #define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1)
 #endif
 
+#if __ISO_C_VISIBLE >= 1999
 /* Minimum and maximum values a `signed long long int' can hold.  */
 #undef LLONG_MIN
 #define LLONG_MIN (-LLONG_MAX-1)
@@ -127,6 +130,7 @@ details. */
 /* Maximum value an `unsigned long long int' can hold.  (Minimum is 0).  */
 #undef ULLONG_MAX
 #define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
+#endif /* __ISO_C_VISIBLE >= 1999 */
 
 /* Maximum size of ssize_t. Sadly, gcc doesn't give us __SSIZE_MAX__
the way it does for __SIZE_MAX__.  On the other hand, we happen to
@@ -171,9 +175,11 @@ details. */
 #undef ARG_MAX
 #define ARG_MAX 32000
 
+#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200809
 /* Maximum number of functions that may be registered with atexit(). */
 #undef ATEXIT_MAX
 #define ATEXIT_MAX 32
+#endif
 
 /* Maximum number of simultaneous processes per real user ID. */
 #undef CHILD_MAX
@@ -187,9 +193,11 @@ details. */
 #undef HOST_NAME_MAX
 #define HOST_NAME_MAX 255
 
+#if __XSI_VISIBLE
 /* Maximum number of iovcnt in a writev (an arbitrary number) */
 #undef IOV_MAX
 #define IOV_MAX 1024
+#endif
 
 /* Maximum number of characters in a login name. */
 #undef LOGIN_NAME_MAX
@@ -212,9 +220,11 @@ details. */
 
 /* Size in bytes of a page. */
 #undef PAGESIZE
-#undef PAGE_SIZE
 #define PAGESIZE 65536
+#if __XSI_VISIBLE
+#undef PAGE_SIZE
 #define PAGE_SIZE PAGESIZE
+#endif
 
 /* Maximum number of attempts made to destroy a thread's thread-specific
data values on thread exit. */
@@ -381,6 +391,7 @@ details. */
 
 /* Runtime Increasable Values */
 
+#if __POSIX_VISIBLE >= 2
 /* Maximum obase values allowed by the bc utility. */
 #undef BC_BASE_MAX
 #define BC_BASE_MAX 99
@@ -428,6 +439,7 @@ details. */
using the interval notation \{m,n\} */
 #undef RE_DUP_MAX
 #define RE_DUP_MAX 255
+#endif /* __POSIX_VISIBLE >= 2 */
 
 
 /* POSIX values */
@@ -435,6 +447,7 @@ details. */
 /* They represent the minimum values that POSIX systems must support.
POSIX-conforming apps must not require larger values. */
 
+#if __POSIX_VISIBLE
 /* Maximum Values */
 
 #define _POSIX_CLOCKRES_MIN 2000
@@ -478,7 +491,9 @@ details. */
 #define _POSIX_TRACE_USER_EVENT_MAX   32
 #define _POSIX_TTY_NAME_MAX   9
 #define _POSIX_TZNAME_MAX  6
+#endif /* __POSIX_VISIBLE */
 
+#if __POSIX_VISIBLE >= 2
 #define _POSIX2_BC_BASE_MAX  99
 #define _POSIX2_BC_DIM_MAX 2048
 #define _POSIX2_BC_SCALE_MAX 99
@@ -487,23 +502,34 @@ details. */
 #define _POSIX2_EXPR_NEST_MAX32
 #define _POSIX2_LINE_MAX   2048
 #define _POSIX2_RE_DUP_MAX  255
+#endif /* __POSIX_VISIBLE >= 2 */
 
+#if __XSI_VISIBLE
 #define _XOPEN_IOV_MAX16
 #define _XOPEN_NAME_MAX  255
 #define _XOPEN_PATH_MAX 1024
+#endif
 
 /* Other Invariant Values */
 
 #define NL_ARGMAX  9
+#if __XSI_VISIBLE
 #define NL_LANGMAX14
+#endif
+#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200809
 #define NL_MSGMAX  32767
-#define NL_NMAX  INT_MAX
 #define NL_SETMAX255
 #define NL_TEXTMAX  _POSIX2_LINE_MAX
+#endif
+#if __POSIX_VISIBLE < 200809
+#define NL_NMAX  INT_MAX
+#endif
 
+#if __XSI_VISIBLE
 /* Default process priority. */
 #undef NZERO
 #define NZERO20
+#endif
 
 #endif /* _MACH_MACHLIMITS_H_ */
 #endif /* _LIMITS_H___ */
-- 
2.15.0



[PATCH setup] Don't write garbage into the "extrakeys" user setting

2017-11-27 Thread Ken Brown
The ExtraKeysSetting destructor called UserSettings::set() on a string
that was terminated by LF instead of NUL.  This led to garbage at the
end of the "extrakeys" setting that was written into setup.rc.  Fix
this by replacing the final LF by NUL before calling set().
---
 KeysSetting.cc | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/KeysSetting.cc b/KeysSetting.cc
index a21c3c4..19c6df3 100644
--- a/KeysSetting.cc
+++ b/KeysSetting.cc
@@ -46,7 +46,11 @@ ExtraKeysSetting::ExtraKeysSetting ():
 ExtraKeysSetting::~ExtraKeysSetting ()
 {
   if (keybuffer)
-UserSettings::instance().set ("extrakeys", keybuffer);
+{
+  // Replace final LF with NUL.
+  keybuffer[bufsize - 1] = '\0';
+  UserSettings::instance().set ("extrakeys", keybuffer);
+}
 }
 
 void
-- 
2.15.0



Re: [PATCH setup] Don't write garbage into the "extrakeys" user setting

2017-11-27 Thread Jon Turney

On 27/11/2017 21:35, Ken Brown wrote:

The ExtraKeysSetting destructor called UserSettings::set() on a string
that was terminated by LF instead of NUL.  This led to garbage at the


What...?!?


/*
 * It stores them all in a contiguous memory buffer.  Each is one line of
 * ASCII text terminated by LF.  THERE IS NO NUL-TERMINATION HERE, TAKE CARE!
 */


Awesome... :)


end of the "extrakeys" setting that was written into setup.rc.  Fix
this by replacing the final LF by NUL before calling set().


Thanks for tracking this down.  Please apply.


mesa 17.2.6-1

2017-11-27 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* dri-drivers-17.2.6-1
* libglapi0-17.2.6-1
* libGL1-17.2.6-1
* libGL-devel-17.2.6-1
* libOSMesa8-17.2.6-1
* libOSMesa-devel-17.2.6-1
* libEGL1-17.2.6-1
* libEGL-devel-17.2.6-1
* libGLESv2_2-17.2.6-1
* libGLESv2-devel-17.2.6-1
* windowsdriproto-17.2.6-1

Mesa is an open-source implementation of the OpenGL, OpenGL ES, and EGL 
specifications for rendering interactive 3D graphics.

Complete documentation on OpenGL usage and configuration can be found here:

http://x.cygwin.com/docs/ug/using-glx.html

This is an update to the latest upstream release:

https://www.mesa3d.org/relnotes/17.2.5.html
https://www.mesa3d.org/relnotes/17.2.6.html

--
Yaakov


[PATCH] Initialize IO_STATUS_BLOCK for pread, pwrite

2017-11-27 Thread Mark Geisert
---
 winsup/cygwin/fhandler_disk_file.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/winsup/cygwin/fhandler_disk_file.cc 
b/winsup/cygwin/fhandler_disk_file.cc
index 5dfcae4d9..2ead9948c 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -1548,7 +1548,7 @@ fhandler_disk_file::pread (void *buf, size_t count, off_t 
offset)
 {
   extern int __stdcall is_at_eof (HANDLE h);
   NTSTATUS status;
-  IO_STATUS_BLOCK io;
+  IO_STATUS_BLOCK io = {{0}, 0};
   LARGE_INTEGER off = { QuadPart:offset };
 
   if (!prw_handle && prw_open (false))
@@ -1630,7 +1630,7 @@ fhandler_disk_file::pwrite (void *buf, size_t count, 
off_t offset)
   if (wbinary () && !mandatory_locking ())
 {
   NTSTATUS status;
-  IO_STATUS_BLOCK io;
+  IO_STATUS_BLOCK io = {{0}, 0};
   LARGE_INTEGER off = { QuadPart:offset };
 
   if (!prw_handle && prw_open (true))
-- 
2.15.0



Re: [PATCH setup] Don't write garbage into the "extrakeys" user setting

2017-11-27 Thread Ken Brown

On 11/27/2017 5:19 PM, Ken Brown wrote:

On 11/27/2017 4:35 PM, Ken Brown wrote:

The ExtraKeysSetting destructor called UserSettings::set() on a string
that was terminated by LF instead of NUL.  This led to garbage at the
end of the "extrakeys" setting that was written into setup.rc.  Fix
this by replacing the final LF by NUL before calling set().


Disregard this for now.  I've just discovered some further issues 
involving "extrakeys", and I'd like to fix them all at once.


Here's an amusing fact: "extrakeys" has apparently been useless for many 
years, so that the '-u' option to setup cannot have worked.  The reason 
is that '#' is a comment character in setup.rc, and the saved keys 
contain several of these.  (Originally the saved keys were kept in a 
file /etc/setup/last-extrakeys, which did not contain comments, but this 
was changed in 2009 to use /etc/setup/setup.rc.)


Here's an example from my own setup.rc after running 'setup -K ...':

extrakeys
	(public-key (dsa (p 
#00DE8D7944FA1731C7D66C17E3928E1CD6D06092B4DD549B96773B24F4F8C0609912EB2158379F7F37DF4BF3F42BF4131DAD1AC27B998398B635147B605F5D5276F0BBF66ECA4583A474A578C82A08EDE6802A74B39EAC62BC7EA7DE5BE721E23A51EDFC68B32A5F8462C071AFDCEA11576F39AC5646F87CEB37A67FE7A2421787#) 
(q #00C2D926EC5053000FF6BAFFA16D39161F8DE16BDF#) (g 
#0095E00E78F13C69274EE7724F2ECA34556ABA6B04EA05C06546F8CD7553807F22EF125AFE01541F82C2AF661C7F7036EDB3A0CC1F8BBB8E5E4F9CF01C179702415B9D2875EDD5AECACF85A87850E71DB1F3BA88EAE1C053ECC35507295C953E8DCBE701CE9BB3DB6E2AE35193A1503695338C448AB532571999BB4BFFFCBC9F2E#) 
(y 
#6F06E2269F93DC76794E63B6C9B56FAF0E57193FA890197BFB6C93BC9FE91C226EBACA0538CE229617E43A15972078574D907479375D4D3CCEA62C0A7A4E1F8D4D02401232DDF86471CD2D18F47E0C0AF9F32A36D0A609972DA79A762AFDBBD9B66F3AC26F490CB526CF9005B7FE4FDF560268EF4ED3E3ED7D9030BB6157D4B8#) 
) )


[The part below "extrakeys" is all one line.]

Everything after the first '#' is discarded, and "extrakeys" is 
effectively set to "(public-key (dsa (p ".


Out of sheer laziness, I'd like to fix this by no longer treating '#' as 
a comment character.  The only use of it I've seen is in site.cc to 
write a comment about dropped mirrors being saved, although there might 
be other uses that I've missed.


If this is not acceptable, then I guess we have to use something like 
'\#' to escape '#', or else choose a different comment character.


WDYT?

Ken