sync
This commit is contained in:
parent
3f8ae0d130
commit
be633fa56a
@ -0,0 +1 @@
|
||||
#machdep.lidaction=0 # 1=suspend, 2=hibernate laptop upon lid closing
|
@ -113,7 +113,7 @@ Summary:
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* We use subtraction of (char *) 0 instead of casting to int
|
||||
because on word-addressable machines a simple cast to int
|
||||
may ignore the byte-within-word field of the pointer. */
|
||||
@ -196,7 +196,7 @@ extern int _obstack_begin_1 (struct obstack *, int, int,
|
||||
void *(*) (void *, long),
|
||||
void (*) (void *, void *), void *);
|
||||
extern int _obstack_memory_used (struct obstack *);
|
||||
|
||||
|
||||
/* Do the function-declarations after the structs
|
||||
but before defining the macros. */
|
||||
|
||||
@ -242,7 +242,7 @@ extern void (*obstack_alloc_failed_handler) (void);
|
||||
|
||||
/* Exit value used when `print_and_abort' is used. */
|
||||
extern int obstack_exit_failure;
|
||||
|
||||
|
||||
/* Pointer to beginning of object being allocated or to be allocated next.
|
||||
Note that this might not be the final address of the object
|
||||
because a new chunk might be needed to hold the final size. */
|
||||
@ -291,7 +291,7 @@ extern int obstack_exit_failure;
|
||||
#define obstack_blank_fast(h,n) ((h)->next_free += (n))
|
||||
|
||||
#define obstack_memory_used(h) _obstack_memory_used (h)
|
||||
|
||||
|
||||
#if defined __GNUC__ && defined __STDC__ && __STDC__
|
||||
/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
|
||||
does not implement __extension__. But that compiler doesn't define
|
||||
@ -441,7 +441,7 @@ __extension__ \
|
||||
if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \
|
||||
__o->next_free = __o->object_base = (char *) __obj; \
|
||||
else (obstack_free) (__o, __obj); })
|
||||
|
||||
|
||||
#else /* not __GNUC__ or not __STDC__ */
|
||||
|
||||
# define obstack_object_size(h) \
|
||||
|
@ -172,7 +172,7 @@ typedef unsigned long int reg_syntax_t;
|
||||
stored in the pattern buffer, so changing this does not affect
|
||||
already-compiled regexps. */
|
||||
extern reg_syntax_t re_syntax_options;
|
||||
|
||||
|
||||
/* Define combinations of the above bits for the standard possibilities.
|
||||
(The [[[ comments delimit what gets put into the Texinfo file, so
|
||||
don't delete them!) */
|
||||
@ -242,7 +242,7 @@ extern reg_syntax_t re_syntax_options;
|
||||
| RE_NO_BK_PARENS | RE_NO_BK_REFS \
|
||||
| RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD)
|
||||
/* [[[end syntaxes]]] */
|
||||
|
||||
|
||||
/* Maximum number of duplicates an interval can allow. Some systems
|
||||
(erroneously) define this in other header files, but we want our
|
||||
value, so remove any previous define. */
|
||||
@ -317,7 +317,7 @@ typedef enum
|
||||
REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */
|
||||
REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */
|
||||
} reg_errcode_t;
|
||||
|
||||
|
||||
/* This data structure represents a compiled pattern. Before calling
|
||||
the pattern compiler, the fields `buffer', `allocated', `fastmap',
|
||||
`translate', and `no_sub' can be set. After the pattern has been
|
||||
@ -397,7 +397,7 @@ struct re_pattern_buffer
|
||||
};
|
||||
|
||||
typedef struct re_pattern_buffer regex_t;
|
||||
|
||||
|
||||
/* Type for byte offsets within the string. POSIX mandates this. */
|
||||
typedef int regoff_t;
|
||||
|
||||
@ -428,7 +428,7 @@ typedef struct
|
||||
regoff_t rm_so; /* Byte offset from string's start to substring's start. */
|
||||
regoff_t rm_eo; /* Byte offset from string's start to substring's end. */
|
||||
} regmatch_t;
|
||||
|
||||
|
||||
/* Declarations for routines. */
|
||||
|
||||
/* To avoid duplicating every routine declaration -- once with a
|
||||
@ -555,7 +555,7 @@ extern void regfree (regex_t *__preg);
|
||||
#endif /* C++ */
|
||||
|
||||
#endif /* regex.h */
|
||||
|
||||
|
||||
/*
|
||||
Local variables:
|
||||
make-backup-files: t
|
||||
|
@ -55,7 +55,7 @@ modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
@ -111,7 +111,7 @@ modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
@ -158,7 +158,7 @@ Library.
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
@ -216,7 +216,7 @@ instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
@ -267,7 +267,7 @@ Library will still fall under Section 6.)
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
@ -329,7 +329,7 @@ restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
@ -370,7 +370,7 @@ subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
@ -422,7 +422,7 @@ conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
@ -456,7 +456,7 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
|
@ -51,7 +51,7 @@ static void fibnode_insert_after (fibnode_t, fibnode_t);
|
||||
#define fibnode_insert_before(a, b) fibnode_insert_after (a->left, b)
|
||||
static fibnode_t fibnode_remove (fibnode_t);
|
||||
|
||||
|
||||
|
||||
/* Create a new fibonacci heap. */
|
||||
fibheap_t
|
||||
fibheap_new (void)
|
||||
|
@ -248,7 +248,7 @@ const struct floatformat floatformat_ia64_quad_little =
|
||||
"floatformat_ia64_quad_little",
|
||||
floatformat_always_valid
|
||||
};
|
||||
|
||||
|
||||
/* Extract a field which starts at START and is LEN bits long. DATA and
|
||||
TOTAL_LEN are the thing we are extracting it from, in byteorder ORDER. */
|
||||
static unsigned long
|
||||
@ -413,7 +413,7 @@ floatformat_to_double (const struct floatformat *fmt,
|
||||
dto = -dto;
|
||||
*to = dto;
|
||||
}
|
||||
|
||||
|
||||
static void put_field (unsigned char *, enum floatformat_byteorders,
|
||||
unsigned int,
|
||||
unsigned int,
|
||||
|
@ -23,7 +23,7 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
|
||||
/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
|
||||
Ditto for AIX 3.2 and <stdlib.h>. */
|
||||
#ifndef _NO_PROTO
|
||||
@ -192,7 +192,7 @@ static enum
|
||||
|
||||
/* Value of POSIXLY_CORRECT environment variable. */
|
||||
static char *posixly_correct;
|
||||
|
||||
|
||||
#ifdef __GNU_LIBRARY__
|
||||
/* We want to avoid inclusion of string.h with non-GNU libraries
|
||||
because there are many ways it can cause trouble.
|
||||
@ -250,7 +250,7 @@ extern int strlen (const char *);
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
#endif /* not __GNU_LIBRARY__ */
|
||||
|
||||
|
||||
/* Handle permutation of arguments. */
|
||||
|
||||
/* Describe the part of ARGV that contains non-options that have
|
||||
@ -461,7 +461,7 @@ _getopt_initialize (int argc ATTRIBUTE_UNUSED,
|
||||
|
||||
return optstring;
|
||||
}
|
||||
|
||||
|
||||
/* Scan elements of ARGV (whose length is ARGC) for option characters
|
||||
given in OPTSTRING.
|
||||
|
||||
@ -980,7 +980,7 @@ getopt (int argc, char *const *argv, const char *optstring)
|
||||
}
|
||||
|
||||
#endif /* Not ELIDE_CODE. */
|
||||
|
||||
|
||||
#ifdef TEST
|
||||
|
||||
/* Compile with -DTEST to make an executable for use in testing
|
||||
|
@ -19,7 +19,7 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
|
||||
USA. */
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
@ -86,7 +86,7 @@ getopt_long_only (int argc, char *const *argv, const char *options,
|
||||
|
||||
|
||||
#endif /* Not ELIDE_CODE. */
|
||||
|
||||
|
||||
#ifdef TEST
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -128,7 +128,7 @@ struct obstack *_obstack;
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* Initialize an obstack H for use. Specify chunk size SIZE (0 means default).
|
||||
Objects start on multiples of ALIGNMENT (0 means use default).
|
||||
CHUNKFUN is the function to use to allocate chunks,
|
||||
@ -317,7 +317,7 @@ _obstack_allocated_p (struct obstack *h, POINTER obj)
|
||||
}
|
||||
return lp != 0;
|
||||
}
|
||||
|
||||
|
||||
/* Free objects in obstack H, including OBJ and everything allocate
|
||||
more recently than OBJ. If OBJ is zero, free everything in H. */
|
||||
|
||||
@ -387,7 +387,7 @@ obstack_free (struct obstack *h, POINTER obj)
|
||||
/* obj is not in any of the chunks! */
|
||||
abort ();
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
_obstack_memory_used (struct obstack *h)
|
||||
{
|
||||
@ -400,7 +400,7 @@ _obstack_memory_used (struct obstack *h)
|
||||
}
|
||||
return nbytes;
|
||||
}
|
||||
|
||||
|
||||
/* Define the error handler. */
|
||||
#ifndef _
|
||||
# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
|
||||
@ -419,7 +419,7 @@ print_and_abort (void)
|
||||
fputs (_("memory exhausted\n"), stderr);
|
||||
exit (obstack_exit_failure);
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
/* These are now turned off because the applications do not use it
|
||||
and it uses bcopy via obstack_grow, which causes trouble on sysV. */
|
||||
|
@ -217,7 +217,7 @@ static int rand_deg = DEG_3;
|
||||
static int rand_sep = SEP_3;
|
||||
|
||||
static long int *end_ptr = &randtbl[sizeof(randtbl) / sizeof(randtbl[0])];
|
||||
|
||||
|
||||
/* Initialize the random number generator based on the given seed. If the
|
||||
type is the trivial no-state-information type, just remember the seed.
|
||||
Otherwise, initializes state[] based on the given "seed" via a linear
|
||||
@ -241,7 +241,7 @@ srandom (unsigned int x)
|
||||
random();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Initialize the state information in the given array of N bytes for
|
||||
future random number generation. Based on the number of bytes we
|
||||
are given, and the break values for the different R.N.G.'s, we choose
|
||||
@ -309,7 +309,7 @@ initstate (unsigned int seed, PTR arg_state, unsigned long n)
|
||||
|
||||
return ostate;
|
||||
}
|
||||
|
||||
|
||||
/* Restore the state from the given state array.
|
||||
Note: It is important that we also remember the locations of the pointers
|
||||
in the current state information, and restore the locations of the pointers
|
||||
@ -360,7 +360,7 @@ setstate (PTR arg_state)
|
||||
|
||||
return ostate;
|
||||
}
|
||||
|
||||
|
||||
/* If we are using the trivial TYPE_0 R.N.G., just do the old linear
|
||||
congruential bit. Otherwise, we do our fancy trinomial stuff, which is the
|
||||
same in all ther other cases due to all the global variables that have been
|
||||
|
@ -188,7 +188,7 @@ char *realloc ();
|
||||
# ifndef MB_LEN_MAX
|
||||
# define MB_LEN_MAX 1
|
||||
# endif
|
||||
|
||||
|
||||
/* Get the interface, including the syntax bits. */
|
||||
# include "xregex.h" /* change for libiberty */
|
||||
|
||||
@ -258,7 +258,7 @@ char *realloc ();
|
||||
/* As in Harbison and Steele. */
|
||||
# define SIGN_EXTEND_CHAR(c) ((((unsigned char) (c)) ^ 128) - 128)
|
||||
# endif
|
||||
|
||||
|
||||
# ifndef emacs
|
||||
/* How many characters in the character set. */
|
||||
# define CHAR_SET_SIZE 256
|
||||
@ -297,7 +297,7 @@ init_syntax_once (void)
|
||||
# define SYNTAX(c) re_syntax_table[(unsigned char) (c)]
|
||||
|
||||
# endif /* emacs */
|
||||
|
||||
|
||||
/* Integer type for pointers. */
|
||||
# if !defined _LIBC && !defined HAVE_UINTPTR_T
|
||||
typedef unsigned long int uintptr_t;
|
||||
@ -444,7 +444,7 @@ static int wcs_re_search_2 (struct re_pattern_buffer *bufp,
|
||||
struct re_registers *regs, int stop);
|
||||
static int wcs_re_compile_fastmap (struct re_pattern_buffer *bufp);
|
||||
#endif
|
||||
|
||||
|
||||
/* These are the command codes that appear in compiled regular
|
||||
expressions. Some opcodes are followed by argument bytes. A
|
||||
command code can specify any interpretation whatsoever for its
|
||||
@ -603,7 +603,7 @@ typedef enum
|
||||
# endif /* emacs */
|
||||
} re_opcode_t;
|
||||
#endif /* not INSIDE_RECURSION */
|
||||
|
||||
|
||||
|
||||
#ifdef BYTE
|
||||
# define CHAR_T char
|
||||
@ -735,7 +735,7 @@ PREFIX(extract_number_and_incr) (int *destination, UCHAR_T **source)
|
||||
|
||||
# endif /* DEBUG */
|
||||
|
||||
|
||||
|
||||
|
||||
/* If DEBUG is defined, Regex prints many voluminous messages about what
|
||||
it is doing (if the variable `debug' is nonzero). If linked with the
|
||||
@ -1226,7 +1226,7 @@ printchar (int c)
|
||||
|
||||
# endif /* not DEBUG */
|
||||
|
||||
|
||||
|
||||
|
||||
# ifdef WCHAR
|
||||
/* This convert a multibyte string to a wide character string.
|
||||
@ -1337,7 +1337,7 @@ re_set_syntax (reg_syntax_t syntax)
|
||||
# ifdef _LIBC
|
||||
weak_alias (__re_set_syntax, re_set_syntax)
|
||||
# endif
|
||||
|
||||
|
||||
/* This table gives an error message for each of the error codes listed
|
||||
in regex.h. Obviously the order here has to be same as there.
|
||||
POSIX doesn't require that we do anything for REG_NOERROR,
|
||||
@ -1363,7 +1363,7 @@ static const char *re_error_msgid[] =
|
||||
gettext_noop ("Regular expression too big"), /* REG_ESIZE */
|
||||
gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */
|
||||
};
|
||||
|
||||
|
||||
#endif /* INSIDE_RECURSION */
|
||||
|
||||
#ifndef DEFINED_ONCE
|
||||
@ -1404,7 +1404,7 @@ static const char *re_error_msgid[] =
|
||||
# undef MATCH_MAY_ALLOCATE
|
||||
# endif
|
||||
#endif /* not DEFINED_ONCE */
|
||||
|
||||
|
||||
#ifdef INSIDE_RECURSION
|
||||
/* Failure stack declarations and macros; both re_compile_fastmap and
|
||||
re_match_2 use a failure stack. These have to be macros because of
|
||||
@ -1776,7 +1776,7 @@ typedef struct
|
||||
set_regs_matched_done = 0; \
|
||||
DEBUG_STATEMENT (nfailure_points_popped++); \
|
||||
} /* POP_FAILURE_POINT */
|
||||
|
||||
|
||||
/* Structure for per-register (a.k.a. per-group) information.
|
||||
Other register information, such as the
|
||||
starting and ending positions (which are addresses), and the list of
|
||||
@ -2195,7 +2195,7 @@ typedef struct
|
||||
|| STREQ (string, "cntrl") || STREQ (string, "blank"))
|
||||
# endif
|
||||
# endif /* DEFINED_ONCE */
|
||||
|
||||
|
||||
# ifndef MATCH_MAY_ALLOCATE
|
||||
|
||||
/* If we cannot allocate large objects within re_match_2_internal,
|
||||
@ -2245,7 +2245,7 @@ PREFIX(regex_grow_registers) (int num_regs)
|
||||
}
|
||||
|
||||
# endif /* not MATCH_MAY_ALLOCATE */
|
||||
|
||||
|
||||
# ifndef DEFINED_ONCE
|
||||
static boolean group_in_compile_stack (compile_stack_type compile_stack,
|
||||
regnum_t regnum);
|
||||
@ -4502,7 +4502,7 @@ byte_compile_range (unsigned int range_start_char, const char **p_ptr,
|
||||
return ret;
|
||||
}
|
||||
#endif /* WCHAR */
|
||||
|
||||
|
||||
/* re_compile_fastmap computes a ``fastmap'' for the compiled pattern in
|
||||
BUFP. A fastmap records which of the (1 << BYTEWIDTH) possible
|
||||
characters can start a string that matches the pattern. This fastmap
|
||||
@ -4869,7 +4869,7 @@ re_compile_fastmap (struct re_pattern_buffer *bufp)
|
||||
#ifdef _LIBC
|
||||
weak_alias (__re_compile_fastmap, re_compile_fastmap)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
|
||||
ENDS. Subsequent matches using PATTERN_BUFFER and REGS will use
|
||||
@ -4906,7 +4906,7 @@ re_set_registers (struct re_pattern_buffer *bufp,
|
||||
#ifdef _LIBC
|
||||
weak_alias (__re_set_registers, re_set_registers)
|
||||
#endif
|
||||
|
||||
|
||||
/* Searching routines. */
|
||||
|
||||
/* Like re_search_2, below, but only one string is specified, and
|
||||
@ -5382,7 +5382,7 @@ PREFIX(re_search_2) (struct re_pattern_buffer *bufp, const char *string1,
|
||||
to actually save any registers when none are active. */
|
||||
#define NO_HIGHEST_ACTIVE_REG (1 << BYTEWIDTH)
|
||||
#define NO_LOWEST_ACTIVE_REG (NO_HIGHEST_ACTIVE_REG + 1)
|
||||
|
||||
|
||||
#else /* not INSIDE_RECURSION */
|
||||
/* Matching routines. */
|
||||
|
||||
@ -7746,7 +7746,7 @@ PREFIX(bcmp_translate) (const CHAR_T *s1, const CHAR_T *s2, register int len,
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#else /* not INSIDE_RECURSION */
|
||||
|
||||
@ -7793,7 +7793,7 @@ re_compile_pattern (const char *pattern, size_t length,
|
||||
#ifdef _LIBC
|
||||
weak_alias (__re_compile_pattern, re_compile_pattern)
|
||||
#endif
|
||||
|
||||
|
||||
/* Entry points compatible with 4.2 BSD regex library. We don't define
|
||||
them unless specifically requested. */
|
||||
|
||||
@ -7865,7 +7865,7 @@ re_exec (const char *s)
|
||||
}
|
||||
|
||||
#endif /* _REGEX_RE_COMP */
|
||||
|
||||
|
||||
/* POSIX.2 functions. Don't define these for Emacs. */
|
||||
|
||||
#ifndef emacs
|
||||
@ -8132,7 +8132,7 @@ weak_alias (__regfree, regfree)
|
||||
|
||||
#endif /* not INSIDE_RECURSION */
|
||||
|
||||
|
||||
|
||||
#undef STORE_NUMBER
|
||||
#undef STORE_NUMBER_AND_INCR
|
||||
#undef EXTRACT_NUMBER
|
||||
|
@ -30,9 +30,9 @@
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $OpenBSD: malloc.3,v 1.133 2023/06/04 06:58:33 otto Exp $
|
||||
.\" $OpenBSD: malloc.3,v 1.134 2023/06/22 11:04:16 otto Exp $
|
||||
.\"
|
||||
.Dd $Mdocdate: June 4 2023 $
|
||||
.Dd $Mdocdate: June 22 2023 $
|
||||
.Dt MALLOC 3
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -294,6 +294,17 @@ To record the dump:
|
||||
To view the leak report:
|
||||
.Pp
|
||||
.Dl $ kdump -u malloc ...
|
||||
.Pp
|
||||
By default, the immediate caller of a
|
||||
.Nm
|
||||
function will be recorded.
|
||||
Use malloc options
|
||||
.Cm 2
|
||||
or
|
||||
.Cm 3
|
||||
to record the caller one or two stack frames deeper instead.
|
||||
These malloc options imply
|
||||
.Cm D .
|
||||
.It Cm F
|
||||
.Dq Freecheck .
|
||||
Enable more extensive double free and use after free detection.
|
||||
@ -813,3 +824,14 @@ and
|
||||
.Fn realloc
|
||||
to avoid these problems on
|
||||
.Ox .
|
||||
.Pp
|
||||
The mechanism to record caller functions when using malloc options
|
||||
.Cm 2
|
||||
or
|
||||
.Cm 3
|
||||
is not guaranteed to work for all platforms, compilers or compilation
|
||||
options,
|
||||
and might even crash your program.
|
||||
Use
|
||||
.Em only
|
||||
for debugging purposes.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: malloc.c,v 1.286 2023/06/07 12:56:22 aoyama Exp $ */
|
||||
/* $OpenBSD: malloc.c,v 1.287 2023/06/22 11:04:16 otto Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2008, 2010, 2011, 2016, 2023 Otto Moerbeek <otto@drijf.net>
|
||||
* Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org>
|
||||
@ -255,7 +255,11 @@ void malloc_dump(void);
|
||||
PROTO_NORMAL(malloc_dump);
|
||||
static void malloc_exit(void);
|
||||
#endif
|
||||
#define CALLER (DO_STATS ? __builtin_return_address(0) : NULL)
|
||||
#define CALLER ( \
|
||||
DO_STATS == 0 ? NULL : (__builtin_extract_return_addr( \
|
||||
DO_STATS == 1 ? __builtin_return_address(0) : \
|
||||
DO_STATS == 2 ? __builtin_return_address(1) : \
|
||||
DO_STATS == 3 ? __builtin_return_address(2) : NULL)))
|
||||
|
||||
/* low bits of r->p determine size: 0 means >= page size and r->size holding
|
||||
* real size, otherwise low bits is the bucket + 1
|
||||
@ -365,8 +369,15 @@ omalloc_parseopt(char opt)
|
||||
mopts.malloc_stats = 0;
|
||||
break;
|
||||
case 'D':
|
||||
case '1':
|
||||
mopts.malloc_stats = 1;
|
||||
break;
|
||||
case '2':
|
||||
mopts.malloc_stats = 2;
|
||||
break;
|
||||
case '3':
|
||||
mopts.malloc_stats = 3;
|
||||
break;
|
||||
#endif /* MALLOC_STATS */
|
||||
case 'f':
|
||||
mopts.malloc_freecheck = 0;
|
||||
|
@ -1,10 +1,8 @@
|
||||
# $OpenBSD: Makefile,v 1.3 2022/09/21 15:24:45 tb Exp $
|
||||
# $OpenBSD: Makefile,v 1.4 2023/06/22 19:23:27 tb Exp $
|
||||
|
||||
TESTS = \
|
||||
symbols
|
||||
|
||||
PROG = ${TESTS}
|
||||
|
||||
REGRESS_TARGETS= all_tests
|
||||
|
||||
.include <bsd.own.mk> # for BSDSRCDIR
|
||||
@ -29,10 +27,10 @@ CFLAGS+= -Wno-deprecated-declarations
|
||||
CLEANFILES+= include_headers.c symbols.c symbols.c.tmp
|
||||
|
||||
symbols.c: symbols.awk ../../../../lib/libcrypto/Symbols.list
|
||||
make -f ${.CURDIR}/Makefile include_headers.c
|
||||
make -f ${.CURDIR}/Makefile include_headers.c; \
|
||||
awk -f ${.CURDIR}/symbols.awk \
|
||||
< ${BSDSRCDIR}/lib/libcrypto/Symbols.list > symbols.c.tmp
|
||||
mv symbols.c.tmp symbols.c
|
||||
< ${BSDSRCDIR}/lib/libcrypto/Symbols.list > $@.tmp; \
|
||||
mv -f $@.tmp $@
|
||||
|
||||
all_tests: ${TESTS}
|
||||
@for test in $>; do \
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $OpenBSD: aplsmc.4,v 1.2 2022/01/10 21:16:44 jmc Exp $
|
||||
.\" $OpenBSD: aplsmc.4,v 1.3 2023/06/22 15:29:05 tobhe Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2021 Mark Kettenis <kettenis@openbsd.org>
|
||||
.\"
|
||||
@ -14,7 +14,7 @@
|
||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.Dd $Mdocdate: January 10 2022 $
|
||||
.Dd $Mdocdate: June 22 2023 $
|
||||
.Dt APLSMC 4 arm64
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -28,7 +28,7 @@ The
|
||||
driver provides support for the System Management Controller (SMC)
|
||||
found on various Apple SoCs.
|
||||
The driver provides a collection of current, fan, power, temperature,
|
||||
voltage and battery information sensors.
|
||||
voltage, lid position and battery information sensors.
|
||||
.Pp
|
||||
Sensor values are made available through the
|
||||
.Xr sysctl 8
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: apm.c,v 1.130 2023/02/10 14:34:16 visa Exp $ */
|
||||
/* $OpenBSD: apm.c,v 1.131 2023/06/22 13:18:02 claudio Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998-2001 Michael Shalayeff. All rights reserved.
|
||||
@ -907,7 +907,7 @@ apm_thread(void *v)
|
||||
rw_enter_write(&sc->sc_lock);
|
||||
(void) apm_periodic_check(sc);
|
||||
rw_exit_write(&sc->sc_lock);
|
||||
tsleep_nsec(&lbolt, PWAIT, "apmev", INFSLP);
|
||||
tsleep_nsec(&nowake, PWAIT, "apmev", SEC_TO_NSEC(1));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1214,7 +1214,6 @@ amdgpu_display_user_framebuffer_create(struct drm_device *dev,
|
||||
|
||||
const struct drm_mode_config_funcs amdgpu_mode_funcs = {
|
||||
.fb_create = amdgpu_display_user_framebuffer_create,
|
||||
.output_poll_changed = drm_fb_helper_output_poll_changed,
|
||||
};
|
||||
|
||||
static const struct drm_prop_enum_list amdgpu_underscan_enum_list[] =
|
||||
|
@ -1605,6 +1605,7 @@ static const u16 amdgpu_unsupported_pciidlist[] = {
|
||||
0x5874,
|
||||
0x5940,
|
||||
0x5941,
|
||||
0x5b70,
|
||||
0x5b72,
|
||||
0x5b73,
|
||||
0x5b74,
|
||||
|
@ -3570,6 +3570,9 @@ static ssize_t amdgpu_psp_vbflash_read(struct file *filp, struct kobject *kobj,
|
||||
void *fw_pri_cpu_addr;
|
||||
int ret;
|
||||
|
||||
if (adev->psp.vbflash_image_size == 0)
|
||||
return -EINVAL;
|
||||
|
||||
dev_info(adev->dev, "VBIOS flash to PSP started");
|
||||
|
||||
ret = amdgpu_bo_create_kernel(adev, adev->psp.vbflash_image_size,
|
||||
@ -3623,14 +3626,14 @@ static ssize_t amdgpu_psp_vbflash_status(struct device *dev,
|
||||
|
||||
#ifdef notyet
|
||||
static const struct bin_attribute psp_vbflash_bin_attr = {
|
||||
.attr = {.name = "psp_vbflash", .mode = 0664},
|
||||
.attr = {.name = "psp_vbflash", .mode = 0660},
|
||||
.size = 0,
|
||||
.write = amdgpu_psp_vbflash_write,
|
||||
.read = amdgpu_psp_vbflash_read,
|
||||
};
|
||||
#endif
|
||||
|
||||
static DEVICE_ATTR(psp_vbflash_status, 0444, amdgpu_psp_vbflash_status, NULL);
|
||||
static DEVICE_ATTR(psp_vbflash_status, 0440, amdgpu_psp_vbflash_status, NULL);
|
||||
|
||||
int amdgpu_psp_sysfs_init(struct amdgpu_device *adev)
|
||||
{
|
||||
|
@ -6969,8 +6969,10 @@ static int gfx_v10_0_kiq_resume(struct amdgpu_device *adev)
|
||||
return r;
|
||||
|
||||
r = amdgpu_bo_kmap(ring->mqd_obj, (void **)&ring->mqd_ptr);
|
||||
if (unlikely(r != 0))
|
||||
if (unlikely(r != 0)) {
|
||||
amdgpu_bo_unreserve(ring->mqd_obj);
|
||||
return r;
|
||||
}
|
||||
|
||||
gfx_v10_0_kiq_init_queue(ring);
|
||||
amdgpu_bo_kunmap(ring->mqd_obj);
|
||||
|
@ -3651,8 +3651,10 @@ static int gfx_v9_0_kiq_resume(struct amdgpu_device *adev)
|
||||
return r;
|
||||
|
||||
r = amdgpu_bo_kmap(ring->mqd_obj, (void **)&ring->mqd_ptr);
|
||||
if (unlikely(r != 0))
|
||||
if (unlikely(r != 0)) {
|
||||
amdgpu_bo_unreserve(ring->mqd_obj);
|
||||
return r;
|
||||
}
|
||||
|
||||
gfx_v9_0_kiq_init_queue(ring);
|
||||
amdgpu_bo_kunmap(ring->mqd_obj);
|
||||
|
@ -117,7 +117,11 @@ static int vcn_v4_0_sw_init(void *handle)
|
||||
if (adev->vcn.harvest_config & (1 << i))
|
||||
continue;
|
||||
|
||||
atomic_set(&adev->vcn.inst[i].sched_score, 0);
|
||||
/* Init instance 0 sched_score to 1, so it's scheduled after other instances */
|
||||
if (i == 0)
|
||||
atomic_set(&adev->vcn.inst[i].sched_score, 1);
|
||||
else
|
||||
atomic_set(&adev->vcn.inst[i].sched_score, 0);
|
||||
|
||||
/* VCN UNIFIED TRAP */
|
||||
r = amdgpu_irq_add_id(adev, amdgpu_ih_clientid_vcns[i],
|
||||
|
@ -83,7 +83,6 @@
|
||||
#include <drm/drm_atomic_uapi.h>
|
||||
#include <drm/drm_atomic_helper.h>
|
||||
#include <drm/drm_blend.h>
|
||||
#include <drm/drm_fb_helper.h>
|
||||
#include <drm/drm_fourcc.h>
|
||||
#include <drm/drm_edid.h>
|
||||
#include <drm/drm_vblank.h>
|
||||
@ -2877,7 +2876,6 @@ const struct amdgpu_ip_block_version dm_ip_block =
|
||||
static const struct drm_mode_config_funcs amdgpu_dm_mode_funcs = {
|
||||
.fb_create = amdgpu_display_user_framebuffer_create,
|
||||
.get_format_info = amd_get_format_info,
|
||||
.output_poll_changed = drm_fb_helper_output_poll_changed,
|
||||
.atomic_check = amdgpu_dm_atomic_check,
|
||||
.atomic_commit = drm_atomic_helper_commit,
|
||||
};
|
||||
@ -6944,7 +6942,13 @@ static int amdgpu_dm_connector_get_modes(struct drm_connector *connector)
|
||||
drm_add_modes_noedid(connector, 640, 480);
|
||||
} else {
|
||||
amdgpu_dm_connector_ddc_get_modes(connector, edid);
|
||||
amdgpu_dm_connector_add_common_modes(encoder, connector);
|
||||
/* most eDP supports only timings from its edid,
|
||||
* usually only detailed timings are available
|
||||
* from eDP edid. timings which are not from edid
|
||||
* may damage eDP
|
||||
*/
|
||||
if (connector->connector_type != DRM_MODE_CONNECTOR_eDP)
|
||||
amdgpu_dm_connector_add_common_modes(encoder, connector);
|
||||
amdgpu_dm_connector_add_freesync_modes(connector, edid);
|
||||
}
|
||||
amdgpu_dm_fbc_init(connector);
|
||||
|
@ -1677,10 +1677,39 @@ static int smu_v13_0_0_set_power_profile_mode(struct smu_context *smu,
|
||||
}
|
||||
}
|
||||
|
||||
/* conv PP_SMC_POWER_PROFILE* to WORKLOAD_PPLIB_*_BIT */
|
||||
workload_type = smu_cmn_to_asic_specific_index(smu,
|
||||
if (smu->power_profile_mode == PP_SMC_POWER_PROFILE_COMPUTE &&
|
||||
(((smu->adev->pdev->device == 0x744C) && (smu->adev->pdev->revision == 0xC8)) ||
|
||||
((smu->adev->pdev->device == 0x744C) && (smu->adev->pdev->revision == 0xCC)))) {
|
||||
ret = smu_cmn_update_table(smu,
|
||||
SMU_TABLE_ACTIVITY_MONITOR_COEFF,
|
||||
WORKLOAD_PPLIB_COMPUTE_BIT,
|
||||
(void *)(&activity_monitor_external),
|
||||
false);
|
||||
if (ret) {
|
||||
dev_err(smu->adev->dev, "[%s] Failed to get activity monitor!", __func__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = smu_cmn_update_table(smu,
|
||||
SMU_TABLE_ACTIVITY_MONITOR_COEFF,
|
||||
WORKLOAD_PPLIB_CUSTOM_BIT,
|
||||
(void *)(&activity_monitor_external),
|
||||
true);
|
||||
if (ret) {
|
||||
dev_err(smu->adev->dev, "[%s] Failed to set activity monitor!", __func__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
workload_type = smu_cmn_to_asic_specific_index(smu,
|
||||
CMN2ASIC_MAPPING_WORKLOAD,
|
||||
PP_SMC_POWER_PROFILE_CUSTOM);
|
||||
} else {
|
||||
/* conv PP_SMC_POWER_PROFILE* to WORKLOAD_PPLIB_*_BIT */
|
||||
workload_type = smu_cmn_to_asic_specific_index(smu,
|
||||
CMN2ASIC_MAPPING_WORKLOAD,
|
||||
smu->power_profile_mode);
|
||||
}
|
||||
|
||||
if (workload_type < 0)
|
||||
return -EINVAL;
|
||||
|
||||
|
@ -179,7 +179,7 @@ static const struct dmi_system_id orientation_data[] = {
|
||||
}, { /* AYA NEO AIR */
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "AYANEO"),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "AIR"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "AIR"),
|
||||
},
|
||||
.driver_data = (void *)&lcd1080x1920_leftside_up,
|
||||
}, { /* AYA NEO NEXT */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: kern_clockintr.c,v 1.24 2023/06/18 23:19:01 cheloha Exp $ */
|
||||
/* $OpenBSD: kern_clockintr.c,v 1.25 2023/06/22 16:23:50 cheloha Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2003 Dale Rahn <drahn@openbsd.org>
|
||||
* Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org>
|
||||
@ -107,7 +107,7 @@ clockintr_init(u_int flags)
|
||||
void
|
||||
clockintr_cpu_init(const struct intrclock *ic)
|
||||
{
|
||||
uint64_t multiplier = 0;
|
||||
uint64_t multiplier = 0, offset;
|
||||
struct cpu_info *ci = curcpu();
|
||||
struct clockintr_queue *cq = &ci->ci_queue;
|
||||
int reset_cq_intrclock = 0;
|
||||
@ -170,8 +170,8 @@ clockintr_cpu_init(const struct intrclock *ic)
|
||||
clockintr_advance(cq->cq_hardclock, hardclock_period);
|
||||
} else {
|
||||
if (cq->cq_hardclock->cl_expiration == 0) {
|
||||
clockintr_stagger(cq->cq_hardclock, hardclock_period,
|
||||
multiplier, ncpus);
|
||||
offset = hardclock_period / ncpus * multiplier;
|
||||
cq->cq_hardclock->cl_expiration = offset;
|
||||
}
|
||||
clockintr_advance(cq->cq_hardclock, hardclock_period);
|
||||
}
|
||||
@ -179,16 +179,12 @@ clockintr_cpu_init(const struct intrclock *ic)
|
||||
/*
|
||||
* We can always advance the statclock and schedclock.
|
||||
*/
|
||||
if (cq->cq_statclock->cl_expiration == 0) {
|
||||
clockintr_stagger(cq->cq_statclock, statclock_avg, multiplier,
|
||||
ncpus);
|
||||
}
|
||||
offset = statclock_avg / ncpus * multiplier;
|
||||
clockintr_schedule(cq->cq_statclock, offset);
|
||||
clockintr_advance(cq->cq_statclock, statclock_avg);
|
||||
if (schedhz != 0) {
|
||||
if (cq->cq_schedclock->cl_expiration == 0) {
|
||||
clockintr_stagger(cq->cq_schedclock, schedclock_period,
|
||||
multiplier, ncpus);
|
||||
}
|
||||
offset = schedclock_period / ncpus * multiplier;
|
||||
clockintr_schedule(cq->cq_schedclock, offset);
|
||||
clockintr_advance(cq->cq_schedclock, schedclock_period);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: json.c,v 1.9 2023/06/05 16:24:05 claudio Exp $ */
|
||||
/* $OpenBSD: json.c,v 1.10 2023/06/22 09:07:04 claudio Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2020 Claudio Jeker <claudio@openbsd.org>
|
||||
@ -232,7 +232,7 @@ json_do_string(const char *name, const char *v)
|
||||
eb = fprintf(jsonfh, "\"") < 0;
|
||||
while ((c = *v++) != '\0' && !eb) {
|
||||
/* skip escaping '/' since our use case does not require it */
|
||||
switch(c) {
|
||||
switch (c) {
|
||||
case '"':
|
||||
eb = fprintf(jsonfh, "\\\"") < 0;
|
||||
break;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: auth.c,v 1.12 2019/12/19 16:47:14 remi Exp $ */
|
||||
/* $OpenBSD: auth.c,v 1.13 2023/06/22 10:38:27 claudio Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
|
||||
@ -21,6 +21,7 @@
|
||||
#include <sys/socket.h>
|
||||
#include <limits.h>
|
||||
#include <md5.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@ -236,14 +237,14 @@ auth_add_trailer(struct ibuf *buf, struct iface *iface)
|
||||
MD5_CTX hash;
|
||||
u_int8_t digest[MD5_DIGEST_LENGTH];
|
||||
struct auth_md *md;
|
||||
struct md5_auth *a;
|
||||
int pos;
|
||||
size_t pos;
|
||||
|
||||
pos = sizeof(struct rip_hdr) + sizeof(struct rip_auth);
|
||||
pos = sizeof(struct rip_hdr) + sizeof(struct rip_auth) +
|
||||
offsetof(struct md5_auth, auth_offset);
|
||||
|
||||
/* add offset to header */
|
||||
a = ibuf_seek(buf, pos, sizeof(*a));
|
||||
a->auth_offset = htons(buf->wpos);
|
||||
if (ibuf_set_n16(buf, pos, ibuf_size(buf)) == -1)
|
||||
return (-1);
|
||||
|
||||
/* insert plaintext key */
|
||||
if ((md = md_list_find(&iface->auth_md_list,
|
||||
@ -259,7 +260,7 @@ auth_add_trailer(struct ibuf *buf, struct iface *iface)
|
||||
|
||||
/* calculate MD5 digest */
|
||||
MD5Init(&hash);
|
||||
MD5Update(&hash, buf->buf, buf->wpos);
|
||||
MD5Update(&hash, ibuf_data(buf), ibuf_size(buf));
|
||||
MD5Update(&hash, digest, MD5_DIGEST_LENGTH);
|
||||
MD5Final(digest, &hash);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: json.c,v 1.3 2023/06/05 14:19:13 claudio Exp $ */
|
||||
/* $OpenBSD: json.c,v 1.4 2023/06/22 09:08:02 claudio Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2020 Claudio Jeker <claudio@openbsd.org>
|
||||
@ -232,7 +232,7 @@ json_do_string(const char *name, const char *v)
|
||||
eb = fprintf(jsonfh, "\"") < 0;
|
||||
while ((c = *v++) != '\0' && !eb) {
|
||||
/* skip escaping '/' since our use case does not require it */
|
||||
switch(c) {
|
||||
switch (c) {
|
||||
case '"':
|
||||
eb = fprintf(jsonfh, "\\\"") < 0;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user