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

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


Problem reports:
Unsubscribe info:

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