aboutsummaryrefslogtreecommitdiff
path: root/main.h
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2019-03-27 11:53:58 +0100
committerFabian Groffen <grobian@gentoo.org>2019-03-27 11:53:58 +0100
commitd0a8d231167adddb80a73849d3bc70edbfda3507 (patch)
tree387e1ffea50f8da37063ce5be638fe35f7397712 /main.h
parentlibq: split out cache-related funcs from main/qsearch (diff)
downloadportage-utils-d0a8d231167adddb80a73849d3bc70edbfda3507.tar.gz
portage-utils-d0a8d231167adddb80a73849d3bc70edbfda3507.tar.bz2
portage-utils-d0a8d231167adddb80a73849d3bc70edbfda3507.zip
build: compile applets as separate objects
Instead of including everything from a single file, compile each applet separately. This standardises things somewhat, and allows for parallel compilation. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'main.h')
-rw-r--r--main.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/main.h b/main.h
index ef98c5df..958efa62 100644
--- a/main.h
+++ b/main.h
@@ -52,6 +52,16 @@ extern const char *argv0;
# define MAX(x, y) ((x) < (y) ? (y) : (x))
#endif
+#define READ_BE_INT32(P) \
+ (((P)[0] << 24) | ((P)[1] << 16) | ((P)[2] << 8 ) | (P)[3])
+#define WRITE_BE_INT32(P,I) \
+{ \
+ (P)[0] = (I & 0xff000000) >> 24; \
+ (P)[1] = (I & 0x00ff0000) >> 16; \
+ (P)[2] = (I & 0x0000ff00) >> 8; \
+ (P)[3] = (I & 0x000000ff); \
+}
+
/* Easy enough to glue to older versions */
#ifndef O_CLOEXEC
# define O_CLOEXEC 0
@@ -122,6 +132,4 @@ extern FILE *warnout;
#define errp(fmt, args...) _err(warnp, fmt , ## args)
#define errfp(fmt, args...) _err(warnfp, fmt, ## args)
-int rematch(const char *, const char *, int);
-
#endif