Merge "Fix the ALIGN and ALIGNBYTES macros for LP64."
This commit is contained in:
commit
458076c3c7
1 changed files with 7 additions and 2 deletions
|
@ -34,8 +34,13 @@
|
||||||
#define MAXPATHLEN PATH_MAX
|
#define MAXPATHLEN PATH_MAX
|
||||||
#define MAXSYMLINKS 8
|
#define MAXSYMLINKS 8
|
||||||
|
|
||||||
|
#if __LP64__
|
||||||
|
#define ALIGNBYTES 7
|
||||||
|
#else
|
||||||
#define ALIGNBYTES 3
|
#define ALIGNBYTES 3
|
||||||
#define ALIGN(p) (((unsigned int)(p) + ALIGNBYTES) &~ ALIGNBYTES)
|
#endif
|
||||||
|
|
||||||
|
#define ALIGN(p) (((unsigned long)(p) + ALIGNBYTES) &~ ALIGNBYTES)
|
||||||
|
|
||||||
#define powerof2(x) ((((x)-1)&(x))==0)
|
#define powerof2(x) ((((x)-1)&(x))==0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue