Skip to content

Make it impossible to build without SECP256K1_BUILD defined #927

@gmaxwell

Description

@gmaxwell

If the library itself is compiled without -DSECP256K1_BUILD then it will be (minorly) miscompiled: all the nullness checks on the interfaces which specify that their arguments be non-null will get optimized out (the exported symbols also won't get flagged for windows, but presumably where that matters it'll get noticed).

Is there any reason to not just have secp256k1.c #define SECP256K1_BUILD before including any headers and then drop any requirement for the build system?

If that can't be done, it should probably check and #error if it isn't defined. But making it configuration-free seems much better to me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions