From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80886 invoked by alias); 3 Aug 2015 11:17:49 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 80877 invoked by uid 89); 3 Aug 2015 11:17:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-la0-f46.google.com Received: from mail-la0-f46.google.com (HELO mail-la0-f46.google.com) (209.85.215.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 03 Aug 2015 11:17:48 +0000 Received: by labow3 with SMTP id ow3so14183906lab.1 for ; Mon, 03 Aug 2015 04:17:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=g2xVjzKie8uncquP9UlZabbVKF8Exa8UiPyBYkguJgc=; b=kbgccrmzTGVALPNF4+vzUrKPDGms5xZjMZbRZ1JTLo7VWtgC3LLsKLRhmxjSzEkRcO b0R2QwnrNxHG4o/KTXm/ScEeQ8ItjsqPqjrjnf0bOD6ninWUX3dG2rztGqag7YBD0EdT lmoyliJvFxZ/qcdIxZjsIR3a/V6QiEzdbsAvpUOBXiLcXVCGok6VMPD9545CbYxydFqM f+QCmv6Yf2kHMlKxPnzZ9sGW72OTMfz2hYBBVjyMDFcPD2ppw4ByAea4zXcDP6ZV9Xqv U6fsNCxj7KbYz5bqr2GPvZTaKR+/iuELg7bYbEY0O4Ow2ZuI9ESsGcl26S9HhvZWuMFo 6+QQ== X-Gm-Message-State: ALoCoQmuirgZifezFuY22in4fJv9SDDnAceTmyoY9/lmcr4igdVS4Cp+Rf43ei84lB2f+kgR8ibA MIME-Version: 1.0 X-Received: by 10.152.28.194 with SMTP id d2mr16534713lah.122.1438600664626; Mon, 03 Aug 2015 04:17:44 -0700 (PDT) Received: by 10.152.111.8 with HTTP; Mon, 3 Aug 2015 04:17:44 -0700 (PDT) Date: Mon, 03 Aug 2015 11:17:00 -0000 Message-ID: Subject: wspiapi.h uses _N conflicting with ctype.h From: Michael Enright To: cygwin@cygwin.com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00036.txt.bz2 Here's a reduction of a problem I had compiling v8: #include #include "wspiapi.h" char array[5]; __wspiapi_countof_helper(array); The reduction isn't realistic but the problem is real. On one hand, ctype.h uses _N and it is within its "rights" to do so as ctype.h is part of the standard library. The statement that uses _N initially is "#define _N 04", so _N enters the global space of defined macros. On the other hand the template __wspiapi_countof_helper uses _N as the name of one of its parameters. This usage is in the domain of strings that can be interpreted as references to macros by the preprocessor, so the _N gets interpreted by the post-preprocessor phases as 04, causing some distress. So... the win32 headers are free to use leading-underscore-capital-letter symbols or no? Anyway, how can this be addressed? -- 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