Bison 3.0.5 Update

2019-01-21 Thread Jeff Gullett
GNU Bison Maintainer-

Is there any chance you have the time to build a GNU Bison 3.0.5 Cygwin 
package?  Thanks,

-Jeff

--
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



Updated: Perl distributions

2019-01-21 Thread Achim Gratz


The following Perl distributions have been updated to their latest
version on CPAN, respectively:


x86/x86_64
--
perl-DBD-mysql-4.050-1
perl-Term-ReadLine-Gnu-1.36-1

noarch
--
perl-JSON-4.01-1
perl-Module-ScanDeps-1.27-1
perl-Test-Simple-1.302160-1
perl-Test2-Suite-0.000118-1
perl-Text-Template-1.54-1
perl-URI-1.76-1


-- 
  *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

If you want to unsubscribe from the cygwin-announce mailing list, look
at the "List-Unsubscribe: " tag in the email header of this message.
Send email to the address specified there. It will be in the format:

cygwin-announce-unsubscribe-you=yourdomain@cygwin.com

If you need more information on unsubscribing, start reading here:

http://sourceware.org/lists.html#unsubscribe-simple

Please read *all* of the information on unsubscribing that is available
starting at this URL.


[ANNOUNCEMENT] Updated: Perl distributions

2019-01-21 Thread Achim Gratz


The following Perl distributions have been updated to their latest
version on CPAN, respectively:


x86/x86_64
--
perl-DBD-mysql-4.050-1
perl-Term-ReadLine-Gnu-1.36-1

noarch
--
perl-JSON-4.01-1
perl-Module-ScanDeps-1.27-1
perl-Test-Simple-1.302160-1
perl-Test2-Suite-0.000118-1
perl-Text-Template-1.54-1
perl-URI-1.76-1


-- 
  *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

If you want to unsubscribe from the cygwin-announce mailing list, look
at the "List-Unsubscribe: " tag in the email header of this message.
Send email to the address specified there. It will be in the format:

cygwin-announce-unsubscribe-you=yourdomain@cygwin.com

If you need more information on unsubscribing, start reading here:

http://sourceware.org/lists.html#unsubscribe-simple

Please read *all* of the information on unsubscribing that is available
starting at this URL.

--
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: timerfd: reset expiry counter in settime

2019-01-21 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=a75bd958b4a64182645984babedad3c2babb8401

commit a75bd958b4a64182645984babedad3c2babb8401
Author: Corinna Vinschen 
Date:   Mon Jan 21 22:54:26 2019 +0100

Cygwin: timerfd: reset expiry counter in settime

As on Linux, reset the expiry counter when the timer gets rearmed.

Signed-off-by: Corinna Vinschen 

Diff:
---
 winsup/cygwin/timerfd.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/winsup/cygwin/timerfd.cc b/winsup/cygwin/timerfd.cc
index 295716f..e865c0c 100644
--- a/winsup/cygwin/timerfd.cc
+++ b/winsup/cygwin/timerfd.cc
@@ -574,6 +574,7 @@ timerfd_shared::arm_timer (int flags, const struct 
itimerspec *new_value)
 }
   set_exp_ts (ts);
   time_spec () = *new_value;
+  read_and_reset_expiration_count ();
   /* TODO: CLOCK_REALTIME_ALARM / CLOCK_BOOTTIME_ALARM
   Note: Advanced Power Settings -> Sleep -> Allow Wake Timers
   since W10 1709 */


[newlib-cygwin] Cygwin: timerfd: fix gettime

2019-01-21 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=5b23a8e83112548d4c06e2f4b46aa20bd38d26d5

commit 5b23a8e83112548d4c06e2f4b46aa20bd38d26d5
Author: Corinna Vinschen 
Date:   Mon Jan 21 22:52:39 2019 +0100

Cygwin: timerfd: fix gettime

- split into to __try/__except blocks to make sure
  leave_critical_section is always called when required.

- Actually fill time_spec in settime so it_interval is returned
  correctly.

- Return all 0 if timer is disarmed.

Signed-off-by: Corinna Vinschen 

Diff:
---
 winsup/cygwin/timerfd.cc | 29 ++---
 1 file changed, 22 insertions(+), 7 deletions(-)

diff --git a/winsup/cygwin/timerfd.cc b/winsup/cygwin/timerfd.cc
index a03749a..295716f 100644
--- a/winsup/cygwin/timerfd.cc
+++ b/winsup/cygwin/timerfd.cc
@@ -502,13 +502,26 @@ timerfd_tracker::gettime (struct itimerspec *curr_value)
  ret = -EBADF;
  __leave;
}
-  LONG64 next_relative_exp = get_exp_ts () - get_clock_now ();
-  curr_value->it_value.tv_sec = next_relative_exp / NS100PERSEC;
-  next_relative_exp -= curr_value->it_value.tv_sec * NS100PERSEC;
-  curr_value->it_value.tv_nsec = next_relative_exp
-* (NSPERSEC / NS100PERSEC);
-  curr_value->it_interval = time_spec ().it_interval;
-  leave_critical_section ();
+}
+  __except (NO_ERROR)
+{
+  return -EFAULT;
+}
+  __endtry
+
+  __try
+{
+  if (IsEventSignalled (tfd_shared->disarm_evt ()))
+   *curr_value = time_spec ();
+  else
+   {
+ LONG64 next_relative_exp = get_exp_ts () - get_clock_now ();
+ curr_value->it_value.tv_sec = next_relative_exp / NS100PERSEC;
+ next_relative_exp -= curr_value->it_value.tv_sec * NS100PERSEC;
+ curr_value->it_value.tv_nsec = next_relative_exp
+* (NSPERSEC / NS100PERSEC);
+ curr_value->it_interval = time_spec ().it_interval;
+   }
   ret = 0;
 }
   __except (NO_ERROR)
@@ -516,6 +529,7 @@ timerfd_tracker::gettime (struct itimerspec *curr_value)
   ret = -EFAULT;
 }
   __endtry
+  leave_critical_section ();
   return ret;
 }
 
@@ -559,6 +573,7 @@ timerfd_shared::arm_timer (int flags, const struct 
itimerspec *new_value)
   ts += get_clock_now ();
 }
   set_exp_ts (ts);
+  time_spec () = *new_value;
   /* TODO: CLOCK_REALTIME_ALARM / CLOCK_BOOTTIME_ALARM
   Note: Advanced Power Settings -> Sleep -> Allow Wake Timers
   since W10 1709 */


Cygwin | Attendees-list of SLAS-2019

2019-01-21 Thread Sharon Clark
Hi,

 

I am writing to check if you would be interested in purchasing
Attendees-list of SLAS-2019 Conference (Society for Laboratory Automation &
Screening) (February 2-6, 2019) with verified contact name, job title,
business email-address, phone number and mailing Address etc

 

Let me know if you'd be interested in hearing more about it.

 

Thanks,

Sharon Clark

Event Coordinator

 

 

If you don't want to include yourself in our mailing list, please reply with
"No Thanks"

 


--
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: UPX compressed setup-x86_64.exe crashes on Win10

2019-01-21 Thread Michael Wild
On Mon, 21 Jan 2019, 20:55 Achim Gratz wrote:

> Michael Wild writes:
> > Thanks. I have very little hope of getting it whitelisted... Is UPX
> > compression really a necessity? Otherwise I'll have to resort to my
> custom
> > compiled versions.
>
> No, that's just so the download is smaller.  Which isn't the point if
> you've built it yourself anyway… you could decompress it if you really
> don't trust your own version or want to skip building it.
>

Interesting. Somehow I assumed that this was a one-way process. But how do
I bootstrap? Can I just use the download from upx.github.io? That'll be
what I try next then.

Michael

>

--
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] Updated: cfitsio-3.450-1

2019-01-21 Thread Achim Gratz


This is an update to the latest upstream version.


Notes
-

The library version has changed from libcfitsio3 to libcfitsio7.
Packages depending on libcfitsio should be recompiled to make use of the
newer ABI.

The build now enables BZip2 and multithreading support.

A Perl binding is available now with the package
perl-Astro-FITS-CFITSIO-1.12-1.


-- 
  *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

