OSDN Git Service

Fix the ALIGN and ALIGNBYTES macros for LP64.
authorElliott Hughes <enh@google.com>
Tue, 8 Oct 2013 22:31:44 +0000 (15:31 -0700)
committerElliott Hughes <enh@google.com>
Tue, 8 Oct 2013 22:31:44 +0000 (15:31 -0700)
Change-Id: I3a361255afce375ab1cefa449721f0aea4d47919

libc/include/sys/param.h

index 0bfdc5d..27acd70 100644 (file)
 #define MAXPATHLEN  PATH_MAX
 #define MAXSYMLINKS 8
 
-#define ALIGNBYTES  3
-#define ALIGN(p)    (((unsigned int)(p) + ALIGNBYTES) &~ ALIGNBYTES)
+#if __LP64__
+#define ALIGNBYTES 7
+#else
+#define ALIGNBYTES 3
+#endif
+
+#define ALIGN(p)    (((unsigned long)(p) + ALIGNBYTES) &~ ALIGNBYTES)
 
 #define powerof2(x) ((((x)-1)&(x))==0)