diff options
Diffstat (limited to 'xorg-server/include/misc.h')
-rw-r--r-- | xorg-server/include/misc.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xorg-server/include/misc.h b/xorg-server/include/misc.h index 877c682d4..a2109e63a 100644 --- a/xorg-server/include/misc.h +++ b/xorg-server/include/misc.h @@ -166,9 +166,9 @@ typedef struct _xReq *xReqPtr; #include <math.h> #undef MAXSHORT -#define MAXSHORT SHRT_MAX +#define MAXSHORT 32767 #undef MINSHORT -#define MINSHORT SHRT_MIN +#define MINSHORT -32768 #undef MAXINT #define MAXINT INT_MAX #undef MININT @@ -185,7 +185,7 @@ typedef struct _xReq *xReqPtr; * @param bits The minimum number of bits needed. * @return The number of bytes needed to hold bits. */ -static inline int +static __inline int bits_to_bytes(const int bits) { return ((bits + 7) >> 3); } @@ -195,7 +195,7 @@ bits_to_bytes(const int bits) { * @param bytes The minimum number of bytes needed. * @return The number of 4-byte units needed to hold bytes. */ -static inline int +static __inline int bytes_to_int32(const int bytes) { return (((bytes) + 3) >> 2); } @@ -205,7 +205,7 @@ bytes_to_int32(const int bytes) { * @param bytes The minimum number of bytes needed. * @return The closest multiple of 4 that is equal or higher than bytes. */ -static inline int +static __inline int pad_to_int32(const int bytes) { return (((bytes) + 3) & ~3); } |