Commit Graph

12 Commits

Author SHA1 Message Date
Ruediger Meier d20eb029d5 include/bitops: avoid fallbacks for more systems
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-08 14:55:38 +01:00
Ruediger Meier d01c0adb83 include/bitops: add casts to bswap functions
Based on kernel sources include/uapi/linux/swab.h.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-08 14:55:17 +01:00
Karel Zak 0f23ee0c85 include: cleanup copyright headers
We use the code from include/ and lib/ on many places, so use public
domain if possible or LGPL for code copied from libs.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-01-08 15:10:17 +01:00
Karel Zak 1a1eb4e188 include/bitopts: Use the operating system byteswapping functions
The swap macros are already in libc.

Co-Author: Cristian Rodríguez <crrodriguez@opensuse.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-01-08 14:07:48 +01:00
Karel Zak d1425592a2 include: [bitops.h] make return values consistent
The *_to_cpu() and cpu_to_*() macros have to return always the same date types
independently on CPU type.

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-08-02 12:33:10 +02:00
Fabian Groffen aabe244176 build-sys: use WORDS_BIGENDIAN to determine platform byte-order
Autoconf contains the right magic to determine the endianness on many
platforms next to Linux.  This reverses previous commits to move away
from WORDS_BIGENDIAN:
"use __BYTE_ORDER rather than AC specific WORDS_BIGENDIAN"

This is necessary to compile on non Linux platforms like Darwin and
Solaris.

Signed-off-by: Fabian Groffen <grobian@gentoo.org>
2011-01-17 15:34:45 +01:00
Karel Zak e98754d6bb fsck.minix: fix broken zone checking
This bug has been introduced by commit
95356e8b74.

The fsck.minix code assumes that isset() macro returns boolean,
unfortunately the generic implementation from libc returns integer.

This patch also add a fallback for the bitmap macros to include/bitops.h.

Reported-by: "Andries E. Brouwer" <Andries.Brouwer@cwi.nl>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-15 14:14:32 +02:00
Karel Zak dcbf520914 include: bitops - explicitly include endian.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-03-17 14:27:38 +01:00
Karel Zak 8bce47d976 include: use __BYTE_ORDER rather than AC specific WORDS_BIGENDIAN
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-08 11:16:37 +01:00
Samuel Thibault 580cb0d069 include: <stdint.h> provides everything
Do not include <linux/posix_types.h> as <stdint.h> provides everything.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2007-12-18 01:10:48 +01:00
Karel Zak a34fc3d4ad include: add bitops.h with swab{16,32,64} macros
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-12-17 13:41:13 +01:00
Karel Zak 1ed3367f61 include: add bitops.h with swab{16,32,64} macros
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-12-17 13:18:12 +01:00