Mail Archives: cygwin/1998/11/27/10:21:21
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 AT cs DOT uu DOT 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 AT cygnus DOT com" with one line of text: "help".
- Raw text -