library: ensure 'XTRA_PROCPS_DEBUG' works in real life

This commit attempts to smooth some wrinkles impacting
any future libprocps user exploitation. The 2 problems
relate exclusively to our XTRA_PROCPS_DEBUG provision.

1. The 'xtra-procps-debug.h' header had an include for
'procps-private.h', which was not an installed header.
So the STRINGIFY macros will now be embedded directly.

2. Each of the new api headers referenced '<proc/...>'
rather than '<procps/...>' for the debugging #include.
So, we must drop that prefix in favor of a quoted file
name so that debugging builds work regardless of where
that 'xtra-procps-debug.h' header happens to be found.

Reference(s):
. Jun, 2020 - changed target install directory
commit d64755ea5f
. Sep, 2018 - #include migrated from procps.h
commit fab37662ef

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2020-07-25 00:00:00 -05:00 committed by Craig Small
parent c13ea57495
commit dbe34f6312
7 changed files with 8 additions and 7 deletions

View File

@ -129,7 +129,7 @@ struct diskstats_stack **procps_diskstats_sort (
#ifdef XTRA_PROCPS_DEBUG
# include <proc/xtra-procps-debug.h>
# include "xtra-procps-debug.h"
#endif
#ifdef __cplusplus
}

View File

@ -201,7 +201,7 @@ struct meminfo_stack *procps_meminfo_select (
#ifdef XTRA_PROCPS_DEBUG
# include <proc/xtra-procps-debug.h>
# include "xtra-procps-debug.h"
#endif
#ifdef __cplusplus
}

View File

@ -239,7 +239,7 @@ struct pids_stack **procps_pids_sort (
#ifdef XTRA_PROCPS_DEBUG
# include <proc/xtra-procps-debug.h>
# include "xtra-procps-debug.h"
#endif
#ifdef __cplusplus
}

View File

@ -133,7 +133,7 @@ struct slabinfo_stack **procps_slabinfo_sort (
#ifdef XTRA_PROCPS_DEBUG
# include <proc/xtra-procps-debug.h>
# include "xtra-procps-debug.h"
#endif
#ifdef __cplusplus
}

View File

@ -162,7 +162,7 @@ struct stat_stack **procps_stat_sort (
#ifdef XTRA_PROCPS_DEBUG
# include <proc/xtra-procps-debug.h>
# include "xtra-procps-debug.h"
#endif
#ifdef __cplusplus
}

View File

@ -353,7 +353,7 @@ struct vmstat_stack *procps_vmstat_select (
#ifdef XTRA_PROCPS_DEBUG
# include <proc/xtra-procps-debug.h>
# include "xtra-procps-debug.h"
#endif
#ifdef __cplusplus
}

View File

@ -18,7 +18,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <proc/procps-private.h>
#define STRINGIFY_ARG(a) #a
#define STRINGIFY(a) STRINGIFY_ARG(a)
// --- DISKSTATS ------------------------------------------