summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am4
-rw-r--r--TODO2
-rw-r--r--common/defs.h (renamed from helpers/defs.h)0
-rw-r--r--common/mode.c (renamed from helpers/mode.c)0
-rw-r--r--common/mode.h (renamed from helpers/mode.h)0
-rw-r--r--helpers/local.mk8
-rw-r--r--opkg-opk/defs.h27
-rw-r--r--opkg-opk/local.mk2
-rw-r--r--opkg-opk/opk/read.c2
-rw-r--r--opkg-opk/opk/write.c2
10 files changed, 10 insertions, 37 deletions
diff --git a/Makefile.am b/Makefile.am
index 3a68526..2a17d38 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -52,6 +52,7 @@ opkg_opk_opkg_opk_CFLAGS = \
$(ASAN_CFLAGS)
opkg_opk_opkg_opk_CPPFLAGS = \
-DLOCALEDIR=\"$(localedir)\" \
+ -I"$(top_srcdir)/common"
$(ZLIB_CFLAGS)
opkg_opk_opkg_opk_LDADD = \
$(ASAN_CFLAGS) \
@@ -63,7 +64,8 @@ helpers_mknod_CFLAGS = \
$(WARN_CFLAGS) \
$(ASAN_CFLAGS)
helpers_mknod_CPPFLAGS = \
- -DLOCALEDIR=\"$(localedir)\"
+ -DLOCALEDIR=\"$(localedir)\" \
+ -I"$(top_srcdir)/common"
helpers_mknod_LDADD = \
$(ASAN_CFLAGS)
diff --git a/TODO b/TODO
index f55be81..0334fea 100644
--- a/TODO
+++ b/TODO
@@ -1,5 +1,3 @@
-`mkdir common/ && git mv src/defs.h helpers/mode.[ch] common/ && \
- git rm helpers/defs.h` and update build system and sources
Write `common/error.[ch]`:
`opkg_opk_set_program_name()`, `opkg_opk_error()`, `opkg_opk_errno()`
Ownership override
diff --git a/helpers/defs.h b/common/defs.h
index 24e9776..24e9776 100644
--- a/helpers/defs.h
+++ b/common/defs.h
diff --git a/helpers/mode.c b/common/mode.c
index b643a60..b643a60 100644
--- a/helpers/mode.c
+++ b/common/mode.c
diff --git a/helpers/mode.h b/common/mode.h
index b332268..b332268 100644
--- a/helpers/mode.h
+++ b/common/mode.h
diff --git a/helpers/local.mk b/helpers/local.mk
index 479b716..2d82b25 100644
--- a/helpers/local.mk
+++ b/helpers/local.mk
@@ -1,5 +1,5 @@
helpers_mknod_SOURCES = \
- %reldir%/defs.h \
- %reldir%/mknod.c \
- %reldir%/mode.c \
- %reldir%/mode.h
+ common/defs.h \
+ common/mode.c \
+ common/mode.h \
+ %reldir%/mknod.c
diff --git a/opkg-opk/defs.h b/opkg-opk/defs.h
deleted file mode 100644
index 24e9776..0000000
--- a/opkg-opk/defs.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (C) 2023 Patrick McDermott
- *
- * This file is part of opkg-opk.
- *
- * opkg-opk is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * opkg-opk is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with opkg-opk. If not, see <https://www.gnu.org/licenses/>.
- */
-
-#ifndef OPKG_OPK_DEFS_H_
-#define OPKG_OPK_DEFS_H_
-
-#define OPKG_OPK_OK 0
-#define OPKG_OPK_END 1
-#define OPKG_OPK_ERROR -1
-
-#endif /* OPKG_OPK_DEFS_H_ */
diff --git a/opkg-opk/local.mk b/opkg-opk/local.mk
index 5fbfd8e..6653839 100644
--- a/opkg-opk/local.mk
+++ b/opkg-opk/local.mk
@@ -1,5 +1,5 @@
opkg_opk_opkg_opk_SOURCES += \
- %reldir%/defs.h \
+ common/defs.h \
%reldir%/dirent.c \
%reldir%/dirent.h \
%reldir%/gzip.c \
diff --git a/opkg-opk/opk/read.c b/opkg-opk/opk/read.c
index 21fbc66..369fcd7 100644
--- a/opkg-opk/opk/read.c
+++ b/opkg-opk/opk/read.c
@@ -23,7 +23,7 @@
#include <string.h>
#include <sys/stat.h>
#include <time.h>
-#include "../defs.h"
+#include "defs.h"
#include "../gzip.h"
#include "../i18n.h"
#include "../opk.h"
diff --git a/opkg-opk/opk/write.c b/opkg-opk/opk/write.c
index 284b625..520b5fd 100644
--- a/opkg-opk/opk/write.c
+++ b/opkg-opk/opk/write.c
@@ -27,7 +27,7 @@
#include <sys/stat.h>
#include <sys/sysmacros.h>
#include <unistd.h>
-#include "../defs.h"
+#include "defs.h"
#include "../dirent.h"
#include "../gzip.h"
#include "../i18n.h"