This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
mk_romfs and binary mode for cygwin
- From: Warren Jasper <warrenj at bops dot com>
- To: ecos-discuss at sources dot redhat dot com
- Date: Mon, 21 Jan 2002 12:09:02 -0500
- Subject: [ECOS] mk_romfs and binary mode for cygwin
- Organization: BOPS Inc.
- Reply-to: warrenj at bops dot com
I was wondering if the following line in
~/packages/fs/rom/current/support/mk_romfs.c
(around line 706)
if ( (fd = open( av[2], O_WRONLY|O_CREAT|O_TRUNC, 0666 )) < 0 ) {
should be
if ( (fd = open( av[2], O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0666 )) < 0
) {
If the file system is mounted in binary mode, this should have no
effect.
If you are running this program in under Cygwin and if the file system
is mounted in "text" mode,
then the os will try to map \n into \r. So one only sees a problem is
the file system is mounted in
"text" mode as opposed to "binary" mode.
However, if the system is mounted in binary mode, then C code written
under Windows does not
compile correctly, or more specifically, the cpp may not interpret
multi-lines correctly.
Comments?