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

Merged

Conversation

johnsonjh
Copy link
Contributor

@johnsonjh johnsonjh commented Aug 7, 2024

  • Portability improvements, cleanup, and bug fixes:
    • Add or fix support for building on Solaris, illumos, Linux/musl, NetBSD, OpenBSD, IBM AIX, IBM OS/400 (PASE), Cygwin, and Haiku, which weren't previously cleanly building.
    • Use pkg-config when available to determine CFLAGS and libraries.
    • Initialize some variables in supdupd.
    • Fix off-by-one error in supdup.
    • Suppress spurious error when Chaosnet bridge socket is missing.
    • Create README.md.
    • Cleanup Makefile.
    • Properly detect bad ports (negative or >65535).
    • Fix non-ANSI function declarations.
    • Add *.ln (Lint) files, supdupd, and compile_commands.json to .gitignore.
    • Create .gitattributes.
    • Ensure file handle is valid (non-negative) before closing.
    • Correct various spelling errors.

  • Tested build under Oracle Solaris, OpenIndiana illumos, Linux/musl, Linux/glibc, IBM AIX, IBM OS/400 (PASE), Haiku, FreeBSD, OpenBSD, NetBSD, DragonFly BSD, Cygwin, and Apple macOS.

  • Compilation tested and working with PCC, GCC, Clang, Xcode, IBM XL C, IBM Open XL C, Oracle Studio C, NVIDIA HPC SDK C, Portland Group C, and DMD ImportC.

  • Passes Cppcheck and Clang Analyzer.

Signed-off-by: Jeffrey H. Johnson <trnsz@pobox.com>

GNUmakefile Outdated Show resolved Hide resolved
GNUmakefile Outdated Show resolved Hide resolved
GNUmakefile Outdated Show resolved Hide resolved
chaos.c Outdated Show resolved Hide resolved
supdup.c Outdated Show resolved Hide resolved
chaos.c Outdated Show resolved Hide resolved
chaos.c Outdated Show resolved Hide resolved
@johnsonjh

This comment was marked as outdated.

@johnsonjh

This comment was marked as outdated.

@johnsonjh johnsonjh force-pushed the 20240807/johnsonjh/portability branch 2 times, most recently from ff2c6ee to 5fc3404 Compare August 9, 2024 00:54
@johnsonjh

This comment was marked as outdated.

@johnsonjh johnsonjh changed the title Portability enhancements Portability enhancements and bug fixes Aug 9, 2024
@johnsonjh johnsonjh changed the title Portability enhancements and bug fixes Portability improvements, cleanup, and bug fixes Aug 9, 2024
@johnsonjh johnsonjh force-pushed the 20240807/johnsonjh/portability branch 2 times, most recently from 6df18ea to f83521c Compare August 9, 2024 10:34
@bscottm
Copy link

bscottm commented Oct 20, 2024

@larsbrinkhoff: Is this going to get integrated?

@larsbrinkhoff
Copy link
Member

@bscottm, I think so, but there was some discussion and I'm not sure everything was resolved. I'll take a look now.

GNUmakefile Outdated Show resolved Hide resolved
supdup.c Outdated Show resolved Hide resolved
supdup.c Outdated Show resolved Hide resolved
supdup.c Outdated Show resolved Hide resolved
supdupd.c Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link
Member

@larsbrinkhoff larsbrinkhoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some comments about things that I'd like to see changed.

@johnsonjh

This comment was marked as resolved.

GNUmakefile Outdated Show resolved Hide resolved
@ams
Copy link
Contributor

ams commented Oct 21, 2024

Maybe we should get this in as is, since it contains lots of good changes. And any other fixes can be done in a different PR?

@johnsonjh

This comment was marked as outdated.

@larsbrinkhoff
Copy link
Member

Maybe we should get this in as is, since it contains lots of good changes. And any other fixes can be done in a different PR?

I think this is the wrong approach. "Fix later" often becomes "fix never". A pull request should be cleaned up before merging. If it seems to take too long, or is too much work, maybe open a new pull request with only the good commits.

@johnsonjh

This comment was marked as resolved.

@ams
Copy link
Contributor

ams commented Oct 23, 2024

Maybe we should get this in as is, since it contains lots of good changes. And any other fixes can be done in a different PR?

I think this is the wrong approach. "Fix later" often becomes "fix never". A pull request should be cleaned up before merging. If it seems to take too long, or is too much work, maybe open a new pull request with only the good commits.

There is also the other side of the coin, that continuously fixing minor points here and there it will never get merged because the person doing the work runs out of steam. Many of the changes here are good ones, some are more of minute importance, and some are just why. Splitting it up sounds like a good idea.

@johnsonjh johnsonjh closed this Oct 27, 2024
@johnsonjh johnsonjh force-pushed the 20240807/johnsonjh/portability branch from 6f7860c to 2c1c27e Compare October 27, 2024 08:57
* Add or fix support for building on Solaris, illumos, Linux/musl, NetBSD, OpenBSD, IBM AIX, IBM OS/400 (PASE), Cygwin, and Haiku, which weren't previously cleanly building.
* Use `pkg-config` when available to determine CFLAGS and libraries.
* Initialize some variables in `supdupd`.
* Fix off-by-one error in `supdup`.
* Suppress spurious error when Chaosnet bridge socket is missing.
* Create `README.md`.
* Cleanup Makefile.
* Properly detect bad ports (negative or >65535).
* Fix non-ANSI function declarations.
* Add `*.ln` (*Lint*) files, `supdupd`, and `compile_commands.json` to `.gitignore`.
* Create `.gitattributes`.
* Ensure file handle is valid (non-negative) before closing.
* Correct various spelling errors.
* Tested build under Oracle Solaris, OpenIndiana illumos, Linux/musl, Linux/glibc, IBM AIX, IBM OS/400 (PASE), Haiku, FreeBSD, OpenBSD, NetBSD, DragonFly BSD, Cygwin, and Apple macOS.
* Compilation tested and working with PCC, GCC, Clang, Xcode, IBM XL C, IBM Open XL C, Oracle Studio C, NVIDIA HPC SDK C, Portland Group C, and DMD ImportC.
* Passes Cppcheck and Clang Analyzer.
* Closes: PDP-10#25, PDP-10#35, PDP-10#38

Signed-off-by: Jeffrey H. Johnson <trnsz@pobox.com>
@larsbrinkhoff
Copy link
Member

Thanks!

Copy link
Member

@larsbrinkhoff larsbrinkhoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

@larsbrinkhoff larsbrinkhoff merged commit 9658d1f into PDP-10:master Oct 28, 2024
@johnsonjh johnsonjh deleted the 20240807/johnsonjh/portability branch October 28, 2024 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a README.md Maybe necessary to link with tinfo? Compilation failure on OpenBSD
4 participants