This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
Re: Possible CRLF and -mno-cygwin bugs
- To: Mark Schoenberg <mark at emmestech dot com>, cygwin at sourceware dot cygnus dot com
- Subject: Re: Possible CRLF and -mno-cygwin bugs
- From: Earnie Boyd <earnie_boyd at yahoo dot com>
- Date: Wed, 18 Oct 2000 12:51:01 -0700 (PDT)
--- Mark Schoenberg <mark@emmestech.com> 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 <sys/types.h> 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@sourceware.cygnus.com
>
=====
Earnie Boyd
mailto:earnie_boyd@yahoo.com
--- <http://earniesystems.safeshopper.com> ---
--- Cygwin: POSIX on Windows <http://gw32.freeyellow.com/> ---
--- Minimalist GNU for Windows <http://www.mingw.org/> ---
__________________________________________________
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@sourceware.cygnus.com