This commit is contained in:
purplerain 2023-06-22 18:19:48 +00:00
parent 3f8ae0d130
commit be633fa56a
Signed by: purplerain
GPG Key ID: F42C07F07E2E35B7
84 changed files with 420 additions and 347 deletions

View File

@ -0,0 +1 @@
#machdep.lidaction=0 # 1=suspend, 2=hibernate laptop upon lid closing

View File

@ -23,7 +23,7 @@ SRCS= argv.c choose-temp.c concat.c cplus-dem.c cp-demangle.c \
$(HOST_FILES)
# XXX -- These files are generated during the PREREQ variable assignment.
CLEANFILES+= config.h config.status needed-list
CLEANFILES+= config.h config.status needed-list
# and more
CLEANFILES+= Makefile config.cache config.log stamp-h xhost-mkfrag \
@ -35,7 +35,7 @@ BUILDFIRST = needed-list
needed-list: config.status
${MAKE} ${XCFLAGS} needed-list
config.status: Makefile.in configure
config.status: Makefile.in configure
PATH="/bin:/usr/bin:/sbin:/usr/sbin" \
INSTALL_PROGRAM="${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP}" \
MAKEINFO='makeinfo --no-split' \

View File

@ -165,7 +165,7 @@ So instead we use the macro below and test it against specific values. */
#define VA_OPEN(AP, VAR) { va_list AP; va_start(AP, VAR); { struct Qdmy
#define VA_CLOSE(AP) } va_end(AP); }
#define VA_FIXEDARG(AP, T, N) struct Qdmy
#undef const
#undef volatile
#undef signed

View File

@ -1,7 +1,7 @@
/* Defs for interface to demanglers.
Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002,
2003, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
@ -125,10 +125,10 @@ cplus_mangle_opname (const char *opname, int options);
extern void
set_cplus_marker_for_demangling (int ch);
extern enum demangling_styles
extern enum demangling_styles
cplus_demangle_set_style (enum demangling_styles style);
extern enum demangling_styles
extern enum demangling_styles
cplus_demangle_name_to_style (const char *name);
/* V3 ABI demangling entry points, defined in cp-demangle.c. */

View File

@ -3,7 +3,7 @@
Contributed by Mark Mitchell (mark@markmitchell.com).
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)

View File

@ -3,7 +3,7 @@
Contributed by Daniel Berlin (dan@cgsoftware.com).
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
@ -33,8 +33,8 @@ Boston, MA 02110-1301, USA. */
Amortized and real worst case time for operations:
ExtractMin: O(lg n) amortized. O(n) worst case.
DecreaseKey: O(1) amortized. O(lg n) worst case.
Insert: O(2) amortized. O(1) actual.
DecreaseKey: O(1) amortized. O(lg n) worst case.
Insert: O(2) amortized. O(1) actual.
Union: O(1) amortized. O(1) actual. */
#ifndef _FIBHEAP_H_

View File

@ -1,4 +1,4 @@
/* An expandable hash tables datatype.
/* An expandable hash tables datatype.
Copyright (C) 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Vladimir Makarov (vmakarov@cygnus.com).
@ -60,7 +60,7 @@ typedef int (*htab_eq) PARAMS ((const void *, const void *));
/* Cleanup function called whenever a live element is removed from
the hash table. */
typedef void (*htab_del) PARAMS ((void *));
/* Function called by htab_traverse for each live element. The first
arg is the slot of the element (which can be passed to htab_clear_slot
if desired), the second arg is the auxiliary pointer handed to

View File

@ -1,7 +1,7 @@
/* Function declarations for libiberty.
Copyright 2001, 2002, 2005 Free Software Foundation, Inc.
Note - certain prototypes declared in this header file are for
functions whoes implementation copyright does not belong to the
FSF. Those prototypes are present in this file for reference
@ -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.
Written by Cygnus Support, 1994.
The libiberty library provides a number of functions which are
@ -184,7 +184,7 @@ extern char * getpwd (void);
#ifdef __MINGW32__
/* Forward declaration to avoid #include <sys/time.h>. */
struct timeval;
extern int gettimeofday (struct timeval *, void *);
extern int gettimeofday (struct timeval *, void *);
#endif
/* Get the amount of time the process has run, in microseconds. */
@ -349,18 +349,18 @@ extern void hex_init (void);
/* Use pipes for communication between processes, if possible. */
#define PEX_USE_PIPES 0x2
/* Save files used for communication between processes. */
#define PEX_SAVE_TEMPS 0x4
/* Prepare to execute one or more programs, with standard output of
each program fed to standard input of the next.
FLAGS As above.
PNAME The name of the program to report in error messages.
PNAME The name of the program to report in error messages.
TEMPBASE A base name to use for temporary files; may be NULL to
use a random name.
Returns NULL on error. */
extern struct pex_obj *pex_init (int flags, const char *pname,
const char *tempbase);
@ -387,7 +387,7 @@ extern struct pex_obj *pex_init (int flags, const char *pname,
/* Send program's standard error to standard output. */
#define PEX_STDERR_TO_STDOUT 0x8
/* Input file should be opened in binary mode. This flag is ignored
on Unix. */
#define PEX_BINARY_INPUT 0x10

View File

@ -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) \

View File

@ -56,7 +56,7 @@ struct partition_elem
unsigned class_count;
};
typedef struct partition_def
typedef struct partition_def
{
/* The number of elements in this partition. */
int num_elements;

View File

@ -3,7 +3,7 @@
Contributed by Mark Mitchell <mark@codesourcery.com>.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
@ -44,5 +44,5 @@ extern void sort_pointers (size_t, void **, void **);
#endif /* SORT_H */

View File

@ -1,9 +1,9 @@
/* A splay-tree datatype.
/* A splay-tree datatype.
Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
Contributed by Mark Mitchell (mark@markmitchell.com).
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
@ -22,7 +22,7 @@ Boston, MA 02110-1301, USA. */
/* For an easily readable description of splay-trees, see:
Lewis, Harry R. and Denenberg, Larry. Data Structures and Their
Algorithms. Harper-Collins, Inc. 1991.
Algorithms. Harper-Collins, Inc. 1991.
The major feature of splay trees is that all basic tree operations
are amortized O(log n) time for a tree with n nodes. */
@ -136,7 +136,7 @@ extern splay_tree_node splay_tree_min (splay_tree);
extern int splay_tree_foreach (splay_tree, splay_tree_foreach_fn, void*);
extern int splay_tree_compare_ints (splay_tree_key, splay_tree_key);
extern int splay_tree_compare_pointers (splay_tree_key, splay_tree_key);
#ifdef __cplusplus
}
#endif /* __cplusplus */

View File

@ -11,7 +11,7 @@
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
@ -44,6 +44,6 @@
bar", "XSTRING(foo)", to yield "bar". Be aware that this only
works for __STDC__, not for traditional C which will still resolve
to "foo". */
#define XSTRING(s) STRINGX(s)
#define XSTRING(s) STRINGX(s)
#endif /* SYM_CAT_H */

View File

@ -33,7 +33,7 @@ typedef struct ternary_node_def
}
ternary_node;
/* Insert string S into tree P, associating it with DATA.
/* Insert string S into tree P, associating it with DATA.
Return the data in the tree associated with the string if it's
already there, and replace is 0.
Otherwise, replaces if it it exists, inserts if it doesn't, and
@ -41,7 +41,7 @@ ternary_node;
void *ternary_insert (ternary_tree *p, const char *s,
void *data, int replace);
/* Delete the ternary search tree rooted at P.
/* Delete the ternary search tree rooted at P.
Does NOT delete the data you associated with the strings. */
void ternary_cleanup (ternary_tree p);

View File

@ -4,7 +4,7 @@
#ifndef _XREGEX_H
#define _XREGEX_H 1
# define regfree xregfree
# define regfree xregfree
# define regexec xregexec
# define regcomp xregcomp
# define regerror xregerror

View File

@ -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

View File

@ -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
@ -146,7 +146,7 @@ such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
@ -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

View File

@ -76,7 +76,7 @@ LIBOBJS = @LIBOBJS@
# A configuration can specify extra .o files that should be included,
# even if they are in libc. (Perhaps the libc version is buggy.)
EXTRA_OFILES =
EXTRA_OFILES =
# Flags to pass to a recursive make.
FLAGS_TO_PASS = \
@ -255,7 +255,7 @@ html: $(HTMLS)
NORMAL_INSTALL = :
mkdir_p = mkdir -p --
html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
install-html: install-html-recursive install-html-am

View File

@ -80,7 +80,7 @@ _doprnt (const char *format, va_list ap, FILE *stream)
const char * ptr = format;
char specifier[128];
int total_printed = 0;
while (*ptr != '\0')
{
if (*ptr != '%') /* While we have regular characters, print them. */
@ -89,7 +89,7 @@ _doprnt (const char *format, va_list ap, FILE *stream)
{
char * sptr = specifier;
int wide_width = 0, short_width = 0;
*sptr++ = *ptr++; /* Copy the % and move forward. */
while (strchr ("-+ #0", *ptr)) /* Move past flags. */
@ -100,7 +100,7 @@ _doprnt (const char *format, va_list ap, FILE *stream)
else
while (ISDIGIT(*ptr)) /* Handle explicit numeric value. */
*sptr++ = *ptr++;
if (*ptr == '.')
{
*sptr++ = *ptr++; /* Copy and go past the period. */

View File

@ -47,7 +47,7 @@ main ()
dev_zero = open ("/dev/zero", O_RDONLY);
if (dev_zero < 0)
exit (1);
p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
MAP_ANON|MAP_PRIVATE, dev_zero, 0);
if (p == (char *)-1)
@ -135,8 +135,8 @@ wenotbecray
], ac_cv_os_cray=yes, ac_cv_os_cray=no)])
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
AC_CHECK_FUNC($ac_func,
[AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func,
AC_CHECK_FUNC($ac_func,
[AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func,
[Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP
systems. This function is required for alloca.c support on those
systems.]) break])

View File

@ -66,16 +66,16 @@ dupargv (char **argv)
{
int argc;
char **copy;
if (argv == NULL)
return NULL;
/* the vector */
for (argc = 0; argv[argc] != NULL; argc++);
copy = (char **) malloc ((argc + 1) * sizeof (char *));
if (copy == NULL)
return NULL;
/* the strings */
for (argc = 0; argv[argc] != NULL; argc++)
{
@ -382,11 +382,11 @@ expandargv (argcp, argvp)
while (file_argv[file_argc] && *file_argv[file_argc])
++file_argc;
/* Now, insert FILE_ARGV into ARGV. The "+1" below handles the
NULL terminator at the end of ARGV. */
*argvp = ((char **)
xrealloc (*argvp,
NULL terminator at the end of ARGV. */
*argvp = ((char **)
xrealloc (*argvp,
(*argcp + file_argc + 1) * sizeof (char *)));
memmove (*argvp + i + file_argc, *argvp + i + 1,
memmove (*argvp + i + file_argc, *argvp + i + 1,
(*argcp - i) * sizeof (char *));
memcpy (*argvp + i, file_argv, file_argc * sizeof (char *));
/* The original option has been replaced by all the new
@ -419,7 +419,7 @@ static const char *const tests[] =
"arg 'Jack said \\'hi\\'' has single quotes",
"arg 'Jack said \\\"hi\\\"' has double quotes",
"a b c d e f g h i j k l m n o p q r s t u v w x y z 1 2 3 4 5 6 7 8 9",
/* This should be expanded into only one argument. */
"trailing-whitespace ",

View File

@ -1,11 +1,11 @@
@c This file is designed to be included in manuals that use
@c This file is designed to be included in manuals that use
@c expandargv.
@item @@@var{file}
Read command-line options from @var{file}. The options read are
inserted in place of the original @@@var{file} option. If @var{file}
does not exist, or cannot be read, then the option will be treated
literally, and not removed.
literally, and not removed.
Options in @var{file} are separated by whitespace. A whitespace
character may be included in an option by surrounding the entire

View File

@ -26,7 +26,7 @@ Behavior is undefined if the pathname ends in a directory separator.
#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
defined (__OS2__)
#define HAVE_DOS_BASED_FILE_SYSTEM
#ifndef DIR_SEPARATOR_2
#ifndef DIR_SEPARATOR_2
#define DIR_SEPARATOR_2 '\\'
#endif
#endif
@ -46,7 +46,7 @@ basename (const char *name)
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
/* Skip over the disk name in MSDOS pathnames. */
if (ISALPHA (name[0]) && name[1] == ':')
if (ISALPHA (name[0]) && name[1] == ':')
name += 2;
#endif

View File

@ -11,7 +11,7 @@ Uses @code{malloc} to allocate storage for @var{nelem} objects of
@end deftypefn
*/
#include "ansidecl.h"
#include <stddef.h>
@ -22,13 +22,13 @@ void bzero (PTR, size_t);
PTR
calloc (size_t nelem, size_t elsize)
{
register PTR ptr;
register PTR ptr;
if (nelem == 0 || elsize == 0)
nelem = elsize = 1;
ptr = malloc (nelem * elsize);
if (ptr) bzero (ptr, nelem * elsize);
return ptr;
}

View File

@ -424,16 +424,16 @@ if test -n "${with_target_subdir}"; then
[ --enable-install-libiberty Install headers for end users],
enable_install_libiberty=$enableval,
enable_install_libiberty=no)dnl
# Option parsed, now set things appropriately.
case x"$enable_install_libiberty" in
xyes|x)
target_header_dir=libiberty
;;
xno)
xno)
target_header_dir=
;;
*)
*)
# This could be sanity-checked in various ways...
target_header_dir="${enable_install_libiberty}"
;;
@ -516,7 +516,7 @@ if test -z "${setobjs}"; then
# missing.
# DJ - only if we're *building* cygwin, not just building *with* cygwin
if test -n "${with_target_subdir}"
then
funcs="`echo $funcs | sed -e 's/random//'`"
@ -539,19 +539,19 @@ if test -z "${setobjs}"; then
;;
*-*-uwin*)
# Under some versions of uwin, vfork is notoriously buggy and the test
# Under some versions of uwin, vfork is notoriously buggy and the test
# can hang configure; on other versions, vfork exists just as a stub.
# FIXME: This should be removed once vfork in uwin's runtime is fixed.
ac_cv_func_vfork_works=no
# Under uwin 2.0+, sys_nerr and sys_errlist exist, but they are
# macros (actually, these are imported from a DLL, but the end effect
# macros (actually, these are imported from a DLL, but the end effect
# is the same), so the test below won't find them.
libiberty_cv_var_sys_nerr=yes
libiberty_cv_var_sys_errlist=yes
;;
*-*-*vms*)
# Under VMS, vfork works very different than on Unix. The standard test
# Under VMS, vfork works very different than on Unix. The standard test
# won't work, and it isn't easily adaptable. It makes more sense to
# just force it.
ac_cv_func_vfork_works=yes

View File

@ -2,10 +2,10 @@
#ifdef __IEEE_BIG_ENDIAN
typedef union
typedef union
{
double value;
struct
struct
{
unsigned int sign : 1;
unsigned int exponent: 11;
@ -13,9 +13,9 @@ typedef union
unsigned int fraction1:16;
unsigned int fraction2:16;
unsigned int fraction3:16;
} number;
struct
struct
{
unsigned int sign : 1;
unsigned int exponent: 11;
@ -25,7 +25,7 @@ typedef union
unsigned int function2:16;
unsigned int function3:16;
} nan;
struct
struct
{
unsigned long msw;
unsigned long lsw;
@ -37,10 +37,10 @@ typedef union
#ifdef __IEEE_LITTLE_ENDIAN
typedef union
typedef union
{
double value;
struct
struct
{
#ifdef __SMALL_BITFIELDS
unsigned int fraction3:16;
@ -54,7 +54,7 @@ typedef union
unsigned int exponent :11;
unsigned int sign : 1;
} number;
struct
struct
{
#ifdef __SMALL_BITFIELDS
unsigned int function3:16;
@ -69,7 +69,7 @@ typedef union
unsigned int exponent: 11;
unsigned int sign : 1;
} nan;
struct
struct
{
unsigned long lsw;
unsigned long msw;
@ -85,14 +85,14 @@ typedef union
typedef union
{
float value;
struct
struct
{
unsigned int sign : 1;
unsigned int exponent: 8;
unsigned int fraction0: 7;
unsigned int fraction1: 16;
} number;
struct
struct
{
unsigned int sign:1;
unsigned int exponent:8;
@ -101,7 +101,7 @@ typedef union
unsigned int function1:16;
} nan;
long p1;
} __ieee_float_shape_type;
#endif
@ -109,14 +109,14 @@ typedef union
typedef union
{
float value;
struct
struct
{
unsigned int fraction0: 7;
unsigned int fraction1: 16;
unsigned int exponent: 8;
unsigned int sign : 1;
} number;
struct
struct
{
unsigned int function1:16;
unsigned int function0:6;
@ -125,7 +125,7 @@ typedef union
unsigned int sign:1;
} nan;
long p1;
} __ieee_float_shape_type;
#endif
@ -135,7 +135,7 @@ double
copysign (double x, double y)
{
__ieee_double_shape_type a,b;
b.value = y;
b.value = y;
a.value = x;
a.number.sign =b.number.sign;
return a.value;

View File

@ -25,7 +25,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
/* This code implements a demangler for the g++ V3 ABI. The ABI is
@ -3063,7 +3063,7 @@ d_print_comp (struct d_print_info *dpi,
d_append_char (dpi, ' ');
}
if ((dpi->options & DMGL_RET_POSTFIX) == 0)
if ((dpi->options & DMGL_RET_POSTFIX) == 0)
d_print_function_type (dpi, dc, dpi->modifiers);
return;
@ -4004,11 +4004,11 @@ cplus_demangle_v3 (const char* mangled, int options)
return d_demangle (mangled, options, &alc);
}
/* Demangle a Java symbol. Java uses a subset of the V3 ABI C++ mangling
/* Demangle a Java symbol. Java uses a subset of the V3 ABI C++ mangling
conventions, but the output formatting is a little different.
This instructs the C++ demangler not to emit pointer characters ("*"), and
to use Java's namespace separator symbol ("." instead of "::"). It then
does an additional pass over the demangled output to replace instances
This instructs the C++ demangler not to emit pointer characters ("*"), and
to use Java's namespace separator symbol ("." instead of "::"). It then
does an additional pass over the demangled output to replace instances
of JArray<TYPE> with TYPE[]. */
char *
@ -4020,7 +4020,7 @@ java_demangle_v3 (const char* mangled)
char *from;
char *to;
demangled = d_demangle (mangled, DMGL_JAVA | DMGL_PARAMS | DMGL_RET_POSTFIX,
demangled = d_demangle (mangled, DMGL_JAVA | DMGL_PARAMS | DMGL_RET_POSTFIX,
&alc);
if (demangled == NULL)
@ -4210,7 +4210,7 @@ print_usage (FILE* fp, int exit_value)
}
/* Option specification for getopt_long. */
static const struct option long_options[] =
static const struct option long_options[] =
{
{ "help", no_argument, NULL, 'h' },
{ "no-params", no_argument, NULL, 'p' },
@ -4234,7 +4234,7 @@ main (int argc, char *argv[])
program_name = argv[0];
/* Parse options. */
do
do
{
opt_char = getopt_long (argc, argv, "hpv", long_options, NULL);
switch (opt_char)
@ -4258,7 +4258,7 @@ main (int argc, char *argv[])
}
while (opt_char != -1);
if (optind == argc)
if (optind == argc)
/* No command line arguments were provided. Filter stdin. */
{
dyn_string_t mangled = dyn_string_new (3);

View File

@ -25,7 +25,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
/* This file provides some definitions shared by cp-demangle.c and

View File

@ -25,7 +25,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
/* This file implements a few interface functions which are provided

View File

@ -463,7 +463,7 @@ static const char* qualifier_string (int);
static const char* demangle_qualifier (int);
static int demangle_expression (struct work_stuff *, const char **, string *,
static int demangle_expression (struct work_stuff *, const char **, string *,
type_kind_t);
static int
@ -788,7 +788,7 @@ cplus_mangle_opname (const char *opname, int options)
enum demangling_styles
cplus_demangle_set_style (enum demangling_styles style)
{
const struct demangler_engine *demangler = libiberty_demanglers;
const struct demangler_engine *demangler = libiberty_demanglers;
for (; demangler->demangling_style != unknown_demangling; ++demangler)
if (style == demangler->demangling_style)
@ -805,7 +805,7 @@ cplus_demangle_set_style (enum demangling_styles style)
enum demangling_styles
cplus_demangle_name_to_style (const char *name)
{
const struct demangler_engine *demangler = libiberty_demanglers;
const struct demangler_engine *demangler = libiberty_demanglers;
for (; demangler->demangling_style != unknown_demangling; ++demangler)
if (strcmp (name, demangler->demangling_style_name) == 0)
@ -913,7 +913,7 @@ ada_demangle (const char *mangled, int option ATTRIBUTE_UNUSED)
char *demangled = NULL;
int changed;
size_t demangled_size = 0;
changed = 0;
if (strncmp (mangled, "_ada_", 5) == 0)
@ -921,10 +921,10 @@ ada_demangle (const char *mangled, int option ATTRIBUTE_UNUSED)
mangled += 5;
changed = 1;
}
if (mangled[0] == '_' || mangled[0] == '<')
goto Suppress;
p = strstr (mangled, "___");
if (p == NULL)
len0 = strlen (mangled);
@ -938,12 +938,12 @@ ada_demangle (const char *mangled, int option ATTRIBUTE_UNUSED)
else
goto Suppress;
}
/* Make demangled big enough for possible expansion by operator name. */
grow_vect (&demangled,
&demangled_size, 2 * len0 + 1,
sizeof (char));
if (ISDIGIT ((unsigned char) mangled[len0 - 1])) {
for (i = len0 - 2; i >= 0 && ISDIGIT ((unsigned char) mangled[i]); i -= 1)
;
@ -958,11 +958,11 @@ ada_demangle (const char *mangled, int option ATTRIBUTE_UNUSED)
changed = 1;
}
}
for (i = 0, j = 0; i < len0 && ! ISALPHA ((unsigned char)mangled[i]);
i += 1, j += 1)
demangled[j] = mangled[i];
while (i < len0)
{
if (i < len0 - 2 && mangled[i] == '_' && mangled[i + 1] == '_')
@ -978,7 +978,7 @@ ada_demangle (const char *mangled, int option ATTRIBUTE_UNUSED)
}
}
demangled[j] = '\000';
for (i = 0; demangled[i] != '\0'; i += 1)
if (ISUPPER ((unsigned char)demangled[i]) || demangled[i] == ' ')
goto Suppress;
@ -987,7 +987,7 @@ ada_demangle (const char *mangled, int option ATTRIBUTE_UNUSED)
return NULL;
else
return demangled;
Suppress:
grow_vect (&demangled,
&demangled_size, strlen (mangled) + 3,
@ -1880,7 +1880,7 @@ demangle_template_value_parm (struct work_stuff *work, const char **mangled,
{
if (**mangled == 'Q')
success = demangle_qualified (work, mangled, s,
/*isfuncname=*/0,
/*isfuncname=*/0,
/*append=*/1);
else
{

View File

@ -3,7 +3,7 @@
Contributed by Mark Mitchell (mark@markmitchell.com).
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
@ -59,7 +59,7 @@ Boston, MA 02110-1301, USA. */
embedded in another object. The contents of of the string itself
are still dynamically allocated. The string initially is capable
of holding at least SPACE characeters, including the terminating
NUL. If SPACE is 0, it will silently be increated to 1.
NUL. If SPACE is 0, it will silently be increated to 1.
If RETURN_ON_ALLOCATION_FAILURE is defined and memory allocation
fails, returns 0. Otherwise returns 1. */
@ -91,7 +91,7 @@ dyn_string_init (struct dyn_string *ds_struct_ptr, int space)
defined and memory allocation fails, returns NULL. Otherwise
returns the newly allocated string. */
dyn_string_t
dyn_string_t
dyn_string_new (int space)
{
dyn_string_t result;
@ -113,7 +113,7 @@ dyn_string_new (int space)
/* Free the memory used by DS. */
void
void
dyn_string_delete (dyn_string_t ds)
{
free (ds->s);
@ -139,12 +139,12 @@ dyn_string_release (dyn_string_t ds)
/* Increase the capacity of DS so it can hold at least SPACE
characters, plus the terminating NUL. This function will not (at
present) reduce the capacity of DS. Returns DS on success.
present) reduce the capacity of DS. Returns DS on success.
If RETURN_ON_ALLOCATION_FAILURE is defined and a memory allocation
operation fails, deletes DS and returns NULL. */
dyn_string_t
dyn_string_t
dyn_string_resize (dyn_string_t ds, int space)
{
int new_allocated = ds->allocated;
@ -155,7 +155,7 @@ dyn_string_resize (dyn_string_t ds, int space)
/* Increase allocation by factors of two. */
while (space > new_allocated)
new_allocated *= 2;
if (new_allocated != ds->allocated)
{
ds->allocated = new_allocated;
@ -312,7 +312,7 @@ dyn_string_insert_char (dyn_string_t dest, int pos, int c)
++dest->length;
return 1;
}
/* Append S to DS, resizing DS if necessary. Returns 1 on success.
On failure, if RETURN_ON_ALLOCATION_FAILURE, deletes DEST and
returns 0. */

View File

@ -1,9 +1,9 @@
/* A Fibonacci heap datatype.
Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Contributed by Daniel Berlin (dan@cgsoftware.com).
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
@ -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)

View File

@ -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
@ -291,7 +291,7 @@ get_field (const unsigned char *data, enum floatformat_byteorders order,
}
return result;
}
#ifndef min
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif
@ -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,

View File

@ -102,7 +102,7 @@ unlock_std_streams (void)
}
FILE *
fopen_unlocked (const char *path, const char *mode)
fopen_unlocked (const char *path, const char *mode)
{
FILE *const fp = fopen (path, mode);
unlock_1 (fp);

View File

@ -34,7 +34,7 @@
# that begins with '*/' without leading spaces (this assumes that the
# texinfo snippet is within a C-style /* */ comment).
#
#
@ -72,7 +72,7 @@ for $in (@ARGV) {
next unless $pertinent;
if (/^\@def[a-z]*[a-wyz] /) {
($name) = m/[^\(]* ([^\( \t\r\n]+) *\(/;
$name =~ s/[ ]*$//;
$key = $name;

View File

@ -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

View File

@ -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>

View File

@ -7,7 +7,7 @@
#include <sys/time.h>
#endif
/*
/*
@deftypefn Supplemental int gettimeofday (struct timeval *@var{tp}, void *@var{tz})
@ -16,7 +16,7 @@ that @var{tz} be NULL. Returns 0 on success, -1 on failure.
@end deftypefn
*/
*/
int
gettimeofday (struct timeval *tp, void *tz)

View File

@ -1,4 +1,4 @@
/* An expandable hash tables datatype.
/* An expandable hash tables datatype.
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
Contributed by Vladimir Makarov (vmakarov@cygnus.com).
@ -85,7 +85,7 @@ htab_eq htab_eq_pointer = eq_pointer;
code to divide by a constant, we want to be able to use the same algorithm
all the time. All of these inverses (are implied to) have bit 32 set.
For the record, here's the function that computed the table; it's a
For the record, here's the function that computed the table; it's a
vastly simplified version of the function of the same name from gcc. */
#if 0
@ -612,7 +612,7 @@ htab_find_slot_with_hash (htab_t htab, const PTR element,
first_deleted_slot = &htab->entries[index];
else if ((*htab->eq_f) (entry, element))
return &htab->entries[index];
hash2 = htab_mod_m2 (hash, htab);
for (;;)
{
@ -620,7 +620,7 @@ htab_find_slot_with_hash (htab_t htab, const PTR element,
index += hash2;
if (index >= size)
index -= size;
entry = htab->entries[index];
if (entry == HTAB_EMPTY_ENTRY)
goto empty_entry;
@ -717,7 +717,7 @@ htab_traverse_noresize (htab_t htab, htab_trav callback, PTR info)
{
PTR *slot;
PTR *limit;
slot = htab->entries;
limit = slot + htab_size (htab);
@ -772,10 +772,10 @@ htab_collisions (htab_t htab)
prime numbers or the appropriate identity. This was the best one.
I don't remember exactly what constituted "best", except I was
looking at bucket-length distributions mostly.
So it should be very good at hashing identifiers, but might not be
as good at arbitrary strings.
I'll add that it thoroughly trounces the hash functions recommended
for this use at http://burtleburtle.net/bob/hash/index.html, both
on speed and bucket distribution. I haven't tried it against the
@ -813,16 +813,16 @@ For every delta with one or two bit set, and the deltas of all three
have at least 1/4 probability of changing.
* If mix() is run forward, every bit of c will change between 1/3 and
2/3 of the time. (Well, 22/100 and 78/100 for some 2-bit deltas.)
mix() was built out of 36 single-cycle latency instructions in a
mix() was built out of 36 single-cycle latency instructions in a
structure that could supported 2x parallelism, like so:
a -= b;
a -= b;
a -= c; x = (c>>13);
b -= c; a ^= x;
b -= a; x = (a<<8);
c -= a; b ^= x;
c -= b; x = (b>>13);
...
Unfortunately, superscalar Pentiums and Sparcs can't take advantage
Unfortunately, superscalar Pentiums and Sparcs can't take advantage
of that parallelism. They've also turned some of those single-cycle
latency instructions into multi-cycle latency instructions. Still,
this is the fastest good hash I could find. There were about 2^^68

View File

@ -52,7 +52,7 @@ lbasename (const char *name)
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
/* Skip over a possible disk name. */
if (ISALPHA (name[0]) && name[1] == ':')
if (ISALPHA (name[0]) && name[1] == ':')
name += 2;
#endif

View File

@ -10,7 +10,7 @@
@finalout
@c %**end of header
@dircategory GNU libraries
@direntry
* Libiberty: (libiberty). Library of utility functions which

View File

@ -65,7 +65,7 @@ extern char *canonicalize_file_name (const char *);
# endif
# endif
#else
/* cygwin has realpath, so it won't get here. */
/* cygwin has realpath, so it won't get here. */
# if defined (_WIN32)
# define WIN32_LEAN_AND_MEAN
# include <windows.h> /* for GetFullPathName */

View File

@ -78,7 +78,7 @@ relative prefix can be found, return @code{NULL}.
# define HAVE_DOS_BASED_FILE_SYSTEM
# define HAVE_HOST_EXECUTABLE_SUFFIX
# define HOST_EXECUTABLE_SUFFIX ".exe"
# ifndef DIR_SEPARATOR_2
# ifndef DIR_SEPARATOR_2
# define DIR_SEPARATOR_2 '\\'
# endif
# define PATH_SEPARATOR ';'

View File

@ -115,7 +115,7 @@ choose_tmpdir (void)
base = try_dir (vartmp, base);
base = try_dir (usrtmp, base);
base = try_dir (tmp, base);
/* If all else fails, use the current directory! */
if (base == 0)
base = ".";

View File

@ -21,7 +21,7 @@ PTR
memchr (register const PTR src_void, int c, size_t length)
{
const unsigned char *src = (const unsigned char *)src_void;
while (length-- > 0)
{
if (*src == c)

View File

@ -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. */

View File

@ -43,12 +43,12 @@ partition
partition_new (int num_elements)
{
int e;
partition part = (partition)
xmalloc (sizeof (struct partition_def) +
partition part = (partition)
xmalloc (sizeof (struct partition_def) +
(num_elements - 1) * sizeof (struct partition_elem));
part->num_elements = num_elements;
for (e = 0; e < num_elements; ++e)
for (e = 0; e < num_elements; ++e)
{
part->elements[e].class_element = e;
part->elements[e].next = &(part->elements[e]);
@ -88,7 +88,7 @@ partition_union (partition part, int elem1, int elem2)
/* Make sure ELEM1 is in the larger class of the two. If not, swap
them. This way we always scan the shorter list. */
if (elements[elem1].class_count < elements[elem2].class_count)
if (elements[elem1].class_count < elements[elem2].class_count)
{
int temp = elem1;
elem1 = elem2;
@ -100,14 +100,14 @@ partition_union (partition part, int elem1, int elem2)
e2 = &(elements[elem2]);
/* Keep a count of the number of elements in the list. */
elements[class_element].class_count
elements[class_element].class_count
+= elements[e2->class_element].class_count;
/* Update the class fields in elem2's class list. */
e2->class_element = class_element;
for (p = e2->next; p != e2; p = p->next)
p->class_element = class_element;
/* Splice ELEM2's class list into ELEM1's. These are circular
lists. */
old_next = e1->next;
@ -120,7 +120,7 @@ partition_union (partition part, int elem1, int elem2)
/* Compare elements ELEM1 and ELEM2 from array of integers, given a
pointer to each. Used to qsort such an array. */
static int
static int
elem_compare (const void *elem1, const void *elem2)
{
int e1 = * (const int *) elem1;
@ -155,7 +155,7 @@ partition_print (partition part, FILE *fp)
fputc ('[', fp);
for (e = 0; e < num_elements; ++e)
/* If we haven't printed this element, print its entire class. */
if (! done[e])
if (! done[e])
{
int c = e;
int count = elements[elements[e].class_element].class_count;
@ -171,7 +171,7 @@ partition_print (partition part, FILE *fp)
qsort ((void *) class_elements, count, sizeof (int), elem_compare);
/* Print them. */
fputc ('(', fp);
for (i = 0; i < count; ++i)
for (i = 0; i < count; ++i)
fprintf (fp, i == 0 ? "%d" : " %d", class_elements[i]);
fputc (')', fp);
}

View File

@ -175,13 +175,13 @@ static int seps[MAX_TYPES] = { SEP_0, SEP_1, SEP_2, SEP_3, SEP_4 };
static long int randtbl[DEG_3 + 1] =
{ TYPE_3,
0x9a319039, 0x32d9c024, 0x9b663182, 0x5da1f342,
0xde3b81e0, 0xdf0a6fb5, 0xf103bc02, 0x48f340fb,
0x7449e56b, 0xbeb1dbb0, 0xab5c5918, 0x946554fd,
0x8c2e680f, 0xeb3d799f, 0xb11ee0b7, 0x2d436b86,
0xda672e2a, 0x1588ca88, 0xe369735d, 0x904f35f7,
0xd7158fd6, 0x6fa6f051, 0x616e6b96, 0xac94efdc,
0x36413f93, 0xc622c298, 0xf5a42ab8, 0x8a88d77b,
0x9a319039, 0x32d9c024, 0x9b663182, 0x5da1f342,
0xde3b81e0, 0xdf0a6fb5, 0xf103bc02, 0x48f340fb,
0x7449e56b, 0xbeb1dbb0, 0xab5c5918, 0x946554fd,
0x8c2e680f, 0xeb3d799f, 0xb11ee0b7, 0x2d436b86,
0xda672e2a, 0x1588ca88, 0xe369735d, 0x904f35f7,
0xd7158fd6, 0x6fa6f051, 0x616e6b96, 0xac94efdc,
0x36413f93, 0xc622c298, 0xf5a42ab8, 0x8a88d77b,
0xf5ad9d0e, 0x8999220b, 0x27fb47b9
};
@ -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

View File

@ -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

View File

@ -64,7 +64,7 @@ others. However, there are two differences between these macros and
those provided by @file{ctype.h}:
@itemize @bullet
@item These macros are guaranteed to have well-defined behavior for all
@item These macros are guaranteed to have well-defined behavior for all
values representable by @code{signed char} and @code{unsigned char}, and
for @code{EOF}.

View File

@ -29,7 +29,7 @@ sigsetmask (int set)
{
sigset_t new_sig;
sigset_t old_sig;
sigemptyset (&new_sig);
if (set != 0) {
abort(); /* FIXME, we don't know how to translate old mask to new */

View File

@ -3,7 +3,7 @@
Contributed by Mark Mitchell <mark@codesourcery.com>.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
@ -47,7 +47,7 @@ Boston, MA 02110-1301, USA. */
void sort_pointers (size_t n, void **pointers, void **work)
{
/* The type of a single digit. This can be any unsigned integral
type. When changing this, DIGIT_MAX should be changed as
type. When changing this, DIGIT_MAX should be changed as
well. */
typedef unsigned char digit_t;
@ -94,7 +94,7 @@ void sort_pointers (size_t n, void **pointers, void **work)
j = sizeof (void *) / sizeof (digit_t) - i;
else
j = i;
/* Now, perform a stable sort on this digit. We use counting
sort. */
memset (count, 0, DIGIT_MAX * sizeof (unsigned int));
@ -108,8 +108,8 @@ void sort_pointers (size_t n, void **pointers, void **work)
/* Count how many there are of each value. At the end of this
loop, COUNT[K] will contain the number of pointers whose Ith
digit is K. */
for (digit = bias;
digit < top;
for (digit = bias;
digit < top;
digit += sizeof (void *) / sizeof (digit_t))
++count[*digit];

View File

@ -1,9 +1,9 @@
/* A splay-tree datatype.
/* A splay-tree datatype.
Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Contributed by Mark Mitchell (mark@markmitchell.com).
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
@ -48,7 +48,7 @@ static int splay_tree_foreach_helper (splay_tree, splay_tree_node,
/* Deallocate NODE (a member of SP), and all its sub-trees. */
static void
static void
splay_tree_delete_helper (splay_tree sp, splay_tree_node node)
{
splay_tree_node pending = 0;
@ -242,7 +242,7 @@ splay_tree_xmalloc_deallocate (void *object, void *data ATTRIBUTE_UNUSED)
values. Use xmalloc to allocate the splay tree structure, and any
nodes added. */
splay_tree
splay_tree
splay_tree_new (splay_tree_compare_fn compare_fn,
splay_tree_delete_key_fn delete_key_fn,
splay_tree_delete_value_fn delete_value_fn)
@ -257,7 +257,7 @@ splay_tree_new (splay_tree_compare_fn compare_fn,
DELETE_KEY_FN to deallocate keys, and DELETE_VALUE_FN to deallocate
values. */
splay_tree
splay_tree
splay_tree_new_with_allocator (splay_tree_compare_fn compare_fn,
splay_tree_delete_key_fn delete_key_fn,
splay_tree_delete_value_fn delete_value_fn,
@ -280,7 +280,7 @@ splay_tree_new_with_allocator (splay_tree_compare_fn compare_fn,
/* Deallocate SP. */
void
void
splay_tree_delete (splay_tree sp)
{
splay_tree_delete_helper (sp, sp->root);
@ -308,18 +308,18 @@ splay_tree_insert (splay_tree sp, splay_tree_key key, splay_tree_value value)
if (sp->delete_value)
(*sp->delete_value)(sp->root->value);
sp->root->value = value;
}
else
}
else
{
/* Create a new node, and insert it at the root. */
splay_tree_node node;
node = ((splay_tree_node)
(*sp->allocate) (sizeof (struct splay_tree_node_s),
sp->allocate_data));
node->key = key;
node->value = value;
if (!sp->root)
node->left = node->right = 0;
else if (comparison < 0)
@ -366,7 +366,7 @@ splay_tree_remove (splay_tree sp, splay_tree_key key)
{
sp->root = left;
/* If there was a right child as well, hang it off the
/* If there was a right child as well, hang it off the
right-most leaf of the left child. */
if (right)
{
@ -380,7 +380,7 @@ splay_tree_remove (splay_tree sp, splay_tree_key key)
}
}
/* Lookup KEY in SP, returning VALUE if present, and NULL
/* Lookup KEY in SP, returning VALUE if present, and NULL
otherwise. */
splay_tree_node
@ -508,7 +508,7 @@ splay_tree_compare_ints (splay_tree_key k1, splay_tree_key k2)
return -1;
else if ((int) k1 > (int) k2)
return 1;
else
else
return 0;
}
@ -521,6 +521,6 @@ splay_tree_compare_pointers (splay_tree_key k1, splay_tree_key k2)
return -1;
else if ((char*) k1 > (char*) k2)
return 1;
else
else
return 0;
}

View File

@ -11,7 +11,7 @@
*/
/*
@deftypefn Supplemental int strcasecmp (const char *@var{s1}, const char *@var{s2})
A case-insensitive @code{strcmp}.

View File

@ -658,7 +658,7 @@ strerror (int errnoval)
/* In range, and a valid message. Just return the message. */
msg = (char *) sys_errlist[errnoval];
}
return (msg);
}

View File

@ -11,7 +11,7 @@
*/
/*
@deftypefn Supplemental int strncasecmp (const char *@var{s1}, const char *@var{s2})
A case-insensitive @code{strncmp}.

View File

@ -435,7 +435,7 @@ strsignal (int signo)
/* In range, and a valid message. Just return the message. */
msg = (const char *) sys_siglist[signo];
}
return (msg);
}

View File

@ -53,12 +53,12 @@ strtod (char *str, char **ptr)
if (ptr == (char **)0)
return atof (str);
p = str;
while (ISSPACE (*p))
++p;
if (*p == '+' || *p == '-')
++p;

View File

@ -21,7 +21,7 @@
#include "libiberty.h"
#include "safe-ctype.h"
/*
/*
@deftypefun int strverscmp (const char *@var{s1}, const char *@var{s2})
The @code{strverscmp} function compares the string @var{s1} against
@var{s2}, considering them as holding indices/version numbers. Return
@ -143,14 +143,14 @@ strverscmp (const char *s1, const char *s2)
{
case CMP:
return diff;
case LEN:
while (ISDIGIT (*p1++))
if (!ISDIGIT (*p2++))
return 1;
return ISDIGIT (*p2) ? -1 : diff;
default:
return state;
}

View File

@ -2598,7 +2598,7 @@ _Utf58_0_1__1_2147483647__2147483648
--format=gnu-v3
St9bad_alloc
std::bad_alloc
#
#
# This caused an infinite loop.
# We still don't demangle this correctly, but at least we don't hang.
--format=auto

View File

@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H

View File

@ -25,7 +25,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifdef HAVE_CONFIG_H
@ -54,13 +54,13 @@ int run_tests (const char **);
void erase_test (int);
/* Test input data, argv before, and argv after:
The \n is an important part of test_data since expandargv
may have to work in environments where \n is translated
as \r\n. Thus \n is included in the test data for the file.
as \r\n. Thus \n is included in the test data for the file.
We use \b to indicate that the test data is the null character.
This is because we use \0 normally to represent the end of the
This is because we use \0 normally to represent the end of the
file data, so we need something else for this. */
#define FILENAME_PATTERN "test-expandargv-%d.lst"
@ -168,7 +168,7 @@ writeout_test (int test, const char * test_data)
parse = malloc (sizeof (char) * (len + 1));
if (parse == NULL)
fatal_error (__LINE__, "Failed to malloc parse.", errno);
memcpy (parse, test_data, sizeof (char) * (len + 1));
/* Run all possible replaces */
run_replaces (parse);
@ -181,10 +181,10 @@ writeout_test (int test, const char * test_data)
/* erase_test:
Erase the test file */
void
void
erase_test (int test)
{
char filename[256];
char filename[256];
sprintf (filename, FILENAME_PATTERN, test);
if (unlink (filename) != 0)
fatal_error (__LINE__, "Failed to erase test file.", errno);
@ -266,10 +266,10 @@ run_tests (const char **test_data)
}
/* main:
Run tests.
Run tests.
Check result and exit with appropriate code. */
int
int
main(int argc, char **argv)
{
int fails;
@ -281,7 +281,7 @@ main(int argc, char **argv)
- Run expandargv.
- Compare output of expandargv argv to after argv.
- If they compare the same then test passes
else the test fails.
else the test fails.
- Erase test file. */
fails = run_tests (test_data);

View File

@ -16,7 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifdef HAVE_CONFIG_H

View File

@ -107,7 +107,7 @@ main (void)
{
char buf[128];
int status;
CLEAR (buf);
status = checkit (buf, 10, "%s:%d", "foobar", 9);
VERIFY (status==8 && memcmp (buf, "foobar:9\0XXXXX\0", 15) == 0);

View File

@ -1,6 +1,6 @@
/* memory allocation routines with error checking.
Copyright 1989, 90, 91, 92, 93, 94 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@ -110,7 +110,7 @@ xmalloc_failed (size_t size)
name, *name ? ": " : "",
(unsigned long) size);
xexit (1);
}
}
PTR
xmalloc (size_t size)

View File

@ -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.

View File

@ -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;

View File

@ -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 \

View File

@ -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

View File

@ -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));
}
}

View File

@ -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[] =

View File

@ -1605,6 +1605,7 @@ static const u16 amdgpu_unsupported_pciidlist[] = {
0x5874,
0x5940,
0x5941,
0x5b70,
0x5b72,
0x5b73,
0x5b74,

View File

@ -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)
{

View File

@ -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);

View File

@ -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);

View File

@ -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],

View File

@ -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);

View File

@ -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;

View File

@ -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 */

View File

@ -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);
}

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -155,7 +155,7 @@ esac
# are we on MinGW?
if uname -s 2>&1 | grep MINGW >/dev/null; then on_mingw="yes"
else
else
if echo $host | grep mingw >/dev/null; then on_mingw="yes"
else on_mingw="no"; fi
fi
@ -184,9 +184,9 @@ ub_conf_dir=`AS_DIRNAME(["$ub_conf_file"])`
AC_SUBST(ub_conf_dir)
# Determine run, chroot directory and pidfile locations
AC_ARG_WITH(run-dir,
AS_HELP_STRING([--with-run-dir=path],[set default directory to chdir to (by default dir part of cfg file)]),
UNBOUND_RUN_DIR="$withval",
AC_ARG_WITH(run-dir,
AS_HELP_STRING([--with-run-dir=path],[set default directory to chdir to (by default dir part of cfg file)]),
UNBOUND_RUN_DIR="$withval",
if test $on_mingw = no; then
UNBOUND_RUN_DIR=`dirname "$ub_conf_file"`
else
@ -197,9 +197,9 @@ AC_SUBST(UNBOUND_RUN_DIR)
ACX_ESCAPE_BACKSLASH($UNBOUND_RUN_DIR, hdr_run)
AC_DEFINE_UNQUOTED(RUN_DIR, ["$hdr_run"], [Directory to chdir to])
AC_ARG_WITH(chroot-dir,
AS_HELP_STRING([--with-chroot-dir=path],[set default directory to chroot to (by default same as run-dir)]),
UNBOUND_CHROOT_DIR="$withval",
AC_ARG_WITH(chroot-dir,
AS_HELP_STRING([--with-chroot-dir=path],[set default directory to chroot to (by default same as run-dir)]),
UNBOUND_CHROOT_DIR="$withval",
if test $on_mingw = no; then
UNBOUND_CHROOT_DIR="$UNBOUND_RUN_DIR"
else
@ -217,9 +217,9 @@ AC_ARG_WITH(share-dir,
AC_SUBST(UNBOUND_SHARE_DIR)
AC_DEFINE_UNQUOTED(SHARE_DIR, ["$UNBOUND_SHARE_DIR"], [Shared data])
AC_ARG_WITH(pidfile,
AS_HELP_STRING([--with-pidfile=filename],[set default pathname to unbound pidfile (default run-dir/unbound.pid)]),
UNBOUND_PIDFILE="$withval",
AC_ARG_WITH(pidfile,
AS_HELP_STRING([--with-pidfile=filename],[set default pathname to unbound pidfile (default run-dir/unbound.pid)]),
UNBOUND_PIDFILE="$withval",
if test $on_mingw = no; then
UNBOUND_PIDFILE="$UNBOUND_RUN_DIR/unbound.pid"
else
@ -230,9 +230,9 @@ AC_SUBST(UNBOUND_PIDFILE)
ACX_ESCAPE_BACKSLASH($UNBOUND_PIDFILE, hdr_pid)
AC_DEFINE_UNQUOTED(PIDFILE, ["$hdr_pid"], [default pidfile location])
AC_ARG_WITH(rootkey-file,
AS_HELP_STRING([--with-rootkey-file=filename],[set default pathname to root key file (default run-dir/root.key). This file is read and written.]),
UNBOUND_ROOTKEY_FILE="$withval",
AC_ARG_WITH(rootkey-file,
AS_HELP_STRING([--with-rootkey-file=filename],[set default pathname to root key file (default run-dir/root.key). This file is read and written.]),
UNBOUND_ROOTKEY_FILE="$withval",
if test $on_mingw = no; then
UNBOUND_ROOTKEY_FILE="$UNBOUND_RUN_DIR/root.key"
else
@ -243,9 +243,9 @@ AC_SUBST(UNBOUND_ROOTKEY_FILE)
ACX_ESCAPE_BACKSLASH($UNBOUND_ROOTKEY_FILE, hdr_rkey)
AC_DEFINE_UNQUOTED(ROOT_ANCHOR_FILE, ["$hdr_rkey"], [default rootkey location])
AC_ARG_WITH(rootcert-file,
AS_HELP_STRING([--with-rootcert-file=filename],[set default pathname to root update certificate file (default run-dir/icannbundle.pem). This file need not exist if you are content with the builtin.]),
UNBOUND_ROOTCERT_FILE="$withval",
AC_ARG_WITH(rootcert-file,
AS_HELP_STRING([--with-rootcert-file=filename],[set default pathname to root update certificate file (default run-dir/icannbundle.pem). This file need not exist if you are content with the builtin.]),
UNBOUND_ROOTCERT_FILE="$withval",
if test $on_mingw = no; then
UNBOUND_ROOTCERT_FILE="$UNBOUND_RUN_DIR/icannbundle.pem"
else
@ -256,9 +256,9 @@ AC_SUBST(UNBOUND_ROOTCERT_FILE)
ACX_ESCAPE_BACKSLASH($UNBOUND_ROOTCERT_FILE, hdr_rpem)
AC_DEFINE_UNQUOTED(ROOT_CERT_FILE, ["$hdr_rpem"], [default rootcert location])
AC_ARG_WITH(username,
AS_HELP_STRING([--with-username=user],[set default user that unbound changes to (default user is unbound)]),
UNBOUND_USERNAME="$withval",
AC_ARG_WITH(username,
AS_HELP_STRING([--with-username=user],[set default user that unbound changes to (default user is unbound)]),
UNBOUND_USERNAME="$withval",
UNBOUND_USERNAME="unbound")
AC_SUBST(UNBOUND_USERNAME)
AC_DEFINE_UNQUOTED(UB_USERNAME, ["$UNBOUND_USERNAME"], [default username])
@ -284,7 +284,7 @@ ACX_DETERMINE_EXT_FLAGS_UNBOUND
# debug mode flags warnings
AC_ARG_ENABLE(checking, AS_HELP_STRING([--enable-checking],[Enable warnings, asserts, makefile-dependencies]))
AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug],[same as enable-checking]))
if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
if test "$enable_debug" = "yes"; then debug_enabled="$enable_debug";
else debug_enabled="$enable_checking"; fi
AC_SUBST(debug_enabled)
case "$debug_enabled" in
@ -452,7 +452,7 @@ AC_CHECK_HEADERS([netioapi.h],,, [AC_INCLUDES_DEFAULT
#endif
])
# check for types.
# check for types.
# Using own tests for int64* because autoconf builtin only give 32bit.
AC_CHECK_TYPE(int8_t, signed char)
AC_CHECK_TYPE(int16_t, short)
@ -548,11 +548,11 @@ sinclude(systemd.m4)
# Include systemd.m4 - end
# set memory allocation checking if requested
AC_ARG_ENABLE(alloc-checks, AS_HELP_STRING([--enable-alloc-checks],[ enable to memory allocation statistics, for debug purposes ]),
AC_ARG_ENABLE(alloc-checks, AS_HELP_STRING([--enable-alloc-checks],[ enable to memory allocation statistics, for debug purposes ]),
, )
AC_ARG_ENABLE(alloc-lite, AS_HELP_STRING([--enable-alloc-lite],[ enable for lightweight alloc assertions, for debug purposes ]),
AC_ARG_ENABLE(alloc-lite, AS_HELP_STRING([--enable-alloc-lite],[ enable for lightweight alloc assertions, for debug purposes ]),
, )
AC_ARG_ENABLE(alloc-nonregional, AS_HELP_STRING([--enable-alloc-nonregional],[ enable nonregional allocs, slow but exposes regional allocations to other memory purifiers, for debug purposes ]),
AC_ARG_ENABLE(alloc-nonregional, AS_HELP_STRING([--enable-alloc-nonregional],[ enable nonregional allocs, slow but exposes regional allocations to other memory purifiers, for debug purposes ]),
, )
if test x_$enable_alloc_nonregional = x_yes; then
AC_DEFINE(UNBOUND_ALLOC_NONREGIONAL, 1, [use malloc not regions, for debug use])
@ -585,7 +585,7 @@ if test "$on_mingw" = "yes"; then
])],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_WINDOWS_THREADS, 1, [Using Windows threads])
,
,
AC_MSG_RESULT(no)
)
@ -596,7 +596,7 @@ else
# check this first, so that the pthread lib does not get linked in via
# libssl or libpython, and thus distorts the tests, and we end up using
# the non-threadsafe C libraries.
AC_ARG_WITH(pthreads, AS_HELP_STRING([--with-pthreads],[use pthreads library, or --without-pthreads to disable threading support.]),
AC_ARG_WITH(pthreads, AS_HELP_STRING([--with-pthreads],[use pthreads library, or --without-pthreads to disable threading support.]),
[ ],[ withval="yes" ])
ub_have_pthreads=no
if test x_$withval != x_no; then
@ -623,7 +623,7 @@ int main(void) {return 0;}
# first compile
echo "$CC $CFLAGS -c conftest.c -o conftest.o" >&AS_MESSAGE_LOG_FD
$CC $CFLAGS -c conftest.c -o conftest.o 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD
if test $? = 0; then
if test $? = 0; then
# then link
echo "$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest contest.o" >&AS_MESSAGE_LOG_FD
$CC $CFLAGS -Werror $LDFLAGS $LIBS -o conftest conftest.o 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD
@ -644,7 +644,7 @@ int main(void) {return 0;}
])
fi
# check solaris thread library
# check solaris thread library
AC_ARG_WITH(solaris-threads, AS_HELP_STRING([--with-solaris-threads],[use solaris native thread library.]), [ ],[ withval="no" ])
ub_have_sol_threads=no
if test x_$withval != x_no; then
@ -658,8 +658,8 @@ if test x_$withval != x_no; then
ACX_CHECK_COMPILER_FLAG(mt, [CFLAGS="$CFLAGS -mt"],
[CFLAGS="$CFLAGS -D_REENTRANT"])
ub_have_sol_threads=yes
] , [
AC_MSG_ERROR([no solaris threads found.])
] , [
AC_MSG_ERROR([no solaris threads found.])
])
fi
fi
@ -1085,7 +1085,7 @@ int load_gost_id(void)
EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
return gost_id;
}
int main(void) {
int main(void) {
EVP_MD_CTX* ctx;
const EVP_MD* md;
unsigned char digest[64]; /* its a 256-bit digest, so uses 32 bytes */
@ -1980,11 +1980,11 @@ AC_ARG_WITH(libunbound-only, AS_HELP_STRING([--with-libunbound-only],[do not bui
fi
])
if test $ALLTARGET = "alltargets"; then
if test $USE_NSS = "yes"; then
AC_MSG_ERROR([--with-nss can only be used in combination with --with-libunbound-only.])
if test $USE_NSS = "yes"; then
AC_MSG_ERROR([--with-nss can only be used in combination with --with-libunbound-only.])
fi
if test $USE_NETTLE = "yes"; then
AC_MSG_ERROR([--with-nettle can only be used in combination with --with-libunbound-only.])
AC_MSG_ERROR([--with-nettle can only be used in combination with --with-libunbound-only.])
fi
fi
@ -1995,7 +1995,7 @@ ACX_STRIP_EXT_FLAGS
if test -n "$LATE_LDFLAGS"; then
LDFLAGS="$LATE_LDFLAGS $LDFLAGS"
fi
# remove start spaces
# remove start spaces
LDFLAGS=`echo "$LDFLAGS"|sed -e 's/^ *//'`
LIBS=`echo "$LIBS"|sed -e 's/^ *//'`