Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

rcs_defs.hh

Go to the documentation of this file.
00001 /*******************************************************************
00002 * File: rcs_defs.hh
00003 * Purpose: Under windows pointers passed between DLL`s and/or EXE's must be far
00004 * and functions in an EXE or a DLL to be called by other DLL's should use
00005 * the pascal calling convention.  Classes that can be used by other DLL's
00006 * or EXE's need to be exported. Under other platforms these notions are
00007 * irrelevant so I define some macros here to reduce the number of
00008 * "#ifdef _Windows" in the rest of the rcs library code.
00009 *******************************************************************/
00010 
00011 #ifndef RCS_DEFS_HH
00012 #define RCS_DEFS_HH
00013 
00014 
00015 #if defined(sunos5) && !defined(NO_THREADS)
00016 #define _REENTRANT
00017 #endif
00018 
00019 #ifndef NO_SCCS_IDS
00020 #if defined(__BORLANDC__) || defined(sunos5CC)
00021 #define NO_SCCS_IDS
00022 #endif
00023 #endif
00024 
00025 /* Make the symbols _MSDOS and MSDOS used by Microsoft Visual C++ and __MSDOS__
00026  used by Borland C++ equivalent. I can still use MSC_VER and __BORLANDC__
00027  to distinguish them. */
00028 #ifdef _MSDOS
00029 #ifndef __MSDOS__
00030 #define __MSDOS__
00031 #endif
00032 #endif
00033 
00034 #ifdef __MSDOS__
00035 #ifndef _MSDOS
00036 #define _MSDOS
00037 #endif
00038 #ifndef MSDOS
00039 #define MSDOS
00040 #endif
00041 #endif
00042 
00043 #ifdef _WIN32
00044 #ifndef WIN32
00045 #define WIN32
00046 #endif
00047 #ifndef __WIN32__
00048 #define __WIN32__
00049 #endif
00050 #endif
00051 
00052 #ifdef __WIN32__
00053 #ifndef WIN32
00054 #define WIN32
00055 #endif
00056 #ifndef _WIN32
00057 #define _WIN32
00058 #endif
00059 #endif
00060 
00061 
00062 
00063 
00064 
00065 /* Make the symbols _WINDOWS used by Microsoft Visual C++ and _Windows
00066  used by Borland C++ equivalent. I can still use MSC_VER and __BORLANDC__
00067  to distinguish them. */
00068 #if  defined(_Windows)
00069 #if defined(USE_PCNFS) && !defined(NO_DCE_RPC)
00070 #if defined(__cplusplus) || defined(__CPLUSPLUS__)
00071 extern "C" {
00072 #endif
00073 #include <tklib.h>              /* PC-NFS Toolkit */
00074 #if defined(__cplusplus) || defined(__CPLUSPLUS__)
00075 }
00076 #endif
00077 #endif
00078 #ifndef _WINDOWS
00079 #define _WINDOWS
00080 #endif
00081 #endif
00082 
00083 #if defined(_WINDOWS)
00084 #if defined(USE_PCNFS) && !defined(NO_DCE_RPC)
00085 #if defined(__cplusplus) || defined(__CPLUSPLUS__)
00086 extern "C" {
00087 #endif
00088 #include <tklib.h>              /* PC-NFS Toolkit */
00089 #if defined(__cplusplus) || defined(__CPLUSPLUS__)
00090 }
00091 #endif
00092 #endif
00093 #ifndef _Windows
00094 #define _Windows
00095 #endif
00096 #ifndef __MSDOS__
00097 #define __MSDOS__ 1
00098 #endif
00099 #endif
00100 
00101 #if defined(_Windows) && !defined(WIN32)
00102 #ifndef WIN16
00103 #define WIN16
00104 #endif
00105 #else
00106 #ifdef WIN16
00107 #undef WIN16
00108 #endif
00109 #endif
00110 
00111 #if defined(WIN32) || defined(WIN16)
00112 #ifndef _Windows
00113 #define _Windows
00114 #endif
00115 #ifndef WINDOWS
00116 #define WINDOWS
00117 #endif
00118 #ifndef _WINDOWS
00119 #define _WINDOWS
00120 #endif
00121 #ifndef MSDOS
00122 #define MSDOS
00123 #endif
00124 #endif
00125 
00126 
00127 /* RCS_EXPORT */
00128 /* Use RCS_EXPORT in front of every class or function which */
00129 /* should be exported under windows. */
00130 #ifdef RCSLIB_DYNAMIC
00131 #if defined(_WINDOWS) && !defined(gnuwin32)
00132 #ifdef _MSC_VER
00133 #if (_MSC_VER >= 900)
00134 #define USING_DECLSPEC
00135 #ifdef CREATING_RCSLIB
00136 #define RCS_EXPORT __declspec(dllexport)
00137 #else 
00138   // CREATING_RCSLIB
00139 #define RCS_EXPORT __declspec(dllimport)
00140 #endif
00141   // CREATING_RCSLIB
00142 
00143 #else 
00144  // (_MSC_VER >= 900)
00145 #define RCS_EXPORT _export
00146 #endif
00147   // (_MSC_VER >= 900)
00148 
00149 #else 
00150   // _MSC_VER
00151 
00152 #define RCS_EXPORT _export
00153 #endif 
00154   // _MSC_VER
00155 
00156 #else 
00157   // !defined(_WINDOWS) && !defined(gnuwin32)
00158 
00159 #define RCS_EXPORT
00160 #endif 
00161   // !defined(_WINDOWS) && !defined(gnuwin32)
00162 
00163 #else
00164 #define RCS_EXPORT
00165 #endif
00166 
00167 #ifndef RCS_EXPORT
00168 #define RCS_EXPORT
00169 #endif
00170 
00171 /* Use RCS_PASCAL in front of any function definition that needs to */
00172 /*  be passed back to a windows DLL. */
00173 #ifdef WIN16
00174 #define RCS_PASCAL _pascal
00175 #else
00176 #define RCS_PASCAL
00177 #endif
00178 
00179 #ifdef WIN16
00180 #define RCS_FAR _far
00181 #define RCS_HUGE _huge
00182 #else
00183 #define RCS_FAR
00184 #define RCS_HUGE
00185 #endif
00186 
00187 #define RCS_PTR RCS_FAR
00188 #define RCS_CALLBACK_FUNC RCS_PASCAL
00189 
00190 
00191 #ifdef WIN32
00192 #define RCS_WINPROC_TYPE __stdcall
00193 #endif
00194 #ifdef WIN16
00195 #define RCS_WINPROC_TYPE RCS_PASCAL
00196 #endif
00197 
00198 
00199 #if defined(DOS) || defined(WINDOWS)  || defined(WIN32) || defined(WIN16) || defined(_Windows) || defined(_MSC_VER) || defined(_WINDOWS) || defined(__MSDOS__) || defined(_MSDOS) || defined(__BORLANDC__) || defined(__WIN32__) || defined(_WIN32)
00200 #define DOS_WINDOWS
00201 #endif
00202 
00203 #if defined(M_I86) || defined(_M_I86) || defined(lynxosPC) || defined(__TURBOC__) || defined(__BORLANDC__)
00204 #define MACHINE_I80x86
00205 #endif
00206 
00207 #if defined(M_I86LM) || defined(_M_I86LM) || defined(__LARGE__)
00208 #define LARGE_MEMORY_MODEL
00209 #endif
00210 
00211 #if defined(DOS_WINDOWS) && !defined(WIN32) && defined(MACHINE_I80x86) && !defined(LARGE_MEMORY_MODEL)
00212 #error  Dos and 16-bit Windows applications for Intel 80x86 Machines must be compiled with the LARGE memory model to use the RCS Library.
00213 #endif
00214 
00215 #if !defined(sunos4) && defined(__cplusplus) && !defined(_MSC_VER) && !defined(qnx)
00216 #define EXTERN_C_STD_HEADERS
00217 #endif
00218 
00219 
00220 #ifndef PLATNAME
00221 #ifdef DOS_WINDOWS
00222 #ifdef WIN32
00223 #define PLATNAME "WIN32"
00224 #else
00225 #ifdef WIN16
00226 #define PLATNAME "WIN16"
00227 #else
00228 #define PLATNAME "MSDOS"
00229 #endif 
00230   // !WIN16
00231 #endif 
00232   // !WIN32
00233 #endif 
00234   // !DOS_WINDOWS
00235 #endif
00236 
00237 
00238 #ifdef gnuwin32
00239 #define NO_DCE_RPC 1
00240 #endif
00241 
00242 #ifdef WIN32
00243 #define NO_DCE_RPC 1
00244 #endif
00245 
00246 
00247 #if !defined(MSDOS) && !defined(VXWORKS) && !defined(_WINDOWS)
00248 #define UNIX_LIKE_PLAT
00249 #endif
00250 
00251 #if defined(sunos) || defined(sunos4) || defined(sunos5) || defined(sunos4CC) || defined(sunos5CC)
00252 #ifndef SUN
00253 #define SUN
00254 #endif
00255 #endif
00256 
00257 #ifdef WIN32
00258 #if defined(_MT) && !defined(NO_THREADS)
00259 #ifndef MULTITHREADED
00260 #define MULTITHREADED
00261 #endif
00262 #endif
00263 #endif
00264 
00265 #ifdef NO_THREADS
00266 #ifdef POSIX_THREADS
00267 #undef POSIX_THREADS
00268 #endif
00269 #endif
00270 
00271 #ifdef UNDER_CE
00272 #ifndef NO_STDIO
00273 #define NO_STDIO
00274 #endif
00275 #ifndef NO_IOSTREAM
00276 #define NO_IOSTREAM
00277 #endif
00278 #define USE_OLD_WINSOCK
00279 #undef NULL
00280 #define NULL (0)
00281 #endif
00282 
00283 #if defined(WIN16) && !defined(WIN32)
00284 #ifndef USE_OLD_WINSOCK
00285 #define USE_OLD_WINSOCK
00286 #endif
00287 #endif
00288 
00289 
00290 #if defined(linux_2_2_5)  || \
00291     defined(linux_2_2_10) || \
00292     defined(linux_2_2_12) || \
00293     defined(linux_2_2_13) || \
00294     defined(linux_2_2_14) || \
00295     defined(linux_2_2_15) || \
00296     defined(linux_2_2_16) || \
00297     defined(linux_2_2_17) || \
00298     defined(linux_2_2_18)
00299 #ifndef LINUX_KERNEL_2_2
00300 #define LINUX_KERNEL_2_2
00301 #endif
00302 #endif
00303 
00304 #if defined(linux_2_4_0_test1) || \
00305     defined(linux_2_4_0_test9) || \
00306     defined(linux_2_4_0)
00307 #ifndef LINUX_KERNEL_2_4
00308 #define LINUX_KERNEL_2_4
00309 #endif
00310 #endif
00311 
00312 
00313 // The ifndef was added specicically to allow rcsvers.c to include this.
00314 #ifndef NO_DBG_MEM
00315 #ifdef DEBUG_MEMORY
00316 #include "dbg_mem.h"            // DEBUG_MALLOC, DEBUG_FREE
00317 #else
00318 #ifndef DEBUG_MALLOC
00319 #define DEBUG_MALLOC(x) malloc(x)
00320 #endif
00321 #ifndef DEBUG_FREE
00322 #define DEBUG_FREE(x) free(x)
00323 #endif
00324 #endif
00325 #endif
00326 
00327 #endif /* RCS_DEFS_HH */
00328 
00329 
00330 
00331 
00332 
00333 
00334 
00335 

Generated on Sun Dec 2 15:56:51 2001 for rcslib by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001