Skip to content

Commit

Permalink
Merge ^/head r363989 through r364034.
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitryAndric committed Aug 7, 2020
2 parents 9a282b3 + eef7327 commit e53daa1
Show file tree
Hide file tree
Showing 41 changed files with 547 additions and 133 deletions.
16 changes: 6 additions & 10 deletions Makefile.inc1
Original file line number Diff line number Diff line change
Expand Up @@ -2179,9 +2179,6 @@ _yacc= usr.bin/yacc
_gensnmptree= usr.sbin/bsnmpd/gensnmptree
.endif

.if ${MK_LOCALES} != "no"
_localedef= usr.bin/localedef
.endif

# We need to build tblgen when we're building clang or lld, either as
# bootstrap tools, or as the part of the normal build.
Expand Down Expand Up @@ -2296,13 +2293,12 @@ ${_bt}-links: .PHONY

.for _tool in ${_bootstrap_tools_links}
${_bt}-link-${_tool}: .PHONY .MAKE
@if [ ! -e "${WORLDTMP}/legacy/bin/${_tool}" ]; then \
source_path=`which ${_tool}`; \
if [ ! -e "$${source_path}" ] ; then \
echo "Cannot find host tool '${_tool}'"; false; \
fi; \
ln -sfnv "$${source_path}" "${WORLDTMP}/legacy/bin/${_tool}"; \
fi
@rm -f "${WORLDTMP}/legacy/bin/${_tool}"; \
source_path=`which ${_tool}`; \
if [ ! -e "$${source_path}" ] ; then \
echo "Cannot find host tool '${_tool}'"; false; \
fi; \
cp -f "$${source_path}" "${WORLDTMP}/legacy/bin/${_tool}"
${_bt}-links: ${_bt}-link-${_tool}
.endfor

Expand Down
6 changes: 6 additions & 0 deletions UPDATING
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 13.x IS SLOW:
information about prerequisites and upgrading, if you are not already
using clang 3.5.0 or higher.

20200807:
Makefile.inc has been updated to work around the issue documented in
20200729. It was a case where the optimization of using symbolic links
to point to binaries created a situation where we'd run new binaries
with old libraries starting midway through the installworld process.

20200729:
r363679 has redefined some undefined behavior in regcomp(3); notably,
extraneous escapes of most ordinary characters will no longer be
Expand Down
1 change: 1 addition & 0 deletions cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#pragma ident "%Z%%M% %I% %E% SMI"

#include <sys/types.h>
#include <sys/endian.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <sys/zmod.h>
Expand Down
1 change: 1 addition & 0 deletions cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,7 @@ wq_init(workqueue_t *wq, int nfiles)

for (i = 0; i < nslots; i++) {
pthread_mutex_init(&wq->wq_wip[i].wip_lock, NULL);
pthread_cond_init(&wq->wq_wip[i].wip_cv, NULL);
wq->wq_wip[i].wip_batchid = wq->wq_next_batchid++;
}

Expand Down
10 changes: 10 additions & 0 deletions cddl/contrib/opensolaris/tools/ctf/cvt/ctftools.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <pthread.h>

