summaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-02-27 16:25:20 +0000
committerOlivier Blin <oblin@mandriva.com>2008-02-27 16:25:20 +0000
commit391d8b29e626b67ef7d2675750b425200decfc7c (patch)
tree498d73d40aa735c804a184db1e9bd1828e192838 /common.h
parent687c1d1454898339b5cf00654359a326089ffccd (diff)
downloadldetect-391d8b29e626b67ef7d2675750b425200decfc7c.tar
ldetect-391d8b29e626b67ef7d2675750b425200decfc7c.tar.gz
ldetect-391d8b29e626b67ef7d2675750b425200decfc7c.tar.bz2
ldetect-391d8b29e626b67ef7d2675750b425200decfc7c.tar.xz
ldetect-391d8b29e626b67ef7d2675750b425200decfc7c.zip
add back /bin/gzip support, and prefer it if available (6 hundredths of second faster on my test system, this should please Titi)
Diffstat (limited to 'common.h')
-rw-r--r--common.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/common.h b/common.h
index 8f79471..90b5d1a 100644
--- a/common.h
+++ b/common.h
@@ -8,6 +8,8 @@
#pragma GCC visibility push(hidden)
+#define GZIP_BIN "/bin/gzip"
+
extern char *table_name_to_file(const char *name);
typedef enum {
@@ -22,7 +24,14 @@ extern void pciusb_initialize(struct pciusb_entry *e) NON_EXPORTED;
#define BUF_SIZE 512
typedef struct {
- gzFile zlib_fh;
+ enum { ZLIB, GZIP } gztype;
+ union {
+ struct {
+ FILE *f;
+ pid_t pid;
+ } gzip_fh;
+ gzFile zlib_fh;
+ } u;
} fh;
#define psizeof(a) (sizeof(a) / sizeof(*(a)))