Author: ed
Date: Tue May 31 13:31:19 2016
New Revision: 301037
URL: https://svnweb.freebsd.org/changeset/base/301037

Log:
  Implement _ALIGN() using internal integer types.
  
  The existing version depends on register_t and uintptr_t, which are only
  available when including headers such as <sys/types.h>. As this macro is
  used by <sys/socket.h>, for example, it should be written in such a way
  that it doesn't depend on those types.

Modified:
  head/sys/x86/include/_align.h

Modified: head/sys/x86/include/_align.h
==============================================================================
--- head/sys/x86/include/_align.h       Tue May 31 12:39:54 2016        
(r301036)
+++ head/sys/x86/include/_align.h       Tue May 31 13:31:19 2016        
(r301037)
@@ -46,7 +46,7 @@
  * for all data types (int, long, ...).   The result is unsigned int
  * and must be cast to any desired pointer type.
  */
-#define        _ALIGNBYTES     (sizeof(register_t) - 1)
-#define        _ALIGN(p)       (((uintptr_t)(p) + _ALIGNBYTES) & ~_ALIGNBYTES)
+#define        _ALIGNBYTES     (sizeof(__register_t) - 1)
+#define        _ALIGN(p)       (((__uintptr_t)(p) + _ALIGNBYTES) & 
~_ALIGNBYTES)
 
 #endif /* !_X86_INCLUDE__ALIGN_H_ */
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to