diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/aarch64/gen/setjmp.S | 2 | ||||
-rw-r--r-- | lib/libc/string/strchr.3 | 8 | ||||
-rw-r--r-- | lib/libdevstat/devstat.c | 2 | ||||
-rw-r--r-- | lib/libdpv/dprompt.c | 3 | ||||
-rw-r--r-- | lib/libedit/edit/readline/readline.h | 17 | ||||
-rw-r--r-- | lib/libedit/readline.c | 22 | ||||
-rw-r--r-- | lib/libgssapi/gss_accept_sec_context.c | 6 | ||||
-rw-r--r-- | lib/libugidfw/ugidfw.c | 6 | ||||
-rw-r--r-- | lib/libutil/pw_util.3 | 4 |
9 files changed, 31 insertions, 39 deletions
diff --git a/lib/libc/aarch64/gen/setjmp.S b/lib/libc/aarch64/gen/setjmp.S index 80a9484..790ed73 100644 --- a/lib/libc/aarch64/gen/setjmp.S +++ b/lib/libc/aarch64/gen/setjmp.S @@ -80,7 +80,7 @@ ENTRY(longjmp) str x1, [sp, #16] /* Restore the signal mask */ - mov x1, #0 /* oset */ + mov x2, #0 /* oset */ add x1, x0, #(_JB_SIGMASK * 8) /* set */ mov x0, #3 /* SIG_BLOCK */ bl sigprocmask diff --git a/lib/libc/string/strchr.3 b/lib/libc/string/strchr.3 index 6117831..a39ea3e 100644 --- a/lib/libc/string/strchr.3 +++ b/lib/libc/string/strchr.3 @@ -113,10 +113,12 @@ and .Fn strrchr conform to .St -isoC . -The +The function .Fn strchrnul -is a GNU extension . -.Sh History +is a +.Tn GNU +extension. +.Sh HISTORY The .Fn strchrnul function first appeared in glibc 2.1.1 and was added in diff --git a/lib/libdevstat/devstat.c b/lib/libdevstat/devstat.c index d52332b..68b5028 100644 --- a/lib/libdevstat/devstat.c +++ b/lib/libdevstat/devstat.c @@ -334,7 +334,6 @@ devstat_getdevs(kvm_t *kd, struct statinfo *stats) { int error; size_t dssize; - int oldnumdevs; long oldgeneration; int retval = 0; struct devinfo *dinfo; @@ -348,7 +347,6 @@ devstat_getdevs(kvm_t *kd, struct statinfo *stats) return(-1); } - oldnumdevs = dinfo->numdevs; oldgeneration = dinfo->generation; if (kd == NULL) { diff --git a/lib/libdpv/dprompt.c b/lib/libdpv/dprompt.c index 031f550..e3d636a 100644 --- a/lib/libdpv/dprompt.c +++ b/lib/libdpv/dprompt.c @@ -391,7 +391,6 @@ dprompt_add_files(struct dpv_file_node *file_list, enum dprompt_state dstate; int estext_lsize; int estext_rsize; - int estext_size; int flabel_size; int hlen; int lsize; @@ -559,13 +558,11 @@ dprompt_add_files(struct dpv_file_node *file_list, bg_code = "\\Zr\\Z1"; /* Red */ estext_lsize = fail_lsize; estext_rsize = fail_rsize; - estext_size = fail_size; estext = fail; } else { /* e.g., DPV_STATUS_DONE */ bg_code = "\\Zr\\Z2"; /* Green */ estext_lsize = done_lsize; estext_rsize = done_rsize; - estext_size = done_size; estext = done; } switch (dstate) { diff --git a/lib/libedit/edit/readline/readline.h b/lib/libedit/edit/readline/readline.h index 4371457..e25781b 100644 --- a/lib/libedit/edit/readline/readline.h +++ b/lib/libedit/edit/readline/readline.h @@ -1,4 +1,4 @@ -/* $NetBSD: readline.h,v 1.34 2013/05/28 00:10:34 christos Exp $ */ +/* $NetBSD: readline.h,v 1.37 2015/06/02 15:36:45 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -41,9 +41,8 @@ /* typedefs */ typedef int Function(const char *, int); typedef void VFunction(void); -typedef void VCPFunction(char *); -typedef char *CPFunction(const char *, int); -typedef char **CPPFunction(const char *, int, int); +typedef void rl_vcpfunc_t(char *); +typedef char **rl_completion_func_t(const char *, int, int); typedef char *rl_compentry_func_t(const char *, int); typedef int rl_command_func_t(int, int); @@ -110,9 +109,9 @@ extern int max_input_history; extern char *rl_basic_word_break_characters; extern char *rl_completer_word_break_characters; extern char *rl_completer_quote_characters; -extern Function *rl_completion_entry_function; +extern rl_compentry_func_t *rl_completion_entry_function; extern char *(*rl_completion_word_break_hook)(void); -extern CPPFunction *rl_attempted_completion_function; +extern rl_completion_func_t *rl_attempted_completion_function; extern int rl_attempted_completion_over; extern int rl_completion_type; extern int rl_completion_query_items; @@ -177,7 +176,7 @@ char *filename_completion_function(const char *, int); char *username_completion_function(const char *, int); int rl_complete(int, int); int rl_read_key(void); -char **completion_matches(const char *, CPFunction *); +char **completion_matches(const char *, rl_compentry_func_t *); void rl_display_match_list(char **, int, int); int rl_insert(int, int); @@ -186,7 +185,7 @@ void rl_reset_terminal(const char *); int rl_bind_key(int, rl_command_func_t *); int rl_newline(int, int); void rl_callback_read_char(void); -void rl_callback_handler_install(const char *, VCPFunction *); +void rl_callback_handler_install(const char *, rl_vcpfunc_t *); void rl_callback_handler_remove(void); void rl_redisplay(void); int rl_get_previous_history(int, int); @@ -196,7 +195,7 @@ int rl_read_init_file(const char *); int rl_parse_and_bind(const char *); int rl_variable_bind(const char *, const char *); void rl_stuff_char(int); -int rl_add_defun(const char *, Function *, int); +int rl_add_defun(const char *, rl_command_func_t *, int); HISTORY_STATE *history_get_history_state(void); void rl_get_screen_size(int *, int *); void rl_set_screen_size(int, int); diff --git a/lib/libedit/readline.c b/lib/libedit/readline.c index 2dd7f4f..caddb9f 100644 --- a/lib/libedit/readline.c +++ b/lib/libedit/readline.c @@ -1,4 +1,4 @@ -/* $NetBSD: readline.c,v 1.115 2015/04/01 15:23:15 christos Exp $ */ +/* $NetBSD: readline.c,v 1.117 2015/06/02 15:35:31 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include "config.h" #if !defined(lint) && !defined(SCCSID) -__RCSID("$NetBSD: readline.c,v 1.115 2015/04/01 15:23:15 christos Exp $"); +__RCSID("$NetBSD: readline.c,v 1.117 2015/06/02 15:35:31 christos Exp $"); #endif /* not lint && not SCCSID */ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); @@ -80,7 +80,7 @@ FILE *rl_outstream = NULL; int rl_point = 0; int rl_end = 0; char *rl_line_buffer = NULL; -VCPFunction *rl_linefunc = NULL; +rl_vcpfunc_t *rl_linefunc = NULL; int rl_done = 0; VFunction *rl_event_hook = NULL; KEYMAP_ENTRY_ARRAY emacs_standard_keymap, @@ -109,9 +109,9 @@ int rl_attempted_completion_over = 0; char *rl_basic_word_break_characters = break_chars; char *rl_completer_word_break_characters = NULL; char *rl_completer_quote_characters = NULL; -Function *rl_completion_entry_function = NULL; +rl_compentry_func_t *rl_completion_entry_function = NULL; char *(*rl_completion_word_break_hook)(void) = NULL; -CPPFunction *rl_attempted_completion_function = NULL; +rl_completion_func_t *rl_attempted_completion_function = NULL; Function *rl_pre_input_hook = NULL; Function *rl_startup1_hook = NULL; int (*rl_getc_function)(FILE *) = NULL; @@ -162,7 +162,7 @@ int rl_completion_append_character = ' '; static History *h = NULL; static EditLine *e = NULL; -static Function *map[256]; +static rl_command_func_t *map[256]; static jmp_buf topbuf; /* internal functions */ @@ -1829,9 +1829,11 @@ rl_complete(int ignore __attribute__((__unused__)), int invoking_key) else breakchars = rl_basic_word_break_characters; + _rl_update_pos(); + /* Just look at how many global variables modify this operation! */ return fn_complete(e, - (CPFunction *)rl_completion_entry_function, + (rl_compentry_func_t *)rl_completion_entry_function, rl_attempted_completion_function, ct_decode_string(rl_basic_word_break_characters, &wbreak_conv), ct_decode_string(breakchars, &sprefix_conv), @@ -1960,7 +1962,7 @@ rl_bind_wrapper(EditLine *el __attribute__((__unused__)), unsigned char c) _rl_update_pos(); - (*map[c])(NULL, c); + (*map[c])(1, c); /* If rl_done was set by the above call, deal with it here */ if (rl_done) @@ -1970,7 +1972,7 @@ rl_bind_wrapper(EditLine *el __attribute__((__unused__)), unsigned char c) } int -rl_add_defun(const char *name, Function *fun, int c) +rl_add_defun(const char *name, rl_command_func_t *fun, int c) { char dest[8]; if ((size_t)c >= sizeof(map) / sizeof(map[0]) || c < 0) @@ -2009,7 +2011,7 @@ rl_callback_read_char(void) } void -rl_callback_handler_install(const char *prompt, VCPFunction *linefunc) +rl_callback_handler_install(const char *prompt, rl_vcpfunc_t *linefunc) { if (e == NULL) { rl_initialize(); diff --git a/lib/libgssapi/gss_accept_sec_context.c b/lib/libgssapi/gss_accept_sec_context.c index b424092..930da7f 100644 --- a/lib/libgssapi/gss_accept_sec_context.c +++ b/lib/libgssapi/gss_accept_sec_context.c @@ -165,7 +165,6 @@ OM_uint32 gss_accept_sec_context(OM_uint32 *minor_status, struct _gss_mechanism_cred *mc; gss_cred_id_t acceptor_mc, delegated_mc; gss_name_t src_mn; - int allocated_ctx; *minor_status = 0; if (src_name) @@ -206,11 +205,8 @@ OM_uint32 gss_accept_sec_context(OM_uint32 *minor_status, free(ctx); return (GSS_S_BAD_MECH); } - allocated_ctx = 1; - } else { + } else m = ctx->gc_mech; - allocated_ctx = 0; - } if (cred) { SLIST_FOREACH(mc, &cred->gc_mc, gmc_link) diff --git a/lib/libugidfw/ugidfw.c b/lib/libugidfw/ugidfw.c index 0dc423d..df7c799 100644 --- a/lib/libugidfw/ugidfw.c +++ b/lib/libugidfw/ugidfw.c @@ -64,11 +64,10 @@ bsde_rule_to_string(struct mac_bsdextended_rule *rule, char *buf, size_t buflen) struct statfs *mntbuf; char *cur, type[sizeof(rule->mbr_object.mbo_type) * CHAR_BIT + 1]; size_t left, len; - int anymode, unknownmode, truncated, numfs, i, notdone; + int anymode, unknownmode, numfs, i, notdone; cur = buf; left = buflen; - truncated = 0; len = snprintf(cur, left, "subject "); if (len < 0 || len > left) @@ -1216,7 +1215,7 @@ bsde_delete_rule(int rulenum, size_t buflen, char *errstr) { struct mac_bsdextended_rule rule; int name[10]; - size_t len, size; + size_t len; int error; if (bsde_check_version(buflen, errstr) != 0) @@ -1233,7 +1232,6 @@ bsde_delete_rule(int rulenum, size_t buflen, char *errstr) name[len] = rulenum; len++; - size = sizeof(rule); error = sysctl(name, len, NULL, NULL, &rule, 0); if (error) { len = snprintf(errstr, buflen, "%s.%d: %s", MIB ".rules", diff --git a/lib/libutil/pw_util.3 b/lib/libutil/pw_util.3 index 0d8c763..706368f 100644 --- a/lib/libutil/pw_util.3 +++ b/lib/libutil/pw_util.3 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 30, 2012 +.Dd June 06, 2015 .Dt PW_UTIL 3 .Os .Sh NAME @@ -222,7 +222,7 @@ and it is the caller's responsibility to free it with The .Fn pw_mkdb function regenerates the password database by running -.Xr pw_mkdb 8 . +.Xr pwd_mkdb 8 . If .Fa user only the record corresponding to that user will be updated. |