www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/01/17/14:15:47

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:from:subject:date:message-id:references
:mime-version:content-type:content-transfer-encoding; q=dns; s=
default; b=UYSSc/kheKmd6Ge9oMXObvVvBHzAqPOL4dZcJLTl7ESY+l3jAeQ73
Ozc3DnWr8tSbIztQ4Tc8RCHpL1ttVDge5RTFx7HprQeoNvJ7Okaxbzlvy0vXVnfL
ScSkcrauTAHF3ldZZrM6S58oZxdq//T8oHL1htaOvxCxFx5XXy+fpk=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:from:subject:date:message-id:references
:mime-version:content-type:content-transfer-encoding; s=default;
bh=HcLa7hCbjY7+k9uk7LaPqb7udZ8=; b=ZJPfsfxq6sqqgn304O/HuG3QsfRl
fV4T5m4p2/6dnPPKqY1tf36bGfYvDynLUNcI2ReOCEgMD3T5iODx2VtVEnFZ48Im
7itSax3733HHEpaojGEQvHjtxIDqGkjG9O3fU27c4cdo4An9wjsBbZa5Auqlp9IY
SfCkTqeNrh6ek/0=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,KAM_SHORT autolearn=no version=3.3.2 spammy=H*F:D*hu, H*Ad:D*hu, Hx-languages-length:1252, szgyg
X-HELO: blaine.gmane.org
To: cygwin AT cygwin DOT com
From: szgyg <szgyg AT ludens DOT elte DOT hu>
Subject: Re: Monit Compilation Errors
Date: Wed, 17 Jan 2018 19:12:20 +0000 (UTC)
Lines: 28
Message-ID: <p3o76k$3va$1@blaine.gmane.org>
References: <CAO2ddnbkToGBYwZuUGfaxr1_NO1qcPzwS+j=tO5C_+jxCos4qA AT mail DOT gmail DOT com> <p3j4h9$q4p$1 AT blaine DOT gmane DOT org> <3ad2549d-a6b3-e00b-c6f7-0a0a402602c0 AT SystematicSw DOT ab DOT ca>
Mime-Version: 1.0
User-Agent: slrn/1.0.3 (CYGWIN_NT-5.1)
X-IsSubscribed: yes

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019