Repository navigation
Make the engines' C sources from 51degrees-cxx 4.5.100 - #22
Merged
Merged
Conversation
…es the C sources from it Each engine compiles one amalgamated .c and .h file, which used to be made from the C repositories' main branches. They are now made from the cxx submodule with ci/update-amalgamation.ps1, and the build checks that the committed files match it.
Generated with ci/update-amalgamation.ps1. The sources the engines compiled until now came from the C repositories' main branches before 51degrees-cxx 4.5.96, so this brings in every change since, including those listed for 4.5.98 and 4.5.100: an IPv4-mapped address is looked up as its IPv4 address, an address below the lowest key gets no value, and a reload that fails keeps the data set in use. The generated files keep the line endings of the C sources, so .gitattributes stops git from converting them.
Device Detection and IP Intelligence each compile their own copy of the common C library, so a program that uses both needs one copy's names changed. mangle.h kept that list by hand. 51degrees-cxx now keeps the same list in src/common/ipiSymbols.h, checked by its own CI, and applies it when FIFTYONE_DEGREES_IPI_SYMBOLS is defined.
The example looks for the Lite data file by searching nearby folders, and now finds cxx/device-detection-data first. CI doesn't fetch Git LFS files, so that copy is only a pointer.
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.
The engines now compile C sources made from 51degrees-cxx 4.5.100, pinned as the
cxxsubmodule. Before, they were made from the C repositories'mainbranches, whichever commit that was on the night.Three commits, best reviewed one at a time:
cxxsubmodule andci/update-amalgamation.ps1. The script makes each engine's.cand.hfile fromcxx/withci/amalgamate.awk, and writes the cxx version at the top of each file.ci/build-project.ps1runs it with-Check, so a pull request fails if the committed files don't matchcxx/..gitattributeskeeps the files' line endings as the C sources have them, so a file made on Windows is the same as one made on Linux.mangle.hreplaced by the list in 51degrees-cxx. IP Intelligence's copy of the common C library is renamed withsrc/common/ipiSymbols.h, checked by 51degrees-cxx's own CI, instead of a list kept by hand here.Checked locally on Windows: the Device Detection and IP Intelligence unit tests pass, and the mixed example links both engines into one program, with 229 renamed functions.
The reload fixes carried over from the old repositories (#2, #5, #6, #7, #14 to #17) are only safe on 4.5.100 or later, so they come after this.