Use the installed MEOS headers, not a copy in the repo - #15
Merged
estebanzimanyi merged 1 commit intoAug 29, 2026
Merged
Conversation
The root package discovers MEOS through `#cgo pkg-config: meos`, the form functions/cgo.go already uses: the installed library reports its own include dir and the family macros it carries, and PKG_CONFIG_PATH selects which libmeos a build compiles against. The three vendored public headers go with the hardcoded paths that reached them. A quoted include resolves from the including file's own directory first, so a copy beside the sources wins over every -I: the package compiled against the copy and linked the library, which is silent until the library renames something. The copy names mult_* and RTreeSearchOp where the library exports mul_* and IndexSearchOp. The calls follow the surface the library publishes: mul_* for the five multiplication entry points, date_in/date_out and timestamptz_in/ timestamptz_out from pg_date.h and pg_timestamp.h, and text_in/text_out for the thirty text conversions, whose cstring2text/text2cstring spellings libmeos exports nowhere.
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 root package discovers MEOS through
#cgo pkg-config: meos, the form functions/cgo.go already uses, so the installed library reports its own include dir and the family macros it carries. The three vendored public headers go with the hardcoded paths that reached them.A quoted include resolves from the including file's own directory first, so a copy beside the sources beats every -I: the package compiles against the copy while linking the library, which stays quiet until the library renames a symbol. The calls follow the surface the library publishes — mul_* for the multiplication entry points, date_in/date_out and timestamptz_in/timestamptz_out from pg_date.h and pg_timestamp.h, and text_in/text_out for the text conversions, whose cstring2text/text2cstring spellings libmeos exports nowhere.