home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 January / Chip_2001-01_cd1.bin / tema / interb / InterBase_WI-V6.0-server.exe / server / examples / api / align.h next >
C/C++ Source or Header  |  2000-06-23  |  2KB  |  68 lines

  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.Interbase.com/IPL/
  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 Interbase Software Corporation
  13.  * and its successors. Portions created by Borland/Inprise are
  14.  * Copyright (C) 1992-1998 and 1999-2000 Borland/Inprise. Portions
  15.  * created by InterBase Software Corporation are Copyright (C)
  16.  * 1998-1999 InterBase Software Corporation.
  17.  *
  18.  * Copyright (C) 2000 InterBase Software Corporation
  19.  * All Rights Reserved.
  20.  * Contributor(s): ______________________________________.
  21.  */
  22. #ifdef VMS
  23. #define ALIGN(n,b)              (n)
  24. #endif
  25.  
  26. #ifdef sun
  27. #ifdef sparc
  28. #define ALIGN(n,b)          ((n + b - 1) & ~(b - 1))
  29. #endif
  30. #endif
  31.  
  32. #ifdef hpux
  33. #define ALIGN(n,b)          ((n + b - 1) & ~(b - 1))
  34. #endif
  35.  
  36. #ifdef ultrix
  37. #define ALIGN(n,b)          ((n + b - 1) & ~(b - 1))
  38. #endif
  39.  
  40. #ifdef sgi
  41. #define ALIGN(n,b)          ((n + b - 1) & ~(b - 1))
  42. #endif
  43.  
  44. #ifdef _AIX
  45. #define ALIGN(n,b)          ((n + b - 1) & ~(b - 1))
  46. #endif
  47.  
  48. #ifdef __m88k__
  49. #define ALIGN(n,b)          ((n + b - 1) & ~(b - 1))
  50. #endif
  51.  
  52. #if (defined __osf__ && defined __alpha)
  53. #define ALIGN(n,b)          ((n + b - 1) & ~(b - 1))
  54. #endif
  55.  
  56. #ifdef mpexl
  57. #define ALIGN(n,b)          ((n + b - 1) & ~(b - 1))
  58. #endif
  59.  
  60. #if (defined(_MSC_VER) && defined(WIN32)) || (defined(__BORLANDC__) \
  61.     && defined(__WIN32__))
  62. #define ALIGN(n,b)          ((n + b - 1) & ~(b - 1))
  63. #endif
  64.  
  65. #ifndef ALIGN
  66. #define ALIGN(n,b)          ((n+1) & ~1)
  67. #endif
  68.