diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-02-27 16:25:20 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-02-27 16:25:20 +0000 |
commit | 391d8b29e626b67ef7d2675750b425200decfc7c (patch) | |
tree | 498d73d40aa735c804a184db1e9bd1828e192838 /common.h | |
parent | 687c1d1454898339b5cf00654359a326089ffccd (diff) | |
download | ldetect-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.h | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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))) |