Giter VIP home page Giter VIP logo

Comments (8)

tomghuang avatar tomghuang commented on August 25, 2024

Thanks for letting me know the differences between BSD license versions and the compatibility between them and GPLv2. I will check the getopt implementation from FreeBSD and see if it is possible to replace the current implementation.

from argtable3.

merlokk avatar merlokk commented on August 25, 2024

thanks))))))

from argtable3.

tomghuang avatar tomghuang commented on August 25, 2024

@merlokk, I've re-organized the project, which now has the original source files, not the generated amalgamation distribution. You can try two ways to use your preferred getopt:

  • Add #define ARG_REPLACE_GETOPT 0, so that compiler will skip the embedded getopt and use the system getopt.
  • Replace the getopt files in the src directory, and make sure the build environment can use your own version to build the library.

from argtable3.

Kerl13 avatar Kerl13 commented on August 25, 2024

On my system, #define ARG_REPLACE_GETOPT 0 breaks argtable since getopt_long.c calls a getopt_internal function which is not available (though getopt and getopt_long are).

from argtable3.

tomghuang avatar tomghuang commented on August 25, 2024

@Kerl13 , this mechanism is meant to use your own getopt implementation. If your own getopt has some issues, I'm afraid that you need to figure out how to resolve it. Maybe you can use getopt implementations from other system, instead of using the one in your system.

from argtable3.

Kerl13 avatar Kerl13 commented on August 25, 2024

Thank you for your answer,

Sorry I think my comment was not very clear.
I meant that when I disable ARG_REPLACE_GETOPT, then argtable calls a getopt_internal function (in src/getopt_long.c) that is not defined anymore withing argtable so it expects this function to be defined in my system getopt.

This is what looks suspicious to me: I would assume my system getopt library to expose a getopt and a getopt_long function but not a getopt_internal function. Why is argtable calling this function and not getopt or getopt_long directly?

But I might be completely missing the point… If you tell me that when I disable ARG_REPLACE_GETOPT I am expected to provide a getopt_internal replacement function I'm okay with this answer :)

from argtable3.

Kerl13 avatar Kerl13 commented on August 25, 2024

By the way I had argtable using my system getopt successfully by just removing the src/getopt.h and src/getopt_long.c files from the tools/build script so this is nice!

from argtable3.

tomghuang avatar tomghuang commented on August 25, 2024

@Kerl13 I think you did find a problem in this ARG_REPLACE_GETOPT mechanism... I'm glad that you've found a solution, which is better than this ARG_REPLACE_GETOPT trick. I will check this issue and I may use your solution to replace the current one. Thanks!

from argtable3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.