]> git.ozlabs.org Git - ppp.git/commitdiff
Fix include paths for plugins to use the public API of pppd
authorEivind Næss <eivnaes@yahoo.com>
Tue, 10 Aug 2021 23:38:45 +0000 (16:38 -0700)
committerEivind Næss <eivnaes@yahoo.com>
Fri, 15 Jul 2022 22:25:39 +0000 (15:25 -0700)
This change does a few different things.
 * Projects that needs #include "config.h" should use a config.h.in for the project generated by configure in the project's local directory.
 * All projects will use #include <pppd/pppd.h>, and Makefile will add -I${top_srcdir} to the appropriate *_CPPFLAGS variable.
 * The inclusion of <pppd/pppdconf.h> will set the presidence for all features enabled/disabled in pppd
 * Plugins will now need to use PPPD_VERSION as it conflicts with VERSION from config.h generated by autotools for third party packages

Currently, only pppoe require the use of config.h to correctly set the defines for which header files and so on was detected by configure

Other projects only needed to include <pppd/pppd.h> (and maybe a few other header files), a future change will fixup <pppd/pppd.h> to include features as needed such that it's the only needed include for a plugin. This will avoid littering the code with #ifdef/#endif constructs.

BREAKING CHANGE!

pppd/pppd.h no longer provide VERSION, third party packages are required to switch to use PPPD_VERSION. This is to avoid conflict with a source package's own VERSION as set by autotools / config.h. Also, the use of PPP_VERSION conflicts with public header files from Glibc/Linux kernel.

Example:

   char pppd_version[] = PPPD_VERSION;

pppd will load plugins, and also look for the symbol "pppd_version" to validate that the plugin was built for the current version of pppd.

Signed-off-by: Eivind Næss <eivnaes@yahoo.com>

No differences found