← Back to team overview

kicad-developers team mailing list archive

Re: *** SPAM *** Re: ngspice-34

 

Holger,

You should use something like NGSPICE_PACKAGE_VERSION to avoid namespace
clashes with other header version definitions.  PACKAGE_VERSION seems
like it could be an issue.

Cheers,

Wayne


On 2/4/21 3:38 PM, Holger Vogt wrote:
> I prefer adding
> #define PACKAGE_VERSION "34+"
> to sharedspice.h.
> 
> sharespice.h has been and will always be there.
> In old ngspice releases PACKAGE_VERSION is not defined. But config.h is
> there, containing its PACKAGE_VERSION. In ngspice-34 unfortunately
> PACKAGE_VERSION will not be available. But the code snipped below
> starting at line 161 in  common/build_version.cpp (not tested) should
> just return "unknown". No user interaction is required. In ngspice-35
> PACKAGE_VERSION will be available in sharedspice.h.
> 
> #else
>     #include <ngspice/sharedspice.h.h>
>     #ifdef PACKAGE_VERSION
>         aMsg << indent4 << "ngspice: " << PACKAGE_VERSION << eol;
>     #else
>         aMsg << indent4 << "ngspice: " << "unknown" << eol;
>     #endif
> #endif
> 
> The disadvantage of the compile time approach of course is that it would
> not follow a user who just upgrades (or downgrades?) ngspice.
> 
> Holger
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp


References