Monit Compilation Errors

2018-01-15 Thread Kizito Porta Balanyà
Hello all,

I'm trying to compile the last version of MONIT and I get some errors that
I can not solve.

Basically I get errors like: expected identifier or ‘(’ before numeric
constant, but reviewing the code I don't see any wrong, beside that the
sources compile correctly with Linux, AIX, etc ...

Can you help me? Do you have any clue?

I show you the errors obtained:

gcc -DHAVE_CONFIG_H -I. -I./src-DCYGWIN
-DSYSCONFDIR="\"/usr/local/etc\"" -I./src -I./src/device -I./src/http
-I./src/process -I./src/protocols -I./src/ssl -I./libmonit/src
-Wno-address -Wno-pointer-sign -g -O2 -Wall -Wunused -Wno-unused-label
-funsigned-char -D_GNU_SOURCE -std=c99 -D _REENTRANT -c -o src/y.tab.o
src/y.tab.c
:0:6: error: expected identifier or ‘(’ before numeric
constant
src/monit.h:581:19: note: in expansion of macro ‘unix’
 } unix;
   ^~~~
:0:6: error: expected identifier or ‘(’ before numeric
constant
src/monit.h:1129:27: note: in expansion of macro ‘unix’
 } unix;
   ^~~~
In file included from src/net.h:30:0,
 from src/p.y:116:
src/monit.h:1130:17: warning: no semicolon at end of struct or union
 } socket;
 ^
src/p.y: In function ‘yyparse’:
:0:6: error: expected identifier before numeric constant
src/p.y:740:42: note: in expansion of macro ‘unix’
 Run.httpd.socket.unix.path = $4;
  ^~~~
:0:6: error: expected identifier before numeric constant
src/p.y:1154:40: note: in expansion of macro ‘unix’
 portset.target.unix.pathname = $2;
^~~~
src/p.y: In function ‘addport’:
:0:6: error: expected identifier before numeric constant
src/p.y:2765:27: note: in expansion of macro ‘unix’
 p->target.unix.pathname = port->target.unix.pathname;


Thanks in advance, and have a new good year,

Regards.

--
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: Monit Compilation Errors

2018-01-15 Thread Ken Brown

On 1/15/2018 7:22 AM, Kizito Porta Balanyà wrote:

Hello all,

I'm trying to compile the last version of MONIT and I get some errors that
I can not solve.

Basically I get errors like: expected identifier or ‘(’ before numeric
constant, but reviewing the code I don't see any wrong, beside that the
sources compile correctly with Linux, AIX, etc ...

Can you help me? Do you have any clue?

I show you the errors obtained:

gcc -DHAVE_CONFIG_H -I. -I./src-DCYGWIN
-DSYSCONFDIR="\"/usr/local/etc\"" -I./src -I./src/device -I./src/http
-I./src/process -I./src/protocols -I./src/ssl -I./libmonit/src
-Wno-address -Wno-pointer-sign -g -O2 -Wall -Wunused -Wno-unused-label
-funsigned-char -D_GNU_SOURCE -std=c99 -D _REENTRANT -c -o src/y.tab.o
src/y.tab.c
:0:6: error: expected identifier or ‘(’ before numeric
constant
src/monit.h:581:19: note: in expansion of macro ‘unix’
  } unix;
^~~~
:0:6: error: expected identifier or ‘(’ before numeric
constant
src/monit.h:1129:27: note: in expansion of macro ‘unix’
  } unix;
^~~~
In file included from src/net.h:30:0,
  from src/p.y:116:
src/monit.h:1130:17: warning: no semicolon at end of struct or union
  } socket;
  ^
src/p.y: In function ‘yyparse’:
:0:6: error: expected identifier before numeric constant
src/p.y:740:42: note: in expansion of macro ‘unix’
  Run.httpd.socket.unix.path = $4;
   ^~~~
:0:6: error: expected identifier before numeric constant
src/p.y:1154:40: note: in expansion of macro ‘unix’
  portset.target.unix.pathname = $2;
 ^~~~
