Deleted Added
full compact
gelf_cap.c (164190) gelf_cap.c (165317)
1/*-
2 * Copyright (c) 2006 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

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

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
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2006 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

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

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
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/lib/libelf/gelf_cap.c 164190 2006-11-11 17:16:35Z jkoshy $");
28__FBSDID("$FreeBSD: head/lib/libelf/gelf_cap.c 165317 2006-12-18 05:40:01Z jkoshy $");
29
30#include <sys/limits.h>
31
32#include <assert.h>
33#include <gelf.h>
29
30#include <sys/limits.h>
31
32#include <assert.h>
33#include <gelf.h>
34#include <osreldate.h>
34
35#include "_libelf.h"
36
35
36#include "_libelf.h"
37
38#if __FreeBSD_version >= 700025
39
37GElf_Cap *
38gelf_getcap(Elf_Data *d, int ndx, GElf_Cap *dst)
39{
40 int ec;
41 Elf *e;
42 Elf_Scn *scn;
43 Elf32_Cap *cap32;
44 Elf64_Cap *cap64;

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

138 } else {
139 cap64 = (Elf64_Cap *) d->d_buf + ndx;
140
141 *cap64 = *gc;
142 }
143
144 return (1);
145}
40GElf_Cap *
41gelf_getcap(Elf_Data *d, int ndx, GElf_Cap *dst)
42{
43 int ec;
44 Elf *e;
45 Elf_Scn *scn;
46 Elf32_Cap *cap32;
47 Elf64_Cap *cap64;

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

141 } else {
142 cap64 = (Elf64_Cap *) d->d_buf + ndx;
143
144 *cap64 = *gc;
145 }
146
147 return (1);
148}
149
150#endif /* __FreeBSD_version >= 700025 */