This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[1.7] Case-sensitive programs exist but cannot both be run


It appears that two EXEs can coexist (with the registry setting) but only whichever one was so named first will be run:

$ cat > lower.c <<EOF
#include <stdio.h>
int main(void) { printf("I am a lower-case a\n"); return 0; }
EOF

$ cat > upper.c <<EOF
#include <stdio.h>
int main(void) { printf("I am an UPPER-case A\n"); return 0; }
EOF

$ gcc -o A.exe upper.c

$ gcc -o a.exe lower.c

$ ls
A.exe*  a.exe*  lower.c  upper.c

# note that A.exe was created first

$ ./A.exe
I am an UPPER-case A

$ ./a.exe
I am an UPPER-case A

# Say what?

$ mv A.exe A2.exe; mv A2.exe A.exe

# now a.exe was there first, let's try again...

$ ./a.exe
I am a lower-case a

$ ./A.exe
I am a lower-case a

# Oh really?

$ cat > B <<EOF
#!/bin/sh
echo "I am an UPPER-case B"
EOF

$ cat > b <<EOF
#!/bin/sh
echo "I am a lower-case b"
EOF

$ chmod +x B b

$ ls
A.exe*  B*  a.exe*  b*  lower.c  upper.c

$ ./B
I am an UPPER-case B

$ ./b
I am a lower-case b

Bug? Limitation? If it hurts, don't do that?


Yaakov



-- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]