delorie.com/archives/browse.cgi | search |
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:date | |
:message-id:subject:from:to:content-type; q=dns; s=default; b=bl | |
dVCJs9h3P0frRmdTVPmgCKyeXnfX8XHvOW3ZcLi8FD3y/c2Ol+O7ywL98/SeUvsR | |
qTEk93g/BJb5juVjDPV6rIHcCse4mbtjO+naIKovRdKPhRv+XnZwT14gtlR/ltYT | |
Hfe9jADDaryoQh3ay2DCUGBTD1AwVspJr0uFNsCTM= | |
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:date | |
:message-id:subject:from:to:content-type; s=default; bh=YVpE0qOU | |
YT1Oytwqqck/modoHMs=; b=Ff+L7iRLwyq/e6qeeXu+fqBHgKHgqvYQ0rCpVgoZ | |
5kSFuwaU5JuCTqibv1zmWUWN6165TGNH4MpWLwkvVe3XH9/QseunKZhsr0xBW5Tl | |
efT+nRRu+0RYf7+NxiRNoHROtCzbHysfFpZB9grCyp8q76htwGcnRFo4Xp7SgPqK | |
vJE= | |
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=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Under, Questions, lee |
X-HELO: | mail-wm0-f52.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:in-reply-to:references:date :message-id:subject:from:to; bh=RbI8ZEAn4hyhI1YmaFT/tieO38NEy96y7uNj6ZU9v4E=; b=bnZwW2/89dViiEz0xrfyX99hqVDd99uBWCfk6Sb3iB6PWWgVOvkYNzX+cdT7M3Dnlb /02pb5eRXhUkCEE0G0+gn2UMzx1hlZ+ymEwmb88rAIm4bzCIlYjij6+wZu+t8kyWAIVC pjPXDwpIpY6GSeE6mTr6Wlhh2ALhK4R41Y2RcdFXdr21MTRM6mjwncydmYxwoFd73/xb zcvgnSARZwVw5iiqXacLhWMcTrMfBOzijnvIHKHU3+RoyYi8//hMTaHeYb8IaxGzqyXI LOrVfGYMjiVB9m2pixCnGIdGnT9bs+HDXSA3uLPGv4qZbzAJmiZTZEfAx/o4YKZg8VcE /BLg== |
X-Gm-Message-State: | AOPr4FXMrKV5i9SlYgtcC1sBRK+RUPHJshHCzA1RgprhY1B44hDeWdPf35wijuVa8xao5Cnca6zRoO2OSnzTng== |
MIME-Version: | 1.0 |
X-Received: | by 10.28.54.224 with SMTP id y93mr18222667wmh.82.1461866801657; Thu, 28 Apr 2016 11:06:41 -0700 (PDT) |
In-Reply-To: | <572091DE.7010800@gmail.com> |
References: | <CAD8GWsuVECqpUX6_BDnKq+ueU8svKXqzG9BWHNOCj4P=e4aDyQ AT mail DOT gmail DOT com> <571FF46E DOT 6050603 AT gmail DOT com> <CAD8GWsusQNP2g5=JbWuyu0L+YqZEOxkgh1TedZkKRxUV-VRZMQ AT mail DOT gmail DOT com> <572091DE DOT 7010800 AT gmail DOT com> |
Date: | Thu, 28 Apr 2016 14:06:41 -0400 |
Message-ID: | <CAD8GWsvAXNnx7u-PpBrnv_yAD0BVwn7_kDjLvJhOXf_rZ58yxw@mail.gmail.com> |
Subject: | Re: converting from -mno-cygwin |
From: | Lee <ler762 AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
X-IsSubscribed: | yes |
On 4/27/16, JonY wrote: > On 4/27/2016 08:32, Lee wrote: >> On 4/26/16, JonY wrote: >>> On 4/27/2016 05:08, Lee wrote: >>>> Questions: [.. snip ..] >> and maybe it's a problem. I haven't tracked it down yet, but >> GNUmakefile.in has >> # PThreads library, if needed. >> PTHREAD_LIB = @PTHREAD_ONLY@@PTHREAD_LIB@ >> >> which, after running autoheader & autoconf, creates a GNUmakefile with >> # PThreads library, if needed. >> PTHREAD_LIB = -lpthreadGC2 >> >> which doesn't work :( >> > > Fix your configure.ac assumptions. Done! works now :) >>>> Is there a standard way to figure out if the compiler is gcc-v3 with >>>> the -mno-cygwin flag set? >>> >>> No, don't do this, it'd turn into a giant hairball fast. >> >> Not really.. it's just a few places that I've had to change the source >> code to deal with the differences between cygwin 1.5 + gcc v3 & >> whatever the current cygwin is + i686-w64-mingw32-gcc >> > > You'd get into a bigger hairball when you involve 64bit Cygwin where > long is 64bit unlike the rest of the Windows world. I took a look at https://cygwin.com/faq/faq.html#faq.programming.64bitporting I'm not sure I really want to go there. But in any case, I think you're right to not try to maintain compatibility with gcc -mno-cygwin >>>> I had to make a few changes to the code to get this far & I'd prefer >>>> to have the changes wrapped inside an #IFDEF or something. For >>>> example, I just commented out the include since it conflicts with >>>> something >>>> >>>> #ifdef __MINGW32__ >>>> /* -LR- #include "cygwin.h" */ >>>> /* -LR- const char cygwin_h_rcs[] = CYGWIN_H_VERSION; */ >>>> #endif >>>> >>>> Under cygwin 1.5, gcc -mno-cygwin requires cygwin.h to be included. >>>> Using i686-w64-mingw32-gcc if cygwin.h is inculded gcc barfs with a >>>> conflicting definition of [i don't remember]. >>>> It'd be nice if I could build using the old or new method without >>>> having to change the source code, so I'm guessing I want some kind of >>>> ifdef wrapper for the include?? >>>> >>> >>> What are you even trying to do? You shouldn't mix different runtimes. >> >> I'm not mixing runtimes. I'm trying to keep it so that the program >> continues to build under the old cygwin 1.5/gcc -mno-cygwin as well as >> building under the current cygwin/i686-w64-mingw32-gcc cross-compiler. >> Since I have to do different things depending on if I'm using the >> cross compiler or the old gcc -mno-cygwin I'm hoping there's a flag or >> something I can use so the exact same source code works with either >> build system. >> > > Using Cygwin headers in purely win32 program is wrong. I understand you > are simply trying to get Cygwin version strings, it'll just end up as a > compile error if the toolchain isn't Cygwin hosted. You can try using > autoconf to run "uname -a" instead and grab that instead. It looks like cygwin.h was included because it has the define for _RICHEDIT_VER If I remove the include & build using gcc v3: [1.5] Lee AT twinky /cygdrive/c/cygwin/cvs/privoxy/current $ make gcc -c -pipe -O2 -DWINVER=0x501 -mwindows -mno-cygwin -Wall -Ipcre w32log.c -o w32log.o w32log.c:61: error: `CYGWIN_H_VERSION' undeclared here (not in a function) w32log.c: In function `InitRichEdit': w32log.c:774: error: `_RICHEDIT_VER' undeclared (first use in this function) w32log.c:774: error: (Each undeclared identifier is reported only once w32log.c:774: error: for each function it appears in.) make: *** [w32log.o] Error 1 The include files for i686-w64-mingw32-gcc have been [changed? fixed?] so that including cygwin.h now causes a warning: /source/privoxy/current $ make i686-w64-mingw32-gcc -c -pipe -O2 -DWINVER=0x501 -mwindows -mwin32 -Wall -Ipcre w32log.c -o w32log.o In file included from w32log.c:60:0: cygwin.h:43:0: warning: "_RICHEDIT_VER" redefined #define _RICHEDIT_VER 0x0300 ^ In file included from w32log.c:45:0: /usr/i686-w64-mingw32/sys-root/mingw/include/richedit.h:23:0: note: this is the location of the previous definition #define _RICHEDIT_VER 0x0800 ^ Thanks for your help!! 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |