sync with OpenBSD -current

This commit is contained in:
purplerain 2024-02-12 22:05:39 +00:00
parent e51bf6e676
commit c151d49b7a
Signed by: purplerain
GPG Key ID: F42C07F07E2E35B7
6 changed files with 20 additions and 14 deletions

View File

@ -1301,11 +1301,7 @@ static void readConfigs(opt::InputArgList &args) {
config->zOrigin = hasZOption(args, "origin");
config->zPacPlt = hasZOption(args, "pac-plt");
config->zRelro = getZFlag(args, "relro", "norelro", true);
#ifndef __OpenBSD__
config->zRetpolineplt = getZFlag(args, "retpolineplt", "noretpolineplt", false);
#else
config->zRetpolineplt = getZFlag(args, "retpolineplt", "noretpolineplt", true);
#endif
config->zRetpolineplt = hasZOption(args, "retpolineplt");
config->zRodynamic = hasZOption(args, "rodynamic");
config->zSeparate = getZSeparate(args);
config->zShstk = hasZOption(args, "shstk");

View File

@ -1,4 +1,4 @@
/* $OpenBSD: options.c,v 1.29 2021/04/13 15:39:21 millert Exp $ */
/* $OpenBSD: options.c,v 1.30 2024/02/12 16:42:42 job Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@ -145,6 +145,8 @@ OPTLIST const optlist[] = {
{"shellmeta", NULL, OPT_STR, 0},
/* O_SHIFTWIDTH 4BSD */
{"shiftwidth", NULL, OPT_NUM, OPT_NOZERO},
/* O_SHOWFILENAME */
{"showfilename",NULL, OPT_0BOOL, 0},
/* O_SHOWMATCH 4BSD */
{"showmatch", NULL, OPT_0BOOL, 0},
/* O_SHOWMODE 4.4BSD */

View File

@ -1,4 +1,4 @@
.\" $OpenBSD: vi.1,v 1.83 2023/01/29 09:28:57 otto Exp $
.\" $OpenBSD: vi.1,v 1.84 2024/02/12 16:42:42 job Exp $
.\"
.\" Copyright (c) 1994
.\" The Regents of the University of California. All rights reserved.
@ -14,7 +14,7 @@
.\"
.\" @(#)vi.1 8.51 (Berkeley) 10/10/96
.\"
.Dd $Mdocdate: January 29 2023 $
.Dd $Mdocdate: February 12 2024 $
.Dt VI 1
.Os
.Sh NAME
@ -2488,6 +2488,10 @@ Set the meta characters checked to determine if file name expansion
is necessary.
.It Cm shiftwidth , sw Bq 8
Set the autoindent and shift command indentation width.
.It Cm showfilename Bq off
.Nm vi
only.
Display the file name on the colon command line.
.It Cm showmatch , sm Bq off
.Nm vi
only.

View File

@ -1,4 +1,4 @@
/* $OpenBSD: vs_refresh.c,v 1.22 2016/01/30 21:31:08 martijn Exp $ */
/* $OpenBSD: vs_refresh.c,v 1.23 2024/02/12 16:42:43 job Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@ -810,7 +810,7 @@ vs_modeline(SCR *sp)
/* If more than one screen in the display, show the file name. */
curlen = 0;
if (IS_SPLIT(sp)) {
if (IS_SPLIT(sp) || O_ISSET(sp, O_SHOWFILENAME)) {
for (p = sp->frp->name; *p != '\0'; ++p);
for (ellipsis = 0, cols = sp->cols / 2; --p > sp->frp->name;) {
if (*p == '/') {

View File

@ -1,4 +1,4 @@
/* $OpenBSD: bt_parse.y,v 1.58 2024/02/07 19:07:42 mpi Exp $ */
/* $OpenBSD: bt_parse.y,v 1.59 2024/02/12 15:11:06 mpi Exp $ */
/*
* Copyright (c) 2019-2023 Martin Pieuchot <mpi@openbsd.org>
@ -611,7 +611,7 @@ bm_insert(const char *mname, struct bt_arg *mkey, struct bt_arg *mval)
{
struct bt_arg *ba;
if (mkey->ba_type == B_AT_TUPLE)
if (mkey->ba_type == B_AT_TUPLE)
yyerror("tuple cannot be used as map key");
ba = ba_new(bg_get(mname), B_AT_MAP);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: btrace.c,v 1.84 2024/02/05 15:11:35 mpi Exp $ */
/* $OpenBSD: btrace.c,v 1.85 2024/02/12 15:12:09 mpi Exp $ */
/*
* Copyright (c) 2019 - 2023 Martin Pieuchot <mpi@openbsd.org>
@ -1868,6 +1868,7 @@ ba2dtflags(struct bt_arg *ba)
long
bacmp(struct bt_arg *a, struct bt_arg *b)
{
char astr[STRLEN];
long val;
if (a->ba_type != b->ba_type)
@ -1877,9 +1878,12 @@ bacmp(struct bt_arg *a, struct bt_arg *b)
case B_AT_LONG:
return ba2long(a, NULL) - ba2long(b, NULL);
case B_AT_STR:
return strcmp(ba2str(a, NULL), ba2str(b, NULL));
strlcpy(astr, ba2str(a, NULL), sizeof(astr));
return strcmp(astr, ba2str(b, NULL));
case B_AT_TUPLE:
/* Compare two lists of arguments one by one. */
a = a->ba_value;
b = b->ba_value;
do {
val = bacmp(a, b);
if (val != 0)