Thu Aug 23 01:25:22 2018 UTC ()
Support building libfdt with _STANDALONE


(jmcneill)
diff -r1.3 -r1.4 src/sys/external/bsd/libfdt/dist/libfdt_env.h

cvs diff -r1.3 -r1.4 src/sys/external/bsd/libfdt/dist/libfdt_env.h (expand / switch to unified diff)

--- src/sys/external/bsd/libfdt/dist/libfdt_env.h 2017/06/08 15:54:32 1.3
+++ src/sys/external/bsd/libfdt/dist/libfdt_env.h 2018/08/23 01:25:22 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: libfdt_env.h,v 1.3 2017/06/08 15:54:32 skrll Exp $ */ 1/* $NetBSD: libfdt_env.h,v 1.4 2018/08/23 01:25:22 jmcneill Exp $ */
2 2
3#ifndef _LIBFDT_ENV_H 3#ifndef _LIBFDT_ENV_H
4#define _LIBFDT_ENV_H 4#define _LIBFDT_ENV_H
5/* 5/*
6 * libfdt - Flat Device Tree manipulation 6 * libfdt - Flat Device Tree manipulation
7 * Copyright (C) 2006 David Gibson, IBM Corporation. 7 * Copyright (C) 2006 David Gibson, IBM Corporation.
8 * Copyright 2012 Kim Phillips, Freescale Semiconductor. 8 * Copyright 2012 Kim Phillips, Freescale Semiconductor.
9 * 9 *
10 * libfdt is dual licensed: you can use it either under the terms of 10 * libfdt is dual licensed: you can use it either under the terms of
11 * the GPL, or the BSD license, at your option. 11 * the GPL, or the BSD license, at your option.
12 * 12 *
13 * a) This library is free software; you can redistribute it and/or 13 * a) This library is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License as 14 * modify it under the terms of the GNU General Public License as
@@ -44,29 +44,30 @@ @@ -44,29 +44,30 @@
44 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 44 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
45 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 45 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
46 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 46 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
47 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 47 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
48 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 48 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
49 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 49 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
50 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 50 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
51 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 51 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
52 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 52 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
53 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 53 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
54 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 54 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
55 */ 55 */
56 56
57#if defined(_KERNEL) 57#if defined(_KERNEL) || defined(_STANDALONE)
58#include <sys/param.h> 58#include <sys/param.h>
59#include <sys/types.h> 59#include <sys/types.h>
 60#include <lib/libkern/libkern.h>
60#else 61#else
61#include <stddef.h> 62#include <stddef.h>
62#include <stdint.h> 63#include <stdint.h>
63#include <stdlib.h> 64#include <stdlib.h>
64#include <string.h> 65#include <string.h>
65#endif 66#endif
66 67
67#ifdef __CHECKER__ 68#ifdef __CHECKER__
68#define FDT_FORCE __attribute__((force)) 69#define FDT_FORCE __attribute__((force))
69#define FDT_BITWISE __attribute__((bitwise)) 70#define FDT_BITWISE __attribute__((bitwise))
70#else 71#else
71#define FDT_FORCE 72#define FDT_FORCE
72#define FDT_BITWISE 73#define FDT_BITWISE