[lkml]   [2008]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 1/2] Add C99-style constructor macros for specific-sized integers
    Matthew Wilcox wrote:
    > On Sun, Mar 02, 2008 at 04:09:51PM -0800, H. Peter Anvin wrote:
    >> first place. C99 has macros of the form [U]INT#_C() to construct
    >> numbers of an arbitrary size; this patch creates analogous macros for
    >> the kernel s# and u# types.
    > Why put this in asm/types.h instead of, say, linux/types.h?

    Because that's where the s* and u* types are defined.

    Realistically, those probably could/should be folded into a pair of
    asm-generic files (for 32 and 64 bits), but that is a separate change.

    > I appreciate you have:
    >> +#define S64_C(x) x ## L
    >> +#define U64_C(x) x ## UL
    > and:
    >> +#define S64_C(x) x ## LL
    >> +#define U64_C(x) x ## ULL
    > but can't we use the latter for all arches?

    You really don't want to, as the whole point is that you want it to
    match what u64/s64 is defined as, in order to avoid spurious warnings.


     \ /
      Last update: 2008-03-03 05:47    [W:0.027 / U:15.500 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site