_elftc.h (6cec9cad762b6476313fb1f8e931a1647822db6b) _elftc.h (71a0c925ce76a304c25bf6d8d8035720f82941bd)
1/*-
2 * Copyright (c) 2009 Joseph Koshy
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2009 Joseph Koshy
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $Id: _elftc.h 2922 2013-03-17 22:53:15Z kaiwang27 $
26 * $Id: _elftc.h 3139 2015-01-05 03:17:06Z kaiwang27 $
27 */
28
29/**
30 ** Miscellanous definitions needed by multiple components.
31 **/
32
33#ifndef _ELFTC_H
34#define _ELFTC_H

--- 36 unchanged lines hidden (view full) ---

71 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
72 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
73 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
74 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
75 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
76 * SUCH DAMAGE.
77 */
78
27 */
28
29/**
30 ** Miscellanous definitions needed by multiple components.
31 **/
32
33#ifndef _ELFTC_H
34#define _ELFTC_H

--- 36 unchanged lines hidden (view full) ---

71 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
72 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
73 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
74 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
75 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
76 * SUCH DAMAGE.
77 */
78
79#ifndef LIST_FOREACH_SAFE
80#define LIST_FOREACH_SAFE(var, head, field, tvar) \
81 for ((var) = LIST_FIRST((head)); \
82 (var) && ((tvar) = LIST_NEXT((var), field), 1); \
83 (var) = (tvar))
84#endif
85
79#ifndef SLIST_FOREACH_SAFE
86#ifndef SLIST_FOREACH_SAFE
80#define SLIST_FOREACH_SAFE(var, head, field, tvar) \
81 for ((var) = SLIST_FIRST((head)); \
82 (var) && ((tvar) = SLIST_NEXT((var), field), 1); \
87#define SLIST_FOREACH_SAFE(var, head, field, tvar) \
88 for ((var) = SLIST_FIRST((head)); \
89 (var) && ((tvar) = SLIST_NEXT((var), field), 1); \
83 (var) = (tvar))
84#endif
85
86#ifndef STAILQ_CONCAT
87#define STAILQ_CONCAT(head1, head2) do { \
88 if (!STAILQ_EMPTY((head2))) { \
89 *(head1)->stqh_last = (head2)->stqh_first; \
90 (head1)->stqh_last = (head2)->stqh_last; \

--- 368 unchanged lines hidden ---
90 (var) = (tvar))
91#endif
92
93#ifndef STAILQ_CONCAT
94#define STAILQ_CONCAT(head1, head2) do { \
95 if (!STAILQ_EMPTY((head2))) { \
96 *(head1)->stqh_last = (head2)->stqh_first; \
97 (head1)->stqh_last = (head2)->stqh_last; \

--- 368 unchanged lines hidden ---