home *** CD-ROM | disk | FTP | other *** search
/ Freelog 42 / Freelog042.iso / Alu / Ancestrologie / Sources / InterBase_WI-V6.0.1-server.ZIP / examples / api / align.h next >
C/C++ Source or Header  |  2001-01-05  |  2KB  |  65 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.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.  *
  15.  * Copyright (C) 2000 Inprise Corporation
  16.  * All Rights Reserved.
  17.  * Contributor(s): ______________________________________.
  18.  */
  19. #ifdef VMS
  20. #define ALIGN(n,b)              (n)
  21. #endif
  22.  
  23. #ifdef sun
  24. #ifdef sparc
  25. #define ALIGN(n,b)          ((n + b - 1) & ~(b - 1))
  26. #endif
  27. #endif
  28.  
  29. #ifdef hpux
  30. #define ALIGN(n,b)          ((n + b - 1) & ~(b - 1))
  31. #endif
  32.  
  33. #ifdef ultrix
  34. #define ALIGN(n,b)          ((n + b - 1) & ~(b - 1))
  35. #endif
  36.  
  37. #ifdef sgi
  38. #define ALIGN(n,b)          ((n + b - 1) & ~(b - 1))
  39. #endif
  40.  
  41. #ifdef _AIX
  42. #define ALIGN(n,b)          ((n + b - 1) & ~(b - 1))
  43. #endif
  44.  
  45. #ifdef __m88k__
  46. #define ALIGN(n,b)          ((n + b - 1) & ~(b - 1))
  47. #endif
  48.  
  49. #if (defined __osf__ && defined __alpha)
  50. #define ALIGN(n,b)          ((n + b - 1) & ~(b - 1))
  51. #endif
  52.  
  53. #ifdef mpexl
  54. #define ALIGN(n,b)          ((n + b - 1) & ~(b - 1))
  55. #endif
  56.  
  57. #if (defined(_MSC_VER) && defined(WIN32)) || (defined(__BORLANDC__) \
  58.     && defined(__WIN32__))
  59. #define ALIGN(n,b)          ((n + b - 1) & ~(b - 1))
  60. #endif
  61.  
  62. #ifndef ALIGN
  63. #define ALIGN(n,b)          ((n+1) & ~1)
  64. #endif
  65.