This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
B19, EGCS 1.1: Strcasecmp uses uppercase?
- To: gnu-win32 at cygnus dot com
- Subject: B19, EGCS 1.1: Strcasecmp uses uppercase?
- From: Steven van Dijk <steven at cs dot uu dot nl>
- Date: Fri, 27 Nov 1998 10:35:34 +0100
Hi,
Compiling the following on my system and on an Unix system gives different
results:
#include <stdio.h>
#include <string.h>
main()
{
char * s1 = "String";
char * s2 = "S_";
printf("Comparing s1 with s2 returns: %d\n", strcasecmp(s1,s2));
}
On my system (using b19, no patches and EGCS 1.1) I get:
Comparing s1 with s2 returns: -11
and on the Unix system I get:
Comparing s1 with s2 returns: 21
The program I am porting expects "_" to be smaller than "t" and therefore
crashes. The implementation of strcasecmp EGCS 1.1 gives maps all alpha's
to their uppercase code. I have not found a reference to this issue in the
archives or the FAQ (or I overlooked it) so I am asking here: is this
correct? And how can I cope with this?
Please send a copy of your reply to me directly (steven@cs.uu.nl) since I
am not subscribed.
While I am at it, is there anyone who knows how I can cope with the absence
of an implementation of mkfifo in the Cygwin lib?
Dag,
Steven
--- (http://www.cs.uu.nl/staff/steven.html)
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".