ICU-597 AS/400 porting changes
X-SVN-Rev: 3721
This commit is contained in:
parent
4e4408fe03
commit
90eaef52a3
@ -94,6 +94,19 @@ typedef unsigned long uint32_t;
|
||||
/*===========================================================================*/
|
||||
/* See utypes.h for the normal defintion */
|
||||
/*===========================================================================*/
|
||||
|
||||
/*
|
||||
With the provided macro we should never be out of range of a given segment
|
||||
(a traditional/typical segment that is). Our segments have 5 bytes for the id
|
||||
and 3 bytes for the offset. The key is that the casting takes care of only
|
||||
retrieving the offset portion minus x1000. Hence, the smallest offset seen in
|
||||
a program is x001000 and when casted to an int would be 0. That's why we can
|
||||
only add 0xffefff. Otherwise, we would exceed the segment. Yes, 16M is the
|
||||
magic limitation we in AS/400-land have been previously limited to. But now
|
||||
we have teraspace storage. Currently this will support up to 2G. I did not
|
||||
take the time to provide this additional check (what kind of pointer and then
|
||||
different calculation).
|
||||
*/
|
||||
#ifndef U_MAX_PTR
|
||||
#define U_MAX_PTR(ptr) ((void*)(((void*)ptr)-((int32_t)(ptr))+((int32_t)0xffefff)))
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user