1
0
Fork 0

Adding upstream version 2.7.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-16 12:25:41 +01:00
parent 04338f02fe
commit d6e1a5d456
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
663 changed files with 15529 additions and 6994 deletions

View file

@ -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)