This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Monit Compilation Errors

Hello again,

Yes, you are right, --ansi have undesirable effects like:

In file included from src/net.h:30:0,
                 from src/p.y:120:
src/monit.h:124:1: error: C++ style comments are not allowed in ISO C90
 //FIXME: we can export this type in libmonit
etc ...

Finally, fter switching to the 32bits cygwin version (-m32 in cygwin64
generated more errors), and modifying Lync.c , monit has been compiled
again for this version.

$ ./monit.exe --version
This is Monit version 5.25.1
Built without ssl, without ipv6, with compression, without pam and without
large                                                        files
Copyright (C) 2001-2017 Tildeslash Ltd. All Rights Reserved.

And the http service works:

user: admin, pwd: monit
Monit Service Manager Running

What are the next steps? Try to compile for the 64bits version? Both
packages are required or only one? In that case, the 64bits cygwin
installer can install the 32 bits monit version?

Thanks a lot for your time.

2018-01-17 20:12 GMT+01:00 szgyg <>:

> On 2018-01-15, Brian Inglis wrote:
> > 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.
> >>> <command-line>:0:6: error: expected identifier or ‘(’ before numeric
> >>> constant
> >>> src/monit.h:581:19: note: in expansion of macro ‘unix’
> >>>                  } unix;
> >>>                    ^~~~
> >>
> >> From
> 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'.
> >> [...]
> >> 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.
> I'd go with the minimally intrusive `CFLAGS=-Uunix'. -ansi can have
> undesirable
> side effects.
> s
> --
> Problem reports:
> FAQ:         
> Documentation:
> Unsubscribe info:

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]