src/p.y: In function ‘addport’:
:0:6: error: expected identifier before numeric constant
src/p.y:2765:27: note: in expansion of macro ‘unix’
  p->target.unix.pathname = port->target.unix.pathname;


I tried to reproduce the problem, but I think you must be using 
different sources than what I found.  I downloaded monit-5.25.1.tar.gz 
from https://mmonit.com/monit/ and found that I couldn't configure it:


$ ./bootstrap
[...]

$ ./configure --without-pam
[...]
configure: error: Architecture not supported: CYGWIN_NT-10.0-WOW
configure: error: ./configure failed for libmonit

Also, the line numbers in my sources differ from those in your error 
messages.  Could you say where you got your sources and how you tried to 
build?


Ken

--
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: Monit Compilation Errors

2018-01-15 Thread BGINFO4X
Hello again,

Well,your are right, I modified the sources to port monit to cygwin, as I
did correctly in version 5.10.

Below you will find a quick how-to (and at the end the required diff files).

##
CYGWIN PACKGAGING
##

0- Install Cygwin via setup-x86_64 or setup-x86 from https://www.cygwin.com

1- The following packages are required from the Cygwin:

Devel Tree:
make, autoconf,automake,gcc-core,bison,libtool,flex, cygwin32-zlib,
zlib-devel

Libs Tree:
libcrypt-devel


Select also all the required dependecies when installing

##
MONIT DOWNLOAD
##

2- For better success, start cygwin.bat or cygwin Terminal with
Administration Elevation Privileges "Run as Administrator":

3- Download monit source from https://mmonit.com/monit/ and copy it to your
"cywin forlder"/tmp:

$ cd /tmp
$ tar xvfz monit-5.25.1.tar.gz
$ cd monit-5.25.1


##
CREATE SYSTEM DEPENDENCIES FILES
##

Copy the Minimal System Dependencies from sysdep_UNKNOWN to the cygwin
architecture:

cp file /src/device/sysdep_UNKNOWN.c /src/device/sysdep_CYGWIN.c
cp file /src/process/sysdep_UNKNOWN.c /src/process/sysdep_CYGWIN.c


##
ADAPT CONIFUGRE.AC TO CYGWIN in # Architecture/OS part of code
##

For configure.ac:
## CYGWIN ADDED LINES START #
elif test "${architecture:0:6}" = "CYGWIN"  # CYGWIN_NT-6.1 -> CYGWIN
(Array slice)
then
ARCH="CYGWIN"
CFLAGS="$CFLAGS -D _REENTRANT"
### LDFLAGS="$LDFLAGS -lcrypt"
###CFLAGS="-E $CFLAGS -D _REENTRANT"
## CYGWIN ADDED LINES END ##

For libmonit configure.ac:
## CYGWIN ADDED LINES START #
elif test "${architecture:0:6}" = "CYGWIN"  # CYGWIN_NT-6.1 -> CYGWIN
(Array slice)
then
CFLAGS="$CFLAGS -D _REENTRANT"
###CFLAGS="-E $CFLAGS -D _REENTRANT"
AC_DEFINE([CYGWIN], 1, [Define to 1 if the system is CYGWIN])
## CYGWIN ADDED LINES END ##

##
ADAPT MONIT.H
##
In monit.h add:

#ifdef CYGWIN

#ifndef ICMP_ECHO
#define ICMP_ECHO 8
#endif

#ifndef ICMP_ECHOREPLY
#define ICMP_ECHOREPLY 20
#endif

#endif

##
ADAPT NET.C
##
In net.c modify icmp_echo function:

