mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-21 08:50:32 -05:00
On non-GNUC systems, use uintmax_t in the ISC_ALIGN macro
This commit is contained in:
parent
9d329a5e74
commit
2e40cc94dc
1 changed files with 7 additions and 1 deletions
|
|
@ -12,6 +12,8 @@
|
|||
#ifndef ISC_UTIL_H
|
||||
#define ISC_UTIL_H 1
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
/*! \file isc/util.h
|
||||
* NOTE:
|
||||
*
|
||||
|
|
@ -264,7 +266,11 @@ extern void mock_assert(const int result, const char* const expression,
|
|||
/*%
|
||||
* Alignment
|
||||
*/
|
||||
#define ISC_ALIGN(x, a) (((x) + (a) - 1) & ~((typeof(x))(a)-1))
|
||||
#ifdef __GNUC__
|
||||
#define ISC_ALIGN(x, a) (((x) + (a) - 1) & ~((typeof(x))(a) - 1))
|
||||
#else
|
||||
#define ISC_ALIGN(x, a) (((x) + (a) - 1) & ~((uintmax_t)(a) - 1))
|
||||
#endif
|
||||
|
||||
/*%
|
||||
* Misc
|
||||
|
|
|
|||
Loading…
Reference in a new issue