[OpenAFS-devel] Building CVS head on Darwin

Alexei Kosut akosut@cs.stanford.edu
Mon, 7 Apr 2003 10:15:47 -0700


On Mon, Apr 07, 2003 at 01:06:30PM -0400, Jim Rees wrote:
> I don't see why some of those changes should be necessary.  Can you
> elaborate on these?

I can try :)

>   -struct rxkad_stats rxkad_stats;
>   +struct rxkad_stats rxkad_stats = {0};
> 
> Global data always starts out 0, according to K&R.

It doesn't make sense to me either.  But for some reason, the compiler
doesn't seem to want to create and export the symbol in librxkad.a
otherwise.  It's quite possibly a compiler bug, or some subtle linker
option I don't know about, but adding the initializer made things link
again.

>   +#ifdef AFS_NAMEI_ENV
>    #ifdef AFS_64BIT_ENV
>    extern char *int64_to_flipbase64(lb64_string_t s, afs_int64 a);
>    extern afs_int64 flipbase64_to_int64(char *s);
>    #else
>    extern char *int64_to_flipbase64(lb64_string_t s, u_int64_t a);
>    extern int64_t flipbase64_to_int64(char *s);
>   +#endif
>    #endif
> 
> I thought 64bit had been backed out.

I don't know about that; I've never looked at it.  But the prototypes
above are definitely present in afsutil_prototypes.h.  The problem is
that lb64_string_t is only defined (in afsutil.h) for AFS_NAMEI_ENV,
which isn't set when building UKERNEL.

-- 
Alexei Kosut <akosut@cs.stanford.edu> <http://cs.stanford.edu/~akosut/>