summaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-03-14 12:32:43 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-03-14 12:32:43 +0000
commit4fcbd8f87cab61e77ce04d958991ca59604b7e86 (patch)
tree8a087c2c5eba1cac85556d307daad7304efd6e96 /common.h
parent869c403c497d881a099e401ebd9e3f3db0f75599 (diff)
downloadldetect-4fcbd8f87cab61e77ce04d958991ca59604b7e86.tar
ldetect-4fcbd8f87cab61e77ce04d958991ca59604b7e86.tar.gz
ldetect-4fcbd8f87cab61e77ce04d958991ca59604b7e86.tar.bz2
ldetect-4fcbd8f87cab61e77ce04d958991ca59604b7e86.tar.xz
ldetect-4fcbd8f87cab61e77ce04d958991ca59604b7e86.zip
add dmitable use
Diffstat (limited to 'common.h')
-rw-r--r--common.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/common.h b/common.h
index 9957d42..0458ba5 100644
--- a/common.h
+++ b/common.h
@@ -1,8 +1,10 @@
#define psizeof(a) (sizeof(a) / sizeof(*(a)))
-
-static inline void *memdup(void *src, size_t size) {
- void *r = malloc(size);
- memcpy(r, src, size);
- return r;
-}
#define ifree(p) do { if (p) { free(p); p = NULL; } } while (0)
+
+
+typedef struct {
+ FILE *f;
+ pid_t pid;
+} fh;
+extern fh fh_open(const char *name);
+extern void fh_close(fh *f);