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_memcmp.c,v 1.7 2006-01-08 12:04:26 obarthel Exp $
|
||||
* $Id: string_memcmp.c,v 1.8 2010-08-20 15:33:36 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@ -135,7 +135,14 @@ __memcmp(const char *m1,const char *m2,size_t len)
|
||||
{
|
||||
if((*m1) != (*m2))
|
||||
{
|
||||
result = (*m1) - (*m2);
|
||||
int b1,b2;
|
||||
|
||||
/* The comparison must be performed as if the
|
||||
bytes were unsigned characters. */
|
||||
b1 = *(unsigned char *)m1;
|
||||
b2 = *(unsigned char *)m2;
|
||||
|
||||
result = b1 - b2;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -185,7 +192,12 @@ memcmp(const void *ptr1, const void *ptr2, size_t len)
|
||||
{
|
||||
if((*m1) != (*m2))
|
||||
{
|
||||
result = (*m1) - (*m2);
|
||||
int b1,b2;
|
||||
|
||||
b1 = *(unsigned char *)m1;
|
||||
b2 = *(unsigned char *)m2;
|
||||
|
||||
result = b1 - b2;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user