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=UoAa0LZsxtE+XSt6RUHagh4bXmocqWMm8pRcuMucwxn9P4bPvZy0e kIxqJseJf1pYiUzGSqNg/0nbfZipD6smMzqh6Ihk+e4JxJx2rQ8NX+q+aWUblmyi nONj/jM8jz77HmUpDkXA8HGzPpUrOYHB9Jn14qEunWkUyy2OzypDG4= 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=MURWw1+LImDW9NiyutvebnQzBQg=; b=qYs/LxuSCAwerPy/ohhLROI8QtNL Fnsf15cP021tzSfdPKWPhxYrgngOvJOfxEUhg2DVJsAUP2hAh8Z0KKpNwCnbgIyl xqcE7nClQUlLPnSjCIiN7SHUoVqc8614r8wiQQIa8xvDYzfexVd9V4Ljsm3cBZgN iqORZT4niYeooME= 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=-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, H*r:Unknown, reserved X-HELO: blaine.gmane.org To: cygwin AT cygwin DOT com From: szgyg Subject: Re: Monit Compilation Errors Date: Mon, 15 Jan 2018 20:56:09 +0000 (UTC) Lines: 57 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User-Agent: slrn/1.0.3 (CYGWIN_NT-5.1) X-IsSubscribed: yes On 2018-01-15, 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. > > :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. szgyg -- 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