Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <20001018195101.18635.qmail@web110.yahoomail.com> Date: Wed, 18 Oct 2000 12:51:01 -0700 (PDT) From: Earnie Boyd Subject: Re: Possible CRLF and -mno-cygwin bugs To: Mark Schoenberg , cygwin AT sourceware DOT cygnus DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii --- Mark Schoenberg wrote: > After a rocky start, I have had reasonable success with Cygwin-1.1.4 > (thanks to Chris Faylor for helping me get started). I have, however, found > two > slight problems which I believe, if fixed, would enhance Cygwin. > > The first involves the old issue of carriage returns and line feeds: > Many > programs having ^Ms as the next-to-last character on a line compile just > fine. > However, I have noticed two problems. The first is that in .c and .h files > "\^M^J" is not recognized as a continuation symbol as I believe it should be. > The second problem is that "#define FIRST Mark^M^J" defines "FIRST" as > "Mark^M", > whereas I think it should be defined as "Mark". > Since there are many posts about \r\n and binary mode processing in the archives I'll only say that this is a user problem. > The second problem I have found involves the -mno-cygwin option. > First consider the +Cygwin part which works fine: > > /usr/include/pwd.h mentions uid_t and #includes which typdefs > it. > > Now the -Cygwin part: > > On my machine, the -mno-cygwin system include path is: > .. > . > /usr/include/mingw32 > /usr/include/mingw > /usr/lib/gcc-lib/i686-pc-cygwin/2.95.2/../../../../include > /usr/include > /usr/lib/gcc-lib/i686-pc-cygwin/2.95.2/include > /usr/include > > This means that "pwd.h" comes from "/usr/include" just as for +Cygwin, > but > "sys/types.h" comes from "/usr/include/mingw". The "types.h" file in > "/usr/include/mingw/sys", unlike its counterpart in "/usr/include/sys", does > not > typedef uid_t, which leads to compiler errors such as: > You can't use the -mno-cygwin switch for POSIX or plain old UNIX. You can only use ANSI coding with the -mno-cygwin switch. The header pwd.h "passwd structure" makes no sense outside of a UNIX environment so it makes no sense to use -mno-cygwin when trying to include it and as you've already found the results will be unpredicatble. Cheers, > In file included from metamail.c:42: > /usr/lib/gcc-lib/i686-pc-cygwin/2.95.2/../../../../include/pwd.h:61: warning: > parameter names (without types) in function declaration > /usr/lib/gcc-lib/i686-pc-cygwin/2.95.2/../../../../include/pwd.h:65: parse > error before `struct' > > Unless there are countervailing reasons, it seems to me that > "/usr/incude/mingw/sys/types.h" should include the line > > typedef int uid_t; > > and possibly also include > > typedef int gid_t; > typedef int dev_t; > typedef int ino_t; > typedef int mode_t; > typedef int caddr_t; > > which likewise appear in "/usr/include/sys/types.h". > > -- > Want to unsubscribe from this list? > Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com > ===== Earnie Boyd mailto:earnie_boyd AT yahoo DOT com --- --- --- Cygwin: POSIX on Windows --- --- Minimalist GNU for Windows --- __________________________________________________ Do You Yahoo!? Yahoo! Messenger - Talk while you surf! It's FREE. http://im.yahoo.com/ -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com