If you want to unsubscribe from the cygwin-announce mailing list, look
at the "List-Unsubscribe: " tag in the email header of this message.
Send email to the address specified there. It will be in the format:

cygwin-announce-unsubscribe-you=yourdomain@cygwin.com

If you need more information on unsubscribing, start reading here:

http://sourceware.org/lists.html#unsubscribe-simple

Please read *all* of the information on unsubscribing that is available
starting at this URL.

--
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



Updated: cfitsio-3.450-1

2019-01-21 Thread Achim Gratz


This is an update to the latest upstream version.


Notes
-

The library version has changed from libcfitsio3 to libcfitsio7.
Packages depending on libcfitsio should be recompiled to make use of the
newer ABI.

The build now enables BZip2 and multithreading support.

A Perl binding is available now with the package
perl-Astro-FITS-CFITSIO-1.12-1.


-- 
  *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

If you want to unsubscribe from the cygwin-announce mailing list, look
at the "List-Unsubscribe: " tag in the email header of this message.
Send email to the address specified there. It will be in the format:

cygwin-announce-unsubscribe-you=yourdomain@cygwin.com

If you need more information on unsubscribing, start reading here:

http://sourceware.org/lists.html#unsubscribe-simple

Please read *all* of the information on unsubscribing that is available
starting at this URL.


Re: UPX compressed setup-x86_64.exe crashes on Win10

2019-01-21 Thread Achim Gratz
Michael Wild writes:
> Thanks. I have very little hope of getting it whitelisted... Is UPX
> compression really a necessity? Otherwise I'll have to resort to my custom
> compiled versions.

No, that's just so the download is smaller.  Which isn't the point if
you've built it yourself anyway… you could decompress it if you really
don't trust your own version or want to skip building it.


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

SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

--
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: UPX compressed setup-x86_64.exe crashes on Win10

2019-01-21 Thread Michael Wild
On Mon, 21 Jan 2019, 18:19 Achim Gratz wrote:

> Michael Wild writes:
> > Anybody else experiencing this? I tried trawling through the mailing
> > list, but nothing specific turned up. Maybe this is an interaction
> > with the BLODA imposed on me by our company IT policy. But then I'd
> > expect others to have seen this issue too.
>
> It wouldn't be the first time antivirus heuristics target UPX routines
> instead of actual malware code.  You'll have to wait for the vendor or
> your organization to whitelist the relatively new setup.exe (unless
> you're allowed to do that yourself).
>
>
> Regards,
> Achim.
>

Thanks. I have very little hope of getting it whitelisted... Is UPX
compression really a necessity? Otherwise I'll have to resort to my custom
compiled versions.

Michael

>

--
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: UPX compressed setup-x86_64.exe crashes on Win10

2019-01-21 Thread Achim Gratz
Michael Wild writes:
> Anybody else experiencing this? I tried trawling through the mailing
> list, but nothing specific turned up. Maybe this is an interaction
> with the BLODA imposed on me by our company IT policy. But then I'd
> expect others to have seen this issue too.

It wouldn't be the first time antivirus heuristics target UPX routines
instead of actual malware code.  You'll have to wait for the vendor or
your organization to whitelist the relatively new setup.exe (unless
you're allowed to do that yourself).


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

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
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: /proc/partitions changed ?

2019-01-21 Thread Corinna Vinschen
On Jan 21 16:03, Marco Atzeri wrote:
> Am 21.01.2019 um 09:39 schrieb Corinna Vinschen:
> > Hi Marco,
> > 
> > On Jan 20 20:48, Marco Atzeri wrote:
> > > Am 20.01.2019 um 19:36 schrieb Eliot Moss:
> > > > On 1/20/2019 1:05 PM, Marco Atzeri wrote:
> > > > > Am 20.01.2019 um 18:51 schrieb Henry S. Thompson:
> > > > > > Marco Atzeri writes:
> > > > > > 
> > > > > > > In the past I saw
> > > > > > > ...
> > > > > > > but now the win-mounts version are missing
> > > > > > > 
> > > > > > > $ cat /proc/partitions
> > > > > > > major minor  #blocks  name   win-mounts
> > > > > > > 
> > > > > > >   8 0 0 sda
> > > > > > >   8    16 0 sdb
> > > > > > > 
> > > Windows 10 Home
> > > Version 1803
> > > 
> > > so or it is Windows or is a BLODA effect
> > 
> > As for the others, WFFM on W10 Enterprise 1809 with the latest
> > Cygwin snapshot code.  I'd bet on BLODA.  Alternatively this may be
> > permission problem of some sort.
> > 
> > Can you please run this command under strace and send the strace output?
> > 
> > 
> > Thanks,
> > Corinna
> 
> attached the strace of  cat /proc/partitions
> 
> I guess my AV is blocking access to the partitions, also when
> I am running as Administrator.
> 
> format_proc_partitions: DeviceIoControl (Harddisk0\Partition0,
> IOCTL_DISK_GET_PARTITION_INFO{_EX}) Win32 error 5

That's the problem.  Due to this, the info for the partition isn't
printed at all.

> However the info is available in other way
> 
> $ cygpath -w /dev/sda
> \\.\Disk{ba1707c6-547e-6b0e-d636-d2fa8ccffbf6}
> 
> $ cygpath -w /dev/sda1
> \\.\D:

That's not the same thing.  This information *would* be available, but
it's only fetched if the partition info could be fetched.  What's
actually missing is access to the partitions and their size, not access
to the mount points to partitions.  That's why you only see sda and sdb,
but not any one of the partitions.  I don't see how to print
/proc/partitions correctly without this info.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer


signature.asc
Description: PGP signature


Re: /proc/partitions changed ?

2019-01-21 Thread Marco Atzeri

Am 21.01.2019 um 09:39 schrieb Corinna Vinschen:

Hi Marco,

On Jan 20 20:48, Marco Atzeri wrote:

Am 20.01.2019 um 19:36 schrieb Eliot Moss:

On 1/20/2019 1:05 PM, Marco Atzeri wrote:

Am 20.01.2019 um 18:51 schrieb Henry S. Thompson:

Marco Atzeri writes:


In the past I saw
...
but now the win-mounts version are missing

$ cat /proc/partitions
major minor  #blocks  name   win-mounts

  8 0 0 sda
  8    16 0 sdb



I have:

cygwin DLL version 2.11.2-1
Windows 10 Pro 1709 (Build 16299.846)

So all pretty recent, and it works fine for me.

Regards - Eliot Moss



Windows 10 Home
Version 1803

so or it is Windows or is a BLODA effect


As for the others, WFFM on W10 Enterprise 1809 with the latest
Cygwin snapshot code.  I'd bet on BLODA.  Alternatively this may be
permission problem of some sort.

Can you please run this command under strace and send the strace output?


Thanks,
Corinna


attached the strace of  cat /proc/partitions

I guess my AV is blocking access to the partitions, also when
I am running as Administrator.

format_proc_partitions: DeviceIoControl (Harddisk0\Partition0, 
IOCTL_DISK_GET_PARTITION_INFO{_EX}) Win32 error 5


However the info is available in other way

$ cygpath -w /dev/sda
\\.\Disk{ba1707c6-547e-6b0e-d636-d2fa8ccffbf6}

$ cygpath -w /dev/sda1
\\.\D:

$ cygpath -w /dev/sda2
\\.\E:

$ cygpath -w /dev/sdb
\\.\Disk{bc009825-d60f-a0b9-e64e-040b8fa61f4c}

$ cygpath -w /dev/sdb1
\\.\STORAGE#Volume#{b725cac0-3d30-11e8-b177-806e6f6e6963}#0010#{53f5630d-b6bf-11d0-94f2-00a0c91efb8b}

$ cygpath -w /dev/sdb2
\\.\STORAGE#Volume#{b725cac0-3d30-11e8-b177-806e6f6e6963}#1050#{7f108a28-9833-4b3b-b780-2c6b5fa5c062}

$ cygpath -w /dev/sdb3
\\.\C:



---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus


cat-partitions.strace.gz
Description: GNU Zip compressed data

--
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

Order Request

2019-01-21 Thread Ben Jackson
Hello Sales,
My name is Ben Jackson and i would like to know if you carry  in stock Fork 
Carriage for sale. Please contact me back with the models and pricing for the 
Fork Carriage.Thank you and will wait to hear from you soon...

 
Best Regards
Ben Jackson


--
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: timerfd: rename overrun_count to expiration_count

2019-01-21 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=528f4d49384e1c3ad95d3a6913bf681ef714d51f

commit 528f4d49384e1c3ad95d3a6913bf681ef714d51f
Author: Corinna Vinschen 
Date:   Mon Jan 21 12:26:51 2019 +0100

Cygwin: timerfd: rename overrun_count to expiration_count

The value returned by reading from a timerfd is not an overrun
count in the same sense as for posix timers, it's an expiry counter.
Reflect that in the name.

Signed-off-by: Corinna Vinschen 

Diff:
---
 winsup/cygwin/fhandler_timerfd.cc |  8 
 winsup/cygwin/timerfd.cc  | 34 +-
 winsup/cygwin/timerfd.h   | 28 ++--
 3 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/winsup/cygwin/fhandler_timerfd.cc 
b/winsup/cygwin/fhandler_timerfd.cc
index 33829ed..8a6c4b5 100644
--- a/winsup/cygwin/fhandler_timerfd.cc
+++ b/winsup/cygwin/fhandler_timerfd.cc
@@ -218,7 +218,7 @@ int
 fhandler_timerfd::ioctl (unsigned int cmd, void *p)
 {
   int ret = -1;
-  uint64_t ov_cnt;
+  uint64_t exp_cnt;
 
   switch (cmd)
 {
@@ -227,13 +227,13 @@ fhandler_timerfd::ioctl (unsigned int cmd, void *p)
{
  timerfd_tracker *tfd = (timerfd_tracker *) timerid;
 
- ov_cnt = *(uint64_t *) p;
- if (!ov_cnt)
+ exp_cnt = *(uint64_t *) p;
+ if (!exp_cnt)
{
  set_errno (EINVAL);
  break;
}
- tfd->ioctl_set_ticks (ov_cnt);
+ tfd->ioctl_set_ticks (exp_cnt);
  ret = 0;
}
   __except (EFAULT) {}
diff --git a/winsup/cygwin/timerfd.cc b/winsup/cygwin/timerfd.cc
index 0a04241..08fff31 100644
--- a/winsup/cygwin/timerfd.cc
+++ b/winsup/cygwin/timerfd.cc
@@ -70,7 +70,7 @@ timerfd_tracker::handle_timechange_window ()
  /* make sure to handle each WM_TIMECHANGE only once! */
  if (msg.time != tc_time ())
{
- set_overrun_count (-1LL);
+ set_expiration_count (-1LL);
  disarm_timer ();
  timer_expired ();
  set_tc_time (msg.time);
@@ -133,7 +133,7 @@ timerfd_tracker::thread_func ()
continue;
  /* Make sure we haven't been abandoned and/or disarmed
 in the meantime */
- if (overrun_count () == -1LL
+ if (expiration_count () == -1LL
  || IsEventSignalled (tfd_shared->disarm_evt ()))
{
  leave_critical_section ();
@@ -142,29 +142,29 @@ timerfd_tracker::thread_func ()
  /* One-shot timer? */
  if (!get_interval ())
{
- /* Set overrun count, disarm timer */
- increment_overrun_count (1);
+ /* Set expiration count, disarm timer */
+ increment_expiration_count (1);
  disarm_timer ();
}
  else
{
- /* Compute overrun count. */
+ /* Compute expiration count. */
  LONG64 now = get_clock_now ();
  LONG64 ts = get_exp_ts ();
+ LONG64 exp_cnt;
 
  /* Make concessions for unexact realtime clock */
  if (ts > now)
ts = now - 1;
- LONG64 ov_cnt = (now - ts + get_interval () - 1)
- / get_interval ();
- increment_overrun_count (ov_cnt);
- ts += get_interval () * ov_cnt;
+ exp_cnt = (now - ts + get_interval () - 1) / get_interval ();
+ increment_expiration_count (exp_cnt);
+ ts += get_interval () * exp_cnt;
  /* Set exp_ts to current timestamp.  Make sure exp_ts ends up
-bigger than "now" and fix overrun count as required */
+bigger than "now" and fix expiration count as required */
  while (ts <= (now = get_clock_now ()))
{
- increment_overrun_count ((now - ts + get_interval () - 1)
-  / get_interval ());
+ increment_expiration_count ((now - ts + get_interval () - 1)
+ / get_interval ());
  ts += get_interval ();
}
  set_exp_ts (ts);
@@ -395,9 +395,9 @@ timerfd_tracker::close ()
 }
 
 void
-timerfd_tracker::ioctl_set_ticks (uint64_t ov_cnt)
+timerfd_tracker::ioctl_set_ticks (uint64_t exp_cnt)
 {
-  set_overrun_count (ov_cnt);
+  set_expiration_count (exp_cnt);
   timer_expired ();
 }
 
@@ -449,7 +449,7 @@ repeat:
ret = -EIO;
   else
{
- ret = read_and_reset_overrun_count ();
+ ret = read_and_reset_expiration_count ();
  leave_critical_section ();
  switch (ret)
{
@@ -461,7 +461,7 @@ repeat:
goto repeat;
  ret = -EAGAIN;
  break;
-   default:/* Return (positive) overrun count. */
+   default:/* Return (positive) 

[newlib-cygwin] Cygwin: timerfd: move ioctl error handling into timerfd_tracker

2019-01-21 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=289b7c09c8bca6c84edfddf77c11b530bda95016

commit 289b7c09c8bca6c84edfddf77c11b530bda95016
Author: Corinna Vinschen 
Date:   Mon Jan 21 12:41:00 2019 +0100

Cygwin: timerfd: move ioctl error handling into timerfd_tracker

Signed-off-by: Corinna Vinschen 

Diff:
---
 winsup/cygwin/fhandler_timerfd.cc | 62 ++-
 winsup/cygwin/timerfd.cc  | 11 +--
 winsup/cygwin/timerfd.h   |  2 +-
 3 files changed, 39 insertions(+), 36 deletions(-)

diff --git a/winsup/cygwin/fhandler_timerfd.cc 
b/winsup/cygwin/fhandler_timerfd.cc
index 8a6c4b5..2a05217 100644
--- a/winsup/cygwin/fhandler_timerfd.cc
+++ b/winsup/cygwin/fhandler_timerfd.cc
@@ -187,6 +187,35 @@ fhandler_timerfd::dup (fhandler_base *child, int flags)
   return ret;
 }
 
+int
+fhandler_timerfd::ioctl (unsigned int cmd, void *p)
+{
+  int ret = -1;
+  uint64_t exp_cnt;
+
+  switch (cmd)
+{
+case TFD_IOC_SET_TICKS:
+  __try
+   {
+ timerfd_tracker *tfd = (timerfd_tracker *) timerid;
+
+ exp_cnt = *(uint64_t *) p;
+ ret = tfd->ioctl_set_ticks (exp_cnt);
+ if (ret < 0)
+   set_errno (-ret);
+   }
+  __except (EFAULT) {}
+  __endtry
+  break;
+default:
+  ret = fhandler_base::ioctl (cmd, p);
+  break;
+}
+  syscall_printf ("%d = ioctl_timerfd(%x, %p)", ret, cmd, p);
+  return ret;
+}
+
 void
 fhandler_timerfd::fixup_after_fork (HANDLE)
 {
@@ -214,39 +243,6 @@ fhandler_timerfd::fixup_after_exec ()
   __endtry
 }
 
-int
-fhandler_timerfd::ioctl (unsigned int cmd, void *p)
-{
-  int ret = -1;
-  uint64_t exp_cnt;
-
-  switch (cmd)
-{
-case TFD_IOC_SET_TICKS:
-  __try
-   {
- timerfd_tracker *tfd = (timerfd_tracker *) timerid;
-
- exp_cnt = *(uint64_t *) p;
- if (!exp_cnt)
-   {
- set_errno (EINVAL);
- break;
-   }
- tfd->ioctl_set_ticks (exp_cnt);
- ret = 0;
-   }
-  __except (EFAULT) {}
-  __endtry
-  break;
-default:
-  ret = fhandler_base::ioctl (cmd, p);
-  break;
-}
-  syscall_printf ("%d = ioctl_timerfd(%x, %p)", ret, cmd, p);
-  return ret;
-}
-
 fhandler_timerfd::~fhandler_timerfd ()
 {
   __try
diff --git a/winsup/cygwin/timerfd.cc b/winsup/cygwin/timerfd.cc
index 08fff31..a03749a 100644
--- a/winsup/cygwin/timerfd.cc
+++ b/winsup/cygwin/timerfd.cc
@@ -394,11 +394,18 @@ timerfd_tracker::close ()
   InterlockedDecrement (_shared->instance_count);
 }
 
-void
-timerfd_tracker::ioctl_set_ticks (uint64_t exp_cnt)
+int
+timerfd_tracker::ioctl_set_ticks (uint64_t new_exp_cnt)
 {
+  LONG64 exp_cnt = (LONG64) new_exp_cnt;
+  if (exp_cnt == 0 || exp_cnt == -1LL)
+return -EINVAL;
+  if (!enter_critical_section ())
+return -EBADF;
   set_expiration_count (exp_cnt);
   timer_expired ();
+  leave_critical_section ();
+  return 0;
 }
 
 void
diff --git a/winsup/cygwin/timerfd.h b/winsup/cygwin/timerfd.h
index 1f9f762..66bf784 100644
--- a/winsup/cygwin/timerfd.h
+++ b/winsup/cygwin/timerfd.h
@@ -148,7 +148,7 @@ class timerfd_tracker   /* cygheap! */
   int settime (int, const struct itimerspec *, struct itimerspec *);
   static void dtor (timerfd_tracker *);
   void close ();
-  void ioctl_set_ticks (uint64_t);
+  int ioctl_set_ticks (uint64_t);
   void fixup_after_fork_exec (bool);
   void fixup_after_fork () { fixup_after_fork_exec (false); }
   void fixup_after_exec () { fixup_after_fork_exec (true); }


[newlib-cygwin] Cygwin: timerfd: fix overrun computation

2019-01-21 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=ea99e9fdda42141ef1c2273943a33d3191d72844

commit ea99e9fdda42141ef1c2273943a33d3191d72844
Author: Corinna Vinschen 
Date:   Mon Jan 21 11:14:16 2019 +0100

Cygwin: timerfd: fix overrun computation

- Drop erroneous initial computation of overrun count in settime
  for absolute non-realtime clocks.  It's repeated in thread_func
  and thus counted twice.

- Fix overrun computation for timestamp offsets being a multiple of
  the timer interval.  The timestamp has to be corrected after the
  first offset, otherwise the correction loop counts the intervals
  again.

Signed-off-by: Corinna Vinschen 

Diff:
---
 winsup/cygwin/timerfd.cc | 21 +++--
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/winsup/cygwin/timerfd.cc b/winsup/cygwin/timerfd.cc
index 64836b0..0a04241 100644
--- a/winsup/cygwin/timerfd.cc
+++ b/winsup/cygwin/timerfd.cc
@@ -155,13 +155,18 @@ timerfd_tracker::thread_func ()
  /* Make concessions for unexact realtime clock */
  if (ts > now)
ts = now - 1;
- increment_overrun_count ((now - ts + get_interval () - 1)
-  / get_interval ());
+ LONG64 ov_cnt = (now - ts + get_interval () - 1)
+ / get_interval ();
+ increment_overrun_count (ov_cnt);
+ ts += get_interval () * ov_cnt;
  /* Set exp_ts to current timestamp.  Make sure exp_ts ends up
 bigger than "now" and fix overrun count as required */
- while ((ts += get_interval ()) <= (now = get_clock_now ()))
-   increment_overrun_count ((now - ts + get_interval () - 1)
-/ get_interval ());
+ while (ts <= (now = get_clock_now ()))
+   {
+ increment_overrun_count ((now - ts + get_interval () - 1)
+  / get_interval ());
+ ts += get_interval ();
+   }
  set_exp_ts (ts);
  /* NtSetTimer allows periods of up to 24 days only.  If the time
 is longer, we set the timer up as one-shot timer for each
@@ -536,11 +541,7 @@ timerfd_shared::arm_timer (int flags, const struct 
itimerspec *new_value)
  /* If the timestamp was earlier than now, compute number
 of overruns and offset DueTime to expire immediately. */
  if (DueTime.QuadPart >= 0)
-   {
- LONG64 num_intervals = DueTime.QuadPart / _interval;
- increment_overrun_count (num_intervals);
- DueTime.QuadPart = -1LL;
-   }
+   DueTime.QuadPart = -1LL;
}
 }
   else


[newlib-cygwin] Cygwin: timerfd: settime: fix computing DueTime on non-realtime clocks

2019-01-21 Thread Corinna Vinschen
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=6ed50a68a133e7e0c0d10e328bce94f98944dbe5

commit 6ed50a68a133e7e0c0d10e328bce94f98944dbe5
Author: Corinna Vinschen 
Date:   Mon Jan 21 10:05:13 2019 +0100

Cygwin: timerfd: settime: fix computing DueTime on non-realtime clocks

Non-CLOCK_REALTIME counters always use a relative DueTime in NtSetTimer.
However, relative DueTime has to be negative, but the code

Signed-off-by: Corinna Vinschen 

Diff:
---
 winsup/cygwin/timerfd.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/winsup/cygwin/timerfd.cc b/winsup/cygwin/timerfd.cc
index e5c17fb..64836b0 100644
--- a/winsup/cygwin/timerfd.cc
+++ b/winsup/cygwin/timerfd.cc
@@ -532,7 +532,7 @@ timerfd_shared::arm_timer (int flags, const struct 
itimerspec *new_value)
DueTime.QuadPart = ts + FACTOR;
   else /* non-REALTIME clocks require relative DueTime. */
{
- DueTime.QuadPart = ts - get_clock_now ();
+ DueTime.QuadPart = get_clock_now () - ts;
  /* If the timestamp was earlier than now, compute number
 of overruns and offset DueTime to expire immediately. */
  if (DueTime.QuadPart >= 0)


Re: /proc/partitions changed ?

2019-01-21 Thread Corinna Vinschen
Hi Marco,

On Jan 20 20:48, Marco Atzeri wrote:
> Am 20.01.2019 um 19:36 schrieb Eliot Moss:
> > On 1/20/2019 1:05 PM, Marco Atzeri wrote:
> > > Am 20.01.2019 um 18:51 schrieb Henry S. Thompson:
> > > > Marco Atzeri writes:
> > > > 
> > > > > In the past I saw
> > > > > ...
> > > > > but now the win-mounts version are missing
> > > > > 
> > > > > $ cat /proc/partitions
> > > > > major minor  #blocks  name   win-mounts
> > > > > 
> > > > >  8 0 0 sda
> > > > >  8    16 0 sdb
> > > > > 
> > 
> > I have:
> > 
> > cygwin DLL version 2.11.2-1
> > Windows 10 Pro 1709 (Build 16299.846)
> > 
> > So all pretty recent, and it works fine for me.
> > 
> > Regards - Eliot Moss
> > 
> 
> Windows 10 Home
> Version 1803
> 
> so or it is Windows or is a BLODA effect

As for the others, WFFM on W10 Enterprise 1809 with the latest
Cygwin snapshot code.  I'd bet on BLODA.  Alternatively this may be
permission problem of some sort.

Can you please run this command under strace and send the strace output?


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer


signature.asc
Description: PGP signature


UPX compressed setup-x86_64.exe crashes on Win10

2019-01-21 Thread Michael Wild
Dear all

I recently got a new laptop at work with Win10 (1709). I went ahead,
downloaded setup-x86_64.exe and wanted to install Cygwin. However, it
crashes with a segmentation fault. Trying to get to the bottom of
things I got the sources on my old laptop and compiled the thing,
copied it to the new laptop, and surprisingly it worked. I then tried
the stripped version. Again, it worked. However, when I tried to run
the UPX compressed executable, I got the segfault again.

Anybody else experiencing this? I tried trawling through the mailing
list, but nothing specific turned up. Maybe this is an interaction
with the BLODA imposed on me by our company IT policy. But then I'd
expect others to have seen this issue too.

Cheers

Michael

--
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