#ifdef CYGWIN
double icmp_echo(const char *hostname, Socket_Family family, Outgoing_T
*outgoing, int size, int timeout, int maxretries) {
return -1;
}
#else
double icmp_echo(const char *hostname, Socket_Family family, Outgoing_T
*outgoing, int size, int timeout, int maxretries) {
ASSERT(hostname);




##
COMPILATION
##

$ ./bootstrap && autoreconf -i -f && automake -acf && ./configure
--without-pam --without-ssl --without-ipv6 --without-largefiles
--without-zlib
   Success bootstrapping libmonit
   Success bootstrapping Monit ...

++
| License:   |
| This is Open Source Software and use is subject to the GNU |
| AFFERO GENERAL PUBLIC LICENSE version 3, available in this |
| distribution in the file COPYING.  |
||
| By continuing this installation process, you are bound by  |
| the terms of this license agreement. If you do not agree   |
| with the terms of this license, you must abort the |
| installation process at this point.|
++
| Libmonit is configured as follows: |
||
|   Optimized:DISABLED   |
|   Profiling:DISABLED   |
|   Compression:  DISABLED   |
++

Monit Build Information:

Architecture: CYGWIN
  Compiler flags: -Wno-address -Wno-pointer-sign -g -O2 -Wall
-Wunused -Wno-unused-label -funsigned-char -D_GNU_SOURCE -std=c99 -D
_REENTRANT
Linker flags: -lpthread -lcrypt -lresolv
   pid file location: /var/run
   Install directory: /usr/local

++
| License:   |
| This is Open Sou

[ANNOUNCEMENT] mediainfo 17.12-1

2018-01-15 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* mediainfo-17.12-1
* mediainfo-gui-17.12-1
* mediainfo-qt-17.12-1
* libmediainfo0-17.12-1
* libmediainfo-devel-17.12-1
* libzen0-0.4.37-1
* libzen-devel-0.4.37-1

MediaInfo is a convenient unified display of the most relevant technical 
and tag data for video and audio files.

This is an update to the latest upstream release:

https://mediaarea.net/MediaInfo/ChangeLog

libmediainfo was built for the latest tinyxml2-6.0.

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



[ANNOUNCEMENT] bind 9.11.2-1

2018-01-15 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* bind-9.11.2-1
* bind-utils-9.11.2-1
* bind-doc-9.11.2-1
* libbind9_160-9.11.2-1
* libdns169-9.11.2-1
* libirs160-9.11.2-1
* libisc166-9.11.2-1
* libisccc160-9.11.2-1
* libisccfg160-9.11.2-1
* liblwres160-9.11.2-1
* libbind9-devel-9.11.2-1
* python2-isc-9.11.2-1
* python3-isc-9.11.2-1

BIND is an implementation of the Domain Name System (DNS) protocols. The 
DNS protocols are part of the core Internet standards. They specify the 
process by which one computer can find another computer on the basis of its 
name. The BIND software distribution contains all of the software needed 
both to ask name service questions and to answer such questions.

This is an update to the latest upstream release, with ABI version bumps to 
libdns and libisc:

http://ftp.isc.org/isc/bind9/9.11.2/RELEASE-NOTES-bind-9.11.2.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: Cygwin socket option SO_REUSEADDR operates unlike Linux

2018-01-15 Thread Corinna Vinschen
On Jan 13 13:39, Mark Geisert wrote:
> Corinna Vinschen wrote:
> > On Jan 13 00:36, Mark Geisert wrote:
> > > ~ ./bindtest
> > > 1st socket is 3
> > > 1st bind OK
> > > 1st connect OK
> > > 2nd socket is 3
> > > 2nd bind OK
> > > 2nd connect: Address already in use
> > > 
> > > ~ ./bindtest
> > > 1st socket is 3
> > > 1st bind OK
> > > 1st connect: Address already in use
> > > 
> > > On Fedora 27, running the same STC shows:
> > > 
> > > [mark@lux ~]$ netstat -an|grep :111
> > > tcp0  0 0.0.0.0:111 0.0.0.0:*LISTEN
> > > tcp6   0  0 :::111  :::* LISTEN
> > > udp0  0 0.0.0.0:111 0.0.0.0:*
> > > udp6   0  0 :::111  :::*
> > > [mark@lux ~]$ ./bindtest
> > > 1st socket is 3
> > > 1st bind OK
> > > 1st connect OK
> > > 2nd socket is 3
> > > 2nd bind OK
> > > 2nd connect OK
> > 
> > I can't reproduce this:
> > 
> > $ uname -sr
> > Linux 4.14.13-300.fc27.x86_64
> > $ netstat -an|grep :111
> > tcp0  0 0.0.0.0:111 0.0.0.0:*   LISTEN
> > tcp6   0  0 :::111  :::*LISTEN
> > udp0  0 0.0.0.0:111 0.0.0.0:*
> > udp6   0  0 :::111  :::*
> > $ ./bindtest
> > 1st socket is 3
> > 1st bind OK
> > 1st connect OK
> > 2nd socket is 3
> > 2nd bind OK
> > 2nd connect: Cannot assign requested address
> > [...]
> Rats.  I'll have to investigate a couple of directions, deeper.  It makes
> sense that connect() returns EADDRINUSE rather than bind() [...]

After some more digging it turns out that both of the above observations
on Linux are correct.  I can reproduce the 2nd connect succeeding by
simply adding a `sleep(1)' after the first close.  So it turns out that
Linux has a timing issue at socket cleanup which can be alleviated
by an extra sleep.  I opened a case about this issue.  EADDRNOTAVAIL
sounds a bit weird in this scenario, but it's kind of ok.

In terms of Cygwin, the EADDRINUSE is a completely different matter.

It turns out that the second connect fails because the first socket
connection is in TIME_WAIT state.  This is not exactly correct in POSIX
terms.  The TIME_WAIT connection should not disallow a new socket to
reuse the same local address.  That's what we observe on Linux (apart from
the timing issue).

But here's the problem:  Regardless if we actually use SO_REUSEADDR or
not, Windows sockets apparently disallows a subsequent connect to
succeed while the first socket is still in TIME_WAIT.  I tweaked Cygwin
to enforce SO_REUSEADDR before bind, but connect still fails with
EADDRINUSE as long as the first socket is in TIME_WAIT.

It seems the code path for listen/accept is different here compared to
connect.  Given that SO_REUSEADDR seems to cover mostly server side
scenarios, and given that I don't see this scenario discussed at all
in Steven's book, I wonder if bind/connect is a bit of a grey area.

Either way, the bottom line is that this is a WinSock restriction,
apparently.  As of today, I don't see any way around that.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat


signature.asc
Description: PGP signature


[ANNOUNCEMENT] ttfautohint 1.8.1-1

2018-01-15 Thread Yaakov Selkowitz
The following packages have been uploaded to the Cygwin distribution:

* ttfautohint-1.8.1-1
* ttfautohint-gui-1.8.1-1
* libttfautohint1-1.8.1-1
* libttfautohint-devel-1.8.1-1

ttfautohint provides a 99% automated hinting process and a platform for 
finely hand-hinting the last 1%. It is ideal for web fonts and supports 
many scripts.

This is an update to the latest upstream release, which now includes a 
shared library:

https://sourceforge.net/projects/freetype/files/ttfautohint/1.8.1/

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



Hello Cygwin

2018-01-15 Thread allangschrum
hi Cygwin

https://goo.gl/D43ZM9

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



cron running but not executing user crontab

2018-01-15 Thread Chris Johnson
Bit of a conundrum here.  Running WIN7 and cygwin64.  Have the terminal 
running and Perl is installed and runs.  AFAIK, that all works.  Used 
cygrunsrv to get cron going.  I can see cron in a ps -af in the 
terminal.  I set up a crontab for my user and it's in /var/cron/tabs by 
using crontab -e.


Doesn't seem to be running anything in the crontab.  I had wanted to run 
a Perl script in a Windows Directory outside the cygwin structure but 
using the /cygdrive/c etc path.  Ain't working.  Even tried the simplest 
thing I could think of and created a line date > dt.txt on it.  
Normally, under *nix this  would put the results of date in dt.txt in 
the home directory.  Not there.


Just isn't running anything as far as I can tell.

Any suggestions.  I'd like to get this working.  Want am I missing? 
Help  appreciated.  Thank you



--

Chris Johnson   rchristopherjohn...@gmail.com
Ex SysAdmin, now, writer/The hardest thing in this world is to live in 
it.
/(Buffy, the vampire slayer EOS 5)


--
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: Monit Compilation Errors

2018-01-15 Thread szgyg
On 2018-01-15, Kizito Porta Balanyà wrote:
> Hello all,
>
> I'm trying to compile the last version of MONIT and I get some errors that
> I can not solve.
>
> :0:6: error: expected identifier or ‘(’ before numeric
> constant
> src/monit.h:581:19: note: in expansion of macro ‘unix’
>  } unix;
>^~~~

>From https://gcc.gnu.org/onlinedocs/cpp/System-specific-Predefined-Macros.html

"historically system-specific macros have had names with no special
prefix; for instance, it is common to find unix defined on Unix systems.
[...] When the -ansi option, or any -std option that requests strict
conformance, is given to the compiler, all the system-specific predefined
macros outside the reserved namespace are suppressed."


You can see the predefined macros with `cpp -dD /dev/null'.

$ cpp -dD /dev/null
# 1 "/dev/null"
# 1 ""
[...]
#define __unix__ 1
#define __unix 1
#define __declspec(x) __attribute__((x))
#define __DECIMAL_BID_FORMAT__ 1
# 1 ""
#define unix 1 <-- this is your problem
# 1 "/dev/null"


With -ansi:

$ cpp -ansi -dD /dev/null
# 1 "/dev/null"
# 1 ""
[...]
#define __unix__ 1
#define __unix 1
#define __declspec(x) __attribute__((x))
#define __DECIMAL_BID_FORMAT__ 1
# 1 ""
# 1 "/dev/null"


$ cpp --version
cpp (GCC) 6.4.0


You can undefine the unix macro or rename the unix struct.

szgyg


--
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: cron running but not executing user crontab

2018-01-15 Thread Brian Inglis
On 2018-01-15 13:48, Chris Johnson wrote:
> Bit of a conundrum here.  Running WIN7 and cygwin64.  Have the terminal 
> running
> and Perl is installed and runs.  AFAIK, that all works.  Used cygrunsrv to get
> cron going.  I can see cron in a ps -af in the terminal.  I set up a crontab 
> for
> my user and it's in /var/cron/tabs by using crontab -e.
> 
> Doesn't seem to be running anything in the crontab.  I had wanted to run a 
> Perl
> script in a Windows Directory outside the cygwin structure but using the
> /cygdrive/c etc path.  Ain't working.  Even tried the simplest thing I could
> think of and created a line date > dt.txt on it.  Normally, under *nix this 
> would put the results of date in dt.txt in the home directory.  Not there.

Use /proc/cygdrive/c/... in case it ever changes, and specify absolute paths for
scripts and commands, as only minimal environments are setup, and
non-interactive shell startup scripts run.
Might need to specify other environment variables required in the crontab.
Ensure your perl script has Cygwin +x permissions and hashbang line.

> Just isn't running anything as far as I can tell.
> 
> Any suggestions.  I'd like to get this working.  Want am I missing? Help 
> appreciated.  Thank you

Add cron users to /var/cron/cron.allow (and maybe also a cron group), or touch
/var/cron/cron.deny to allow all users: see crontab(1).
Check /etc/crontab and /etc/cron.d/* are owned and writable only by the crond
user if they exist; /var/run/cron.pid and /var/log/cron.log exist and are owned
and writable only by the crond user; /var/cron/tabs/* exist and are owned by
their users and writable only by their owners; /var/run/cron.pid contains the
cron pid, and see what's in /var/log/cron.log.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

--
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: cron running but not executing user crontab

2018-01-15 Thread René Berber
On 1/15/2018 2:48 PM, Chris Johnson wrote:

> Bit of a conundrum here.  Running WIN7 and cygwin64.  Have the terminal
> running and Perl is installed and runs.  AFAIK, that all works.  Used
> cygrunsrv to get cron going.

Not sure if I remember this right, but there is a cron-config in the
package, and that is what you are supposed to use to install it as a
service (and set a proper daemon user, file & dir access, etc.)  You
probably will have to undo whatever you did with cygrunsrv.

Better read /usr/share/doc/Cygwin/cron-4.1-65.README to be sure.

Hope this helps.
-- 
R. Berber


--
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: Monit Compilation Errors

2018-01-15 Thread Brian Inglis
On 2018-01-15 13:56, szgyg wrote:
> On 2018-01-15, Kizito Porta Balanyà wrote:
>> I'm trying to compile the last version of MONIT and I get some errors that
>> I can not solve.
>> :0:6: error: expected identifier or ‘(’ before numeric
>> constant
>> src/monit.h:581:19: note: in expansion of macro ‘unix’
>>  } unix;
>>^~~~
>>From https://gcc.gnu.org/onlinedocs/cpp/System-specific-Predefined-Macros.html
> "historically system-specific macros have had names with no special
> prefix; for instance, it is common to find unix defined on Unix systems.
> [...] When the -ansi option, or any -std option that requests strict
> conformance, is given to the compiler, all the system-specific predefined
> macros outside the reserved namespace are suppressed."
> You can see the predefined macros with `cpp -dD /dev/null'.
> $ cpp -dD /dev/null
> # 1 "/dev/null"
> # 1 ""
> [...]
> #define __unix__ 1
> #define __unix 1
> #define __declspec(x) __attribute__((x))
> #define __DECIMAL_BID_FORMAT__ 1
> # 1 ""
> #define unix 1 <-- this is your problem
> # 1 "/dev/null"
> With -ansi:
> $ cpp -ansi -dD /dev/null
> # 1 "/dev/null"
> # 1 ""
> [...]
> #define __unix__ 1
> #define __unix 1
> #define __declspec(x) __attribute__((x))
> #define __DECIMAL_BID_FORMAT__ 1
> # 1 ""
> # 1 "/dev/null"
> $ cpp --version
> cpp (GCC) 6.4.0
> You can undefine the unix macro or rename the unix struct.

Looks like -std=c99 without -ansi does not suppress those symbols so add -ansi
to CFLAGS, use equivalent configure options, or autoconf/automake changes.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

--
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: cppcheck-1.82-1

2018-01-15 Thread David Stacey

The following packages have been updated in the Cygwin distribution:

* cppcheck-1.82-1
* cppcheck-gui-1.82-1

Cppcheck is a static analysis tool for C/C++ code. Unlike C/C++
compilers and many other analysis tools it does not detect syntax
errors in the code. Cppcheck primarily detects the types of bugs that
the compilers normally do not detect. The goal is to detect only real
errors in the code (i.e. have zero false positives).

This is an update to the latest upstream release.

Dave.

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



deleted current directory behaviour

2018-01-15 Thread Tony Cook
Currently cygwin emulates* Linux (and most other POSIXish systems that
I'm aware of) by allowing the current directory to be removed:

tony@saturn ~/dev/perl/git
$ mkdir foo

tony@saturn ~/dev/perl/git
$ cd foo

tony@saturn ~/dev/perl/git/foo
$ rmdir ~/dev/perl/git/foo

but is inconsistent after that:

tony@saturn ~/dev/perl/git/foo
$ pwd
/home/tony/dev/perl/git/foo

tony@saturn ~/dev/perl/git/foo
$ cd ~/dev/perl/git/foo
bash: cd: /home/tony/dev/perl/git/foo: No such file or directory

tony@saturn ~/dev/perl/git/foo
$ cd ~/dev/perl/git

tony@saturn ~/dev/perl/git
$ ls foo
ls: cannot access 'foo': No such file or directory

The pwd isn't (only) the shell caching the current directory:

tony@saturn ~/dev/perl/git
$ cat 132648.c
#include 
#include 
#include 
#include 

int main(void) {
  char buf[1000]; /* keeping this simple */
  if (mkdir("foo", 0700) < 0) {
perror("mkdir");
return 1;
  }
  if (chdir("foo") < 0) {
perror("chdir");
return 1;
  }
  if (rmdir("../foo") < 0) {
perror("rmdir");
return 1;
  }

  if (!getcwd(buf, sizeof(buf))) {
perror("getcwd");
return 1;
  }
  puts(buf);

  return 0;
}

