diff options
author | striker <striker@13f79535-47bb-0310-9956-ffa450edef68> | 2002-03-02 09:26:07 +0000 |
---|---|---|
committer | striker <striker@13f79535-47bb-0310-9956-ffa450edef68> | 2002-03-02 09:26:07 +0000 |
commit | ff5e63cd3137c0e9dbcc6fc750cac57042c39dc4 (patch) | |
tree | c25b2a7b3ce882eacc64188d4648382594f69c63 /include/apr_general.h | |
parent | 9a4265797a6010398ab7cecd9d66c76d930267e2 (diff) | |
download | libapr-ff5e63cd3137c0e9dbcc6fc750cac57042c39dc4.tar.gz |
Export the APR_ALIGN macros.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63076 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_general.h')
-rw-r--r-- | include/apr_general.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/apr_general.h b/include/apr_general.h index 8849ec27c..85b0011a1 100644 --- a/include/apr_general.h +++ b/include/apr_general.h @@ -159,6 +159,17 @@ int strncasecmp(const char *a, const char *b, size_t n); #endif /** + * Allignment macros + */ + +/* APR_ALIGN() is only to be used to align on a power of 2 boundary */ +#define APR_ALIGN(size, boundary) \ + (((size) + ((boundary) - 1)) & ~((boundary) - 1)) + +#define APR_ALIGN_DEFAULT(size) APR_ALIGN(size, 8) + + +/** * String and memory functions */ |