Relevant options, and how they are defined, are listed in this section
Defines | |
#define | CPPCSP_FIBERS |
This symbol is defined when C++CSP2 is using fibers as its implementation mechanism for sub-threads. | |
#define | CPPCSP_GCC |
This symbol is defined when C++CSP2 is being compiled using the GNU C++ Compiler. | |
#define | CPPCSP_LONGJMP |
This symbol is defined when C++CSP2 is using setjmp/longjmp as its implementation mechanism for sub-threads. | |
#define | CPPCSP_MSVC |
This symbol is defined when C++CSP2 is being compiled using Microsoft Visual C++. | |
#define | CPPCSP_POSIX |
This symbol is defined when C++CSP2 is being compiled on a POSIX-compliant operating system (such as Linux, BSD, etc). | |
#define | CPPCSP_WINDOWS |
This symbol is defined when C++CSP2 is being compiled on a Microsoft Windows system (2000 or XP). | |
#define | CPPCSP_X86 |
This symbol is defined when C++CSP2 is being compiled on an x86 (or x86-64) compatible machine. |
#define CPPCSP_WINDOWS |
This symbol is defined when C++CSP2 is being compiled on a Microsoft Windows system (2000 or XP).
It is based on the define WIN32. If WIN32 is defined, the system is assumed to be Windows, and CPPCSP_WINDOWS is defined. Otherwise, the system is assumed to be POSIX and CPPCSP_POSIX is defined
#define CPPCSP_FIBERS |
This symbol is defined when C++CSP2 is using fibers as its implementation mechanism for sub-threads.
It is based on CPPCSP_WINDOWS. When CPPCSP_WINDOWS is defined, CPPCSP_FIBERS will also be defined, because fibers are the only sub-thread implementation on Windows. If CPPCSP_WINDOWS is not defined, neither is CPPCSP_FIBERS
#define CPPCSP_X86 |
This symbol is defined when C++CSP2 is being compiled on an x86 (or x86-64) compatible machine.
If CPPCSP_WINDOWS is defined, CPPCSP_X86 is always defined (given that C++CSP2 requires at least Windows 2000). Under POSIX systems, this define is written to the cppcsp_config.h file by the autoconf/automake tools.
In fact, at the time of writing, CPPCSP_X86 should always be defined in C++CSP2 because they are the only supported processor family. However, this may not remain true in future.
#define CPPCSP_POSIX |
This symbol is defined when C++CSP2 is being compiled on a POSIX-compliant operating system (such as Linux, BSD, etc).
Not all POSIX Operating Systems are supported! The current list of known working Operating Systems should be found on the main page of the documentation.
This symbol is defined whenever CPPCSP_WINDOWS is not. If you find that this symbol is defined on a Windows-based system, you probably forgot to define WIN32.
#define CPPCSP_LONGJMP |
This symbol is defined when C++CSP2 is using setjmp/longjmp as its implementation mechanism for sub-threads.
It is based on CPPCSP_POSIX, as it is the only sub-thread implementation on POSIX. If CPPCSP_POSIX is defined, CPPCSP_LONGJMP will be defined.
#define CPPCSP_MSVC |
This symbol is defined when C++CSP2 is being compiled using Microsoft Visual C++.
This symbol is based on _MSC_VER, which Microsoft state will be automatically defined with their compiler (http://support.microsoft.com/kb/65472). Other compilers may also define this symbol (check your compiler documentation). This is not a problem as long as the compiler supports the Microsoft C++ intrinsics for thread-local storage, aligned storage and assembly blocks.
You must compile your program that uses C++CSP2 with the same compiler that you use to compile C++CSP2, due to the way it uses compiler-specific features. With Microsoft Visual C++/GCC this will always be the case anyway as their library formats are not compatible. However, if you compile C++CSP2 with, say, Visual C++ and then compile your program using, say, the Intel compiler then you may run into problems. In this case, re-compile the C++CSP2 library with the appropriate compiler. If you need help porting C++CSP2 to a new compiler I may be able to offer some assistance, so contact me.
#define CPPCSP_GCC |
This symbol is defined when C++CSP2 is being compiled using the GNU C++ Compiler.
This symbol is based on __GNUC__, which GNU state will be automatically defined with their compiler (http://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html).
You must compile your program that uses C++CSP2 with the same compiler that you use to compile C++CSP2, due to the way it uses compiler-specific features. With Microsoft Visual C++/GCC this will always be the case anyway as their library formats are not compatible. However, if you compile C++CSP2 with, say, GCC and then compile your program using, say, the Intel compiler then you may run into problems. In this case, re-compile the C++CSP2 library with the appropriate compiler. If you need help porting C++CSP2 to a new compiler I may be able to offer some assistance, so contact me.