library: extend ITEMTABLE_DEBUG just a tad, <PIDS> api

Under the above #define this commit now also addresses
2 additional possible toe stubbers involving 'select'.

If some readproc.h constants were uncoupled from their
pids.h enumerators a 'make check-lib' will now detect.

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner
2020-12-21 00:00:00 -06:00
committed by Craig Small
parent d1f5004df5
commit fd64b91d09
2 changed files with 11 additions and 0 deletions

View File

@@ -1139,6 +1139,16 @@ PROCPS_EXPORT int procps_pids_new (
failed = 1;
}
}
if (PIDS_SELECT_PID != PROC_PID) {
fprintf(stderr, "%s: header error: PIDS_SELECT_PID = 0x%04x, PROC_PID = 0x%04x\n"
, __FILE__, PIDS_SELECT_PID, PROC_PID);
failed = 1;
}
if (PIDS_SELECT_UID != PROC_UID) {
fprintf(stderr, "%s: header error: PIDS_SELECT_UID = 0x%04x, PROC_UID = 0x%04x\n"
, __FILE__, PIDS_SELECT_UID, PROC_UID);
failed = 1;
}
if (failed) _Exit(EXIT_FAILURE);
#endif