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:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=PA3q3/gG2hNysk3v KGJcOC4Q9cwzctO2BNJZpMe6OuVueMcqiA+9OWluDxlTvoZe+c4ngZ0MqjI5jjus Yw2DbFa4F4T0hjpRFjfpxA5Vm65OxH0lsNHqghyGoTXxgxaKS57sGcoai9y46kmO Byt6RrnafmyBZ9NbhrzawniSVNY= 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:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=Yv1hvMvbPeiA4m5TVQKLSv 3ejNE=; b=KhQMYqPsahbj1j2pTToW2ZE5B4DzffPqiuuRXu1shAuWPdafJI6pKP IFYDKZRs5zOz79NQGrL6Byj1uCDTiESJl7R3wFNSs/4w+Ua+MIm18b/03c05bvww wA8z2SA5T1XZXLivc6PI0NRgAIf5Hf4ezuLplKupsw5ze1yUGkNko= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=-1.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,KAM_SHORT,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=Canada, reserved, HContent-Transfer-Encoding:8bit X-HELO: smtp-out-no.shaw.ca X-Authority-Analysis: v=2.2 cv=f8g4PK6M c=1 sm=1 tr=0 a=MVEHjbUiAHxQW0jfcDq5EA==:117 a=MVEHjbUiAHxQW0jfcDq5EA==:17 a=N659UExz7-8A:10 a=mDV3o1hIAAAA:8 a=mlBNbs7Q1Ju3IOac10AA:9 a=pILNOxqGKmIA:10 a=v7_a8pSIVpEA:10 a=_FVE-zBwftR9WsbkzFJk:22 Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca Subject: Re: Monit Compilation Errors To: cygwin AT cygwin DOT com References: From: Brian Inglis Message-ID: <3ad2549d-a6b3-e00b-c6f7-0a0a402602c0@SystematicSw.ab.ca> Date: Mon, 15 Jan 2018 15:19:52 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4wfISTNpA8BTQgeCfJ6GI5G0DqQY5Ad3wt67Pc/h8dJBGIMM0mZ3fmk1UoBHVaT/xU4Jn+mxTQC+WpcKBC/+P3qByxiwyFsmNtbeCEQ6A+rcfaK1P6QInb QE5o8kDF7HL4jMZY5cVYmuJ++3FH0VTp3jsSQDvlp8SbK5JR0kopHv3eqGqgRTTzLflOD5/vdkv5Cg== X-IsSubscribed: yes 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