align.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * The contents of this file are subject to the Interbase Public
  3. * License Version 1.0 (the "License"); you may not use this file
  4. * except in compliance with the License. You may obtain a copy
  5. * of the License at http://www.Inprise.com/IPL.html
  6. *
  7. * Software distributed under the License is distributed on an
  8. * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
  9. * or implied. See the License for the specific language governing
  10. * rights and limitations under the License.
  11. *
  12. * The Original Code was created by Inprise Corporation
  13. * and its predecessors. Portions created by Inprise Corporation are
  14. * Copyright (C) Inprise Corporation.
  15. *
  16. * All Rights Reserved.
  17. * Contributor(s): ______________________________________.
  18. *
  19. * 2002.10.27 Sean Leyne - Code Cleanup, removed obsolete "Ultrix" port
  20. *
  21. * 2002.10.28 Sean Leyne - Code cleanup, removed obsolete "SGI" port
  22. *
  23. */
  24. #ifdef VMS
  25. #define FB_ALIGN(n,b) (n)
  26. #endif
  27. #ifdef sun
  28. #ifdef sparc
  29. #define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
  30. #endif
  31. #endif
  32. #ifdef hpux
  33. #define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
  34. #endif
  35. #ifdef _AIX
  36. #define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
  37. #endif
  38. #if (defined(_MSC_VER) && defined(WIN32))
  39. #define FB_ALIGN(n,b) ((n + b - 1) & ~(b - 1))
  40. #endif
  41. #ifndef FB_ALIGN
  42. #define FB_ALIGN(n,b) ((n+1) & ~1)
  43. #endif