Mail Archives: cygwin/1999/01/16/04:13:02
In article <4 DOT 1 DOT 19990114113241 DOT 00a7d040 DOT cygnus DOT gnu-win32 AT mail DOT cyberport DOT com>,
Warren Young <tangent AT cyberport DOT com> wrote:
>At 05:24 PM 1/14/99 +0800, you wrote:
>Actually, it's not gcc setting up argv that way, but the C startup code
>that ships with Cygwin's C library (libc). This libc is trying to be
>Unix-like in the absence of a Unix shell. On a true Unix-like operating
>system, the shell (sh, csh, bash, etc.) expands wildcards before running
>the program. But since you can't count on this under Win32, libc
>apparently takes over this task.
>
>It's curious, though, that when you run your test program under Cygwin's
>bash like this:
>
> $ test "t*"
Actually, it's not really curious. It's cygwin working as designed.
It wouldn't make sense to expand something like this inside a shell
so it doesn't happen.
>the t* isn't expanded. This is normally the Right Thing, since double
>quotes tells the shell not to expand wildcards, but the wildcarded argument
>should be expanded by libc as it is when you run it from cmd.exe. I
>suspect that bash passes the quotes to the program literally, so that the C
>startup routines will see them and not to expand the wildcard.
No. bash has not been modified in this way for cygwin. The DLL essentially
detects when it is being run from the "DOS" command shell and does the
appropriate thing.
--
cgf AT cygnus DOT com
http://www.cygnus.com/
- Raw text -