tony@saturn ~/dev/perl/git
$ cc -o132648.exe 132648.c

tony@saturn ~/dev/perl/git
$ ./132648
/home/tony/dev/perl/git/foo

On Linux that program outputs:

tony@mars:.../newlib/git$ ./132648
getcwd: No such file or directory

Is that inconsistency with other platforms intentional?

If it isn't, are there any plans to make it consistent with
Linux/other POSIX-like systems?

Note: I'm not requesting this be fixed.  I have perl test code that
needs to be skip the test with the current behaviour, or allow
execution if the behaviour is made more consistent.

Thanks,
Tony

If it matters:

tony@saturn ~/dev/perl/git
$ uname -a
CYGWIN_NT-6.1-WOW saturn 2.9.0(0.318/5/3) 2017-09-12 10:41 i686 Cygwin

* Win32 doesn't allow removing the current directory:
  C:\Users\tony>.\132648
  rmdir: Permission denied

--
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: Missing dependencies for opam package

2018-01-15 Thread Andy Li
On Thu, Jan 11, 2018 at 8:50 PM, David Allsopp 
wrote:
>
> So, in summary, the following dependencies would be good to have added to
> the opam package, in descending order of importance:
>
>   flexdll
>   libX11-devel
>   diffutils
>   tar
>   patch
>   unzip
>   curl (or wget, if preferred)
>   gcc-core
>   make
>   m4
>   rsync
>   git
>   mercurial
>   ocaml


