Skip to content

Separating or excluding the regcomp/regexec/regerror functions from the library. #160

@pem

Description

@pem

The POSIX compatibility functions regcomp, regexec and regerror are included in the Onigmo library.
There doesn't seem to be any way to avoid this without patching the code or build scripts. If there is one, please advice, we haven't found it.

This is a problem for us. We have a large application with lots of libraries, some of which uses the standard library functions regcomp et al, but we also use the Onigmo library (the native functions) in some places. If library A used regomp, and library B uses the native Onigmo functions, and both are linked in the same binary, A will use the functions in the Onigmo library, not the standard library versions. You might argue the it shouldn't matter, but it does for us. It's important that we know exactly which function is used. Or to put it differently, we want regcomp to mean the standard library function and nothing else, everywhere.

We can work around this by patching Makefile.in before building, but we would prefer if there was a supported way to do this.
Either

  • A configure option to exclude the regcomp etc from the build completely
  • Put regcomp etc in a separate library

Either method would be ok.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions