Menu

#23 inconsistent usage of config.h and HAVE_CONFIG_H

1.2
closed-fixed
None
5
2018-01-02
2012-07-19
Diab Jerius
No

tclap depends upon config.h and the HAVE_CONFIG_H macro for proper behavior. The current implementation has a couple of problems:

* config.h isn't installed along with the rest of tclap, so unless the project using tclap defines HAVE_CONFIG_H and has a config.h which defines the appropriate macros tclap will not be fully functional.

* Arg.h and ValuesConstrant.h assume that if HAVE_CONFIG_H is defined then HAVE_SSTREAM or HAVE_STRSTREAM are also defined. In the case where a project defines HAVE_CONFIG_H but doesn't define either of the other two the compilation fails because no stream header is included.

To remedy this I've made the following changes:

* config/config.h is installed as tclap/config.h

* PACKAGE specific macros are removed from config.h to avoid clashing with those defined by other packages

* the HAVE_CONFIG_H guards (and any dependent stream logic) are removed and tclap/config.h is unconditionally included

Discussion

  • Diab Jerius

    Diab Jerius - 2012-07-19

    patch

     
  • Daniel Aarno

    Daniel Aarno - 2017-12-23
    • assigned_to: Daniel Aarno
    • Group: --> v1.0 (example)
     
  • Daniel Aarno

    Daniel Aarno - 2017-12-23
    • status: open --> closed-fixed
     
  • Diab Jerius

    Diab Jerius - 2017-12-28

    Thanks!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.