Thanks for the detailed explanation!
I've just added those in the opam 1.2.2-2 package.

Best regards,
Andy

--
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: deleted current directory behaviour

2018-01-15 Thread Thomas Wolff


Am 16.01.2018 um 05:13 schrieb Tony Cook:

Currently cygwin emulates* Linux (and most other POSIXish systems that
I'm aware of) by allowing the current directory to be removed:

tony@saturn ~/dev/perl/git
$ mkdir foo

tony@saturn ~/dev/perl/git
$ cd foo

tony@saturn ~/dev/perl/git/foo
$ rmdir ~/dev/perl/git/foo

but is inconsistent after that:

tony@saturn ~/dev/perl/git/foo
$ pwd
/home/tony/dev/perl/git/foo

tony@saturn ~/dev/perl/git/foo
$ cd ~/dev/perl/git/foo
bash: cd: /home/tony/dev/perl/git/foo: No such file or directory

tony@saturn ~/dev/perl/git/foo
$ cd ~/dev/perl/git

tony@saturn ~/dev/perl/git
$ ls foo
ls: cannot access 'foo': No such file or directory

The pwd isn't (only) the shell caching the current directory:

tony@saturn ~/dev/perl/git
$ cat 132648.c
#include 
#include 
#include 
#include 

int main(void) {
   char buf[1000]; /* keeping this simple */
   if (mkdir("foo", 0700) < 0) {
 perror("mkdir");
 return 1;
   }
   if (chdir("foo") < 0) {
 perror("chdir");
 return 1;
   }
   if (rmdir("../foo") < 0) {
 perror("rmdir");
 return 1;
   }

   if (!getcwd(buf, sizeof(buf))) {
 perror("getcwd");
 return 1;
   }
   puts(buf);

   return 0;
}

tony@saturn ~/dev/perl/git
$ cc -o132648.exe 132648.c

tony@saturn ~/dev/perl/git
$ ./132648
/home/tony/dev/perl/git/foo

On Linux that program outputs:

tony@mars:.../newlib/git$ ./132648
getcwd: No such file or directory

Is that inconsistency with other platforms intentional?

If it isn't, are there any plans to make it consistent with
Linux/other POSIX-like systems?
The shell-internal pwd just echos $PWD, even if the directory does not 
exist anymore; this is consistent with Linux.


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