1. 25 Mar, 2022 1 commit
  2. 24 Mar, 2022 1 commit
    • Rob Swindell's avatar
      byte-count to string routines type unsigned 64-bit int now · fcb6846b
      Rob Swindell authored
      We don't have a use case negative byte values in strings anywhere that I can think of.
      Created wrapper for MSFT _ui64toa_() - unsigned 64-bit integer to ASCII string.
      Add Petabyte (actually, Pebibyte) support to byte_count_to_str()  and byte_estimate_to_str().
      Removed 'B' suffix from byte_estimate_to_str() output for values < 1024. Callers may display this returned string followed by "bytes" (or similar) and thus the 'B' suffix is redundant in that case. If the caller needs a 'B' suffix, they can detect no suffix and add it.
  3. 14 Mar, 2022 1 commit
  4. 10 Mar, 2022 2 commits
    • Rob Swindell's avatar
      Fix FreeBSD/Clang C++ error · 2465ac46
      Rob Swindell authored
      /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))
    • Rob Swindell's avatar
      Fix LE/BE_INT() and BYTE_SWAP_INT() for 64-bit long targets (Linux-x64) · b1155820
      Rob Swindell authored
      long is 64-bits (8 bytes), not 32-bit on some target platforms (e.g. Linux-x64), so don't assume sizeof(long)==4.
      It appears we weren't using these "automatic" integer-size macros anywhere that I can see, so no harm, but might as well fix them.
      Also remove BYTE_SWAP_SHORT and BYTE_SWAP_LONG since they're terribly named. Retain the LE/BE_SHORT/LONG macros since we're using them currently in SBBS (e.g. js_file.c).
  5. 28 Feb, 2022 1 commit
  6. 27 Feb, 2022 1 commit
  7. 25 Feb, 2022 4 commits
  8. 21 Feb, 2022 1 commit
  9. 20 Feb, 2022 3 commits
    • Deucе's avatar
      Add DISABLE_MKSTEMP_DEFINE support · cb76b146
      Deucе authored
      This macro as written won't compile on mingw32 due to the attributes
      on _mktemp().  This could be worked around, but it's easier to just
      disable it since I don't need it, and nobody else is building with
    • Deucе's avatar
      Fix socket_ioctl_ptr_t · 24a76496
      Deucе authored
      On Win32 it can't be defined until after winsock*.h is #included.
      On everything else, it needs to be a pointer.
    • Deucе's avatar
      Add socket_ioctl_ptr_t · 1d7b9805
      Deucе authored
      For Win32, this is actually the pointer type an ioctl() third
      argument needs to be.  For other OSs, this is basically what an
      FIONBIO third argument needs to be... there's really no restruction
      at all on what arguments after the second to ioctl() need to be.
  10. 19 Feb, 2022 3 commits
    • Deucе's avatar
      Make socket_send_buffer_t separate from socket_recv_buffer_t · edc4b075
      Deucе authored
      It seems we can't add a const to a typedef in a static_cast<>()
    • Deucе's avatar
      Use MinGW32 types for pthread_t and pthread_mutex_t · 3d0d525c
      Deucе authored
      uintptr_t should be the same as a DWORD on Win32,
      and CRITICAL_SECTION can be stored in an inptr_t as well.
      This should work fine, and allow more build environments to be happy.
      This is generally caused by new C++ standards having thread support
      in the standard library, so wrappers getting pushed deeper in.
      At some pointer, this should be redone with standard threads, but
      now is not the time.
    • Deucе's avatar
      typedef a socket_buffer_t · 3f08e8f6
      Deucе authored
      This is so we can deal with send(), recv() and friends taking
      a void* on BSD stacks, and a char* on Win32.
      Not a big deal for C where a void* is universal, but C++ hates that
      type of thing.
  11. 14 Feb, 2022 2 commits
  12. 12 Feb, 2022 14 commits
  13. 11 Feb, 2022 3 commits
  14. 10 Feb, 2022 1 commit
  15. 23 Jan, 2022 2 commits