forked from OSchip/llvm-project
lib: Rename endianness.h to int_endianness.h (for consistency) and tidy up a bit.
llvm-svn: 144669
This commit is contained in:
parent
ad4f982879
commit
cc675f410e
|
@ -1,4 +1,4 @@
|
|||
/* ===-- endianness.h - configuration header for compiler-rt ---------------===
|
||||
/* ===-- int_endianness.h - configuration header for compiler-rt ------------===
|
||||
*
|
||||
* The LLVM Compiler Infrastructure
|
||||
*
|
||||
|
@ -13,13 +13,8 @@
|
|||
* ===----------------------------------------------------------------------===
|
||||
*/
|
||||
|
||||
#ifndef ENDIANNESS_H
|
||||
#define ENDIANNESS_H
|
||||
|
||||
/*
|
||||
* Known limitations:
|
||||
* Middle endian systems are not handled currently.
|
||||
*/
|
||||
#ifndef INT_ENDIANNESS_H
|
||||
#define INT_ENDIANNESS_H
|
||||
|
||||
#if defined(__SVR4) && defined(__sun)
|
||||
#include <sys/byteorder.h>
|
||||
|
@ -91,4 +86,4 @@
|
|||
#error Unable to determine endian
|
||||
#endif /* Check we found an endianness correctly. */
|
||||
|
||||
#endif /* ENDIANNESS_H */
|
||||
#endif /* INT_ENDIANNESS_H */
|
|
@ -16,6 +16,10 @@
|
|||
#ifndef INT_LIB_H
|
||||
#define INT_LIB_H
|
||||
|
||||
/* Assumption: Signed integral is 2's complement. */
|
||||
/* Assumption: Right shift of signed negative is arithmetic shift. */
|
||||
/* Assumption: Endianness is little or big (not mixed). */
|
||||
|
||||
/* ABI macro definitions */
|
||||
|
||||
#if __ARM_EABI__
|
||||
|
@ -27,12 +31,8 @@
|
|||
# define COMPILER_RT_ABI
|
||||
#endif
|
||||
|
||||
/* Assumption: signed integral is 2's complement */
|
||||
/* Assumption: right shift of signed negative is arithmetic shift */
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdint.h>
|
||||
#include "endianness.h"
|
||||
#include <math.h>
|
||||
|
||||
/* If compiling for kernel use, call panic() instead of abort(). */
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#ifndef INT_TYPES_H
|
||||
#define INT_TYPES_H
|
||||
|
||||
#include "endianness.h"
|
||||
#include "int_endianness.h"
|
||||
|
||||
typedef int si_int;
|
||||
typedef unsigned su_int;
|
||||
|
|
Loading…
Reference in New Issue