home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-01-18 | 2.4 KB | 110 lines | [TEXT/MMCC] |
- //
- // TurboTCP.buildflags.h
- //
- // TurboTCP library
- // Compile-time flags
- //
- // Copyright © 1993-95, FrostByte Design / Eric Scouten
- //
-
- #pragma once
-
-
- //***********************************************************
- //
- // Use these macros to determine which class library you’re working with. All but one of
- // the macros below should be commented out.
- //
-
- //#define TurboTCP_TCL
- #define TurboTCP_PP
-
-
- //***********************************************************
- //
- // Attempt to automatically determine which platform we’re building for.
- //
-
- #if defined(powerc) || defined(__powerc) || GENERATINGPOWERPC
- #define TurboTCP_PPC 1
- #define TurboTCP_68K 0
- #define TurboTCP_CFM 1
-
- #else
- #define TurboTCP_PPC 0
- #define TurboTCP_68K 1
- #if GENERATINGCFM
- #define TurboTCP_CFM GENERATINGCFM
- #else
- #define TurboTCP_CFM 0
- #endif
-
- #endif
-
-
- //***********************************************************
- //
- // Attempt to automatically determine which headers we have.
- //
-
- #include <Types.h> // will include <ConditionalMacros.h> if available
-
- #if defined(GENERATINGCFM)
- #define TurboTCP_UH2 1
- #define TurboTCP_UH1 0
-
- #elif defined(SystemSevenOrLater) //! WILL NEED TO CHECK THESE OUT!
- #define TurboTCP_UH2 0
- #define TurboTCP_UH1 1
-
- #else
- #define TurboTCP_UH2 0
- #define TurboTCP_UH1 0
-
- #endif
-
-
- #if defined (TurboTCP_TCL)
- #undef TurboTCP_TCL
- #define TurboTCP_TCL 1
- #define TurboTCP_PP 0
-
- #elif defined (TurboTCP_PP)
- #undef TurboTCP_PP
- #define TurboTCP_TCL 0
- #define TurboTCP_PP 1
-
- #else
- #define TurboTCP_TCL 0
- #define TurboTCP_PP 0
-
- #endif
-
-
- //***********************************************************
- //
- // Build exception handling from either TCL or PowerPlant.
- //
-
- #if TurboTCP_TCL // make TCL exceptions look like PowerPlant exceptions
- #include "TCL.h"
- #define Try_ TRY
- #define Catch_(err) CATCH
- #define EndCatch_ ENDTRY;
- #define ThrowIfNil_(ptr) FailNIL(ptr)
- #define ThrowIfOSErr_(err) FailOSErr(err) //? need to check that this is correct use of FailOSErr
- #define ThrowOSErr_(err) FailOSErr(err)
- #define DontThrowSame_ NO_PROPAGATE
- #define ThrowSame_ // this is default behavior in TCL
-
- #else
- #if TurboTCP_PP // use PowerPlant exceptions “as is”
- #include <UException.h>
- #define DontThrowSame_ // this is default behavior in PP
- #define ThrowSame_ Throw_(err)
-
- #else // make native C++ exceptions look like PowerPlant exceptions
- #error Cannot compile without exception library.
-
- #endif
- #endif