[OpenAFS-devel] Solaris 10 - 1.4.3rc3 kernel modules build issues

Douglas E. Engert deengert@anl.gov
Fri, 09 Mar 2007 15:51:32 -0600


Derrick J Brashear wrote:
> On Fri, 9 Mar 2007, Douglas E. Engert wrote:
> 
>> It was not clear if this was a name made up by AFS, or a
>> name that is defined on some OS. If its an AFS made up name than
>> I agree.
> 
> The idea was to use the OS' definition, if they defined it. However, the 
> question then is whether OFFSET_MAX(fd) is portable, or whether this is 
> just inherently a non-portable macro and we have to do something ugly.
> 

If I understand the comments in the code in that area, you are trying
to detect if the af->l_len is the max value for an offset,  or if Java
may have passed in a 32 bit 0x7ffffffe, as this is what Java thinks is
the max. And why would java use the -1?

If so, the use of 0x7fffffff in line 547 for non UNIX machines
is not right as it assumes a 32 bit offset. It really needs to look
at the max for an offset. The code after the comment about Java and 32
bit offset -1 does not make sense when using a OFFSET_MAX which is 64 bits.

Solaris in param.h does define MAXOFF32_T,  MAXOFF_T and MAXOFFSET_T
depending _SYSCALL32, and _LP64  And in types.h defines LONG_MAX.



> 

-- 

  Douglas E. Engert  <DEEngert@anl.gov>
  Argonne National Laboratory
  9700 South Cass Avenue
  Argonne, Illinois  60439
  (630) 252-5444