AmigaOS 4.1 Update 2 and 3 changed the semantics of the AssignLock DOS call.
Before Update 2 and on OS 2.x/3.x AssignLock("foo", 0L) would return DOSTRUE (-1L) if the assign does not exist. Starting with Update 2, it returns DOSFALSE (0L).
This breaks the ccselect tool of Cubic IDE for example.
Please restore the compatibility to 3.x and return DOSTRUE in case the assign does not exist. After the call the assign still does not exist, so it does not make sense that the call "failed".
Test case:
Code: Select all
/* compile with
* vc +aos68k test.c -o test
* ppc-amigaos-gcc -D__USE_INLINE__ test.c -o test
*/
#include <proto/dos.h>
#include <dos/dos.h>
int main() {
char *assign = "foo";
// clear Assign
if (AssignLock(assign, 0L)) {
Printf("Assign '%s' cleared.\n", assign);
} else {
Printf("Could not clear Assign '%s'. Reason: %ld\n", assign, IoErr());
}
return 0;
}
Code: Select all
3. > Work:Cubic IDE/ide/devkits/tools/ccselect/bin > assign | grep foo
3. > Work:Cubic IDE/ide/devkits/tools/ccselect/bin > assign foo:
Kann 'foo' nicht abbrechen.
3. > Work:Cubic IDE/ide/devkits/tools/ccselect/bin > test
Could not clear Assign 'foo'. Reason: 0
Code: Select all
1. > assign | grep foo
1. > assign foo:
1. > test
Assign 'foo' cleared.
Josef
