This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/cppexamp/excarea/excarea.cpp

24 lines
492 B
C++
Raw Normal View History

#include <stddef.h>
#include <limits.h>
#if 0 // CANCEL DEFAULTS
#if INT_MAX == SHRT_MAX
#define EXC_SIZE 1024 // size of exception area
#else
#define EXC_SIZE 4096 // size of exception area
#endif
#else // MODIFICATIONS START
#define EXC_SIZE 1024*10 // use 10k for example
#endif // MODIFICATIONS END
struct exc_area
{
size_t area_size;
char work_area[ EXC_SIZE - sizeof( size_t ) ];
};
extern "C"
struct exc_area __EXC_AREA = { EXC_SIZE };