• src/xpdev/filewrap.h

    From rswindell@1:103/705 to CVS commit on Sat Aug 31 15:16:21 2019
    src/xpdev filewrap.h 1.38 1.39
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv27652

    Modified Files:
    filewrap.h
    Log Message:
    New useful function-like macro: CLOSE_OPEN_FILE(fd), conditionally closes
    the file and sets the descriptor to -1 (if not already < 0).


    --- SBBSecho 3.09-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Thu May 20 03:02:41 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/27c79cad3318dff6889f8318
    Modified Files:
    src/xpdev/filewrap.h
    Log Message:
    Create a Win32 wrapper for mkstemp() as MSVC doesn't have itSBBSecho uses mkstemp() now (instead of tempnam()) - so we need this POSIX function wrapper for Windows builds to succeed.
    --- SBBSecho 3.14-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sat Feb 19 23:38:06 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/cb76b1463cfec65f1dc90e6f
    Modified Files:
    src/xpdev/filewrap.h
    Log Message:
    Add DISABLE_MKSTEMP_DEFINE supportThis macro as written won't compile on mingw32 due to the attributeson _mktemp(). This could be worked around, but it's easier to justdisable it since I don't need it, and nobody else is building withmingw32.
    --- SBBSecho 3.14-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Fri Feb 25 13:05:26 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/e4adeee8dff35620f95fe55e
    Modified Files:
    src/xpdev/filewrap.h
    Log Message:
    Add a mingw32 compatible mode_t
    --- SBBSecho 3.14-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Fri Feb 25 14:30:46 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/cff6d9918688352e8d41b19b
    Modified Files:
    src/xpdev/filewrap.h
    Log Message:
    Fix sbbs-windows buildBCC error filewrap.h 77: Multiple declaration for 'mode_t'Introduced in commit e4adeee8
    --- SBBSecho 3.14-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Thu Mar 10 00:15:59 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/2465ac46256220aefa49cc95
    Modified Files:
    src/xpdev/filewrap.h
    Log Message:
    Fix FreeBSD/Clang C++ error/usr/include/c++/v1/iterator:1168:87: error: expected unqualified-id ...&& traits_type::eq_int_type(__sbuf_->sputc(__c), traits_type::eof()))
    ^/src/sbbs3/../xpdev/filewrap.h:124:21: note: expanded from macro 'eof' #define eof(fd) (tell(fd)==filelength(fd)) --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (in GitKraken)@1:103/705 to Git commit to main/sbbs/master on Sun Feb 19 13:42:55 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/edf9bc341b88832d376973d7
    Modified Files:
    src/xpdev/filewrap.h
    Log Message:
    _chsize_s() is only available in MSVC, apparentlyFixes Borland and mingw-GCC builds.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on ChromeOS)@1:103/705 to Git commit to main/sbbs/master on Sun Jun 11 14:33:40 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/c2291604b9b9a678e79167a4
    Modified Files:
    src/xpdev/filewrap.h
    Log Message:
    Fix runtime errors when built with UBSannopen.c:37:15: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'nopen.c:39:18: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'userdat.c:251:111: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'There are lot of 1<<31 macro definitions in this repo,
    so I'm expecting alot more of this type of fix to be required to make UBSan happy.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Windows 11)@1:103/705 to Git commit to main/sbbs/master on Thu Nov 23 17:49:22 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/07a0cc3e2cbf6b4537a242ac
    Modified Files:
    src/xpdev/filewrap.h
    Log Message:
    Add FCLOSE_OPEN_FILE to close a FILE*, if it's open (non-NULL), and NULLify it

    Change CLOSE_OPEN_FILE to a do/while(0) to eliminate extraneous semicolon
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Sun Nov 10 21:56:44 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/77c31de6b8e073473950fe37
    Modified Files:
    src/xpdev/filewrap.h
    Log Message:
    Fix write-locks (deny-all/exclusive flocks) in sopen()

    SH_DENYRW (deny-all) locks were broken 18 years ago with commit b866f1990a.

    This fixes that by treating SH_COMPAT the same as SH_DENYNO (only), rather
    than the same as SH_DENYNO or SH_DENYRW (and performing no locking).

    This is likely the/a root-cause of some SBBS file corruption on *nix systems. --- SBBSecho 3.21-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Tue Nov 12 18:17:07 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/ac9c138a8e5158192868bf56
    Modified Files:
    src/xpdev/filewrap.h
    Log Message:
    Add FILE_RETRY_ERRNO() definition, to be used in sopen()/lock() loops

    Note: EBUSY was added to the list of errno values that should cause a retry
    as observed on Vertrauen, running sbbs-linux on a Samba mount, opening
    locked files can return failure (-1) with errno = EBUSY, e.g.
    evnt BBS Events !ERROR 16 (Device or resource busy) in logon.cpp line 616 (logonstats) reading "system stats" access=0

    This was apparently resolved by adding EBUSY (16) the values that trigger an sopen()
    retry (i.e. from [f]nopen()).
    --- SBBSecho 3.21-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)