X-Recipient: archive-cygwin@delorie.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:subject:to:references:from:message-id:date
	:mime-version:in-reply-to:content-type
	:content-transfer-encoding; q=dns; s=default; b=KSIAQUH+eM5szAIi
	LiXw+xXScFlQM4Eu4Ihz4wUW3dQm12yxu4Q/RP5hX2++Qighf2vpeDGGZ40oS6EC
	BSJq7nwbsiDTBWnmlj1JjIF3ZMEbi8lDzmLaoEDXud7D6xn1edxoZHp4qwXrXaBU
	DayM1MoW2nnY+/dJPbZ5LxYBiUE=
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:subject:to:references:from:message-id:date
	:mime-version:in-reply-to:content-type
	:content-transfer-encoding; s=default; bh=IMFUspUYiVwmuN+h1hxCnS
	Uuy08=; b=LbrIcXGwHvQex3/+L5xA9hPn7Y9aJn6H+X7bXv52pY+aXNeZm8McVx
	DtwKhWflOBu8R4u8eqvXwcgM/MKPEBL1wJAWb5+hpyJzMqK5vY3pymdEY2OGmOQp
	UUZ9SAKiQX+PUwoZ28FntGYsrUY62N4Xb9NNMkH+90VYlPe1zusnQ=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=0.0 required=5.0 tests=AWL,BAYES_50,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=py, Errors, yyparse, MONIT
X-HELO: limerock01.mail.cornell.edu
X-CornellRouted: This message has been Routed already.
Subject: Re: Monit Compilation Errors
To: cygwin@cygwin.com
References: <CAO2ddnbkToGBYwZuUGfaxr1_NO1qcPzwS+j=tO5C_+jxCos4qA@mail.gmail.com>
From: Ken Brown <kbrown@cornell.edu>
Message-ID: <ef0018b6-ffc0-56c3-9ae2-3a85302da7b5@cornell.edu>
Date: Mon, 15 Jan 2018 09:27:11 -0500
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: <CAO2ddnbkToGBYwZuUGfaxr1_NO1qcPzwS+j=tO5C_+jxCos4qA@mail.gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
X-PMX-Cornell-Gauge: Gauge=X
X-PMX-CORNELL-AUTH-RESULTS: dkim-out=none;
X-IsSubscribed: yes

On 1/15/2018 7:22 AM, Kizito Porta Balanyà wrote:
> Hello all,
> 
> I'm trying to compile the last version of MONIT and I get some errors that
> I can not solve.
> 
> Basically I get errors like: expected identifier or ‘(’ before numeric
> constant, but reviewing the code I don't see any wrong, beside that the
> sources compile correctly with Linux, AIX, etc ...
> 
> Can you help me? Do you have any clue?
> 
> I show you the errors obtained:
> 
> gcc -DHAVE_CONFIG_H -I. -I./src    -DCYGWIN
> -DSYSCONFDIR="\"/usr/local/etc\"" -I./src -I./src/device -I./src/http
> -I./src/process -I./src/protocols -I./src/ssl -I./libmonit/src
> -Wno-address -Wno-pointer-sign -g -O2 -Wall -Wunused -Wno-unused-label
> -funsigned-char -D_GNU_SOURCE -std=c99 -D _REENTRANT -c -o src/y.tab.o
> src/y.tab.c
> <command-line>:0:6: error: expected identifier or ‘(’ before numeric
> constant
> src/monit.h:581:19: note: in expansion of macro ‘unix’
>                   } unix;
>                     ^~~~
> <command-line>:0:6: error: expected identifier or ‘(’ before numeric
> constant
> src/monit.h:1129:27: note: in expansion of macro ‘unix’
>                           } unix;
>                             ^~~~
> In file included from src/net.h:30:0,
>                   from src/p.y:116:
> src/monit.h:1130:17: warning: no semicolon at end of struct or union
>                   } socket;
>                   ^
> src/p.y: In function ‘yyparse’:
> <command-line>:0:6: error: expected identifier before numeric constant
> src/p.y:740:42: note: in expansion of macro ‘unix’
>                           Run.httpd.socket.unix.path = $4;
>                                            ^~~~
> <command-line>:0:6: error: expected identifier before numeric constant
> src/p.y:1154:40: note: in expansion of macro ‘unix’
>                           portset.target.unix.pathname = $2;
>                                          ^~~~
> src/p.y: In function ‘addport’:
> <command-line>:0:6: error: expected identifier before numeric constant
> src/p.y:2765:27: note: in expansion of macro ‘unix’
>                   p->target.unix.pathname = port->target.unix.pathname;

I tried to reproduce the problem, but I think you must be using 
different sources than what I found.  I downloaded monit-5.25.1.tar.gz 
from https://mmonit.com/monit/ and found that I couldn't configure it:

$ ./bootstrap
[...]

$ ./configure --without-pam
[...]
configure: error: Architecture not supported: CYGWIN_NT-10.0-WOW
configure: error: ./configure failed for libmonit

Also, the line numbers in my sources differ from those in your error 
messages.  Could you say where you got your sources and how you tried to 
build?

Ken

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

