diff options
author | Fabian Groffen <grobian@gentoo.org> | 2019-03-27 11:53:58 +0100 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2019-03-27 11:53:58 +0100 |
commit | d0a8d231167adddb80a73849d3bc70edbfda3507 (patch) | |
tree | 387e1ffea50f8da37063ce5be638fe35f7397712 /main.h | |
parent | libq: split out cache-related funcs from main/qsearch (diff) | |
download | portage-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.h | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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 |