home *** CD-ROM | disk | FTP | other *** search
/ Freelog 11 / Freelog011.iso / BestOf / PhoenixMail / Source / comps / DFS.inc < prev    next >
Text File  |  1999-01-06  |  7KB  |  172 lines

  1. {*****************************************************************************
  2.  *
  3.  *  Parts of this code were changed by Michael Haller
  4.  *  E-mail:     michael@discountdrive.com
  5.  *  Homepage:   http://www.discountdrive.com/sunrise/
  6.  *
  7.  *  The copyright has the original author of this code.
  8.  *
  9.  *****************************************************************************}
  10.  
  11.  
  12. (******************************************************************************)
  13. (* Delphi Free Stuff Include File.  This file is used for all my components   *)
  14. (* to create some standard defines.  This will help reduce headaches when new *)
  15. (* versions of Delphi and C++Builder are released, among other things.        *)
  16. (******************************************************************************)
  17. (* Brad Stowers: bstowers@pobox.com                                           *)
  18. (* Delphi Free Stuff: http://www.pobox.com/~bstowers/delphi/                  *)
  19. (* July 6, 1998                                                               *)
  20. (******************************************************************************)
  21. (* Usage:   Add the following line to the top of your unit file:              *)
  22. (*   {$I DFS.INC}                                                             *)
  23. (******************************************************************************)
  24. (* Complete Boolean Evaluation compiler directive is turned off by including  *)
  25. (*   this file.                                                               *)
  26. (* Here is a brief explanation of what each of the defines mean:              *)
  27. (* DELPHI_FREE_STUFF    : Always defined when DFS.INC is included             *)
  28. (* DFS_WIN16            : Compilation target is 16-bit Windows                *)
  29. (* DFS_WIN32            : Compilation target is 32-bit Windows                *)
  30. (* DFS_USEDEFSHLOBJ     : The SHLOBJ.PAS version contains no none errors.     *)
  31. (*                        Delphi 2.0x and C++Builder 1.0x shipped with a      *)
  32. (*                        version of SHLOBJ.PAS that had many nasty errors.   *)
  33. (*                        See my web site in the Hints section for how to fix *)
  34. (* DFS_NO_COM_CLEANUP   : The version of the compiler being used does not     *)
  35. (*                        require COM objects to be released; it is done      *)
  36. (*                        automatically when they go "out of scope".          *)
  37. (* DFS_COMPILER_1       : Delphi 1.0 is the compiler.  Note that C++B 1.0     *)
  38. (*                        does NOT cause this to be defined.  It is really    *)
  39. (*                        the 2.0 compiler.                                   *)
  40. (* DFS_COMPILER_1_UP    : Delphi 1.0x or higher, or C++B 1.0x or higher is the*)
  41. (*                        compiler.                                           *)
  42. (* DFS_COMPILER_2       : Delphi 2.0x or C++B 1.0x is the compiler.           *)
  43. (* DFS_COMPILER_2_UP    : Delphi 2.0x or higher, or C++B 1.0x or higher is the*)
  44. (*                        compiler.                                           *)
  45. (* DFS_COMPILER_3       : Delphi 3.0x or C++B 3.0x is the compiler.           *)
  46. (* DFS_COMPILER_3_UP    : Delphi 3.0x or higher, or C++B 3.0x or higher is the*)
  47. (*                        compiler.                                           *)
  48. (* DFS_COMPILER_4       : Delphi 4.0x is the compiler.                        *)
  49. (* DFS_COMPILER_4_UP    : Delphi 4.0x or higher is the compiler.              *)
  50. (* DFS_UNKNOWN_COMPILER : No sense could be made of the compiliation          *)
  51. (*                        environment.                                        *)
  52. (* DFS_CPPB             : Any version of C++B is being used.                  *)
  53. (* DFS_CPPB_1           : C++B v1.0x is being used.                           *)
  54. (* DFS_CPPB_3           : C++B v3.0x is being used.                           *)
  55. (* DFS_CPPB_3_UP        : C++B v3.0x or higher is being used.                 *)
  56. (* DFS_DELPHI           : Any version of Delphi is being used.                *)
  57. (* DFS_DELPHI_1         : Delphi v1.0x is being used.                         *)
  58. (* DFS_DELPHI_2         : Delphi v2.0x is being used.                         *)
  59. (* DFS_DELPHI_2_UP      : Delphi v2.0x or higher is being used.               *)
  60. (* DFS_DELPHI_3         : Delphi v3.0x is being used.                         *)
  61. (* DFS_DELPHI_3_UP      : Delphi v3.0x or higher is being used.               *)
  62. (* DFS_DELPHI_4         : Delphi v4.0x is being used.                         *)
  63. (* DFS_DELPHI_4_UP      : Delphi v4.0x or higher is being used.               *)
  64. (******************************************************************************)
  65.  
  66.  
  67. { All DFS components rely on complete boolean eval compiler directive set off. }
  68. {$B-}
  69.  
  70. {$DEFINE DELPHI_FREE_STUFF}
  71.  
  72. {$IFDEF WIN32}
  73.   {$DEFINE DFS_WIN32}
  74. {$ELSE}
  75.   {$DEFINE DFS_WIN16}
  76. {$ENDIF}
  77.  
  78. {$IFDEF VER120}
  79.   {$DEFINE DFS_COMPILER_4}
  80.   {$DEFINE DFS_DELPHI}
  81.   {$DEFINE DFS_DELPHI_4}
  82.   {$DEFINE DFS_USEDEFSHLOBJ} { Only D3+ and C++B 3 have no errors in SHLOBJ }
  83. {$ENDIF}
  84.  
  85. {$IFDEF VER110}
  86.   {$DEFINE DFS_COMPILER_3}
  87.   {$DEFINE DFS_CPPB}
  88.   {$DEFINE DFS_CPPB_3}
  89.   {$DEFINE DFS_USEDEFSHLOBJ} { Only D3+ and C++B 3 have no errors in SHLOBJ }
  90. {$ENDIF}
  91.  
  92. {$IFDEF VER100}
  93.   {$DEFINE DFS_COMPILER_3}
  94.   {$DEFINE DFS_DELPHI}
  95.   {$DEFINE DFS_DELPHI_3}
  96.   {$DEFINE DFS_USEDEFSHLOBJ} { Only D3+ and C++B 3 have no errors in SHLOBJ }
  97. {$ENDIF}
  98.  
  99. {$IFDEF VER93}
  100.   {$DEFINE DFS_COMPILER_2}  { C++B v1 compiler is really v2 }
  101.   {$DEFINE DFS_CPPB}
  102.   {$DEFINE DFS_CPPB_1}
  103.   {.$DEFINE DFS_USEDEFSHLOBJ} { C++B 1 has the correct SHLOBJ.H, but
  104.                                 SHLOBJ.PAS has errors so this isn't defined }
  105. {$ENDIF}
  106.  
  107. {$IFDEF VER90}
  108.   {$DEFINE DFS_COMPILER_2}
  109.   {$DEFINE DFS_DELPHI}
  110.   {$DEFINE DFS_DELPHI_2}
  111. {$ENDIF}
  112.  
  113. {$IFDEF VER80}
  114.   {$DEFINE DFS_COMPILER_1}
  115.   {$DEFINE DFS_DELPHI}
  116.   {$DEFINE DFS_DELPHI_1}
  117. {$ENDIF}
  118.  
  119. {$IFNDEF DFS_CPPB}
  120.   {$IFNDEF DFS_DELPHI}
  121.     { Don't know what the hell it is.  Could be new version, or could be old BP. }
  122.     {$DEFINE DFS_UNKNOWN_COMPILER}
  123.   {$ENDIF}
  124. {$ENDIF}
  125.  
  126. {$IFDEF DFS_COMPILER_1}
  127.   {$DEFINE DFS_COMPILER_1_UP}
  128. {$ENDIF}
  129.  
  130. {$IFDEF DFS_COMPILER_2}
  131.   {$DEFINE DFS_COMPILER_1_UP}
  132.   {$DEFINE DFS_COMPILER_2_UP}
  133. {$ENDIF}
  134.  
  135. {$IFDEF DFS_COMPILER_3}
  136.   {$DEFINE DFS_COMPILER_1_UP}
  137.   {$DEFINE DFS_COMPILER_2_UP}
  138.   {$DEFINE DFS_COMPILER_3_UP}
  139. {$ENDIF}
  140.  
  141. {$IFDEF DFS_COMPILER_4}
  142.   {$DEFINE DFS_COMPILER_1_UP}
  143.   {$DEFINE DFS_COMPILER_2_UP}
  144.   {$DEFINE DFS_COMPILER_3_UP}
  145.   {$DEFINE DFS_COMPILER_4_UP}
  146. {$ENDIF}
  147.  
  148. {$IFDEF DFS_DELPHI_2}
  149.   {$DEFINE DFS_DELPHI_2_UP}
  150. {$ENDIF}
  151.  
  152. {$IFDEF DFS_DELPHI_3}
  153.   {$DEFINE DFS_DELPHI_2_UP}
  154.   {$DEFINE DFS_DELPHI_3_UP}
  155. {$ENDIF}
  156.  
  157. {$IFDEF DFS_DELPHI_4}
  158.   {$DEFINE DFS_DELPHI_2_UP}
  159.   {$DEFINE DFS_DELPHI_3_UP}
  160.   {$DEFINE DFS_DELPHI_4_UP}
  161. {$ENDIF}
  162.  
  163. {$IFDEF DFS_CPPB_3}
  164.   {$DEFINE DFS_CPPB_3_UP}
  165. {$ENDIF}
  166.  
  167. {$IFDEF DFS_COMPILER_3_UP}
  168.   {$DEFINE DFS_NO_COM_CLEANUP}
  169. {$ENDIF}
  170.  
  171.  
  172.