CVS commit: src/external/bsd/elftoolchain/dist/common

2021-04-29 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Thu Apr 29 17:38:08 UTC 2021

Modified Files:
src/external/bsd/elftoolchain/dist/common: elfdefinitions.h

Log Message:
Add a version control system marker.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/external/bsd/elftoolchain/dist/common/elfdefinitions.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/elftoolchain/dist/common/elfdefinitions.h
diff -u src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.6 src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.7
--- src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.6	Thu Apr  8 19:37:43 2021
+++ src/external/bsd/elftoolchain/dist/common/elfdefinitions.h	Thu Apr 29 17:38:08 2021
@@ -1,3 +1,5 @@
+/*	$NetBSD: elfdefinitions.h,v 1.7 2021/04/29 17:38:08 jkoshy Exp $	*/
+
 /*-
  * Copyright (c) 2010,2021 Joseph Koshy
  * All rights reserved.



CVS commit: src/external/bsd/elftoolchain/dist/common

2021-04-24 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Sat Apr 24 09:42:00 UTC 2021

Removed Files:
src/external/bsd/elftoolchain/dist/common: native-elf-format
os.Linux.mk

Log Message:
Remove files that no longer exist upstream.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r0 \
src/external/bsd/elftoolchain/dist/common/native-elf-format \
src/external/bsd/elftoolchain/dist/common/os.Linux.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/elftoolchain/dist/common

2021-04-08 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Thu Apr  8 19:37:43 UTC 2021

Modified Files:
src/external/bsd/elftoolchain/dist/common: elfdefinitions.h

Log Message:
Update Elftoolchain 'common/elfdefinitions.h' to upstream r3943.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/external/bsd/elftoolchain/dist/common/elfdefinitions.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/elftoolchain/dist/common/elfdefinitions.h
diff -u src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.5 src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.6
--- src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.5	Sun Mar  7 14:53:59 2021
+++ src/external/bsd/elftoolchain/dist/common/elfdefinitions.h	Thu Apr  8 19:37:43 2021
@@ -1,7 +1,5 @@
-/*	$NetBSD: elfdefinitions.h,v 1.5 2021/03/07 14:53:59 jkoshy Exp $	*/
-
 /*-
- * Copyright (c) 2010 Joseph Koshy
+ * Copyright (c) 2010,2021 Joseph Koshy
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -25,2969 +23,12 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * Id: elfdefinitions.h 3916 2020-12-12 11:26:53Z jkoshy
- */
-
-/*
- * These definitions are based on:
- * - The public specification of the ELF format as defined in the
- *   October 2009 draft of System V ABI.
- *   See: http://www.sco.com/developers/gabi/latest/ch4.intro.html
- * - The May 1998 (version 1.5) draft of "The ELF-64 object format".
- * - Processor-specific ELF ABI definitions for sparc, i386, amd64, mips,
- *   ia64, powerpc, and RISC-V processors.
- * - The "Linkers and Libraries Guide", from Sun Microsystems.
+ * Id: elfdefinitions.h 3942 2021-04-05 12:16:03Z jkoshy
  */
 
 #ifndef _ELFDEFINITIONS_H_
 #define _ELFDEFINITIONS_H_
 
