/* ** rwstcfns.c nmake Technical Support 02/17/98 ** ** There is a possible conflict when using nmake, Sun Solaris C++, and ** RogueWave Tools.h++ v7 headers. ** ** nmake cpp uses the pp:reguard option with the Sun C++ compiler. ** pp:reguard tells cpp to re-emit the #defines in the preprocessed output. ** Sun C++ needs pp:reguard for template instantiation. Under certain ** conditions the Solaris C++ compiler has to search for an outboard ** template definitions file. When that file is brought in, under certain ** conditions, the missing include guard (that is stripped out by the ** nmake cpp) can lead to multiple definition problems. ** ** The re-emited #defines may cause a problem when using RogueWave headers. ** This new problem can be alleviated by using the RogueWave ** -DRW_NO_CPP_RECURSION define, however to use this librwtool is supposed ** to be recomiled appropriately. This isn't an option if you do not have ** the source for librwtool. ** ** rwstcfns.c allows one to use -DRW_NO_CPP_RECURSION without recompiling ** librwtool. This scheme uses C++ function calls to reverse the mapping ** created by -DRW_NO_CPP_RECURSION (which would be done automatically by ** recompiling librwtool with -DRW_NO_CPP_RECURSION). All one needs to ** do is to to use -DRW_NO_CPP_RECURSION in the RougeWave related compiles ** and compile and link with rwstcfns.c. ** ** Example: ** ** CCFLAGS += -DRW_NO_CPP_RECURSION ** rwtest :: rwtest.c rwstcfns.c -lrwtool ** ** This solution has been designed and tested for RogueWave Tools.h++ v7. ** It may not be applicable to other versions of Tools.h++. */ #ifdef RW_NO_CPP_RECURSION #include "rw/toolerr.h" #undef RWTOOL_ALLOCOUT RWMsgId rwexport RWTOOL_ALLOCOUT(); RWMsgId rwexport rwtool_ALLOCOUT() { return RWTOOL_ALLOCOUT(); } #undef RWTOOL_BADRE RWMsgId rwexport RWTOOL_BADRE(); RWMsgId rwexport rwtool_BADRE() { return RWTOOL_BADRE(); } #undef RWTOOL_CRABS RWMsgId rwexport RWTOOL_CRABS(); RWMsgId rwexport rwtool_CRABS() { return RWTOOL_CRABS(); } #undef RWTOOL_FLIST RWMsgId rwexport RWTOOL_FLIST(); RWMsgId rwexport rwtool_FLIST() { return RWTOOL_FLIST(); } #undef RWTOOL_ID RWMsgId rwexport RWTOOL_ID(); RWMsgId rwexport rwtool_ID() { return RWTOOL_ID(); } #undef RWTOOL_INDEX RWMsgId rwexport RWTOOL_INDEX(); RWMsgId rwexport rwtool_INDEX() { return RWTOOL_INDEX(); } #undef RWTOOL_LOCK RWMsgId rwexport RWTOOL_LOCK(); RWMsgId rwexport rwtool_LOCK() { return RWTOOL_LOCK(); } #undef RWTOOL_LONGINDEX RWMsgId rwexport RWTOOL_LONGINDEX(); RWMsgId rwexport rwtool_LONGINDEX() { return RWTOOL_LONGINDEX(); } #undef RWTOOL_MAGIC RWMsgId rwexport RWTOOL_MAGIC(); RWMsgId rwexport rwtool_MAGIC() { return RWTOOL_MAGIC(); } #undef RWTOOL_NEVECL RWMsgId rwexport RWTOOL_NEVECL(); RWMsgId rwexport rwtool_NEVECL() { return RWTOOL_NEVECL(); } #undef RWTOOL_NOCREATE RWMsgId rwexport RWTOOL_NOCREATE(); RWMsgId rwexport rwtool_NOCREATE() { return RWTOOL_NOCREATE(); } #undef RWTOOL_NOTALLOW RWMsgId rwexport RWTOOL_NOTALLOW(); RWMsgId rwexport rwtool_NOTALLOW() { return RWTOOL_NOTALLOW(); } #undef RWTOOL_READERR RWMsgId rwexport RWTOOL_READERR(); RWMsgId rwexport rwtool_READERR() { return RWTOOL_READERR(); } #undef RWTOOL_REF RWMsgId rwexport RWTOOL_REF(); RWMsgId rwexport rwtool_REF() { return RWTOOL_REF(); } #undef RWTOOL_SEEKERR RWMsgId rwexport RWTOOL_SEEKERR(); RWMsgId rwexport rwtool_SEEKERR() { return RWTOOL_SEEKERR(); } #undef RWTOOL_STREAM RWMsgId rwexport RWTOOL_STREAM(); RWMsgId rwexport rwtool_STREAM() { return RWTOOL_STREAM(); } #undef RWTOOL_SUBSTRING RWMsgId rwexport RWTOOL_SUBSTRING(); RWMsgId rwexport rwtool_SUBSTRING() { return RWTOOL_SUBSTRING(); } #undef RWTOOL_UNLOCK RWMsgId rwexport RWTOOL_UNLOCK(); RWMsgId rwexport rwtool_UNLOCK() { return RWTOOL_UNLOCK(); } #undef RWTOOL_WRITEERR RWMsgId rwexport RWTOOL_WRITEERR(); RWMsgId rwexport rwtool_WRITEERR() { return RWTOOL_WRITEERR(); } #undef RWTOOL_INDEXERR RWMsgId rwexport RWTOOL_INDEXERR(); RWMsgId rwexport rwtool_INDEXERR() { return RWTOOL_INDEXERR(); } #undef RWTOOL_NPOSINDEX RWMsgId rwexport RWTOOL_NPOSINDEX(); RWMsgId rwexport rwtool_NPOSINDEX() { return RWTOOL_NPOSINDEX(); } #undef RWTOOL_NOPERSIST RWMsgId rwexport RWTOOL_NOPERSIST(); RWMsgId rwexport rwtool_NOPERSIST() { return RWTOOL_NOPERSIST(); } #undef RWTOOL_CRABSS RWMsgId rwexport RWTOOL_CRABSS(); RWMsgId rwexport rwtool_CRABSS() { return RWTOOL_CRABSS(); } #include "rw/coreerr.h" #undef RWCORE_EOF RWMsgId rwexport RWCORE_EOF(); RWMsgId rwexport rwcore_EOF() { return RWCORE_EOF(); } #undef RWCORE_GENERIC RWMsgId rwexport RWCORE_GENERIC(); RWMsgId rwexport rwcore_GENERIC() { return RWCORE_GENERIC(); } #undef RWCORE_INVADDR RWMsgId rwexport RWCORE_INVADDR(); RWMsgId rwexport rwcore_INVADDR() { return RWCORE_INVADDR(); } #undef RWCORE_LOCK RWMsgId rwexport RWCORE_LOCK(); RWMsgId rwexport rwcore_LOCK() { return RWCORE_LOCK(); } #undef RWCORE_NOINIT RWMsgId rwexport RWCORE_NOINIT(); RWMsgId rwexport rwcore_NOINIT() { return RWCORE_NOINIT(); } #undef RWCORE_NOMEM RWMsgId rwexport RWCORE_NOMEM(); RWMsgId rwexport rwcore_NOMEM() { return RWCORE_NOMEM(); } #undef RWCORE_OPERR RWMsgId rwexport RWCORE_OPERR(); RWMsgId rwexport rwcore_OPERR() { return RWCORE_OPERR(); } #undef RWCORE_OUTALLOC RWMsgId rwexport RWCORE_OUTALLOC(); RWMsgId rwexport rwcore_OUTALLOC() { return RWCORE_OUTALLOC(); } #undef RWCORE_OVFLOW RWMsgId rwexport RWCORE_OVFLOW(); RWMsgId rwexport rwcore_OVFLOW() { return RWCORE_OVFLOW(); } #undef RWCORE_STREAM RWMsgId rwexport RWCORE_STREAM(); RWMsgId rwexport rwcore_STREAM() { return RWCORE_STREAM(); } #undef RWCORE_SYNSTREAM RWMsgId rwexport RWCORE_SYNSTREAM(); RWMsgId rwexport rwcore_SYNSTREAM() { return RWCORE_SYNSTREAM(); } #endif