helpers.h, start-stop-daemon.c: remove uneeded macros
TAILQ_CONCAT, TAILQ_FOREACH_SAFE and LIST_FOREACH_SAFE are defined in our bundled queue.h and are no longer required.
This commit is contained in:
parent
1e0a4bebde
commit
6ca79042b9
@ -48,25 +48,6 @@
|
|||||||
|
|
||||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
||||||
|
|
||||||
/* Some libc implemntations don't have these */
|
|
||||||
#ifndef TAILQ_CONCAT
|
|
||||||
#define TAILQ_CONCAT(head1, head2, field) do { \
|
|
||||||
if (!TAILQ_EMPTY(head2)) { \
|
|
||||||
*(head1)->tqh_last = (head2)->tqh_first; \
|
|
||||||
(head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \
|
|
||||||
(head1)->tqh_last = (head2)->tqh_last; \
|
|
||||||
TAILQ_INIT((head2)); \
|
|
||||||
} \
|
|
||||||
} while (0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef TAILQ_FOREACH_SAFE
|
|
||||||
#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \
|
|
||||||
for ((var) = TAILQ_FIRST((head)); \
|
|
||||||
(var) && ((tvar) = TAILQ_NEXT((var), field), 1); \
|
|
||||||
(var) = (tvar))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __GLIBC__
|
#ifdef __GLIBC__
|
||||||
# if ! defined (__UCLIBC__) && ! defined (__dietlibc__)
|
# if ! defined (__UCLIBC__) && ! defined (__dietlibc__)
|
||||||
# define strlcpy(dst, src, size) snprintf(dst, size, "%s", src)
|
# define strlcpy(dst, src, size) snprintf(dst, size, "%s", src)
|
||||||
|
@ -78,15 +78,6 @@ static struct pam_conv conv = { NULL, NULL};
|
|||||||
#include "rc.h"
|
#include "rc.h"
|
||||||
#include "rc-misc.h"
|
#include "rc-misc.h"
|
||||||
|
|
||||||
/* Some libc implementations don't define this */
|
|
||||||
#ifndef LIST_FOREACH_SAFE
|
|
||||||
#define LIST_FOREACH_SAFE(var, head, field, tvar) \
|
|
||||||
for ((var) = LIST_FIRST((head)); \
|
|
||||||
(var) && ((tvar) = LIST_NEXT((var), field), 1); \
|
|
||||||
(var) = (tvar))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct scheduleitem
|
typedef struct scheduleitem
|
||||||
{
|
{
|
||||||
enum
|
enum
|
||||||
|
Loading…
Reference in New Issue
Block a user