aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2024-10-14 09:36:14 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2024-10-14 09:44:02 -0400
commita29bca4b79f19e9f04420b545bdec27ddc99150c (patch)
tree5c02a4e1f38ef73bd80f2334887ac0476c8ecdb7
parent5a9688e9e78a25a42bddfc4388fb4ce3311ded74 (diff)
downloadstasis-a29bca4b79f19e9f04420b545bdec27ddc99150c.tar.gz
Fix includes
-rw-r--r--include/artifactory.h1
-rw-r--r--include/conda.h2
-rw-r--r--include/core.h22
-rw-r--r--include/core_mem.h3
-rw-r--r--include/delivery.h9
-rw-r--r--include/docker.h2
-rw-r--r--include/download.h2
-rw-r--r--include/envctl.h1
-rw-r--r--include/ini.h1
-rw-r--r--include/str.h1
-rw-r--r--include/strlist.h5
-rw-r--r--include/utils.h7
-rw-r--r--tests/test_artifactory.c2
-rw-r--r--tests/test_conda.c2
-rw-r--r--tests/test_docker.c2
-rw-r--r--tests/test_download.c1
-rw-r--r--tests/test_junitxml.c1
-rw-r--r--tests/test_multiprocessing.c1
-rw-r--r--tests/test_recipe.c2
-rw-r--r--tests/test_wheel.c1
20 files changed, 45 insertions, 23 deletions
diff --git a/include/artifactory.h b/include/artifactory.h
index c6e5c2b..e580886 100644
--- a/include/artifactory.h
+++ b/include/artifactory.h
@@ -5,6 +5,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "core.h"
+#include "download.h"
//! JFrog Artifactory Authentication struct
struct JFRT_Auth {
diff --git a/include/conda.h b/include/conda.h
index b26c7a3..1eb42f4 100644
--- a/include/conda.h
+++ b/include/conda.h
@@ -4,7 +4,9 @@
#include <stdio.h>
#include <string.h>
+#include <sys/utsname.h>
#include "core.h"
+#include "download.h"
#define CONDA_INSTALL_PREFIX "conda"
#define PYPI_INDEX_DEFAULT "https://pypi.org/simple"
diff --git a/include/core.h b/include/core.h
index 972e1ee..b0a1a11 100644
--- a/include/core.h
+++ b/include/core.h
@@ -4,6 +4,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <stdbool.h>
#include <string.h>
#include <limits.h>
#include <unistd.h>
@@ -22,27 +23,6 @@
#include "config.h"
#include "core_mem.h"
-#include "multiprocessing.h"
-#include "envctl.h"
-#include "template.h"
-#include "utils.h"
-#include "copy.h"
-#include "ini.h"
-#include "conda.h"
-#include "environment.h"
-#include "artifactory.h"
-#include "docker.h"
-#include "delivery.h"
-#include "str.h"
-#include "strlist.h"
-#include "system.h"
-#include "download.h"
-#include "recipe.h"
-#include "relocation.h"
-#include "wheel.h"
-#include "junitxml.h"
-#include "github.h"
-#include "template_func_proto.h"
#define COE_CHECK_ABORT(COND, MSG) \
do {\
diff --git a/include/core_mem.h b/include/core_mem.h
index 87a2a2f..bd50e9d 100644
--- a/include/core_mem.h
+++ b/include/core_mem.h
@@ -2,6 +2,9 @@
#ifndef STASIS_CORE_MEM_H
#define STASIS_CORE_MEM_H
+#include "environment.h"
+#include "strlist.h"
+
#define guard_runtime_free(X) do { if (X) { runtime_free(X); X = NULL; } } while (0)
#define guard_strlist_free(X) do { if ((*X)) { strlist_free(X); (*X) = NULL; } } while (0)
#define guard_free(X) do { if (X) { free(X); X = NULL; } } while (0)
diff --git a/include/delivery.h b/include/delivery.h
index 15cde13..bd5137c 100644
--- a/include/delivery.h
+++ b/include/delivery.h
@@ -10,6 +10,15 @@
#include <fnmatch.h>
#include <sys/statvfs.h>
#include "core.h"
+#include "copy.h"
+#include "environment.h"
+#include "conda.h"
+#include "ini.h"
+#include "artifactory.h"
+#include "docker.h"
+#include "wheel.h"
+#include "multiprocessing.h"
+#include "recipe.h"
#define DELIVERY_PLATFORM_MAX 4
#define DELIVERY_PLATFORM_MAXLEN 65
diff --git a/include/docker.h b/include/docker.h
index ff8a8d5..7585d86 100644
--- a/include/docker.h
+++ b/include/docker.h
@@ -2,6 +2,8 @@
#ifndef STASIS_DOCKER_H
#define STASIS_DOCKER_H
+#include "core.h"
+
//! Flag to squelch output from docker_exec()
#define STASIS_DOCKER_QUIET 1 << 1
diff --git a/include/download.h b/include/download.h
index 058812e..0b6311e 100644
--- a/include/download.h
+++ b/include/download.h
@@ -2,6 +2,8 @@
#ifndef STASIS_DOWNLOAD_H
#define STASIS_DOWNLOAD_H
+#include <stdlib.h>
+#include <string.h>
#include <curl/curl.h>
size_t download_writer(void *fp, size_t size, size_t nmemb, void *stream);
diff --git a/include/envctl.h b/include/envctl.h
index 1536938..659cae3 100644
--- a/include/envctl.h
+++ b/include/envctl.h
@@ -3,6 +3,7 @@
#define STASIS_ENVCTL_H
#include <stdlib.h>
+#include "core.h"
#define STASIS_ENVCTL_PASSTHRU 0
#define STASIS_ENVCTL_REQUIRED 1 << 1
diff --git a/include/ini.h b/include/ini.h
index 3d0565b..557f157 100644
--- a/include/ini.h
+++ b/include/ini.h
@@ -5,6 +5,7 @@
#include <stdio.h>
#include <stddef.h>
#include <stdbool.h>
+#include "template.h"
#define INI_WRITE_RAW 0 ///< Dump INI data. Contents are not modified.
#define INI_WRITE_PRESERVE 1 ///< Dump INI data. Template strings are
diff --git a/include/str.h b/include/str.h
index 4cf221d..7254225 100644
--- a/include/str.h
+++ b/include/str.h
@@ -9,6 +9,7 @@
#include <string.h>
#include <stdarg.h>
#include <ctype.h>
+#include "relocation.h"
#include "core.h"
#define STASIS_SORT_ALPHA 1 << 0
diff --git a/include/strlist.h b/include/strlist.h
index dd22a0a..cdbfc01 100644
--- a/include/strlist.h
+++ b/include/strlist.h
@@ -4,10 +4,15 @@
*/
#ifndef STASIS_STRLIST_H
#define STASIS_STRLIST_H
+
+typedef int (ReaderFn)(size_t line, char **);
+
#include <stdlib.h>
+#include "core.h"
#include "utils.h"
#include "str.h"
+
struct StrList {
size_t num_alloc;
size_t num_inuse;
diff --git a/include/utils.h b/include/utils.h
index 4f7c3a4..4ade817 100644
--- a/include/utils.h
+++ b/include/utils.h
@@ -8,7 +8,12 @@
#include <unistd.h>
#include <limits.h>
#include <errno.h>
+#include "core.h"
+#include "copy.h"
#include "system.h"
+#include "strlist.h"
+#include "utils.h"
+#include "ini.h"
#if defined(STASIS_OS_WINDOWS)
#define PATH_ENV_VAR "path"
@@ -25,8 +30,6 @@
#define STASIS_XML_PRETTY_PRINT_PROG "xmllint"
#define STASIS_XML_PRETTY_PRINT_ARGS "--format"
-typedef int (ReaderFn)(size_t line, char **);
-
/**
* Change directory. Push path on directory stack.
*
diff --git a/tests/test_artifactory.c b/tests/test_artifactory.c
index 1a21f0e..2c732fa 100644
--- a/tests/test_artifactory.c
+++ b/tests/test_artifactory.c
@@ -1,4 +1,6 @@
#include "testing.h"
+#include "artifactory.h"
+#include "delivery.h"
// Import private functions from core
extern int delivery_init_platform(struct Delivery *ctx);
diff --git a/tests/test_conda.c b/tests/test_conda.c
index fc762e9..2ed869a 100644
--- a/tests/test_conda.c
+++ b/tests/test_conda.c
@@ -1,4 +1,6 @@
#include "testing.h"
+#include "conda.h"
+#include "delivery.h"
char cwd_start[PATH_MAX];
char cwd_workspace[PATH_MAX];
diff --git a/tests/test_docker.c b/tests/test_docker.c
index 04a73aa..6eec53c 100644
--- a/tests/test_docker.c
+++ b/tests/test_docker.c
@@ -1,4 +1,6 @@
#include "testing.h"
+#include "docker.h"
+
struct DockerCapabilities cap_suite;
void test_docker_capable() {
diff --git a/tests/test_download.c b/tests/test_download.c
index cee7683..ad8724e 100644
--- a/tests/test_download.c
+++ b/tests/test_download.c
@@ -1,4 +1,5 @@
#include "testing.h"
+#include "download.h"
void test_download() {
struct testcase {
diff --git a/tests/test_junitxml.c b/tests/test_junitxml.c
index 9b2181e..7111249 100644
--- a/tests/test_junitxml.c
+++ b/tests/test_junitxml.c
@@ -1,4 +1,5 @@
#include "testing.h"
+#include "junitxml.h"
void test_junitxml_testsuite_read() {
struct JUNIT_Testsuite *testsuite;
diff --git a/tests/test_multiprocessing.c b/tests/test_multiprocessing.c
index f59fa7a..b9cd309 100644
--- a/tests/test_multiprocessing.c
+++ b/tests/test_multiprocessing.c
@@ -1,4 +1,5 @@
#include "testing.h"
+#include "multiprocessing.h"
static struct MultiProcessingPool *pool;
char *commands[] = {
diff --git a/tests/test_recipe.c b/tests/test_recipe.c
index 8e2c470..7c55cd5 100644
--- a/tests/test_recipe.c
+++ b/tests/test_recipe.c
@@ -1,4 +1,6 @@
#include "testing.h"
+#include "relocation.h"
+#include "recipe.h"
static void make_local_recipe(const char *localdir) {
char path[PATH_MAX] = {0};
diff --git a/tests/test_wheel.c b/tests/test_wheel.c
index 16f60a3..6818b22 100644
--- a/tests/test_wheel.c
+++ b/tests/test_wheel.c
@@ -1,4 +1,5 @@
#include "testing.h"
+#include "wheel.h"
void test_get_wheel_file() {
struct testcase {