#include <sys/ccompile.h>
#include <sys/endian.h>

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -65,6 +66,15 @@ extern "C" {
#define MIN(a, b) ((a) > (b) ? (b) : (a))
#endif

/* Sanity check for cross-build bootstrap tools */
#if !defined(BYTE_ORDER)
#error "Missing BYTE_ORDER defines"
#elif !defined(_LITTLE_ENDIAN)
#error "Missing _LITTLE_ENDIAN defines"
#elif !defined(_BIG_ENDIAN)
#error "Missing _BIG_ENDIAN defines"
#endif

#define TRUE 1
#define FALSE 0

Expand Down
10 changes: 9 additions & 1 deletion contrib/telnet/telnet/telnet.1
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
.\" @(#)telnet.1 8.6 (Berkeley) 6/1/94
.\" $FreeBSD$
.\"
.Dd September 18, 2006
.Dd August 7, 2020
.Dt TELNET 1
.Os
.Sh NAME
Expand All @@ -47,6 +47,7 @@ protocol
.Op Fl l Ar user
.Op Fl n Ar tracefile
.Op Fl s Ar src_addr
.Op Fl P Ar policy
.Oo
.Ar host
.Op Ar port
Expand Down Expand Up @@ -189,6 +190,13 @@ for recording trace information.
See the
.Ic set tracefile
command below.
.It Fl P Ar policy
Use IPsec policy specification string
.Ar policy ,
for the connections.
See
.Xr ipsec_set_policy 3
for details.
.It Fl r
Specifies a user interface similar to
.Xr rlogin 1 .
Expand Down
8 changes: 4 additions & 4 deletions lib/lib80211/lib80211_regdomain.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ struct regdomain {
netband_head bands_11b; /* 11b operation */
netband_head bands_11g; /* 11g operation */
netband_head bands_11a; /* 11a operation */
netband_head bands_11ng;/* 11ng operation */
netband_head bands_11na;/* 11na operation */
netband_head bands_11ac;/* 11ac 5GHz operation */
netband_head bands_11acg;/* 11ac 2GHz operation */
netband_head bands_11ng; /* 11ng operation */
netband_head bands_11na; /* 11na operation */
netband_head bands_11ac; /* 11ac 5GHz operation */
netband_head bands_11acg; /* 11ac 2GHz operation */

LIST_ENTRY(regdomain) next;
};
Expand Down
22 changes: 18 additions & 4 deletions lib/libc/locale/mbsrtowcs.3
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD$
.Dd July 21, 2004
.Dd August 7, 2020
.Dt MBSRTOWCS 3
.Os
.Sh NAME
Expand Down Expand Up @@ -98,15 +98,29 @@ except that conversion stops after reading at most
bytes from the buffer pointed to by
.Fa src .
.Sh RETURN VALUES
The
If successful, and
.Fa dst
is not NULL, the
.Fn mbsrtowcs
and
.Fn mbsnrtowcs
functions return the number of wide characters stored in
the array pointed to by
.Fa dst .
.Pp
If
.Fa dst
if successful, otherwise it returns
.Po Vt size_t Pc Ns \-1 .
was NULL then the functions
.Fn mbsrtowcs
and
.Fn mbsnrtowcs
return the number of wide characters that would have been stored where
.Fa dst
points to an infinitely large array.
.Pp
If either one of the functions is not successful then
.Po Vt size_t Pc Ns \-1
is returned.
.Sh ERRORS
The
.Fn mbsrtowcs
Expand Down
25 changes: 24 additions & 1 deletion lib/libc/locale/setlocale.3
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
.\" @(#)setlocale.3 8.1 (Berkeley) 6/9/93
.\" $FreeBSD$
.\"
.Dd September 9, 2019
.Dd August 7, 2020
.Dt SETLOCALE 3
.Os
.Sh NAME
Expand Down Expand Up @@ -98,6 +98,10 @@ as well as values returned by
Set a locale for formatting dates and times using the
.Fn strftime
function.
.It Dv LANG
Sets the generic locale category for native language, local customs
and coded character set in the absence of more specific locale
variables.
.El
.Pp
Only three locales are defined by default,
Expand Down Expand Up @@ -153,6 +157,25 @@ if the given combination of
and
.Fa locale
makes no sense.
.Sh EXAMPLES
The following code illustrates how a program can initialize the
international environment for one language, while selectively
modifying the program's locale such that regular expressions and
string operations can be applied to text recorded in a different
language:
.Bd -literal
setlocale(LC_ALL, "de");
setlocale(LC_COLLATE, "fr");
.Ed
.Pp
When a process is started, its current locale is set to the C or POSIX
locale.
An internationalized program that depends on locale data not defined in
the C or POSIX locale must invoke the setlocale subroutine in the
following manner before using any of the locale-specific information:
.Bd -literal
setlocale(LC_ALL, "");
.Ed
.Sh FILES
.Bl -tag -width /usr/share/locale/locale/category -compact
.It Pa $PATH_LOCALE/ Ns Em locale/category
Expand Down
4 changes: 3 additions & 1 deletion lib/libc/stdio/tmpnam.3
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
.\" @(#)tmpnam.3 8.2 (Berkeley) 11/17/93
.\" $FreeBSD$
.\"
.Dd March 18, 2007
.Dd August 7, 2020
.Dt TMPFILE 3
.Os
.Sh NAME
Expand Down Expand Up @@ -156,6 +156,8 @@ on error.
.Bl -tag -width Ds
.It Ev TMPDIR
.Pf [ Fn tempnam
and
.Fn tmpfile
only]
If set,
the directory in which the temporary file is stored.
Expand Down
2 changes: 2 additions & 0 deletions release/packages/generate-ucl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ main() {

outname="${outname%%_*}"

pkgdeps="$(echo ${pkgdeps} | tr '_' '-')"

desc="$(make -C ${srctree}/release/packages -f Makefile.package -V ${outname}_DESC)"
comment="$(make -C ${srctree}/release/packages -f Makefile.package -V ${outname}_COMMENT)"

Expand Down
23 changes: 23 additions & 0 deletions sbin/ifconfig/ifieee80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -4779,6 +4779,23 @@ getid(int s, int ix, void *data, size_t len, int *plen, int mesh)
return 0;
}

static int
getdevicename(int s, void *data, size_t len, int *plen)
{
struct ieee80211req ireq;

(void) memset(&ireq, 0, sizeof(ireq));
(void) strlcpy(ireq.i_name, name, sizeof(ireq.i_name));
ireq.i_type = IEEE80211_IOC_IC_NAME;
ireq.i_val = -1;
ireq.i_data = data;
ireq.i_len = len;
if (ioctl(s, SIOCG80211, &ireq) < 0)
return (-1);
*plen = ireq.i_len;
return (0);
}

static void
ieee80211_status(int s)
{
Expand Down Expand Up @@ -5503,6 +5520,12 @@ ieee80211_status(int s)
}

LINE_BREAK();

if (getdevicename(s, data, sizeof(data), &len) < 0)
return;
LINE_CHECK("parent interface: %s", data);

LINE_BREAK();
}

