-
- Downloads
Use default calling convention (__cdecl) for DLL funcs in Borland builds.
Fix age-old bug with Borland/C++Builder built executables (Windows): to achieve compatibility with the default __cdecl symbol naming rules of Visual C++, we were using __stdcall convention for DLL functions when building code with Borland/C++Builder tools and using the default (__cdecl) convention when building with Microsoft (Visual C++) tools. Although this allowed symbols to be located when linking, the calling convention mismatch caused a stack cleanup issue that very rarely manifested itself in a bug (e.g. exception of some kind in sbbsctrl.exe, usually). Mismatching the calling conventions was unintentional (I thought the default for MSVC DLL functions was __stdcall) - but since the calls to MSVC-Built DLL functions worked 99% of the time, I didn't realize there was an underlying issue. So I now work-around the DLL symbol naming mismatch using a command-line option (-a) passed to implib in src/sbbs3/ctrl/makelibs.bat I had previously worked-around exceptions when calling MSVC DLL functions in sbbsctrl.exe by calling the problematic DLL functions from a timer tick handler rather than a user control (e.g. button) event handler. Those work-arounds can now be removed. The erroneous "DLLCALL" definition design pattern was replicated (copy/pasted) to many other projects' header files in cvs.synchro.net. In the future, we may want to just remove all instances of *CALL since they now serve no purpose and appear as useless "Kruft" (but do allow us to more-easily globally change DLL function calling conventions if/when necessary in the future).
Showing
- src/comio/comio.h 1 addition, 1 deletionsrc/comio/comio.h
- src/conio/ciolib.h 1 addition, 1 deletionsrc/conio/ciolib.h
- src/encode/base64.h 1 addition, 1 deletionsrc/encode/base64.h
- src/encode/lzh.h 1 addition, 1 deletionsrc/encode/lzh.h
- src/hash/crc32.h 1 addition, 1 deletionsrc/hash/crc32.h
- src/hash/md5.h 1 addition, 1 deletionsrc/hash/md5.h
- src/sbbs3/ctrl/makelibs.bat 5 additions, 5 deletionssrc/sbbs3/ctrl/makelibs.bat
- src/sbbs3/dat_rec.h 1 addition, 1 deletionsrc/sbbs3/dat_rec.h
- src/sbbs3/ftpsrvr.h 1 addition, 1 deletionsrc/sbbs3/ftpsrvr.h
- src/sbbs3/js_rtpool.c 0 additions, 13 deletionssrc/sbbs3/js_rtpool.c
- src/sbbs3/js_rtpool.h 1 addition, 1 deletionsrc/sbbs3/js_rtpool.h
- src/sbbs3/mailsrvr.h 1 addition, 1 deletionsrc/sbbs3/mailsrvr.h
- src/sbbs3/sbbs.h 1 addition, 1 deletionsrc/sbbs3/sbbs.h
- src/sbbs3/services.h 1 addition, 1 deletionsrc/sbbs3/services.h
- src/sbbs3/ssl.h 1 addition, 1 deletionsrc/sbbs3/ssl.h
- src/sbbs3/startup.h 1 addition, 1 deletionsrc/sbbs3/startup.h
- src/sbbs3/telnet.h 1 addition, 1 deletionsrc/sbbs3/telnet.h
- src/sbbs3/userdat.h 1 addition, 1 deletionsrc/sbbs3/userdat.h
- src/sbbs3/websrvr.h 1 addition, 1 deletionsrc/sbbs3/websrvr.h
- src/smblib/smblib.h 1 addition, 1 deletionsrc/smblib/smblib.h
Loading
Please register or sign in to comment