diff options
author | pixel <pixel> | 2006-07-16 12:24:26 +0000 |
---|---|---|
committer | pixel <pixel> | 2006-07-16 12:24:26 +0000 |
commit | 309d8c1318d7e92e6f685ad2011d73f8653dd4d1 (patch) | |
tree | 978d4d82bcf9b0239663e238da7cabc006a90557 | |
parent | 1f97ba72e51f52f351137550239e9dae7f743fc7 (diff) |
Adding align
-rw-r--r-- | include/generic.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/generic.h b/include/generic.h index 1633617..b8464c4 100644 --- a/include/generic.h +++ b/include/generic.h @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: generic.h,v 1.37 2006-02-02 17:27:28 pixel Exp $ */ +/* $Id: generic.h,v 1.38 2006-07-16 12:24:26 pixel Exp $ */ #ifndef __GENERIC_H__ #define __GENERIC_H__ @@ -193,6 +193,10 @@ inline T ABS(T x) { } #endif +#ifndef align +# define align(a) (((ub4)a+(sizeof(void *)-1))&(~(sizeof(void *)-1))) +#endif + #if defined __linux__ || defined sun || defined __solaris__ || defined __CYGWIN32__ || defined __MINGW32__ || defined __APPLE__ #define FUNCNAME String(__PRETTY_FUNCTION__) #else |