patch-pfe_def-config_h 760 B

1234567891011121314151617181920212223
  1. $OpenBSD: patch-pfe_def-config_h,v 1.1 2014/01/21 20:45:43 miod Exp $
  2. Make sure cell pointers are aligned to pointer boundaries, for the sake of
  3. strict-alignment 64-bit platforms.
  4. --- pfe/def-config.h.orig Sun May 11 12:29:19 2008
  5. +++ pfe/def-config.h Sun Jan 19 19:39:18 2014
  6. @@ -127,7 +127,13 @@ typedef int mode_t;
  7. #endif
  8. #ifndef PFE_ALIGNOF_CELL
  9. -#define PFE_ALIGNOF_CELL PFE_SIZEOF_INT
  10. +# if defined PFE_SIZEOF_INT && PFE_SIZEOF_INT >= PFE_SIZEOF_VOIDP
  11. +# define PFE_ALIGNOF_CELL PFE_SIZEOF_INT
  12. +# elif defined PFE_SIZEOF_LONG && PFE_SIZEOF_LONG >= PFE_SIZEOF_VOIDP
  13. +# define PFE_ALIGNOF_CELL PFE_SIZEOF_LONG
  14. +# else
  15. +# error cell type and size not detected.
  16. +# endif
  17. #endif
  18. #ifndef PFE_ALIGNOF_SFLOAT
  19. #define PFE_ALIGNOF_SFLOAT PFE_SIZEOF_FLOAT