library: eliminated the questionable 'procps.h' header

There was a time when that procps.h file served a more
traditional role. Prior to the commit referenced below
it held just macros plus manifest constants. But, with
that change, such items were replaced with a series of
includes embracing all the library exported functions.

That approach was known to disguise errors which would
have otherwise yielded a compiler warning. And without
such a warning, there was no way to address the error.

So this patch will trade the all inclusive header file
approach for individual includes only where necessary.

Reference(s):
. April 2016, procps.h header file revamped
commit ccb6ae8de1
. Sept 2018, top abandoned use of procps.h
commit a6dfc2382e

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner
2020-06-30 00:00:00 -05:00
committed by Craig Small
parent 70fd03e461
commit 1aa8b16441
18 changed files with 62 additions and 78 deletions

View File

@@ -19,12 +19,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "version.h"
#include "readproc.h"
#include "escape.h"
#include "pwcache.h"
#include "devname.h"
#include "procps.h"
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
@@ -41,7 +35,13 @@
#ifdef WITH_SYSTEMD
#include <systemd/sd-login.h>
#endif
#include <proc/namespace.h>
#include "devname.h"
#include "escape.h"
#include "namespace.h"
#include "pwcache.h"
#include "readproc.h"
#include "version.h"
// sometimes it's easier to do this manually, w/o gcc helping
#ifdef PROF