swtpm: Move ARRAY_LEN and min #define's to swtpm_utils.h

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
Stefan Berger 2021-10-06 13:57:38 -04:00 committed by Stefan Berger
parent f2786a759f
commit 50670dca12
9 changed files with 11 additions and 4 deletions

View File

@ -68,6 +68,7 @@ libswtpm_libtpms_la_CFLAGS = \
-I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(top_srcdir)/include/swtpm \
-I$(top_srcdir)/src/utils \
$(MY_CFLAGS) \
$(CFLAGS) \
$(HARDENING_CFLAGS) \
@ -105,6 +106,7 @@ swtpm_CFLAGS = \
-I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(top_srcdir)/include/swtpm \
-I$(top_srcdir)/src/utils \
$(MY_CFLAGS) \
$(HARDENING_CFLAGS) \
$(GLIB_CFLAGS) \
@ -131,6 +133,7 @@ swtpm_cuse_CFLAGS = \
-I$(top_builddir)/include \
-I$(top_srcdir)/include \
-I$(top_srcdir)/include/swtpm \
-I$(top_srcdir)/src/utils \
$(MY_CFLAGS) \
$(GLIB_CFLAGS) \
$(LIBFUSE_CFLAGS) \

View File

@ -61,6 +61,7 @@
#include "mainloop.h"
#include "utils.h"
#include "swtpm_debug.h"
#include "swtpm_utils.h"
/* local variables */

View File

@ -78,6 +78,7 @@
#include "seccomp_profile.h"
#include "options.h"
#include "capabilities.h"
#include "swtpm_utils.h"
/* maximum size of request buffer */
#define TPM_REQ_MAX 4096

View File

@ -65,6 +65,7 @@
#include "utils.h"
#include "sys_dependencies.h"
#include "compiler_dependencies.h"
#include "swtpm_utils.h"
/* local variables */
static TPM_MODIFIER_INDICATOR locality;

View File

@ -47,6 +47,7 @@
#include "logging.h"
#include "utils.h"
#include "seccomp_profile.h"
#include "swtpm_utils.h"
#ifdef WITH_SECCOMP
static int create_seccomp_profile_add_rules(scmp_filter_ctx ctx,

View File

@ -87,6 +87,7 @@
#include "swtpm_aes.h"
#include "swtpm_debug.h"
#include "swtpm_nvstore.h"
#include "swtpm_utils.h"
#include "key.h"
#include "logging.h"
#include "tpmstate.h"

View File

@ -58,6 +58,7 @@
#endif
#include "utils.h"
#include "compiler_dependencies.h"
#include "swtpm_utils.h"
/*
* convert the blobtype integer into a string that libtpms

View File

@ -45,9 +45,6 @@
#include <libtpms/tpm_library.h>
#define min(a,b) ((a) < (b) ? (a) : (b))
#define ARRAY_LEN(a) (sizeof(a) / sizeof((a)[0]))
#define ROUND_TO_NEXT_POWER_OF_2_32(a) \
do { \
a--; \

View File

@ -14,7 +14,8 @@
#include <glib.h>
#define min(X,Y) (X) < (Y) ? (X) : (Y)
#define min(X,Y) ((X) < (Y) ? (X) : (Y))
#define ARRAY_LEN(a) (sizeof(a) / sizeof((a)[0]))
extern gchar *gl_LOGFILE;