Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portability improvements, cleanup, and bug fixes #36

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Commits on Aug 9, 2024

  1. Portability improvements

    * Add or fix support for building on Solaris, illumos,
      Linux/musl, NetBSD, OpenBSD, IBM AIX, and Haiku.
    * Use pkg-config when available to determine CFLAGS and
      libraries.
    * Cleanup Makefile.
    * Cleanup excess trailing whitespace characters.
    * Indent nested preprocessor directives with GNU Cppi.
    * Tested build under Oracle Solaris, OpenIndiana illumos,
      Linux/musl, Linux/glibc, IBM AIX, Haiku, FreeBSD, OpenBSD,
      NetBSD, and Apple macOS.
    * Compilation tested and working with PCC, GCC, Clang, IBM XL C,
      IBM Open XL C, Oracle Studio C, NVIDIA HPC SDK C, Portland
      Group C, and DMD ImportC.
    
    Signed-off-by: Jeffrey H. Johnson <trnsz@pobox.com>
    johnsonjh committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    5fc3404 View commit details
    Browse the repository at this point in the history
  2. Fix some variables that are twiddled while uninitialized.

    Signed-off-by: Jeffrey H. Johnson <trnsz@pobox.com>
    johnsonjh committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    cc9b175 View commit details
    Browse the repository at this point in the history
  3. Fix off-by-one resulting in out-of-bounds write.

    supdup.c:1157:6: error: Array 'loc[128]' accessed at index 128, which is out of bounds. [arrayIndexOutOfBounds]
      loc[i] = '\0';  /* terminate */
         ^
    supdup.c:1136:3: note: After for loop, i has value 128
      for (i = 0; i < sizeof(loc); i++) {
      ^
    supdup.c:1157:6: note: Array index out of bounds
      loc[i] = '\0';  /* terminate */
         ^
    
    Signed-off-by: Jeffrey H. Johnson <trnsz@pobox.com>
    johnsonjh committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    e9974ef View commit details
    Browse the repository at this point in the history
  4. Actually suppress error when Chaosnet bridge socket is missing

    On every system I've tested, errno is set to ENOENT rather than
    ECONNREFUSED.  This change successfully suppreses the spurious
    "connect(server): No such file or directory" error message.
    
    Signed-off-by: Jeffrey H. Johnson <trnsz@pobox.com>
    johnsonjh committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    e2f5ced View commit details
    Browse the repository at this point in the history
  5. Create README.md and fix various spelling errors

    Signed-off-by: Jeffrey H. Johnson <trnsz@pobox.com>
    johnsonjh committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    addd9d3 View commit details
    Browse the repository at this point in the history
  6. Cleanup macro

    Signed-off-by: Jeffrey H. Johnson <trnsz@pobox.com>
    johnsonjh committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    209a7b0 View commit details
    Browse the repository at this point in the history
  7. Ensure file handle is valid (non-negative) before closing

    Signed-off-by: Jeffrey H. Johnson <trnsz@pobox.com>
    johnsonjh committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    ac001cf View commit details
    Browse the repository at this point in the history
  8. Fix non-ANSI function declaration (put_newline)

    supdup.c:191:19: warning: non-ANSI function declaration of function 'put_newline'
    
    Found with smatch.
    
    Signed-off-by: Jeffrey H. Johnson <trnsz@pobox.com>
    johnsonjh committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    0fe59fd View commit details
    Browse the repository at this point in the history
  9. Properly detect bad ports (negative or >65535)

    Signed-off-by: Jeffrey H. Johnson <trnsz@pobox.com>
    johnsonjh committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    553393c View commit details
    Browse the repository at this point in the history
  10. Add *.ln (Lint), compile_commands.json, and supdupd to .gitignore

    Signed-off-by: Jeffrey H. Johnson <trnsz@pobox.com>
    johnsonjh committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    f83521c View commit details
    Browse the repository at this point in the history
  11. Create .gitattributes file

    Exclude `doc/` from GitHub Linguist; resolves 48.9% of
    the project being detected (incorrectly) as CartoCSS.
    
    Signed-off-by: Jeffrey H. Johnson <trnsz@pobox.com>
    johnsonjh committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    6f7860c View commit details
    Browse the repository at this point in the history