summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2016-02-21 13:49:26 +0000
committerdim <dim@FreeBSD.org>2016-02-21 13:49:26 +0000
commit2e1a0cbbd8f5a5ca7ec73c85311451ed1ac4242c (patch)
treebb5f550a5fd2ee1357495987f5076839273e5998 /lib
parentf393760a8a7c87242739a64002290b7bda94cb27 (diff)
parent579b7ad49fdbcb4dd1e016603c5d0774b32c12d1 (diff)
downloadFreeBSD-src-2e1a0cbbd8f5a5ca7ec73c85311451ed1ac4242c.zip
FreeBSD-src-2e1a0cbbd8f5a5ca7ec73c85311451ed1ac4242c.tar.gz
Merge ^/head r295601 through r295844.
Diffstat (limited to 'lib')
-rw-r--r--lib/clang/libllvmdebuginfodwarf/Makefile.depend15
-rw-r--r--lib/clang/libllvmdebuginfopdb/Makefile.depend15
-rw-r--r--lib/clang/libllvmlibdriver/Makefile.depend18
-rw-r--r--lib/clang/libllvmlto/Makefile.depend18
-rw-r--r--lib/clang/libllvmmirparser/Makefile.depend15
-rw-r--r--lib/clang/libllvmorcjit/Makefile.depend15
-rw-r--r--lib/clang/libllvmpasses/Makefile.depend18
-rw-r--r--lib/libc/gen/directory.33
-rw-r--r--lib/libc/stdio/fgetln.35
-rw-r--r--lib/libc/stdio/fgetln.c9
-rw-r--r--lib/libc/stdio/fputs.c3
-rw-r--r--lib/libc/sys/lseek.218
-rw-r--r--lib/libc/tests/Makefile2
-rw-r--r--lib/libc/tests/gen/posix_spawn/Makefile2
-rw-r--r--lib/libc/tests/sys/Makefile2
-rw-r--r--lib/libkvm/kvm_arm.c2
-rw-r--r--lib/libkvm/kvm_arm.h13
-rw-r--r--lib/libpe/Makefile.depend13
18 files changed, 167 insertions, 19 deletions
diff --git a/lib/clang/libllvmdebuginfodwarf/Makefile.depend b/lib/clang/libllvmdebuginfodwarf/Makefile.depend
new file mode 100644
index 0000000..3e7f3f5
--- /dev/null
+++ b/lib/clang/libllvmdebuginfodwarf/Makefile.depend
@@ -0,0 +1,15 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/libc++ \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/libllvmdebuginfopdb/Makefile.depend b/lib/clang/libllvmdebuginfopdb/Makefile.depend
new file mode 100644
index 0000000..3e7f3f5
--- /dev/null
+++ b/lib/clang/libllvmdebuginfopdb/Makefile.depend
@@ -0,0 +1,15 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/libc++ \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/libllvmlibdriver/Makefile.depend b/lib/clang/libllvmlibdriver/Makefile.depend
new file mode 100644
index 0000000..731ea8a
--- /dev/null
+++ b/lib/clang/libllvmlibdriver/Makefile.depend
@@ -0,0 +1,18 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/libc++ \
+ lib/msun \
+ usr.bin/clang/tblgen.host \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+LibDriver.o: Options.inc.h
+LibDriver.po: Options.inc.h
+.endif
diff --git a/lib/clang/libllvmlto/Makefile.depend b/lib/clang/libllvmlto/Makefile.depend
new file mode 100644
index 0000000..642380b
--- /dev/null
+++ b/lib/clang/libllvmlto/Makefile.depend
@@ -0,0 +1,18 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/libc++ \
+ lib/msun \
+ usr.bin/clang/tblgen.host \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+LTOCodeGenerator.o: Intrinsics.inc.h
+LTOCodeGenerator.po: Intrinsics.inc.h
+.endif
diff --git a/lib/clang/libllvmmirparser/Makefile.depend b/lib/clang/libllvmmirparser/Makefile.depend
new file mode 100644
index 0000000..3e7f3f5
--- /dev/null
+++ b/lib/clang/libllvmmirparser/Makefile.depend
@@ -0,0 +1,15 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/libc++ \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/libllvmorcjit/Makefile.depend b/lib/clang/libllvmorcjit/Makefile.depend
new file mode 100644
index 0000000..3e7f3f5
--- /dev/null
+++ b/lib/clang/libllvmorcjit/Makefile.depend
@@ -0,0 +1,15 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/libc++ \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/libllvmpasses/Makefile.depend b/lib/clang/libllvmpasses/Makefile.depend
new file mode 100644
index 0000000..c40b54a
--- /dev/null
+++ b/lib/clang/libllvmpasses/Makefile.depend
@@ -0,0 +1,18 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/libc++ \
+ lib/msun \
+ usr.bin/clang/tblgen.host \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+PassBuilder.o: Intrinsics.inc.h
+PassBuilder.po: Intrinsics.inc.h
+.endif
diff --git a/lib/libc/gen/directory.3 b/lib/libc/gen/directory.3
index f0d0f4b..3919805 100644
--- a/lib/libc/gen/directory.3
+++ b/lib/libc/gen/directory.3
@@ -28,7 +28,7 @@
.\" @(#)directory.3 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd May 6, 2015
+.Dd February 19, 2016
.Dt DIRECTORY 3
.Os
.Sh NAME
@@ -46,7 +46,6 @@
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
-.In sys/types.h
.In dirent.h
.Ft DIR *
.Fn opendir "const char *filename"
diff --git a/lib/libc/stdio/fgetln.3 b/lib/libc/stdio/fgetln.3
index 4b83664..7d4b89a5 100644
--- a/lib/libc/stdio/fgetln.3
+++ b/lib/libc/stdio/fgetln.3
@@ -28,7 +28,7 @@
.\" @(#)fgetln.3 8.3 (Berkeley) 4/19/94
.\" $FreeBSD$
.\"
-.Dd April 19, 1994
+.Dd February 15, 2016
.Dt FGETLN 3
.Os
.Sh NAME
@@ -97,6 +97,9 @@ These changes are lost as soon as the pointer becomes invalid.
The argument
.Fa stream
is not a stream open for reading.
+.It Bq Er ENOMEM
+The internal line buffer could not be expanded due to lack of available memory,
+or because it would need to expand beyond INT_MAX in size.
.El
.Pp
The
diff --git a/lib/libc/stdio/fgetln.c b/lib/libc/stdio/fgetln.c
index 1779de2..1509bc8 100644
--- a/lib/libc/stdio/fgetln.c
+++ b/lib/libc/stdio/fgetln.c
@@ -37,6 +37,8 @@ static char sccsid[] = "@(#)fgetln.c 8.2 (Berkeley) 1/2/94";
__FBSDID("$FreeBSD$");
#include "namespace.h"
+#include <errno.h>
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -61,6 +63,10 @@ __slbexpand(FILE *fp, size_t newsize)
#endif
if (fp->_lb._size >= newsize)
return (0);
+ if (newsize > INT_MAX) {
+ errno = ENOMEM;
+ return (-1);
+ }
if ((p = realloc(fp->_lb._base, newsize)) == NULL)
return (-1);
fp->_lb._base = p;
@@ -152,13 +158,14 @@ fgetln(FILE *fp, size_t *lenp)
}
*lenp = len;
#ifdef notdef
- fp->_lb._base[len] = 0;
+ fp->_lb._base[len] = '\0';
#endif
FUNLOCKFILE(fp);
return ((char *)fp->_lb._base);
error:
*lenp = 0; /* ??? */
+ fp->_flags |= __SERR;
FUNLOCKFILE(fp);
return (NULL); /* ??? */
}
diff --git a/lib/libc/stdio/fputs.c b/lib/libc/stdio/fputs.c
index 32e5764..1f9795a 100644
--- a/lib/libc/stdio/fputs.c
+++ b/lib/libc/stdio/fputs.c
@@ -37,6 +37,7 @@ static char sccsid[] = "@(#)fputs.c 8.1 (Berkeley) 6/4/93";
__FBSDID("$FreeBSD$");
#include "namespace.h"
+#include <limits.h>
#include <stdio.h>
#include <string.h>
#include "un-namespace.h"
@@ -62,5 +63,7 @@ fputs(const char * __restrict s, FILE * __restrict fp)
ORIENT(fp, -1);
retval = __sfvwrite(fp, &uio);
FUNLOCKFILE(fp);
+ if (retval == 0)
+ return (iov.iov_len > INT_MAX ? INT_MAX : iov.iov_len);
return (retval);
}
diff --git a/lib/libc/sys/lseek.2 b/lib/libc/sys/lseek.2
index 349940a..017dc54 100644
--- a/lib/libc/sys/lseek.2
+++ b/lib/libc/sys/lseek.2
@@ -28,7 +28,7 @@
.\" @(#)lseek.2 8.3 (Berkeley) 4/19/94
.\" $FreeBSD$
.\"
-.Dd May 26, 2012
+.Dd February 18, 2016
.Dt LSEEK 2
.Os
.Sh NAME
@@ -131,8 +131,14 @@ Applications can use
.Dv SEEK_HOLE
to optimise their behavior for ranges of zeros, but must not depend on it to
find all such ranges in a file.
+Each file is presented as having a zero-size virtual hole at the very
+end of the file.
The existence of a hole at the end of every data region allows for easy
-programming and implies that a virtual hole exists at the end of the file.
+programming and also provides compatibility to the original implementation
+in Solaris.
+It also causes the current file size (i.e., end-of-file offset) to be returned
+to indicate that there are no more holes past the supplied
+.Fa offset .
Applications should use
.Fn fpathconf _PC_MIN_HOLE_SIZE
or
@@ -176,9 +182,11 @@ be negative for a non-character special file.
For
.Dv SEEK_DATA ,
there are no more data regions past the supplied offset.
-For
-.Dv SEEK_HOLE ,
-there are no more holes past the supplied offset.
+Due to existence of the hole at the end of the file, for
+.Dv SEEK_HOLE
+this error is only returned when the
+.Fa offset
+already points to the end-of-file position.
.It Bq Er EOVERFLOW
The resulting file offset would be a value which cannot be represented
correctly in an object of type
diff --git a/lib/libc/tests/Makefile b/lib/libc/tests/Makefile
index a9d8c02..68ce44c 100644
--- a/lib/libc/tests/Makefile
+++ b/lib/libc/tests/Makefile
@@ -22,6 +22,8 @@ TESTS_SUBDIRS+= termios
TESTS_SUBDIRS+= tls
TESTS_SUBDIRS+= ttyio
+SUBDIR_DEPEND_tls= tls_dso
+
.if ${MK_LOCALES} != "no"
TESTS_SUBDIRS+= locale
.endif
diff --git a/lib/libc/tests/gen/posix_spawn/Makefile b/lib/libc/tests/gen/posix_spawn/Makefile
index 9bb2cf1..9b687c6 100644
--- a/lib/libc/tests/gen/posix_spawn/Makefile
+++ b/lib/libc/tests/gen/posix_spawn/Makefile
@@ -20,7 +20,7 @@ CLEANFILES+= h_nonexec
.include "../../Makefile.netbsd-tests"
h_zero:
- dd if=/dev/zero of=h_zero bs=1k count=2
+ dd if=/dev/zero of=h_zero bs=1k count=2 status=none
chmod a+x h_zero
CLEANFILES+= h_zero
diff --git a/lib/libc/tests/sys/Makefile b/lib/libc/tests/sys/Makefile
index efc892c..c7b0053 100644
--- a/lib/libc/tests/sys/Makefile
+++ b/lib/libc/tests/sys/Makefile
@@ -78,6 +78,6 @@ truncate_test_FILESGRP= wheel
CLEANFILES= truncate_test.root_owned
truncate_test.root_owned:
- dd if=/dev/null bs=1 count=1 of=${.TARGET}
+ dd if=/dev/null bs=1 count=1 of=${.TARGET} status=none
.include <bsd.test.mk>
diff --git a/lib/libkvm/kvm_arm.c b/lib/libkvm/kvm_arm.c
index bbead35..ae5fb5b 100644
--- a/lib/libkvm/kvm_arm.c
+++ b/lib/libkvm/kvm_arm.c
@@ -183,7 +183,7 @@ _arm_initvtop(kvm_t *kd)
#define l1pte_section_p(pde) (((pde) & ARM_L1_TYPE_MASK) == ARM_L1_TYPE_S)
#define l1pte_valid(pde) ((pde) != 0)
#define l2pte_valid(pte) ((pte) != 0)
-#define l2pte_index(v) (((v) & ARM_L2_ADDR_BITS) >> ARM_L2_S_SHIFT)
+#define l2pte_index(v) (((v) & ARM_L1_S_OFFSET) >> ARM_L2_S_SHIFT)
static int
diff --git a/lib/libkvm/kvm_arm.h b/lib/libkvm/kvm_arm.h
index 096a6b1..38d05cd 100644
--- a/lib/libkvm/kvm_arm.h
+++ b/lib/libkvm/kvm_arm.h
@@ -29,10 +29,6 @@
#ifndef __KVM_ARM_H__
#define __KVM_ARM_H__
-#ifdef __arm__
-#include <machine/pte.h>
-#endif
-
typedef uint32_t arm_physaddr_t;
typedef uint32_t arm_pd_entry_t;
typedef uint32_t arm_pt_entry_t;
@@ -72,11 +68,15 @@ typedef uint32_t arm_pt_entry_t;
#define ARM_L2_TYPE_T 0x03 /* Tiny Page - 1k - not used */
#define ARM_L2_TYPE_MASK 0x03
-#define ARM_L2_ADDR_BITS 0x000ff000 /* L2 PTE address bits */
-
#ifdef __arm__
#include <machine/acle-compat.h>
+#if __ARM_ARCH >= 6
+#include <machine/pte-v6.h>
+#else
+#include <machine/pte-v4.h>
+#endif
+
_Static_assert(PAGE_SHIFT == ARM_PAGE_SHIFT, "PAGE_SHIFT mismatch");
_Static_assert(PAGE_SIZE == ARM_PAGE_SIZE, "PAGE_SIZE mismatch");
_Static_assert(PAGE_MASK == ARM_PAGE_MASK, "PAGE_MASK mismatch");
@@ -106,7 +106,6 @@ _Static_assert(L2_TYPE_S == ARM_L2_TYPE_S, "L2_TYPE_S mismatch");
_Static_assert(L2_TYPE_T == ARM_L2_TYPE_T, "L2_TYPE_T mismatch");
#endif
_Static_assert(L2_TYPE_MASK == ARM_L2_TYPE_MASK, "L2_TYPE_MASK mismatch");
-_Static_assert(L2_ADDR_BITS == ARM_L2_ADDR_BITS, "L2_ADDR_BITS mismatch");
#endif
int _arm_native(kvm_t *);
diff --git a/lib/libpe/Makefile.depend b/lib/libpe/Makefile.depend
new file mode 100644
index 0000000..18be76b
--- /dev/null
+++ b/lib/libpe/Makefile.depend
@@ -0,0 +1,13 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
OpenPOWER on IntegriCloud