home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / harbb30g.zip / INCLUDE / hbsetup.h < prev    next >
C/C++ Source or Header  |  1999-09-20  |  8KB  |  242 lines

  1. /*
  2.  * $Id: hbsetup.h,v 1.33 1999/09/20 17:54:28 vszel Exp $
  3.  */
  4.  
  5. /*
  6.  * Harbour Project source code:
  7.  * Header file for compiler and runtime configuration
  8.  *
  9.  * Copyright 1999 Ryszard Glab <rglab@imid.med.pl>
  10.  * www - http://www.harbour-project.org
  11.  *
  12.  * This program is free software; you can redistribute it and/or modify
  13.  * it under the terms of the GNU General Public License as published by
  14.  * the Free Software Foundation; either version 2 of the License, or
  15.  * (at your option) any later version, with one exception:
  16.  *
  17.  * The exception is that if you link the Harbour Runtime Library (HRL)
  18.  * and/or the Harbour Virtual Machine (HVM) with other files to produce
  19.  * an executable, this does not by itself cause the resulting executable
  20.  * to be covered by the GNU General Public License. Your use of that
  21.  * executable is in no way restricted on account of linking the HRL
  22.  * and/or HVM code into it.
  23.  *
  24.  * This program is distributed in the hope that it will be useful,
  25.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  26.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  27.  * GNU General Public License for more details.
  28.  *
  29.  * You should have received a copy of the GNU General Public License
  30.  * along with this program; if not, write to the Free Software
  31.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
  32.  * their web site at http://www.gnu.org/).
  33.  *
  34.  */
  35.  
  36. #ifndef HB_SETUP_H_
  37. #define HB_SETUP_H_
  38.  
  39. #include <limits.h>
  40.  
  41. /* ***********************************************************************
  42.  * This symbol defines if Harbour is compiled using C compiler
  43.  * that support strict ANSI C only
  44.  *
  45.  * The only non ANSI C feature that we are using is an ability
  46.  * to call functions before the 'main' module is called.
  47.  * This trick is used to automatically join all symbol tables defined
  48.  * in run-time support modules and in user defined modules.
  49.  *   If strict ANSI C compability is required then all symbol tables
  50.  * have to be joined manually by calling special function named
  51.  * hb_vm_SymbolInit_<module_name>
  52.  * (for example for myfirst.prg it will be: 'hb_vm_SymbolInit_MYFIRST'
  53.  * The generation of this function is performed by the macro called
  54.  * HB_CALL_ON_STARTUP that is defined in 'init.h'
  55.  *
  56.  * By default we are using extensions to ANSI C (symbol is not defined)
  57. */
  58. /*#define HARBOUR_STRICT_ANSI_C */
  59.  
  60. /* ***********************************************************************
  61.  * Define this option if you want the /y YACC trace option to be available
  62.  * in the Harbour compiler.
  63.  *
  64.  * Note that if you turn this on, the compiler will slighly grow in size.
  65.  *
  66.  * By default this is turned on.
  67.  * TODO: This should be disabled, when the parser has matured.
  68. */
  69. /*#define HARBOUR_YYDEBUG*/
  70.  
  71. /* ***********************************************************************
  72.  * This symbol defines if we are trying to compile using GCC for OS/2
  73.  *
  74.  * By default it is disabled (symbol is not defined)
  75. */
  76. /*#define HARBOUR_GCC_OS2*/
  77.  
  78. /* ***********************************************************************
  79.  * The name of starting procedure
  80.  * Note: You have to define it in case when Harbour cannot find the proper
  81.  * starting procedure (due to incorrect order of static data initialization)
  82.  *
  83.  * The list of compilers that require it:
  84.  * - Watcom C/C++ 10.0
  85.  * - GCC on Linux
  86.  *
  87.  * By default we are using automatic lookup (symbol not defined)
  88. */
  89. #if defined(__WATCOMC__) || defined(__GNUC__)
  90.    #if !defined(__DJGPP__) && !defined(HARBOUR_GCC_OS2)
  91.       #define HARBOUR_START_PROCEDURE "MAIN"
  92.    #endif
  93. #endif
  94.  
  95. /* ***********************************************************************
  96.  * This symbol defines which national language module should be included
  97.  * in the Harbour run time library. See source/rtl/msgxxx for all allowed
  98.  * values for <nl> in this manifest constant.
  99.  *
  100.  * By default it is disabled (symbol is not defined), which selects UK
  101. */
  102. /*#define HARBOUR_LANGUAGE_<nl>*/
  103.  
  104. /* ***********************************************************************
  105.  * This symbol defines if we want an ability to create and link OBJ files
  106.  * generated by Harbour compiler
  107.  *
  108.  * Note that the Virtual Machine support need a platform/compiler specific
  109.  * assembler module, so you will be able to use this only with 32 bits
  110.  * Borland C/C++ compilers.
  111.  *
  112.  * By default it is disabled (symbol is not defined)
  113. */
  114. /*#define HARBOUR_OBJ_GENERATION*/
  115.  
  116. /* ***********************************************************************
  117.  * This symbol defines if we want to use strict Clipper compatibility
  118.  *
  119.  * By default it is disabled (symbol is not defined)
  120. */
  121. /*#define HARBOUR_STRICT_CLIPPER_COMPATIBILITY*/
  122.  
  123. /* ***********************************************************************
  124.  * These symbols defines if we want to use the GT API (and which platform
  125.  * to build the GT API for, if using the GNU Make System).
  126.  *
  127.  * By default they are disabled (symbols are not defined)
  128. */
  129. /*#define HARBOUR_USE_DOS_GTAPI*/
  130. /*#define HARBOUR_USE_OS2_GTAPI*/
  131. /*#define HARBOUR_USE_WIN_GTAPI*/
  132.  
  133. /* Indicate that one of the GTAPIs is defined */
  134. #if defined(HARBOUR_USE_DOS_GTAPI) || defined(HARBOUR_USE_OS2_GTAPI) || defined(HARBOUR_USE_WIN_GTAPI)
  135.    #define HARBOUR_USE_GTAPI
  136. #endif
  137.  
  138. /* ***********************************************************************
  139.  * These symbols defined if we want to use the MOUSE API (and which platform
  140.  * to build the MOUSE API for, if using the GNU Make System).
  141.  *
  142.  * By default they are disabled (symbols are not defined)
  143. */
  144. /*#define HARBOUR_USE_DOS_MSAPI*/
  145. /*#define HARBOUR_USE_OS2_MSAPI*/
  146. /*#define HARBOUR_USE_WIN_MSAPI*/
  147.  
  148. /* Indicate that one of the GTAPIs is defined */
  149. #if defined(HARBOUR_USE_DOS_MSAPI) || defined(HARBOUR_USE_OS2_MSAPI) || defined(HARBOUR_USE_WIN_MSAPI)
  150.   #define HARBOUR_USE_MSAPI
  151. #endif
  152.  
  153. /* ***********************************************************************
  154.  * Operating system specific definitions
  155.  */
  156. #ifdef __GNUC__
  157.    /* The GNU C compiler is used */
  158.    #if defined(__DJGPP__) || defined(HARBOUR_GCC_OS2) || defined(_Windows) || defined(_WIN32)
  159.       /* The DJGPP port of GNU C is used - for DOS platform */
  160.       #define OS_DOS_COMPATIBLE
  161.       #define OS_PATH_LIST_SEPARATOR    ';'
  162.       #define OS_PATH_DELIMITER         '\\'
  163.       #define OS_PATH_DELIMITER_LIST    "\\/:"
  164.       #define OS_OPT_DELIMITER_LIST     "/-"
  165.    #else
  166.       #define OS_UNIX_COMPATIBLE
  167.       #define OS_PATH_LIST_SEPARATOR    ':'
  168.       #define OS_PATH_DELIMITER         '/'
  169.       #define OS_PATH_DELIMITER_LIST    "/"
  170.       #define OS_OPT_DELIMITER_LIST     "-"
  171.    #endif
  172. #else
  173.    /* we are assuming here the DOS compatible OS */
  174.    #define OS_DOS_COMPATIBLE
  175.    #define OS_PATH_LIST_SEPARATOR    ';'
  176.    #define OS_PATH_DELIMITER         '\\'
  177.    #define OS_PATH_DELIMITER_LIST    "\\/:"
  178.    #define OS_OPT_DELIMITER_LIST     "/-"
  179. #endif
  180.  
  181. #ifndef _POSIX_PATH_MAX
  182.    #define _POSIX_PATH_MAX    255
  183. #endif
  184.  
  185. /* ***********************************************************************
  186.  * Platform detection
  187.  */
  188.  
  189. /* New style (under testing) */
  190.  
  191. #ifndef DOS
  192.    #if defined(_QC) || defined(__DOS__) || defined(MSDOS) || defined(__MSDOS__)
  193.       #define DOS
  194.    #endif
  195. #endif
  196.  
  197. #ifndef OS2
  198.    #if defined(__OS2__) || defined(OS_2) || defined(HARBOUR_GCC_OS2)
  199.       #define OS2
  200.    #endif
  201. #endif
  202.  
  203. #ifndef EMX
  204.    #if defined(__EMX__)
  205.       #define EMX
  206.    #endif
  207. #endif
  208.  
  209. #ifndef WINNT
  210.    #if defined(__NT__)
  211.       #define WINNT
  212.    #endif
  213. #endif
  214.  
  215. /* Old style */
  216.  
  217. #ifndef DOS
  218.    #if defined(_QC) || defined(__DOS__) || defined(MSDOS) || defined(__MSDOS__)
  219.       #define DOS
  220.    #endif
  221. #endif
  222.  
  223. #ifndef OS2
  224.    #if defined(__OS2__) || defined(OS_2) || defined(HARBOUR_GCC_OS2)
  225.       #define OS2
  226.    #endif
  227. #endif
  228.  
  229. #ifndef EMX
  230.    #if defined(__EMX__)
  231.       #define EMX
  232.    #endif
  233. #endif
  234.  
  235. #ifndef WINNT
  236.    #if defined(__NT__)
  237.       #define WINNT
  238.    #endif
  239. #endif
  240.  
  241. #endif /* HB_SETUP_H_ */
  242.