-#include 
-
-/*
- * Types of capabilities.
- */
-
-#define	_ELF_DEFINE_CAPABILITIES()\
-_ELF_DEFINE_CA(CA_SUNW_NULL,	0,	"ignored")		\
-_ELF_DEFINE_CA(CA_SUNW_HW_1,	1,	"hardware capability")	\
-_ELF_DEFINE_CA(CA_SUNW_SW_1,	2,	"software capability")
-
-#undef	_ELF_DEFINE_CA
-#define	_ELF_DEFINE_CA(N, V, DESCR)	N = V ,
-enum {
-	_ELF_DEFINE_CAPABILITIES()
-	CA__LAST__
-};
-
-/*
- * Flags used with dynamic linking entries.
- */
-
-#define	_ELF_DEFINE_DYN_FLAGS()	\
-_ELF_DEFINE_DF(DF_ORIGIN,   0x1,			\
-	"object being loaded may refer to $ORIGIN")		\
-_ELF_DEFINE_DF(DF_SYMBOLIC, 0x2,			\
-	"search library for references before executable")	\
-_ELF_DEFINE_DF(DF_TEXTREL,  0x4,			\
-	"relocation entries may modify text segment")		\
-_ELF_DEFINE_DF(DF_BIND_NOW, 0x8,			\
-	"process relocation entries at load time")		\
-_ELF_DEFINE_DF(DF_STATIC_TLS,   0x10,			\
-	"uses static thread-local storage")			\
-_ELF_DEFINE_DF(DF_1_BIND_NOW,   0x1,			\
-	"process relocation entries at load time")		\
-_ELF_DEFINE_DF(DF_1_GLOBAL, 0x2,			\
-	"unused")		\
-_ELF_DEFINE_DF(DF_1_GROUP,  0x4,			\
-	"object is a member of a group")			\
-_ELF_DEFINE_DF(DF_1_NODELETE,   0x8,			\
-	"object cannot be deleted from a process")		\
-_ELF_DEFINE_DF(DF_1_LOADFLTR,   0x10,			\
-	"immediate load filtees")\
-_ELF_DEFINE_DF(DF_1_INITFIRST,  0x20,			\
-	"initialize object first")\
-_ELF_DEFINE_DF(DF_1_NOOPEN, 0x40,			\
-	"disallow dlopen()")	\
-_ELF_DEFINE_DF(DF_1_ORIGIN, 0x80,			\
-	"object being loaded may refer to $ORIGIN")		\
-_ELF_DEFINE_DF(DF_1_DIRECT, 0x100,			\
-	"direct bindings enabled")\
-_ELF_DEFINE_DF(DF_1_INTERPOSE,  0x400,			\
-	"object is interposer")	\
-_ELF_DEFINE_DF(DF_1_NODEFLIB,   0x800,			\
-	"ignore default library search path")			\
-_ELF_DEFINE_DF(DF_1_NODUMP, 0x1000,			\
-	"disallow dldump()")	\
-_ELF_DEFINE_DF(DF_1_CONFALT,0x2000,			\
-	"object is a configuration alternative")		\
-_ELF_DEFINE_DF(DF_1_ENDFILTEE,  0x4000,			\
-	"filtee terminates filter search")			\
-_ELF_DEFINE_DF(DF_1_DISPRELDNE, 0x8000,			\
-	"displacement relocation done")\
-_ELF_DEFINE_DF(DF_1_DISPRELPND, 0x1,			\
-	"displacement relocation pending")
-#undef	_ELF_DEFINE_DF
-#define	_ELF_DEFINE_DF(N, V, DESCR)	N = V ,
-enum {
-	_ELF_DEFINE_DYN_FLAGS()
-	DF__LAST__
-};
-
-
-/*
- * Dynamic linking entry types.
- */
-
-#define	_ELF_DEFINE_DYN_TYPES()		\
-_ELF_DEFINE_DT(DT_NULL, 0, "end of array")			\
-_ELF_DEFINE_DT(DT_NEEDED,   1, "names a needed library")	\
-_ELF_DEFINE_DT(DT_PLTRELSZ, 2,	\
-	"size in bytes of associated relocation entries")		\
-_ELF_DEFINE_DT(DT_PLTGOT,   3,	\
-	"address associated with the procedure linkage table")		\
-_ELF_DEFINE_DT(DT_HASH, 4,	\
-	"address of the symbol hash table")\
-_ELF_DEFINE_DT(DT_STRTAB,   5,	\
-	"address of the string table")	\
-_ELF_DEFINE_DT(DT_SYMTAB,   

CVS commit: src/external/bsd/elftoolchain/dist/common

2021-04-06 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Tue Apr  6 19:28:26 UTC 2021

Modified Files:
src/external/bsd/elftoolchain/dist/common: Makefile

Log Message:
Sync with upstream r3943.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/elftoolchain/dist/common/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/elftoolchain/dist/common/Makefile
diff -u src/external/bsd/elftoolchain/dist/common/Makefile:1.2 src/external/bsd/elftoolchain/dist/common/Makefile:1.3
--- src/external/bsd/elftoolchain/dist/common/Makefile:1.2	Thu Nov 26 21:52:00 2020
+++ src/external/bsd/elftoolchain/dist/common/Makefile	Tue Apr  6 19:28:25 2021
@@ -1,7 +1,9 @@
-# Id: Makefile 3594 2018-04-11 18:26:50Z jkoshy
+# Id: Makefile 3938 2021-04-04 18:16:18Z jkoshy
 
 TOP=	..
 
+SUBDIR=		sys
+
 INCS=		elfdefinitions.h
 INCSDIR=	/usr/include
 
@@ -16,3 +18,4 @@ cleandepend:
 	rm -f ${.OBJDIR}/.depend
 
 .include "${TOP}/mk/elftoolchain.inc.mk"
+.include "${TOP}/mk/elftoolchain.subdir.mk"



CVS commit: src/external/bsd/elftoolchain/dist/common/sys

2021-04-06 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Tue Apr  6 18:38:04 UTC 2021

Added Files:
src/external/bsd/elftoolchain/dist/common/sys: Makefile elfconstants.m4
elfdefinitions.m4

Log Message:
Add files present in upstream revision r3943.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/elftoolchain/dist/common/sys/Makefile \
src/external/bsd/elftoolchain/dist/common/sys/elfconstants.m4 \
src/external/bsd/elftoolchain/dist/common/sys/elfdefinitions.m4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/external/bsd/elftoolchain/dist/common/sys/Makefile
diff -u /dev/null src/external/bsd/elftoolchain/dist/common/sys/Makefile:1.1
--- /dev/null	Tue Apr  6 18:38:04 2021
+++ src/external/bsd/elftoolchain/dist/common/sys/Makefile	Tue Apr  6 18:38:04 2021
@@ -0,0 +1,25 @@
+# Id: Makefile 3943 2021-04-05 17:03:34Z jkoshy
+
+TOP=	../..
+
+SRCS=		elfdefinitions.m4 elfconstants.m4
+INCS=		elfdefinitions.h
+INCSDIR=	/usr/include/sys
+
+CLEANFILES=	${INCS}
+
+.PHONY:	all clean clobber depend obj
+
+all:	${INCS}
+
+elfdefinitions.h:	elfdefinitions.m4 elfconstants.m4
+	m4 -I${.CURDIR} -D SRCDIR=${.CURDIR} ${M4FLAGS} \
+		elfdefinitions.m4 > ${.TARGET}
+
+depend cleandepend:
+
+clean clobber:
+	rm -f ${CLEANFILES}
+
+.include "${TOP}/mk/elftoolchain.inc.mk"
+.include "${TOP}/mk/elftoolchain.m4.mk"
Index: src/external/bsd/elftoolchain/dist/common/sys/elfconstants.m4
diff -u /dev/null src/external/bsd/elftoolchain/dist/common/sys/elfconstants.m4:1.1
--- /dev/null	Tue Apr  6 18:38:04 2021
+++ src/external/bsd/elftoolchain/dist/common/sys/elfconstants.m4	Tue Apr  6 18:38:04 2021
@@ -0,0 +1,2592 @@
+# Copyright (c) 2010,2021 Joseph Koshy
+# All rights reserved.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+
+# These definitions are based on:
+# - The public specification of the ELF format as defined in the
+#   October 2009 draft of System V ABI.
+#   See: http://www.sco.com/developers/gabi/latest/ch4.intro.html
+# - The May 1998 (version 1.5) draft of "The ELF-64 object format".
+# - Processor-specific ELF ABI definitions for sparc, i386, amd64, mips,
+#   ia64, powerpc, and RISC-V processors.
+# - The "Linkers and Libraries Guide", from Sun Microsystems.
+
+define(`VCSID_ELFCONSTANTS_M4',
+	`Id: elfconstants.m4 3939 2021-04-04 20:15:13Z jkoshy')
+
+#
+# Types of capabilities.
+# 
+define(`DEFINE_CAPABILITIES',`
+DEFINE_CAPABILITY(`CA_SUNW_NULL',	0,	`ignored')
+DEFINE_CAPABILITY(`CA_SUNW_HW_1',	1,	`hardware capability')
+DEFINE_CAPABILITY(`CA_SUNW_SW_1',	2,	`software capability')')
+
+#
+# Flags used with dynamic linking entries.
+#
+define(`DEFINE_DYN_FLAGS',`
+DEFINE_DYN_FLAG(`DF_ORIGIN',   0x1,
+	`object being loaded may refer to `$ORIGIN'')
+DEFINE_DYN_FLAG(`DF_SYMBOLIC', 0x2,
+	`search library for references before executable')
+DEFINE_DYN_FLAG(`DF_TEXTREL',  0x4,
+	`relocation entries may modify text segment')
+DEFINE_DYN_FLAG(`DF_BIND_NOW', 0x8,
+	`process relocation entries at load time')
+DEFINE_DYN_FLAG(`DF_STATIC_TLS',   0x10,
+	`uses static thread-local storage')
+DEFINE_DYN_FLAG(`DF_1_BIND_NOW',   0x1,
+	`process relocation entries at load time')
+DEFINE_DYN_FLAG(`DF_1_GLOBAL', 0x2,
+	`unused')
+DEFINE_DYN_FLAG(`DF_1_GROUP',  0x4,
+	`object is a member of a group')
+DEFINE_DYN_FLAG(`DF_1_NODELETE',   0x8,
+	`object cannot be deleted from a process')
+DEFINE_DYN_FLAG(`DF_1_LOADFLTR',   0x10,
+	`immediate load filtees')
+DEFINE_DYN_FLAG(`DF_1_INITFIRST',  0x20,
+	`initialize object first')
+DEFINE_DYN_FLAG(`DF_1_NOOPEN', 0x40,
+	`disallow dlopen()')

CVS commit: src/external/bsd/elftoolchain/dist/common

2021-03-10 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Wed Mar 10 21:36:29 UTC 2021

Modified Files:
src/external/bsd/elftoolchain/dist/common: _elftc.h

Log Message:
Update to upstream elftoolchain revision r3933.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/elftoolchain/dist/common/_elftc.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/elftoolchain/dist/common/_elftc.h
diff -u src/external/bsd/elftoolchain/dist/common/_elftc.h:1.7 src/external/bsd/elftoolchain/dist/common/_elftc.h:1.8
--- src/external/bsd/elftoolchain/dist/common/_elftc.h:1.7	Thu Nov 26 21:01:47 2020
+++ src/external/bsd/elftoolchain/dist/common/_elftc.h	Wed Mar 10 21:36:29 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: _elftc.h,v 1.7 2020/11/26 21:01:47 jkoshy Exp $	*/
+/*	$NetBSD: _elftc.h,v 1.8 2021/03/10 21:36:29 jkoshy Exp $	*/
 
 /*-
  * Copyright (c) 2009 Joseph Koshy
@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * Id: _elftc.h 3894 2020-11-20 18:02:53Z jkoshy
+ * Id: _elftc.h 3933 2021-03-10 21:09:49Z jkoshy
  */
 
 /**
@@ -384,6 +384,10 @@ extern const char *__progname;
 #include 
 #include 
 
+#ifndef	roundup2
+#define	roundup2	roundup
+#endif
+
 #define	ELFTC_BYTE_ORDER			_BYTE_ORDER
 #define	ELFTC_BYTE_ORDER_LITTLE_ENDIAN		_LITTLE_ENDIAN
 #define	ELFTC_BYTE_ORDER_BIG_ENDIAN		_BIG_ENDIAN



CVS commit: src/external/bsd/elftoolchain/dist/common

2021-03-07 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Sun Mar  7 14:53:59 UTC 2021

Modified Files:
src/external/bsd/elftoolchain/dist/common: elfdefinitions.h

Log Message:
Sync with Elftoolchain [r3916]: update the list of known EM_* values.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/bsd/elftoolchain/dist/common/elfdefinitions.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/elftoolchain/dist/common/elfdefinitions.h
diff -u src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.4 src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.5
--- src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.4	Thu Nov 19 20:58:30 2020
+++ src/external/bsd/elftoolchain/dist/common/elfdefinitions.h	Sun Mar  7 14:53:59 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: elfdefinitions.h,v 1.4 2020/11/19 20:58:30 jkoshy Exp $	*/
+/*	$NetBSD: elfdefinitions.h,v 1.5 2021/03/07 14:53:59 jkoshy Exp $	*/
 
 /*-
  * Copyright (c) 2010 Joseph Koshy
@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * Id: elfdefinitions.h 3858 2020-05-11 22:53:38Z emaste
+ * Id: elfdefinitions.h 3916 2020-12-12 11:26:53Z jkoshy
  */
 
 /*
@@ -873,7 +873,34 @@ _ELF_DEFINE_EM(EM_KMX32,211,
 _ELF_DEFINE_EM(EM_KMX16,212, "KM211 KMX16 16-bit processor") \
 _ELF_DEFINE_EM(EM_KMX8, 213, "KM211 KMX8 8-bit processor")  \
 _ELF_DEFINE_EM(EM_KVARC,214, "KM211 KMX32 KVARC processor") \
-_ELF_DEFINE_EM(EM_RISCV,243, "RISC-V")
+_ELF_DEFINE_EM(EM_CDP,  215, "Paneve CDP architecture family") \
+_ELF_DEFINE_EM(EM_COGE, 216, "Cognitive Smart Memory Processor") \
+_ELF_DEFINE_EM(EM_COOL, 217, "Bluechip Systems CoolEngine") \
+_ELF_DEFINE_EM(EM_NORC, 218, "Nanoradio Optimized RISC")\
+_ELF_DEFINE_EM(EM_CSR_KALIMBA,  219,\
+	"CSR Kalimba architecture family")  \
+_ELF_DEFINE_EM(EM_Z80,  220, "Zilog Z80")   \
+_ELF_DEFINE_EM(EM_VISIUM,   221,\
+	"Controls and Data Services VISIUMcore processor")  \
+_ELF_DEFINE_EM(EM_FT32, 222,\
+	"FTDI Chip FT32 high performance 32-bit RISC architecture") \
+_ELF_DEFINE_EM(EM_MOXIE,223, "Moxie processor family")  \
+_ELF_DEFINE_EM(EM_AMDGPU,   224, "AMD GPU architecture")\
+_ELF_DEFINE_EM(EM_RISCV,243, "RISC-V")  \
+_ELF_DEFINE_EM(EM_LANAI,244, "Lanai processor") \
+_ELF_DEFINE_EM(EM_CEVA, 245,\
+	"CEVA Processor Architecture Family") 		\
+_ELF_DEFINE_EM(EM_CEVA_X2,  246, "CEVA X2 Processor Family") 	\
+_ELF_DEFINE_EM(EM_BPF,  247,\
+	"Linux BPF – in-kernel virtual machine") 	\
+_ELF_DEFINE_EM(EM_GRAPHCORE_IPU,248,\
+	"Graphcore Intelligent Processing Unit") 	\
+_ELF_DEFINE_EM(EM_IMG1, 249, "Imagination Technologies") 	\
+_ELF_DEFINE_EM(EM_NFP,  250,\
+	"Netronome Flow Processor (NFP)") 	\
+_ELF_DEFINE_EM(EM_CSKY, 252, "C-SKY processor family")  \
+_ELF_DEFINE_EM(EM_65816,257, "WDC 65816/65C816")\
+_ELF_DEFINE_EM(EM_KF32, 259, "ChipON KungFu 32")
 
 #undef	_ELF_DEFINE_EM
 #define	_ELF_DEFINE_EM(N, V, DESCR)	N = V ,



CVS commit: src/external/bsd/elftoolchain/dist/common

2020-11-30 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Mon Nov 30 22:26:30 UTC 2020

Modified Files:
src/external/bsd/elftoolchain/dist/common: uthash.h

Log Message:
Unbreak the lint build (sync to elftoolchain [r3912]).


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/elftoolchain/dist/common/uthash.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/elftoolchain/dist/common/uthash.h
diff -u src/external/bsd/elftoolchain/dist/common/uthash.h:1.3 src/external/bsd/elftoolchain/dist/common/uthash.h:1.4
--- src/external/bsd/elftoolchain/dist/common/uthash.h:1.3	Wed Nov 18 22:23:05 2020
+++ src/external/bsd/elftoolchain/dist/common/uthash.h	Mon Nov 30 22:26:30 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uthash.h,v 1.3 2020/11/18 22:23:05 jkoshy Exp $	*/
+/*	$NetBSD: uthash.h,v 1.4 2020/11/30 22:26:30 jkoshy Exp $	*/
 
 /*
 Copyright (c) 2003-2018, Troy D. Hanson http://troydhanson.github.com/uthash/
@@ -76,6 +76,8 @@ typedef unsigned char uint8_t;
 #endif
 #elif defined(__GNUC__) && !defined(__VXWORKS__)
 #include 
+#elif defined(__lint__)
+#include 
 #else
 typedef unsigned int uint32_t;
 typedef unsigned char uint8_t;



CVS commit: src/external/bsd/elftoolchain/dist/common

2020-11-26 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Thu Nov 26 21:52:00 UTC 2020

Modified Files:
src/external/bsd/elftoolchain/dist/common: Makefile native-elf-format
os.Linux.mk

Log Message:
Sync with elftoolchain upstream.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 \
src/external/bsd/elftoolchain/dist/common/Makefile \
src/external/bsd/elftoolchain/dist/common/native-elf-format
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/external/bsd/elftoolchain/dist/common/os.Linux.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/elftoolchain/dist/common/Makefile
diff -u src/external/bsd/elftoolchain/dist/common/Makefile:1.1.1.2 src/external/bsd/elftoolchain/dist/common/Makefile:1.2
--- src/external/bsd/elftoolchain/dist/common/Makefile:1.1.1.2	Sat Feb 20 02:42:01 2016
+++ src/external/bsd/elftoolchain/dist/common/Makefile	Thu Nov 26 21:52:00 2020
@@ -1,4 +1,4 @@
-# Id: Makefile 3022 2014-04-17 18:05:58Z jkoshy 
+# Id: Makefile 3594 2018-04-11 18:26:50Z jkoshy
 
 TOP=	..
 
@@ -7,12 +7,12 @@ INCSDIR=	/usr/include
 
 .PHONY:	all clean clobber depend obj
 
-all depend obj:
+all depend:
 
 clean clobber:
 	rm -f ${CLEANFILES}
 
 cleandepend:
-	rm -f .depend
+	rm -f ${.OBJDIR}/.depend
 
 .include "${TOP}/mk/elftoolchain.inc.mk"
Index: src/external/bsd/elftoolchain/dist/common/native-elf-format
diff -u src/external/bsd/elftoolchain/dist/common/native-elf-format:1.1.1.2 src/external/bsd/elftoolchain/dist/common/native-elf-format:1.2
--- src/external/bsd/elftoolchain/dist/common/native-elf-format:1.1.1.2	Sat Feb 20 02:42:01 2016
+++ src/external/bsd/elftoolchain/dist/common/native-elf-format	Thu Nov 26 21:52:00 2020
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Id: native-elf-format 3293 2016-01-07 19:26:27Z emaste 
+# Id: native-elf-format 3893 2020-11-20 17:11:04Z jkoshy
 #
 # Find the native ELF format for a host platform by compiling a
 # test object and examining the resulting object.
@@ -9,7 +9,7 @@
 # information statically at compile time.
 
 program=`basename $0`
-tmp_c=`mktemp -u nefXX`.c
+tmp_c=`mktemp ${MAKEOBJDIRPREFIX+"-p ${MAKEOBJDIRPREFIX}"} -u nefXX`.c
 tmp_o=`echo ${tmp_c} | sed -e 's/.c$/.o/'`
 
 trap "rm -f ${tmp_c} ${tmp_o}"	0 1 2 3 15
@@ -35,8 +35,12 @@ $1 ~ "Machine:" {
 elfarch = "EM_386";
 } else if (match($0, "MIPS")) {
 elfarch = "EM_MIPS";
-} else if (match($0, ".*[xX]86-64")) {
+} else if (match($0, ".*[xX]86[-_]64")) {
 elfarch = "EM_X86_64";
+} else if (match($0, "PowerPC64")) {
+elfarch = "EM_PPC64";
+	} else if (match($0, "ARM")) {
+	elfarch = "EM_ARM";
 } else {
 elfarch = "unknown";
 }

Index: src/external/bsd/elftoolchain/dist/common/os.Linux.mk
diff -u src/external/bsd/elftoolchain/dist/common/os.Linux.mk:1.1.1.1 src/external/bsd/elftoolchain/dist/common/os.Linux.mk:1.2
--- src/external/bsd/elftoolchain/dist/common/os.Linux.mk:1.1.1.1	Sun Mar  9 16:25:59 2014
+++ src/external/bsd/elftoolchain/dist/common/os.Linux.mk	Thu Nov 26 21:52:00 2020
@@ -1,13 +1,15 @@
 #
 # Build recipes for Linux based operating systems.
 #
-# Id: os.Linux.mk 2064 2011-10-26 15:12:32Z jkoshy 
+# Id: os.Linux.mk 3594 2018-04-11 18:26:50Z jkoshy
 
 _NATIVE_ELF_FORMAT = native-elf-format
 
-.BEGIN:	${_NATIVE_ELF_FORMAT}.h
+.if !make(obj)
+.BEGIN:	${.OBJDIR}/${_NATIVE_ELF_FORMAT}.h
 
-${_NATIVE_ELF_FORMAT}.h:
+${.OBJDIR}/${_NATIVE_ELF_FORMAT}.h:
 	${.CURDIR}/${_NATIVE_ELF_FORMAT} > ${.TARGET} || rm ${.TARGET}
+.endif
 
-CLEANFILES += ${_NATIVE_ELF_FORMAT}.h
+CLEANFILES += ${.OBJDIR}/${_NATIVE_ELF_FORMAT}.h



CVS commit: src/external/bsd/elftoolchain/dist/common

2020-11-26 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Thu Nov 26 21:01:47 UTC 2020

Modified Files:
src/external/bsd/elftoolchain/dist/common: _elftc.h

Log Message:
Restore an overlooked 'Id' line.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/elftoolchain/dist/common/_elftc.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/elftoolchain/dist/common/_elftc.h
diff -u src/external/bsd/elftoolchain/dist/common/_elftc.h:1.6 src/external/bsd/elftoolchain/dist/common/_elftc.h:1.7
--- src/external/bsd/elftoolchain/dist/common/_elftc.h:1.6	Sat Nov 21 21:04:25 2020
+++ src/external/bsd/elftoolchain/dist/common/_elftc.h	Thu Nov 26 21:01:47 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: _elftc.h,v 1.6 2020/11/21 21:04:25 jkoshy Exp $	*/
+/*	$NetBSD: _elftc.h,v 1.7 2020/11/26 21:01:47 jkoshy Exp $	*/
 
 /*-
  * Copyright (c) 2009 Joseph Koshy
@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $Id: _elftc.h,v 1.6 2020/11/21 21:04:25 jkoshy Exp $
+ * Id: _elftc.h 3894 2020-11-20 18:02:53Z jkoshy
  */
 
 /**



CVS commit: src/external/bsd/elftoolchain/dist/common

2020-11-21 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Sat Nov 21 21:04:25 UTC 2020

Modified Files:
src/external/bsd/elftoolchain/dist/common: _elftc.h

Log Message:
Sync '_elftc.h' with the upstream elftoolchain project.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/elftoolchain/dist/common/_elftc.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/elftoolchain/dist/common/_elftc.h
diff -u src/external/bsd/elftoolchain/dist/common/_elftc.h:1.5 src/external/bsd/elftoolchain/dist/common/_elftc.h:1.6
--- src/external/bsd/elftoolchain/dist/common/_elftc.h:1.5	Sun Mar 13 03:47:41 2016
+++ src/external/bsd/elftoolchain/dist/common/_elftc.h	Sat Nov 21 21:04:25 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: _elftc.h,v 1.5 2016/03/13 03:47:41 christos Exp $	*/
+/*	$NetBSD: _elftc.h,v 1.6 2020/11/21 21:04:25 jkoshy Exp $	*/
 
 /*-
  * Copyright (c) 2009 Joseph Koshy
@@ -25,11 +25,11 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * Id: _elftc.h 3244 2015-08-31 19:53:08Z emaste 
+ * $Id: _elftc.h,v 1.6 2020/11/21 21:04:25 jkoshy Exp $
  */
 
 /**
- ** Miscellanous definitions needed by multiple components.
+ ** Miscellaneous definitions needed by multiple components.
  **/
 
 #ifndef	_ELFTC_H
@@ -284,49 +284,34 @@ struct name {			\
 
 /*
  * VCS Ids.
+ *
+ * The marker below is intended to be replaced with a project-specific
+ * definition of the ELFTC_VCSID macro.
  */
 
+#ifndef ELFTC_VCSID
+#define	ELFTC_VCSID(ID)		/**/
+#endif
+
 #ifndef	ELFTC_VCSID
 
-#if defined(__DragonFly__)
-#define	ELFTC_VCSID(ID)		__RCSID(ID)
-#endif
+#if defined(__DragonFly__) || defined(__NetBSD__)
 
-#if defined(__FreeBSD__)
-#define	ELFTC_VCSID(ID)		__FBSDID(ID)
-#endif
+#define	ELFTC_VCSID(ID)		__RCSID(ID)
 
-#if defined(__APPLE__) || defined(__GLIBC__) || defined(__GNU__) || \
-defined(__linux__)
-#if defined(__GNUC__)
-#define	ELFTC_VCSID(ID)		__asm__(".ident\t\"" ID "\"")
-#else
-#define	ELFTC_VCSID(ID)		/**/
-#endif
-#endif
+#elif defined(__FreeBSD__)
 
-#if defined(__minix)
-#if defined(__GNUC__)
-#define	ELFTC_VCSID(ID)		__asm__(".ident\t\"" ID "\"")
-#else
-#define	ELFTC_VCSID(ID)		/**/
-#endif	/* __GNU__ */
-#endif
+#define	ELFTC_VCSID(ID)		__FBSDID(ID)
 
-#if defined(__NetBSD__)
-#define	ELFTC_VCSID(ID)		__RCSID(ID)
-#endif
+#elif defined(__APPLE__) || defined(__OpenBSD__) || defined(__GLIBC__) || \
+defined(__GNU__) || defined(__linux__) || defined(__minix)
 
-#if defined(__OpenBSD__)
 #if defined(__GNUC__)
 #define	ELFTC_VCSID(ID)		__asm__(".ident\t\"" ID "\"")
 #else
 #define	ELFTC_VCSID(ID)		/**/
-#endif	/* __GNUC__ */
 #endif
 
-#ifndef ELFTC_VCSID
-#define	ELFTC_VCSID(ID)		/**/
 #endif
 
 #endif	/* ELFTC_VCSID */
@@ -344,7 +329,7 @@ struct name {			\
 
 #define	ELFTC_GETPROGNAME()	getprogname()
 
-#endif	/* __DragonFly__ || __FreeBSD__ || __minix || __NetBSD__ */
+#endif	/* __APPLE__ || __DragonFly__ || __FreeBSD__ || __minix || __NetBSD__ */
 
 
 #if defined(__GLIBC__) || defined(__linux__)
@@ -372,12 +357,41 @@ extern const char *__progname;
 #endif	/* ELFTC_GETPROGNAME */
 
 
-#ifndef HAVE_NBTOOL_CONFIG_H
-/**
- ** Per-OS configuration.
- **/
+/*
+ * Per-OS configuration.
+ *
+ * The following symbols are supported by this configuration fragment,
+ * although not all the OSes so referenced are fully supported.
+ *
+ * Cross-compilation:
+ *
+ * HAVE_NBTOOL_CONFIG_H : cross-compiling NetBSD tools on various OSes.
+ *
+ * Native compilation:
+ *
+ * __APPLE__ : compiling under Mac OS X.
+ * __DragonFly__ : compiling under DragonFlyBSD.
+ * __GLIBC__ : compiling under GNU based systems, such as GNU/kFreeBSD.
+ * __linux__ : compiling under GNU/Linux systems.
+ * __FreeBSD__   : compiling under FreeBSD.
+ * __minix   : compiling under Minix3.
+ * __NetBSD__: compiling (native) under NetBSD.
+ * __OpenBSD__   : compiling under OpenBSD.
+ */
 
-#if defined(__APPLE__)
+#if defined(HAVE_NBTOOL_CONFIG_H)
+
+#include 
+#include 
+
+#define	ELFTC_BYTE_ORDER			_BYTE_ORDER
+#define	ELFTC_BYTE_ORDER_LITTLE_ENDIAN		_LITTLE_ENDIAN
+#define	ELFTC_BYTE_ORDER_BIG_ENDIAN		_BIG_ENDIAN
+
+#define	ELFTC_HAVE_MMAP1
+#define	ELFTC_HAVE_STRMODE			1
+
+#elif defined(__APPLE__)
 
 #include 
 #define	htobe32(x)	OSSwapHostToBigInt32(x)
@@ -391,10 +405,8 @@ extern const char *__progname;
 #define	ELFTC_HAVE_STRMODE			1
 
 #define ELFTC_NEED_BYTEORDER_EXTENSIONS		1
-#endif /* __APPLE__ */
-
 
-#if defined(__DragonFly__)
+#elif defined(__DragonFly__)
 
 #include 
 #include 
@@ -405,9 +417,7 @@ extern const char *__progname;
 
 #define	ELFTC_HAVE_MMAP1
 
-#endif
-
-#if defined(__GLIBC__) || defined(__linux__)
+#elif defined(__GLIBC__) || defined(__linux__)
 
 #include 
 
@@ -427,10 +437,7 @@ extern const char *__progname;
 
 #define	roundup2	roundup
 
-#endif	/* __GLIBC__ || __linux__ */
-
-
-#if defined(__FreeBSD__)

CVS commit: src/external/bsd/elftoolchain/dist/common

2020-11-19 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Thu Nov 19 20:58:30 UTC 2020

Modified Files:
src/external/bsd/elftoolchain/dist/common: elfdefinitions.h

Log Message:
Update 'elfdefinitions.h' to elftoolchain revision [r3891].


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/bsd/elftoolchain/dist/common/elfdefinitions.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/elftoolchain/dist/common/elfdefinitions.h
diff -u src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.3 src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.4
--- src/external/bsd/elftoolchain/dist/common/elfdefinitions.h:1.3	Sat Feb 20 02:43:41 2016
+++ src/external/bsd/elftoolchain/dist/common/elfdefinitions.h	Thu Nov 19 20:58:30 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: elfdefinitions.h,v 1.3 2016/02/20 02:43:41 christos Exp $	*/
+/*	$NetBSD: elfdefinitions.h,v 1.4 2020/11/19 20:58:30 jkoshy Exp $	*/
 
 /*-
  * Copyright (c) 2010 Joseph Koshy
@@ -25,7 +25,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * Id: elfdefinitions.h 3392 2016-02-05 19:51:22Z emaste 
+ * Id: elfdefinitions.h 3858 2020-05-11 22:53:38Z emaste
  */
 
 /*
@@ -35,7 +35,7 @@
  *   See: http://www.sco.com/developers/gabi/latest/ch4.intro.html
  * - The May 1998 (version 1.5) draft of "The ELF-64 object format".
  * - Processor-specific ELF ABI definitions for sparc, i386, amd64, mips,
- *   ia64, and powerpc processors.
+ *   ia64, powerpc, and RISC-V processors.
  * - The "Linkers and Libraries Guide", from Sun Microsystems.
  */
 
@@ -74,7 +74,39 @@ _ELF_DEFINE_DF(DF_TEXTREL,  0x4,
 _ELF_DEFINE_DF(DF_BIND_NOW, 0x8,			\
 	"process relocation entries at load time")		\
 _ELF_DEFINE_DF(DF_STATIC_TLS,   0x10,			\
-	"uses static thread-local storage")
+	"uses static thread-local storage")			\
+_ELF_DEFINE_DF(DF_1_BIND_NOW,   0x1,			\
+	"process relocation entries at load time")		\
+_ELF_DEFINE_DF(DF_1_GLOBAL, 0x2,			\
+	"unused")		\
+_ELF_DEFINE_DF(DF_1_GROUP,  0x4,			\
+	"object is a member of a group")			\
+_ELF_DEFINE_DF(DF_1_NODELETE,   0x8,			\
+	"object cannot be deleted from a process")		\
+_ELF_DEFINE_DF(DF_1_LOADFLTR,   0x10,			\
+	"immediate load filtees")\
+_ELF_DEFINE_DF(DF_1_INITFIRST,  0x20,			\
+	"initialize object first")\
+_ELF_DEFINE_DF(DF_1_NOOPEN, 0x40,			\
+	"disallow dlopen()")	\
+_ELF_DEFINE_DF(DF_1_ORIGIN, 0x80,			\
+	"object being loaded may refer to $ORIGIN")		\
+_ELF_DEFINE_DF(DF_1_DIRECT, 0x100,			\
+	"direct bindings enabled")\
+_ELF_DEFINE_DF(DF_1_INTERPOSE,  0x400,			\
+	"object is interposer")	\
+_ELF_DEFINE_DF(DF_1_NODEFLIB,   0x800,			\
+	"ignore default library search path")			\
+_ELF_DEFINE_DF(DF_1_NODUMP, 0x1000,			\
+	"disallow dldump()")	\
+_ELF_DEFINE_DF(DF_1_CONFALT,0x2000,			\
+	"object is a configuration alternative")		\
+_ELF_DEFINE_DF(DF_1_ENDFILTEE,  0x4000,			\
+	"filtee terminates filter search")			\
+_ELF_DEFINE_DF(DF_1_DISPRELDNE, 0x8000,			\
+	"displacement relocation done")\
+_ELF_DEFINE_DF(DF_1_DISPRELPND, 0x1,			\
+	"displacement relocation pending")
 #undef	_ELF_DEFINE_DF
 #define	_ELF_DEFINE_DF(N, V, DESCR)	N = V ,
 enum {
@@ -155,6 +187,8 @@ _ELF_DEFINE_DT(DT_SUNW_FILTER,  0x60
 	"offset of string naming standard filtees")			\
 _ELF_DEFINE_DT(DT_SUNW_CAP, 0x6010UL,			\
 	"address of hardware capabilities section")			\
+_ELF_DEFINE_DT(DT_SUNW_ASLR,0x6023UL,			\
+	"Address Space Layout Randomization flag")			\
 _ELF_DEFINE_DT(DT_HIOS, 0x6000UL,			\
 	"end of OS-specific types")	\
 _ELF_DEFINE_DT(DT_VALRNGLO, 0x6D00UL,			\
@@ -186,6 +220,10 @@ _ELF_DEFINE_DT(DT_ADDRRNGLO,0x6F
 	"start of range using the d_ptr field")\
 _ELF_DEFINE_DT(DT_GNU_HASH,	0x6EF5UL,			\
 	"GNU style hash tables")	\
+_ELF_DEFINE_DT(DT_TLSDESC_PLT,	0x6EF6UL,			\
+	"location of PLT entry for TLS descriptor resolver calls")	\
+_ELF_DEFINE_DT(DT_TLSDESC_GOT,	0x6EF7UL,			\
+	"location of GOT entry used by TLS descriptor resolver PLT entry") \
 _ELF_DEFINE_DT(DT_GNU_CONFLICT, 0x6EF8UL,			\
 	"address of conflict section")	\
 _ELF_DEFINE_DT(DT_GNU_LIBLIST,  0x6EF9UL,			\
@@ -271,7 +309,7 @@ _ELF_DEFINE_DT(DT_MIPS_DELTA_RELOC, 0x70
 _ELF_DEFINE_DT(DT_MIPS_DELTA_RELOC_NO, 0x701CUL,			\
 	"number of entries in DT_MIPS_DELTA_RELOC")			\
 _ELF_DEFINE_DT(DT_MIPS_DELTA_SYM,   0x701DUL,			\
-	"Delta symbols refered by Delta relocations")			\
+	"Delta symbols referred by Delta relocations")			\
 _ELF_DEFINE_DT(DT_MIPS_DELTA_SYM_NO, 0x701EUL,			\
 	"number of entries in DT_MIPS_DELTA_SYM")			\
 _ELF_DEFINE_DT(DT_MIPS_DELTA_CLASSSYM, 0x7020UL,			\
@@ -422,6 +460,22 @@ 

CVS commit: src/external/bsd/elftoolchain/dist/common

2020-11-18 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Wed Nov 18 22:23:05 UTC 2020

Modified Files:
src/external/bsd/elftoolchain/dist/common: utarray.h uthash.h

Log Message:
Sync 'utarray.h' and 'uthash.h' with elftoolchain revision [r3891].

This change upgrades these files to UT{HASH,ARRAY}_VERSION 2.1.0.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/elftoolchain/dist/common/utarray.h \
src/external/bsd/elftoolchain/dist/common/uthash.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/elftoolchain/dist/common/utarray.h
diff -u src/external/bsd/elftoolchain/dist/common/utarray.h:1.2 src/external/bsd/elftoolchain/dist/common/utarray.h:1.3
--- src/external/bsd/elftoolchain/dist/common/utarray.h:1.2	Sun Mar  9 16:58:03 2014
+++ src/external/bsd/elftoolchain/dist/common/utarray.h	Wed Nov 18 22:23:05 2020
@@ -1,7 +1,7 @@
-/*	$NetBSD: utarray.h,v 1.2 2014/03/09 16:58:03 christos Exp $	*/
+/*	$NetBSD: utarray.h,v 1.3 2020/11/18 22:23:05 jkoshy Exp $	*/
 
 /*
-Copyright (c) 2008-2013, Troy D. Hanson   http://uthash.sourceforge.net
+Copyright (c) 2008-2018, Troy D. Hanson   http://troydhanson.github.com/uthash/
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -23,28 +23,30 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY 
 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-/* Id: utarray.h 2694 2012-11-24 17:11:58Z kaiwang27  */
-
-/* a dynamic array implementation using macros 
- * see http://uthash.sourceforge.net/utarray
+/* a dynamic array implementation using macros
  */
 #ifndef UTARRAY_H
 #define UTARRAY_H
 
-#define UTARRAY_VERSION 1.9.7
+#define UTARRAY_VERSION 2.1.0
+
+#include   /* size_t */
+#include   /* memset, etc */
+#include   /* exit */
 
 #ifdef __GNUC__
-#define _UNUSED_ __attribute__ ((__unused__)) 
+#define UTARRAY_UNUSED __attribute__((__unused__))
 #else
-#define _UNUSED_ 
+#define UTARRAY_UNUSED
 #endif
 
-#include   /* size_t */
-#include   /* memset, etc */
-#include   /* exit */
+#ifdef oom
+#error "The name of macro 'oom' has been changed to 'utarray_oom'. Please update your code."
+#define utarray_oom() oom()
+#endif
 
-#ifndef oom
-#define oom() exit(-1)
+#ifndef utarray_oom
+#define utarray_oom() exit(-1)
 #endif
 
 typedef void (ctor_f)(void *dst, const void *src);
@@ -65,13 +67,13 @@ typedef struct {
 
 #define utarray_init(a,_icd) do { \
   memset(a,0,sizeof(UT_array));   \
-  (a)->icd=*_icd; \
+  (a)->icd = *(_icd); \
 } while(0)
 
 #define utarray_done(a) do {  \
   if ((a)->n) {   \
 if ((a)->icd.dtor) {  \
-  size_t _ut_i;   \
+  unsigned _ut_i; \
   for(_ut_i=0; _ut_i < (a)->i; _ut_i++) { \
 (a)->icd.dtor(utarray_eltptr(a,_ut_i));   \
   }   \
@@ -82,7 +84,10 @@ typedef struct {
 } while(0)
 
 #define utarray_new(a,_icd) do {  \
-  a=(UT_array*)malloc(sizeof(UT_array));  \
+  (a) = (UT_array*)malloc(sizeof(UT_array));  \
+  if ((a) == NULL) {  \
+utarray_oom();\
+  }   \
   utarray_init(a,_icd);   \
 } while(0)
 
@@ -92,9 +97,14 @@ typedef struct {
 } while(0)
 
 #define utarray_reserve(a,by) do {\
-  if (((a)->i+by) > ((a)->n)) {   \
-while(((a)->i+by) > ((a)->n)) { (a)->n = ((a)->n ? (2*(a)->n) : 8); } \
-if ( ((a)->d=(char*)realloc((a)->d, (a)->n*(a)->icd.sz)) == NULL) oom();  \
+  if (((a)->i+(by)) > (a)->n) {   \
+char *utarray_tmp;\
+while (((a)->i+(by)) > (a)->n) { (a)->n = ((a)->n ? (2*(a)->n) : 8); }\
+utarray_tmp=(char*)realloc((a)->d, (a)->n*(a)->icd.sz);   \
+if (utarray_tmp == NULL) {\
+  utarray_oom();  \
+}  

CVS commit: src/external/bsd/elftoolchain/dist/common

2016-03-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Mar 13 03:47:41 UTC 2016

Modified Files:
src/external/bsd/elftoolchain/dist/common: _elftc.h

Log Message:
Don't use os-specific defines when cross-compiling.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/elftoolchain/dist/common/_elftc.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/elftoolchain/dist/common/_elftc.h
diff -u src/external/bsd/elftoolchain/dist/common/_elftc.h:1.4 src/external/bsd/elftoolchain/dist/common/_elftc.h:1.5
--- src/external/bsd/elftoolchain/dist/common/_elftc.h:1.4	Fri Feb 19 21:43:41 2016
+++ src/external/bsd/elftoolchain/dist/common/_elftc.h	Sat Mar 12 22:47:41 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: _elftc.h,v 1.4 2016/02/20 02:43:41 christos Exp $	*/
+/*	$NetBSD: _elftc.h,v 1.5 2016/03/13 03:47:41 christos Exp $	*/
 
 /*-
  * Copyright (c) 2009 Joseph Koshy
@@ -372,6 +372,7 @@ extern const char *__progname;
 #endif	/* ELFTC_GETPROGNAME */
 
 
+#ifndef HAVE_NBTOOL_CONFIG_H
 /**
  ** Per-OS configuration.
  **/
@@ -462,11 +463,7 @@ extern const char *__progname;
 
 #define	ELFTC_HAVE_MMAP1
 #define	ELFTC_HAVE_STRMODE			1
-#if __NetBSD_Version__ <= 599002100
-/* from src/doc/CHANGES: flex(1): Import flex-2.5.35 [christos 20091025] */
-/* and 5.99.21 was from Wed Oct 21 21:28:36 2009 UTC */
-#  define ELFTC_BROKEN_YY_NO_INPUT		1
-#endif
+
 #endif	/* __NetBSD __ */
 
 
@@ -487,4 +484,18 @@ extern const char *__progname;
 
 #endif	/* __OpenBSD__ */
 
+#else /* Crosscompiling for NetBSD tools */
+
+#include 
+#include 
+
+#define	ELFTC_BYTE_ORDER			_BYTE_ORDER
+#define	ELFTC_BYTE_ORDER_LITTLE_ENDIAN		_LITTLE_ENDIAN
+#define	ELFTC_BYTE_ORDER_BIG_ENDIAN		_BIG_ENDIAN
+
+#define	ELFTC_HAVE_MMAP1
+#define	ELFTC_HAVE_STRMODE			1
+
+#endif /* NBTOOL_CONFIG_H */
+
 #endif	/* _ELFTC_H */