Configure build fix for all Non-Linux OSes, fixed compilation errors for test suite, feature addition. - #8
Open
nthcomputing wants to merge 5 commits into
Open
Conversation
I reverted the configure and configure.in from commit e9113ee. The commit after this broke the build system for every OS except Linux. This now correctly tries to build on MacOS.
The "SIGUNUSED" signal is exactly the same value as SIGUSR2, causing the conflict. SIGUNUSED isn't actually used anymore, it's a compat signal macro anyway.
Incorrectly, NULL, specified range in this test suite, was essentially a NOOP. Just a warning but an easy fix.
All these patches are actually just to add this feature. CRTSCTS_Hardware_Flow_Control => CRTSCTS While this is NOT actually stated in the Ada POSIX Interface Specification, it's a modern option that is essential to serial operations for any modem or modem-like device. I've only tested this on MacOS, but it works. This option enables FULL hardware flow control, MacOS does have unidirectional form of this, I needed and used the normal bidirectional form. Without this, buffer overrun is very common during binary transfer with a modem. I added this for my own usage...but I'd prefer it be in the library natively.
…the platform. This forms a null range, which is acceptable for a non-present feature. Due to some compilation arguments, warnings treated as errors, means this was a critical stop on MacOS. It's okay and a desired outcome, tell the compiler we really are okay with this.
Author
|
Additional commit now for fixing default build stopping on MacOS due to compiler warning. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have done separate commits, so hopefully you can pick and choose.
This first is the Autoconf build system has been partially broken since mid-march. On commit 4c72dea a bug was introduced into the configure scripts that simply copied the Linux version of the pconfig.h.in file as default, regardless of what host OS was detected. This causes errors (macro code hiding/view issues) on MacOS which error the build very quickly. I simply reverted the simple change for files "configure & configure.in" to the previous commit (e9113ee). There have been not other changes since then so this seems simple enough get back on track.
The second fix is an error in tests/test_parameters.adb in the case statement for signals, the comment says the same info, but basically the value of 31 is also used in MacOS (at least) for SIGUSR2...so it conflicts, I just removed the specific value of 31 in the case statement.
The third is a test case warning, not an error, but was a NULL ranged NO-OP loop for looping through the Signals data type, defining default termination behavior, I simply added the 'RANGE to it so the loop did something. If this was a purposeful neuter I didn't see that as obvious but it can of course be commented out, I assumed the warning about skipping the operation was not the intended behavior.
The fourth and final is actually a feature-add (my main reason for doing this pull request). I do realize this could be somewhat controversial as this additional terminal option that isn't strictly in the Ada POSIX interface specification (At least the copy I have from 1998 doesn't list it). And that is the terminal serial hardware flow control CRTSCTS option. I have used this on MacOS and I hope I added it correctly where Linux and other UNIXes will work correctly as well (but full disclosure, it's tested ONLY under MacOS, right now).
I'm using your florist library to interface with a voice modem (using the Hayes AT command set) on MacOS and without hardware flow control, it's absolutely unusable for streaming and large command transfer/output. So I require this option to make things work correctly, because of things like Andriod and Arduino I think CRTSCTS is now a critical option and should be added as "standard" given it's now present in all modern UNIXes and is very important to serial operation.
I'm open to help in improving or changing these, if anyone has a suggestion. Otherwise, it does work for MacOS now and that's all I know.