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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=NMo+ySI44EYUB56y /ip/APgXRdWPjIjUV/VJ6zV2Us5m3vemKUu3PkQl1TsABWxlIUkxzoY2k0SZWTVC jVWJKoWH7V0aaB5xacTqjCMAg9O2Z7wDhCMMSwK+Z1ZyPpP8EoBhVLHfe0WngI6d +jiV3UyznkiXzoFYp4U9Uy+O1SI= 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=0WF9GToPaQ5+GIu/ZQ9Vft j2f/0=; b=DqqttLZ4K/H58CO6Tl3nfypeVdMhywWr7sf42UldhESUBKr1D+XLiV g0ekJb+SqpNEU6HPdjob7HZ/E/ELPQwu6phKd2GaDjd/Q/bAV8mvIte9+yqJ3utv zhoe/H6viERnSAV6S0EwGYuMtKsqarhbGu+4Jx4/3xjboFLQcsP7Q= 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-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=H*M:online, H*r:encrypted, H*r:sk:mailout, H*RU:sk:mailout X-HELO: mailout02.t-online.de Subject: Re: Why is __unix__ defined, and not __WINDOWS__ ? To: cygwin AT cygwin DOT com References: <5fbb6229-da17-c056-19b9-9819c684a8ad AT agner DOT org> From: =?UTF-8?Q?Hans-Bernhard_Br=c3=b6ker?= Openpgp: preference=signencrypt Message-ID: <8e9bfbb4-2139-639d-afaa-dfbacac1a8d9@t-online.de> Date: Sun, 12 May 2019 21:53:48 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <5fbb6229-da17-c056-19b9-9819c684a8ad@agner.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Am 12.05.2019 um 20:22 schrieb Agner Fog: > I have noticed that the gcc and clang compilers have defined the > preprocessing macro __unix__, but not __WINDOWS__, _WIN32, or _WIN64 > when compiling a windows executable. > > Why is this? Because it's correct that way. Cygwin runs on Windows, but it _is_ not Windows. > A C/C++ program will check for these macros if it wants to know which > operating system you are compiling for, and this will give the wrong > result. No. It gives the correct result. -- 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