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:in-reply-to:references:from:date :message-id:subject:to:content-type:content-transfer-encoding; q=dns; s=default; b=Hg/yabm6B+L24n+fECMbx7RhUhBFREhTO2rdN5bZRdO TFw5wF8lW2Rc3u0jqhpHwYeRtTEjvfYMzaEaEtgJnHyaftoD1UUEbsyUAmE32NJF c8uuMATsor+Qo0beOv5Fl/7gFtOn9bgWm3mASbk9/ltpd4KSUr3eD3AshjLWlLu8 = 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:in-reply-to:references:from:date :message-id:subject:to:content-type:content-transfer-encoding; s=default; bh=p2HjLHhjeqtdYC5N6KYeOPGGih4=; b=o1kZ5TITr8FUTPWY4 Ig+CBbAZzxrn8ekGKduUGeWCRhM/+zLvaFe3gMPOzsUjji2Hf2XiQkmfjNPy/mXK dK+l4Urnx58XD7oomZw4vUdQ0qA7xu4uOLpaLC188Ecx3XvFGNkKH/vXLU7vsH+7 bb/qdy6aFT4pm80OfKaTggFSm4= 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=-0.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.1 spammy=lee X-HELO: mail-qt1-f181.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=rLscwC9dtZO5B70EYJwOF3Xg7pZZZFZITJWcyKuKtfk=; b=AeXfg9qo9JmICcZQexHuRICszJAs9dtaSECm5KHgDn1B+hHk51GAI0hm6CNwqSMagY aEfH85GjQmS/tukDEDg5eq/mI5pzVqiOYtZR5heJbtniVBGU/1QLB3tOb9QR1E7GpvKC aV2NSuWo/SKVaAXZyvv/I/8FkLr5KnJh+4K4PHftYx/8DHVbIOaCYvJvvAbeLMU5UBDX PMNR8dWI5LIfHbyQfORzO9FEPIa8AEwaEDld7uLtHLzB/SSE6780qitWa5mOX70NFeBF NSvlQ5WpI+4FMDBATjUL9TPlXQ2dXXri3BsDhAe2As2L0ZRq/bjH3Am2ivf1cIrT1oqR /nZg== MIME-Version: 1.0 In-Reply-To: <8e9bfbb4-2139-639d-afaa-dfbacac1a8d9@t-online.de> References: <5fbb6229-da17-c056-19b9-9819c684a8ad AT agner DOT org> <8e9bfbb4-2139-639d-afaa-dfbacac1a8d9 AT t-online DOT de> From: Lee Date: Sun, 12 May 2019 16:29:36 -0400 Message-ID: Subject: Re: Why is __unix__ defined, and not __WINDOWS__ ? To: cygwin AT cygwin DOT com Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id x4CKTnud028897 On 5/12/19, Hans-Bernhard Bröker wrote: > 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. Or you can use a cross-compiler to create a 'native' windows executable that doesn't require any of the cygwin dlls. $ echo | gcc -dM -E -xc - | grep '#define _WIN32 ' $ echo | i686-w64-mingw32-gcc -dM -E -xc - | grep '#define _WIN32 ' #define _WIN32 1 Lee -- 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