OSDN Git Service

Use appropriate little-endian/big-endian types in struct definitions.
authorErik Larsson <mechie@users.sourceforge.net>
Sat, 3 Oct 2015 10:58:08 +0000 (12:58 +0200)
committerErik Larsson <mechie@users.sourceforge.net>
Sat, 3 Oct 2015 10:58:08 +0000 (12:58 +0200)
commit9191d85e28d4991e7c4294f37a3cdb3542f716a0
tree1ce45dcba0037ec758f6005d52b05963aa348c7c
parentdeeb0ad58443b420e23b2aef1e2dfd42ba92fc4c
Use appropriate little-endian/big-endian types in struct definitions.

On-disk struct definitions used native types (u16/u32/u64/s16/s32/s64),
which doesn't say anything about the intended interpretation of the
data. The intention of having little-endian-specific types and
big-endian-specific types must have been to clarify interpretation of
data and intentions in the code. Therefore it seems reasonable to use
these types in struct definitions to clarify what data represention is
used to encode field data.

Because some struct members in layout.h are big-endian, this change also
means moving the duplicated definitions for big-endian byteswapping
macros and big-endian types found in acls.h and security.h to the
appropriate locations in endians.h and types.h respectively in order to
make them available for the struct definitions in layout.h.
include/ntfs-3g/acls.h
include/ntfs-3g/endians.h
include/ntfs-3g/layout.h
include/ntfs-3g/logfile.h
include/ntfs-3g/security.h
include/ntfs-3g/types.h