• src/sbbs3/ctrl/makelibs.bat

    From rswindell@VERT to CVS commit on Fri Mar 22 18:28:45 2019
    src/sbbs3/ctrl makelibs.bat 1.11 1.12
    Update of /cvsroot/sbbs/src/sbbs3/ctrl
    In directory cvs:/tmp/cvs-serv32122/sbbs3/ctrl

    Modified Files:
    makelibs.bat
    Log Message:
    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).



    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thu May 9 16:23:53 2019
    src/sbbs3/ctrl makelibs.bat 1.12 1.13
    Update of /cvsroot/sbbs/src/sbbs3/ctrl
    In directory cvs:/tmp/cvs-serv21447

    Modified Files:
    makelibs.bat
    Log Message:
    Work-around for issue with the old implib version:
    Borland Implib Version 3.0.22 Copyright (c) 1991, 2000 Inprise Corporation
    and MSVC-generated DLLs with exported functions using _cdecl calling convention ... sometimes or with some verisons of some DLLs, implib won't add the underscore prefix to the exported function name which caused the build error: Error: Unresolved external '_total_users' ...

    Using coff2omf instead to convert the MSVC-generated import library (sbbs.lib) to the Borland/OMF flavor works, however. I'd seen this issue before but it went away when the number of symbols in the source DLL changes. Newer versions of implib appear to *not* have this issue so when we upgrade to a newer C++Builder, this work-around will no longer be necessary.


    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sat Dec 31 02:13:21 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/695da6a284c0e45e5163636b
    Modified Files:
    src/sbbs3/ctrl/makelibs.bat
    Log Message:
    Try the 'exit /b' trick to stop makelibs.bat from terminating build.bat

    when run from Gitlab-Runner (CI) using shell="cmd"

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sat Dec 31 02:51:25 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/15494c2d8813658420379067
    Modified Files:
    src/sbbs3/ctrl/makelibs.bat
    Log Message:
    Is coff2omf the issue?

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Sat Dec 31 03:50:10 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/3f3fbb7d3bb94bde07e996e8
    Modified Files:
    src/sbbs3/ctrl/makelibs.bat
    Log Message:
    Revert "Is coff2omf the issue?"

    This reverts commit 15494c2d8813658420379067b070b7f7bf73c9d4.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net