• src/sbbs3/js_archive.cpp js_client.cpp js_com.cpp js_conio.cpp js_cryp

    From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Fri Dec 12 22:22:58 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/e49f928b662f12224817a459
    Added Files:
    src/sbbs3/js_archive.cpp js_client.cpp js_com.cpp js_conio.cpp js_cryptcert.cpp js_cryptcon.cpp js_cryptkeyset.cpp js_file.cpp js_file_area.cpp js_filebase.cpp js_global.cpp js_internal.cpp js_main.cpp js_mqtt.cpp js_msg_area.cpp js_msgbase.cpp js_queue.cpp js_request.cpp js_rtpool.cpp js_server.cpp js_socket.cpp js_sprintf.cpp js_system.cpp js_uifc.cpp js_user.cpp js_xtrn_area.cpp jsexec.cpp mailsrvr.cpp services.cpp websrvr.cpp
    Modified Files:
    src/sbbs3/js_bbs.cpp jsdebug.h jsexec.vcxproj logfile.cpp logfile.h mailsrvr.vcxproj main.cpp mime.h sbbs.h sbbs.vcxproj scfgdefs.h services.vcxproj ver.cpp websrvr.vcxproj
    Log Message:
    Convert all C source files that use JavaScript (libmozjs) to C++

    C++ is a prerequisite for all modern versions of libmozjs (SpiderMonkey).

    This commit is *not* updating libmozjs, it's just doing the C->C++ conversion using the minimum number of changes to get it to compile and run as before using MSVC Version 19.44.35217 and GCC 11.4.0. There are still some new warnings now however.

    In general, MSVC was more permissive than GCC/G++.

    This commit consists of renaming of files and resovling errors and warnings:
    - More typecasts (preferring static_cast<> where possible, mostly)
    - More proper constification (of char *'s)

    Detecting C++ compilation no can be used to infer "sbbs/Terminal Server" as JSexec and all of the other servers (except the FTP server) are now C++ as well. This required linking the (new) SFTP library into other server projects <shrug>.

    There is a concern with services.cpp and a potential (new) memory leak with
    the protected_uint32_t clients member of service_t. This is now an _Atomic
    type in C++ which doesn't have a copy or move constructor so manual allocation was required and we're probably not deleting/freeing it entirely upon shutdown or recycle. Need to follow-up on that.

    After this (more C++ heavy) build is determined to be solid, we can start tackling the next steps in upgading libmozjs (likely version 78).

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Rob Swindell (on Windows 11) on Fri Dec 12 22:31:28 2025
    Re: src/sbbs3/js_archive.cpp js_client.cpp js_com.cpp js_conio.cpp js_cryp
    By: Rob Swindell (on Windows 11) to Git commit to main/sbbs/master on Fri Dec 12 2025 10:22 pm

    make: *** No rule to make target 'js_archive.c', needed by 'gcc.linux.x64.obj.debug-mt/js_archive.o'. Stop.

    *nix sysops, you'll need to perform a 'make clean' (in your src/sbbs3 dir) before building with this commit: js_archive.c was replaced with js_archive.cpp, as was the case with several other .c files.
    --
    digital man (rob)

    Synchronet/BBS Terminology Definition #34:
    FREQ = File Request
    Norco, CA WX: 59.1øF, 80.0% humidity, 0 mph WNW wind, 0.00 inches rain/24hrs ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net