Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Nov 2006 13:32:59 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/sparc64/include endian.h
Message-ID:  <200611051332.kA5DWxmj075611@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611051332.kA5DWxmj075611>