• src/xpdev/gen_defs.h

    From deuce@VERT to CVS commit on Thursday, February 06, 2014 00:17:02
    src/xpdev gen_defs.h 1.61 1.62
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv8914

    Modified Files:
    gen_defs.h
    Log Message:
    Make the incorrect assumption that if we don't have at least stdint.h,
    an unsigned long can hold any pointer (Should fix builds with old Borland compilers - ie: sbbsctrl)




    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From deuce@VERT to CVS commit on Thursday, February 06, 2014 00:19:02
    src/xpdev gen_defs.h 1.62 1.63
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv8971

    Modified Files:
    gen_defs.h
    Log Message:
    Actually, since intptr_t is only guaranteed to be big enough, use intmax_t
    and uintmax_t... them suckers will be big enough you betcha.




    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From deuce@VERT to CVS commit on Thursday, February 06, 2014 12:37:32
    src/xpdev gen_defs.h 1.63 1.64
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv27085

    Modified Files:
    gen_defs.h
    Log Message:
    Commit the actual declaration of intptr_t



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Tuesday, March 18, 2014 12:36:52
    src/xpdev gen_defs.h 1.64 1.65
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv30727

    Modified Files:
    gen_defs.h
    Log Message:
    Don't typedef uintptr_t if _UINTPTR_T_DEFINED is defined (resolves MSVC2010 build error) - conflict with definition form vadefs.h.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From deuce@VERT to CVS commit on Thursday, April 03, 2014 17:17:52
    src/xpdev gen_defs.h 1.65 1.66
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv7142

    Modified Files:
    gen_defs.h
    Log Message:
    Remove the GLIBC test for definitions of uint and friends.
    Whatever made us do that seems to not be happening with --std=c99.




    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From deuce@VERT to CVS commit on Friday, August 21, 2015 21:34:54
    src/xpdev gen_defs.h 1.66 1.67
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv24405

    Modified Files:
    gen_defs.h
    Log Message:
    Add a XP_PRIsize_t macro that defines the size for printing a size_t.



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From deuce@VERT to CVS commit on Friday, August 21, 2015 21:41:15
    src/xpdev gen_defs.h 1.67 1.68
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv24691

    Modified Files:
    gen_defs.h
    Log Message:
    Move XP_PRIsize_t out of #ifdef block.




    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Friday, December 04, 2015 01:23:17
    src/xpdev gen_defs.h 1.68 1.69
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv2660

    Modified Files:
    gen_defs.h
    Log Message:
    Add #include <ctype.h> to be C99 compliant.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From rswindell@VERT to CVS commit on Thursday, December 07, 2017 17:58:16
    src/xpdev gen_defs.h 1.72 1.73
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv31466

    Modified Files:
    gen_defs.h
    Log Message:
    Added SKIP_CRLF and FIND_CRLF macros which skip (or find) occurences of either CR or LF, just a convenience wrapper for SKIP/FIND_CHARSET(p, "\r\n")


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Monday, February 19, 2018 21:25:47
    src/xpdev gen_defs.h 1.74 1.75
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv29387

    Modified Files:
    gen_defs.h
    Log Message:
    Fix off-by-one in the SAFECAT bounds-checking.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Thursday, March 08, 2018 18:23:38
    src/xpdev gen_defs.h 1.75 1.76
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/home/rswindell/sbbs/src/xpdev

    Modified Files:
    gen_defs.h
    Log Message:
    Use the "long" printf specifier for file offset (off_t) when __LP64__
    is defined - resolves gcc warning in ftpsrvr.c.



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tuesday, August 28, 2018 14:20:18
    src/xpdev gen_defs.h 1.76 1.77
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv13610

    Modified Files:
    gen_defs.h
    Log Message:
    Wrap use of FREE_AND_NULL argument in parens, just because it's best practice and no actual observed problem.



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Wednesday, January 30, 2019 19:13:14
    src/xpdev gen_defs.h 1.77 1.78
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv8780

    Modified Files:
    gen_defs.h
    Log Message:
    Handy macros to calculate the number of digits in a given integer:
    HEX_DIGITS() and DEC_DIGITS()



    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Tuesday, July 09, 2019 13:05:32
    src/xpdev gen_defs.h 1.78 1.79
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv4868

    Modified Files:
    gen_defs.h
    Log Message:
    Fix FREE_AND_NULL() so it can be used wherever a function is... especially:

    if (fg)
    FREE_AND_NULL(fd);
    else
    FREE_AND_NULL(bg);




    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From deuce@VERT to CVS commit on Tuesday, July 16, 2019 13:43:08
    src/xpdev gen_defs.h 1.79 1.80
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv30629

    Modified Files:
    gen_defs.h
    Log Message:
    Function-like-ify SAFECAT()




    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Friday, April 17, 2020 13:30:06
    src/xpdev gen_defs.h 1.81 1.82
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv18212

    Modified Files:
    gen_defs.h
    Log Message:
    This file is still used when building a 16-bit MS-DOS program (DOSXTRN.EXE)
    so put the 64-bit integer stuff in an #ifndef __MSDOS__ block to enable the build to succeed.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Monday, May 25, 2020 15:26:36
    src/xpdev gen_defs.h 1.82 1.83
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv24748

    Modified Files:
    gen_defs.h
    Log Message:
    Microsoft isn't typedef'ing ssize_t for us.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Tuesday, May 26, 2020 10:07:21
    src/xpdev gen_defs.h 1.83 1.84
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv4468

    Modified Files:
    gen_defs.h
    Log Message:
    Borland builds also need ssize_t typedef'd. Watcom can come along for the ride.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From rswindell@VERT to CVS commit on Saturday, August 15, 2020 12:57:51
    src/xpdev gen_defs.h 1.84 1.85
    Update of /cvsroot/sbbs/src/xpdev
    In directory cvs:/tmp/cvs-serv32380

    Modified Files:
    gen_defs.h
    Log Message:
    Resolve GCC compile warnings on 32-bit Linux by insuring that PRId/uOFF
    expands to "ld"/"lu", respectively since off_t is a long (not an int): examples:
    ftpsrvr.c:1374:77: warning: format '%d' expects argument of type 'int', but argument 6 has type 'off_t {aka long int}' [-Wformat=]
    lprintf(LOG_WARNING, "%04d <%s> !DATA cannot send file (%s) with size of %"PRIdOFF" bytes"
    websrvr.c:6063:45: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'off_t {aka long int}' [-Wformat=]
    lprintf(LOG_INFO,"%04d Sending file: %s (%"PRIuOFF" bytes)"




    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuce@VERT to Git commit to sbbs/master on Saturday, November 21, 2020 02:12:43
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/6a3fd5591683615872c22eb4
    Modified Files:
    src/xpdev/gen_defs.h
    Log Message:
    define U?INT[0-9]+_(MIN|MAX) for builds without stdint.h (ie: Borland)

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuce@VERT to Git commit to sbbs/master on Saturday, November 21, 2020 02:13:29
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/ce5cf032d42db61e4aff72ef
    Modified Files:
    src/xpdev/gen_defs.h
    Log Message:
    Fix UINT32_MAX definition in previous commit

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Saturday, May 22, 2021 15:52:38
    https://gitlab.synchro.net/main/sbbs/-/commit/c5bdb26443df75e6d03eebdb
    Modified Files:
    src/xpdev/gen_defs.h
    Log Message:
    Character 255 is a non-breaking space in CP437

    Now IS_WHITESPACE() will return true for that char and this allows things like truncsp() to truncate trailing white-space (e.g. from a FILE_ID.DIZ), even if it contains a terminating 0xFF character for some unknown reason.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Monday, November 22, 2021 20:53:40
    https://gitlab.synchro.net/main/sbbs/-/commit/b1fcb452d08cbf462dcf750b
    Modified Files:
    src/xpdev/gen_defs.h
    Log Message:
    MSVC 1.5c defines _MSDOS, not __MSDOS__

    This change needed to build dosxtrn.exe (again).

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Friday, February 25, 2022 13:05:26
    https://gitlab.synchro.net/main/sbbs/-/commit/85d3f30f52723d9d0cad818f
    Modified Files:
    src/xpdev/gen_defs.h
    Log Message:
    Even when MSVC has inttypes.h, it still doesn't have ssize_t

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Tuesday, January 24, 2023 12:44:00
    https://gitlab.synchro.net/main/sbbs/-/commit/c0e857c930feb9833d40617f
    Modified Files:
    src/xpdev/gen_defs.h
    Log Message:
    Make SAFECOPY() even safer by not passing NULL destination to strncpy()

    This should resolve (new) CID 434884 and 434885.

    Also, remove the SAFECOPY_USES_SPRINTF check/block - nobody enables this.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on ChromeOS)@VERT to Git commit to main/sbbs/master on Thursday, January 26, 2023 23:30:10
    https://gitlab.synchro.net/main/sbbs/-/commit/1e3a6b84e7bc1485b2a96828
    Modified Files:
    src/xpdev/gen_defs.h
    Log Message:
    Revert "Make SAFECOPY() even safer by not passing NULL destination to strncpy()"

    This reverts commit c0e857c930feb9833d40617f00ff5d11be9f7772.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on ChromeOS)@VERT to Git commit to main/sbbs/master on Thursday, January 26, 2023 23:45:00
    https://gitlab.synchro.net/main/sbbs/-/commit/ea99ca801e63268479f91e94
    Modified Files:
    src/xpdev/gen_defs.h
    Log Message:
    Add XSAFECOPY (extra safe copy) that won't pass NULL to strncpy()

    The previous (reverted) change to SAFECOPY would double-resolve the (src) argument and caused weird side effects.

    Again, removes SAFECOPY_USES_SNPRINTF since it was unused.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Friday, March 22, 2024 11:38:39
    https://gitlab.synchro.net/main/sbbs/-/commit/ffd5385d1510e7da8a547970
    Modified Files:
    src/xpdev/gen_defs.h
    Log Message:
    Use strlcpy() for X?SAFECOPY() macros.

    Also, for DEBUG builds, add a static assertion that
    sizeof(dst) != sizeof(void*) to catch the most common breakage.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Friday, March 22, 2024 11:42:26
    https://gitlab.synchro.net/main/sbbs/-/commit/d13fa3bd3eb4953a587c6d5d
    Modified Files:
    src/xpdev/gen_defs.h
    Log Message:
    Use static_assert() macro instead of _Static_assert keyword

    More compatible with C++ that way.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Friday, March 22, 2024 11:48:03
    https://gitlab.synchro.net/main/sbbs/-/commit/a8c0ac5da5374f83333b570e
    Modified Files:
    src/xpdev/gen_defs.h
    Log Message:
    Fix stale comment about XSAFECOPY (now uses strlcpy, not strncpy)

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Friday, March 22, 2024 11:48:38
    https://gitlab.synchro.net/main/sbbs/-/commit/2b3a174068b33c4c947b2b21
    Modified Files:
    src/xpdev/gen_defs.h
    Log Message:
    static_assert() only available with C11 and higher.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Friday, March 22, 2024 11:50:56
    https://gitlab.synchro.net/main/sbbs/-/commit/406ea9488765141c69185e81
    Modified Files:
    src/xpdev/gen_defs.h
    Log Message:
    Borland expects ()

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Friday, March 22, 2024 11:53:02
    https://gitlab.synchro.net/main/sbbs/-/commit/a987cf4b49ff92f4925f7106
    Modified Files:
    src/xpdev/gen_defs.h
    Log Message:
    Stop interlacing preprocessor stuff.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Friday, March 22, 2024 23:11:54
    https://gitlab.synchro.net/main/sbbs/-/commit/c64357b949c68ff54489f1e1
    Modified Files:
    src/xpdev/gen_defs.h
    Log Message:
    include genwrap.h at the end of gen_defs.h for strlcpy()/strlcat().

    This whole library is starting to get crufty and could use a room
    at a hackathon.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Sunday, March 24, 2024 17:58:57
    https://gitlab.synchro.net/main/sbbs/-/commit/be523ad92bf537adb4c195f3
    Modified Files:
    src/xpdev/gen_defs.h
    Log Message:
    Remove obsolete note comment about genwrap.h

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