Blame libacl/byteorder.h

rpm-build 0a0c83
/*
rpm-build 0a0c83
  Copyright (C) 2000, 2002  Andreas Gruenbacher <agruen@suse.de>
rpm-build 0a0c83
rpm-build 0a0c83
  This program is free software: you can redistribute it and/or modify it
rpm-build 0a0c83
  under the terms of the GNU Lesser General Public License as published by
rpm-build 0a0c83
  the Free Software Foundation, either version 2.1 of the License, or
rpm-build 0a0c83
  (at your option) any later version.
rpm-build 0a0c83
rpm-build 0a0c83
  This program is distributed in the hope that it will be useful,
rpm-build 0a0c83
  but WITHOUT ANY WARRANTY; without even the implied warranty of
rpm-build 0a0c83
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
rpm-build 0a0c83
  GNU Lesser General Public License for more details.
rpm-build 0a0c83
rpm-build 0a0c83
  You should have received a copy of the GNU Lesser General Public License
rpm-build 0a0c83
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
rpm-build 0a0c83
*/
rpm-build 0a0c83
rpm-build 0a0c83
#ifdef WORDS_BIGENDIAN
rpm-build 0a0c83
# define cpu_to_le16(w16) le16_to_cpu(w16)
rpm-build 0a0c83
# define le16_to_cpu(w16) ((u_int16_t)((u_int16_t)(w16) >> 8) | \
rpm-build 0a0c83
                           (u_int16_t)((u_int16_t)(w16) << 8))
rpm-build 0a0c83
# define cpu_to_le32(w32) le32_to_cpu(w32)
rpm-build 0a0c83
# define le32_to_cpu(w32) ((u_int32_t)( (u_int32_t)(w32) >>24) | \
rpm-build 0a0c83
                           (u_int32_t)(((u_int32_t)(w32) >> 8) & 0xFF00) | \
rpm-build 0a0c83
                           (u_int32_t)(((u_int32_t)(w32) << 8) & 0xFF0000) | \
rpm-build 0a0c83
			   (u_int32_t)( (u_int32_t)(w32) <<24))
rpm-build 0a0c83
#else
rpm-build 0a0c83
# define cpu_to_le16(w16) ((u_int16_t)(w16))
rpm-build 0a0c83
# define le16_to_cpu(w16) ((u_int16_t)(w16))
rpm-build 0a0c83
# define cpu_to_le32(w32) ((u_int32_t)(w32))
rpm-build 0a0c83
# define le32_to_cpu(w32) ((u_int32_t)(w32))
rpm-build 0a0c83
#endif
rpm-build 0a0c83