mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
- Preparations for clib2 1.205
- Added support for ELF shared objects and libraries. This is implemented through constructor/destructor functions, which means that you can use this functionality even in Amiga Exec style shared libraries, with the proper library initialization code to invoke the constructor/destructor functions for you. - Updated uname() to recognize AmigaOS 4.1. - The translation from Unix to Amiga path names did not properly process multiple occurences of "/./" in the path name. Thanks go to Steven Solie for finding the issue. - The detection of "/./" and "/../" patterns in Unix path names to be translated into Amiga path names did not test if it was overrunning the end of the string. - If strcmp(), strncmp() and memcmp() detect a pair of different characters, then the function result must be calculated as if the characters were of type "unsigned char". This is a requirement according to the ISO 'C' (1994) standard. Thanks go to Georg Steger for finding the issue. - The definitions for INT_MIN, INT_MAX and UINT_MAX in <limits.h> no longer use long integer types, as prompted by Steven Solie. git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15204 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: string_strcmp.c,v 1.4 2006-01-08 12:04:27 obarthel Exp $
|
||||
* $Id: string_strcmp.c,v 1.5 2010-08-20 15:33:36 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@ -62,6 +62,8 @@ strcmp(const char *s1, const char * s2)
|
||||
|
||||
if(s1 != s2)
|
||||
{
|
||||
int c1,c2;
|
||||
|
||||
while((*s1) == (*s2))
|
||||
{
|
||||
if((*s1) == '\0')
|
||||
@ -71,7 +73,12 @@ strcmp(const char *s1, const char * s2)
|
||||
s2++;
|
||||
}
|
||||
|
||||
result = (*s1) - (*s2);
|
||||
/* The comparison must be performed as if the
|
||||
characters were unsigned characters. */
|
||||
c1 = *(unsigned char *)s1;
|
||||
c2 = *(unsigned char *)s2;
|
||||
|
||||
result = c1 - c2;
|
||||
}
|
||||
|
||||
out:
|
||||
|
||||
Reference in New Issue
Block a user