static int
Expand Down
2 changes: 1 addition & 1 deletion sbin/iscontrol/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# $FreeBSD$

PACKAGE=iscsi_legacy
PACKAGE=iscsilegacy
SRCS= iscontrol.c pdu.c fsm.c config.c login.c auth_subr.c misc.c
PROG= iscontrol
LIBADD= cam md
Expand Down
4 changes: 2 additions & 2 deletions sbin/mount/mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -697,9 +697,9 @@ prmount(struct statfs *sfp)
(uintmax_t)sfp->f_syncreads,
(uintmax_t)sfp->f_asyncreads);
if (sfp->f_fsid.val[0] != 0 || sfp->f_fsid.val[1] != 0) {
printf(", fsid ");
(void)printf(", fsid ");
for (i = 0; i < sizeof(sfp->f_fsid); i++)
printf("%02x", ((u_char *)&sfp->f_fsid)[i]);
(void)printf("%02x", ((u_char *)&sfp->f_fsid)[i]);
}
}
(void)printf(")\n");
Expand Down
12 changes: 11 additions & 1 deletion share/man/man4/net80211.4
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd July 10, 2009
.Dd August 7, 2020
.Dt NET80211 4
.Os
.Sh NAME
Expand Down Expand Up @@ -393,6 +393,16 @@ Valid values are:
and
.Dv IEEE80211_HWMP_ROOTMODE_RANN
(send broadcast Root Announcement (RANN) frames).
.It Dv IEEE80211_IOC_IC_NAME
Return the underlying hardware
.Xr device 9
name in the buffer pointed to by
.Va i_data
and the name length including terminating NUL character in
.Va i_len .
If the buffer length is too small to hold the full name
.Er EINVAL
will be returned.
.It Dv IEEE80211_IOC_INACTIVITY
Return whether or not the system handles inactivity processing in
.Va i_val .
Expand Down
1 change: 1 addition & 0 deletions share/man/man9/seqc.9
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ obj->var2 = 2;
seqc_write_end(&obj->seqc);
unlock_exclusive(&obj->lock);
.Ed
.Pp
The following example for a reader reads the
.Va var1
and
Expand Down
2 changes: 1 addition & 1 deletion stand/defs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,6 @@ ${_ILINKS}: .NOMETA
esac ; \
path=`(cd $$path && /bin/pwd)` ; \
${ECHO} ${.TARGET} "->" $$path ; \
ln -fhs $$path ${.TARGET}
ln -fns $$path ${.TARGET}
.endif # !NO_OBJ
.endif # __BOOT_DEFS_MK__
4 changes: 1 addition & 3 deletions sys/cddl/compat/opensolaris/sys/assfail.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ void assfail3(const char *, uintmax_t, const char *, uintmax_t, const char *,
#ifndef HAVE_ASSFAIL
extern int aok;

__inline int __assfail(const char *expr, const char *file, int line);

__inline int
static __inline int
__assfail(const char *expr, const char *file, int line)
{

Expand Down
13 changes: 11 additions & 2 deletions sys/cddl/compat/opensolaris/sys/stat.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,19 @@

#include_next <sys/stat.h>

/*
* When bootstrapping on Linux a stat64/fstat64 functions exists in both
* glibc and musl libc. To avoid compilation errors, use those functions instead
* of redefining them to stat/fstat.
* Similarly, macOS provides (deprecated) stat64 functions that we can use
* for now.
*/
#if !defined(__linux__) && !defined(__APPLE__)
#define stat64 stat

#define MAXOFFSET_T OFF_MAX

#ifndef _KERNEL
#if !defined(_KERNEL)
#include <sys/disk.h>

static __inline int
Expand All @@ -51,6 +59,7 @@ fstat64(int fd, struct stat *sb)
}
return (ret);
}
#endif
#endif /* !defined(_KERNEL) */
#endif /* !defined(__linux__) && !defined(__APPLE__) */

#endif /* !_COMPAT_OPENSOLARIS_SYS_STAT_H_ */
1 change: 1 addition & 0 deletions sys/cddl/compat/opensolaris/sys/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#ifndef _OPENSOLARIS_SYS_TIME_H_
#define _OPENSOLARIS_SYS_TIME_H_

#include <sys/types.h>
#include_next <sys/time.h>

#define SEC 1
Expand Down
Loading

0 comments on commit e53daa1

Please sign in to comment.