Monit Compilation Errors
szgyg
szgyg@ludens.elte.hu
Wed Jan 17 19:15:00 GMT 2018
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 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'.
>> [...]
>> 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: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list