Adding upstream version 2.7.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
04338f02fe
commit
d6e1a5d456
663 changed files with 15529 additions and 6994 deletions
|
@ -5,6 +5,8 @@
|
|||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "util/mem.h"
|
||||
|
||||
#define __cleanup__(fn) __attribute__((cleanup(fn)))
|
||||
|
||||
#define DECLARE_CLEANUP_FUNC(name, type) \
|
||||
|
@ -17,17 +19,17 @@ DECLARE_CLEANUP_FUNC(name, type) \
|
|||
free_fn(*__p); \
|
||||
}
|
||||
|
||||
DECLARE_CLEANUP_FUNC(cleanup_charp, char *);
|
||||
|
||||
static inline void freep(void *p)
|
||||
{
|
||||
free(*(void**) p);
|
||||
}
|
||||
#define _cleanup_free_ __cleanup__(freep)
|
||||
|
||||
#define _cleanup_huge_ __cleanup__(nvme_free_huge)
|
||||
|
||||
static inline void close_file(int *f)
|
||||
{
|
||||
if (*f >= 0)
|
||||
if (*f > STDERR_FILENO)
|
||||
close(*f);
|
||||
}
|
||||
#define _cleanup_file_ __cleanup__(close_file)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue