Problems with archiver "ar"

Eric Blake
Thu Sep 28 12:36:00 GMT 2006

Hash: SHA1

According to Frank Illenseer on 9/28/2006 5:34 AM:
>> Sounds like ar needs to be taught about open(O_BINARY)/fopen("rb") (or be
>> linked with binmode.o).
> Do I have to post this advice in any other list to get it to note to the
> correct persons?

Nope.  cgf, the binutils package maintainer, reads this list.

>> IFS=' ''    ''
>> ' # Yes, that is space, tab, and either a 1 or 2-character EOL as needed
> I tried this IFS setting right below the SHA-BANG line, but nothing
> changed.
> (I used emacs editor to be sure to write the correct characters.)

You could use 'od -c filename | head' to validate whether the file has
\r\n endings where you think it is supposed to, after you have retrieved
your script from version control.  Either the whole script does (and IFS
is now four characters as the first thing you do, so that it splits
fields, and being whitespace, is ignored), or is three characters and
there are no other \r to confuse your script.

Hmm, my simple test case seemed to work, which is why I posted that idea
as a simple solution; but playing with it a bit further, I'm seeing some
weird behavior, too.  It looks like I may end up releasing bash 3.1-9 that
makes sure that if \r is in IFS that itis treated like \n (non-whitespace
characters are handled differently than whitespace ones during field

> > We ask that you ATTACH this, not include it inline, to avoid spurious hits
> > in the mail archive search engine.
> I actually DID attache the particular file.

Sorry, my mistake.

>> > Not Found: sh
>> Not good.  Are you sure evereything is installed correctly?
> Yes I am. See:
> $ which sh
> /usr/bin/sh
> $ ll /usr/bin/sh
> lrwxrwxrwx 1 illenseer Kein 8 Jul 20  2005 /usr/bin/sh -> bash.exe

While cygwin doesn't mind a symlink, they won't work if you try to use sh
from, which is why the bash postinstall script does a copy instead
of a symlink.  And naming a symlink sh when it points to bash.exe is a bit
confusing; the postinstall script names the copy sh.exe.  Hmm, we still
don't have cygcheck patched to resolve symlinks.

> Can I mount a particular subdirectory (and all subdirs below this) in
> textmode while the rest of the
> partition will be mounted in binmode? (If yes, how?)

Yes.  'man mount'.  In fact, I do just that:

$ mount -m
mount -f -u -t "c:/cygwin/home/eblake/text" "/home/eblake/text"
mount -f -s -b "c:/cygwin/bin" "/usr/bin"
mount -f -s -b "c:/cygwin/lib" "/usr/lib"
mount -f -s -b "c:/cygwin" "/"
mount -s -b --change-cygdrive-prefix "/cygdrive"

- --
Life is short - so eat dessert first!

Eric Blake   
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at
Comment: Using GnuPG with Mozilla -


Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list