cvs commit: src/sys/sparc64/include endian.h

Marius Strobl marius at FreeBSD.org
Sun Nov 5 13:33:00 UTC 2006


marius      2006-11-05 13:32:59 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_6)
    sys/sparc64/include  endian.h 
  Log:
  MFC: 1.16
  
  In the replacement text of the __bswapN_const() macros encapsulate the
  argument in parentheses so these macros are safe to use and invocations
  with an expression as the argument like __bswap32_const(42 << 23 | 13)
  work as expected. Additionally, mask all the individually shifted bytes
  as appropriate so the bytes which exceed the width of the respective
  __bswapN_const() macro in invocations like __bswap16_const(0xdead600d)
  are ignored like it's the case with the corresponding __bswapN_var()
  function.
  
  Approved by:    re (hrs)
  
  Revision  Changes    Path
  1.15.2.1  +12 -8     src/sys/sparc64/include/endian.h


More information about the cvs-all mailing list