delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/08/03/07:18:09

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:mime-version:date:message-id:subject:from:to
:content-type; q=dns; s=default; b=UX7wk79dx1rX5pMqn65Fa2rwFDYpC
rRKRA4E0H9L898qNxcFcKUuHQsY6vWqDfTIY7nSutFZKjEsuZayZeK9l1Vz/1c1H
umt7OJ+fIynPMU6Kz8TWqKqbEOGJY3UVM8+jMDezmV0fu6/+a+2VN9eoWE1dRREG
fYRGh7J5OFR8Aw=
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:mime-version:date:message-id:subject:from:to
:content-type; s=default; bh=5tBSKFsbmEY404M7V2VMr7V0Hpg=; b=hBj
ZGVgJR8wyutvQfUVujN4A2wb8Jnak1E9WyLSKHaGa2aVGLQ4eP9Pr3IUNSKV5z+C
WEGJvjekJRgx3rBbWOQ2b6x3w3KEcCqKC9Pg1ZQnQSKV/ALZ09mD2EPP2e5myI99
PCJbjSN0h8SXKEU28zWCjBjvIdQJwLz/PJ86WARs=
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=-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
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)
Date: Mon, 3 Aug 2015 04:17:44 -0700
Message-ID: <CAOC2fq-Gsqj3zZa-X+w_jHDdob0bO0iUSVk--PoGoj-YaiyQ4Q@mail.gmail.com>
Subject: wspiapi.h uses _N conflicting with ctype.h
From: Michael Enright <mike AT kmcardiff DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

Here's a reduction of a problem I had compiling v8:

#include <ctype.h>
#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

- Raw text -


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