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: unistd_translateu2a.c,v 1.11 2006-10-03 16:36:47 obarthel Exp $
|
||||
* $Id: unistd_translateu2a.c,v 1.12 2010-08-20 15:33:36 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@@ -50,6 +50,7 @@
|
||||
* ././foo
|
||||
* foo/./baz
|
||||
* foo/./bar/./baz
|
||||
* foo/./././bar
|
||||
* foo/.
|
||||
* /.
|
||||
* /tmp
|
||||
@@ -260,7 +261,7 @@ __translate_unix_to_amiga_path_name(char const ** name_ptr,struct name_translati
|
||||
D(("name = '%s' (line %ld)",name,__LINE__));
|
||||
}
|
||||
|
||||
/* Ditch all embedded '/./' ('foo/./bar' -> 'foo/bar'). */
|
||||
/* Ditch all embedded '/./' ('foo/./bar' -> 'foo/bar', 'foo/././bar' -> 'foo/bar'). */
|
||||
if(len > 2)
|
||||
{
|
||||
BOOL have_slash_dot_slash = FALSE;
|
||||
@@ -278,10 +279,11 @@ __translate_unix_to_amiga_path_name(char const ** name_ptr,struct name_translati
|
||||
{
|
||||
for(i = j = 0 ; i < len ; i++)
|
||||
{
|
||||
replace[j++] = name[i];
|
||||
|
||||
if(name[i] == '/' && name[i + 1] == '.' && name[i + 2] == '/')
|
||||
while(i < len - 2 && name[i] == '/' && name[i + 1] == '.' && name[i + 2] == '/')
|
||||
i += 2;
|
||||
|
||||
if(i < len)
|
||||
replace[j++] = name[i];
|
||||
}
|
||||
|
||||
len = j;
|
||||
@@ -474,10 +476,10 @@ __translate_unix_to_amiga_path_name(char const ** name_ptr,struct name_translati
|
||||
{
|
||||
for(i = j = 0 ; i < len ; i++)
|
||||
{
|
||||
replace[j++] = name[i];
|
||||
|
||||
if(name[i] == '/' && name[i + 1] == '.' && name[i + 2] == '.' && name[i + 3] == '/')
|
||||
if(i < len - 3 && name[i] == '/' && name[i + 1] == '.' && name[i + 2] == '.' && name[i + 3] == '/')
|
||||
i += 2;
|
||||
|
||||
replace[j++] = name[i];
|
||||
}
|
||||
|
||||
len = j;
|
||||
|
||||
Reference in New Issue
Block a user