Subject: B19, EGCS 1.1: Strcasecmp uses uppercase?
From: [email-masked] (Steven van Dijk)

27 Nov 1998 10:21:21 -0800
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: [email-masked]

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 ([email-masked]) 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
"[email-masked]" with one line of text: "help".