Change contrib/laxder from headers-only to files compilable as standalone C #343

pull apoelstra wants to merge 1 commits into bitcoin-core:master from apoelstra:contrib-c changing 6 files +327 −250
  1. apoelstra commented at 8:26 pm on October 26, 2015: contributor

    Verified that both programs compile with

    0gcc -I. -I../include -lsecp256k1 -c -W -Wextra -Wall -Werror -ansi -pedantic lax_der_privatekey_parsing.c
    1gcc -I. -I../include -lsecp256k1 -c -W -Wextra -Wall -Werror -ansi -pedantic lax_der_parsing.c
    
  2. sipa commented at 10:16 pm on October 26, 2015: contributor
    Eh, I don’t like this. These things are not compilable modules with a neat exposed API, they’re just pieces of example code…
  3. gmaxwell commented at 10:50 pm on October 26, 2015: contributor

    I don’t see where the modules comment comes from? They’re now just ordinary C code, not weird header stuff. They’re still just code fragments, not libraries, not modules, not added to the build system, etc.

    Oh you’re referring the linking into libsecp256k1? Yea, I don’t agree with that, but this patch doesn’t do that.

    Would be good if it touched the build system enough to fix tests.c, however!

  4. sipa commented at 11:54 pm on October 26, 2015: contributor

    Turning it into full .c files with corresponding header files gives a pretty strong impression that this is code that is to be compiled and linked into your application as-is.

    I really want to discourage that. You shouldn’t be compiling code from another project’s source tree. If that was the intention, we should just make it a compile time flag and expose it through the library.

    This is an example code snippet you can copy-paste into your application or translate to another language as needed, making changes as needed too.

  5. apoelstra force-pushed on Oct 27, 2015
  6. apoelstra commented at 5:04 pm on October 27, 2015: contributor
    Updated to fix tests.c, add warning for users not to link directly from our codebase, and remove the secp256k1_ prefixes from the functions to emphasize that they are not part of libsecp256k1 proper.
  7. sipa commented at 9:33 pm on October 27, 2015: contributor
    You need to add the .c files to the makefiles.
  8. sipa commented at 8:44 pm on October 29, 2015: contributor
    @apoelstra Ping?
  9. Change contrib/laxder from headers-only to files compilable as standalone C
    Verified that both programs compile with
    
        gcc -I. -I../include -lsecp256k1 -c -W -Wextra -Wall -Werror -ansi -pedantic lax_der_privatekey_parsing.c
        gcc -I. -I../include -lsecp256k1 -c -W -Wextra -Wall -Werror -ansi -pedantic lax_der_parsing.c
    eed87af10a
  10. apoelstra force-pushed on Oct 29, 2015
  11. apoelstra commented at 1:06 am on October 30, 2015: contributor
    I added the .c files to noinst_HEADERS. Is this right?
  12. sipa commented at 1:42 am on October 30, 2015: contributor
    It seems the almighty Travis is happy with it.
  13. sipa merged this on Oct 30, 2015
  14. sipa closed this on Oct 30, 2015

  15. sipa referenced this in commit 3b7bc695ef on Oct 30, 2015
  16. apoelstra deleted the branch on Jun 19, 2017

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-24 21:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me