[EMAIL PROTECTED] wrote on Thu, 05 Jan 2006 10:17 -0600:
> Oh. I keep forgetting that fs_id is a 32 bit type. thanks for pointing it
> out.. Is an enum type always guaranteed to be a 32-bits or do we need to
> enforce it with an int32_t/uint32_t?

The code makes the explicit assumption that enums are represented as
int32_t in the definition of (en|de)code_enum.  This isn't
guaranteed to be true, but has worked on everything so far.

The following is more clumsy but would support bizarre C compilers
that use something other than int types for enums, through the
standard conversion to int:

    #define encode_enum(pptr,x) do { \
        int32_t xi = *x; \
        encode_int32_t(pptr, &xi); \
    }

I'd rather stick with what we have until it breaks, myself.  It will
be obvious when that happens.

                -- Pete
_______________________________________________
PVFS2-developers mailing list
PVFS2-developers@beowulf-underground.org
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers

Reply via email to