mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Update from Gnulib
This incorporates: 2018-06-29 regex: glibc does not use intprops.h 2018-06-28 regex: port to recently proposed glibc regex merge 2018-06-25 Continue to use spaces for indentation, not tabs 2018-06-25 manywarnings: Don't enable -Wjump-misses-init by default 2018-06-25 acl-internal.h: remove _GL_ATTRIBUTE_CONST on void function 2018-06-24 manywarnings: accommodate GCC 9: remove -Wchkp and -Wabi 2018-06-24 maint: clarify comments about sticky EOF 2018-06-24 af_alg: avoid hangs when reading from streams 2018-06-17 crypto: use byteswap 2018-06-17 getloadavg: Return 0 on MS-Windows without Cygwi 2018-06-17 getloadavg: Allow building on MS-Windows without Cygwin * build-aux/config.guess, build-aux/config.sub, doc/misc/texinfo.tex: * lib/acl-internal.c, lib/acl-internal.h, lib/get-permissions.c: * lib/getloadavg.c, lib/gettimeofday.c, lib/md5.c, lib/pselect.c: * lib/set-permissions.c, lib/sha1.c, lib/sha256.c, lib/sha512.c: * lib/time.in.h, m4/getloadavg.m4, m4/gnulib-common.m4: * m4/manywarnings.m4, m4/pthread_sigmask.m4, m4/vararrays.m4: Copy from Gnulib.
This commit is contained in:
parent
2e2811865f
commit
35e9dcab51
20 changed files with 403 additions and 427 deletions
6
build-aux/config.guess
vendored
6
build-aux/config.guess
vendored
|
|
@ -2,7 +2,7 @@
|
|||
# Attempt to guess a canonical system name.
|
||||
# Copyright 1992-2018 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2018-05-19'
|
||||
timestamp='2018-06-26'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
|
|
@ -894,8 +894,8 @@ EOF
|
|||
# other systems with GNU libc and userland
|
||||
echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
|
||||
exit ;;
|
||||
i*86:Minix:*:*)
|
||||
echo "$UNAME_MACHINE"-pc-minix
|
||||
*:Minix:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-minix
|
||||
exit ;;
|
||||
aarch64:Linux:*:*)
|
||||
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
|
||||
|
|
|
|||
205
build-aux/config.sub
vendored
205
build-aux/config.sub
vendored
|
|
@ -2,7 +2,7 @@
|
|||
# Configuration validation subroutine script.
|
||||
# Copyright 1992-2018 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2018-05-19'
|
||||
timestamp='2018-05-24'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
|
|
@ -149,9 +149,31 @@ case $1 in
|
|||
esac
|
||||
;;
|
||||
*-*)
|
||||
# Second component is usually, but not always the OS
|
||||
case $field2 in
|
||||
# Prevent following clause from handling this valid os
|
||||
sun*os*)
|
||||
basic_machine=$field1
|
||||
os=$field2
|
||||
;;
|
||||
# Manufacturers
|
||||
dec* | mips* | sequent* | encore* | pc532* | sgi* | sony* \
|
||||
| att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
|
||||
| unicom* | ibm* | next | hp | isi* | apollo | altos* \
|
||||
| convergent* | ncr* | news | 32* | 3600* | 3100* | hitachi* \
|
||||
| c[123]* | convex* | sun | crds | omron* | dg | ultra | tti* \
|
||||
| harris | dolphin | highlevel | gould | cbm | ns | masscomp \
|
||||
| apple | axis | knuth | cray | microblaze* \
|
||||
| sim | cisco | oki | wec | wrs | winbond)
|
||||
basic_machine=$field1-$field2
|
||||
os=
|
||||
;;
|
||||
*)
|
||||
basic_machine=$field1
|
||||
os=$field2
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
# Convert single-component short-hands not valid as part of
|
||||
# multi-component configurations.
|
||||
|
|
@ -540,110 +562,6 @@ case $1 in
|
|||
;;
|
||||
esac
|
||||
|
||||
### Let's recognize common machines as not being operating systems so
|
||||
### that things like config.sub decstation-3100 work. We also
|
||||
### recognize some manufacturers as not being operating systems, so we
|
||||
### can provide default operating systems below.
|
||||
case $os in
|
||||
sun*os*)
|
||||
# Prevent following clause from handling this invalid input.
|
||||
;;
|
||||
dec* | mips* | sequent* | encore* | pc532* | sgi* | sony* | \
|
||||
att* | 7300* | 3300* | delta* | motorola* | sun[234]* | \
|
||||
unicom* | ibm* | next | hp | isi* | apollo | altos* | \
|
||||
convergent* | ncr* | news | 32* | 3600* | 3100* | hitachi* |\
|
||||
c[123]* | convex* | sun | crds | omron* | dg | ultra | tti* | \
|
||||
harris | dolphin | highlevel | gould | cbm | ns | masscomp | \
|
||||
apple | axis | knuth | cray | microblaze*)
|
||||
os=
|
||||
basic_machine=$1
|
||||
;;
|
||||
bluegene*)
|
||||
os=cnk
|
||||
;;
|
||||
sim | cisco | oki | wec | winbond)
|
||||
os=
|
||||
basic_machine=$1
|
||||
;;
|
||||
scout)
|
||||
;;
|
||||
wrs)
|
||||
os=vxworks
|
||||
basic_machine=$1
|
||||
;;
|
||||
chorusos*)
|
||||
os=chorusos
|
||||
basic_machine=$1
|
||||
;;
|
||||
chorusrdb)
|
||||
os=chorusrdb
|
||||
basic_machine=$1
|
||||
;;
|
||||
hiux*)
|
||||
os=hiuxwe2
|
||||
;;
|
||||
sco6)
|
||||
os=sco5v6
|
||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
sco5)
|
||||
os=sco3.2v5
|
||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
sco4)
|
||||
os=sco3.2v4
|
||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
sco3.2.[4-9]*)
|
||||
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
|
||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
sco3.2v[4-9]*)
|
||||
# Don't forget version if it is 3.2v4 or newer.
|
||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
sco5v6*)
|
||||
# Don't forget version if it is 3.2v4 or newer.
|
||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
sco*)
|
||||
os=sco3.2v2
|
||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
udk*)
|
||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
isc)
|
||||
os=isc2.2
|
||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
clix*)
|
||||
basic_machine=clipper-intergraph
|
||||
;;
|
||||
isc*)
|
||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
lynx*178)
|
||||
os=lynxos178
|
||||
;;
|
||||
lynx*5)
|
||||
os=lynxos5
|
||||
;;
|
||||
lynx*)
|
||||
os=lynxos
|
||||
;;
|
||||
ptx*)
|
||||
basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
|
||||
;;
|
||||
psos*)
|
||||
os=psos
|
||||
;;
|
||||
mint | mint[0-9]*)
|
||||
basic_machine=m68k-atari
|
||||
os=mint
|
||||
;;
|
||||
esac
|
||||
|
||||
# Decode aliases for certain CPU-COMPANY combinations.
|
||||
case $basic_machine in
|
||||
# Recognize the basic CPU types without company name.
|
||||
|
|
@ -1377,6 +1295,9 @@ case $os in
|
|||
auroraux)
|
||||
os=auroraux
|
||||
;;
|
||||
bluegene*)
|
||||
os=cnk
|
||||
;;
|
||||
solaris1 | solaris1.*)
|
||||
os=`echo $os | sed -e 's|solaris1|sunos4|'`
|
||||
;;
|
||||
|
|
@ -1393,26 +1314,57 @@ case $os in
|
|||
es1800*)
|
||||
os=ose
|
||||
;;
|
||||
# Some version numbers need modification
|
||||
chorusos*)
|
||||
os=chorusos
|
||||
;;
|
||||
isc)
|
||||
os=isc2.2
|
||||
;;
|
||||
sco6)
|
||||
os=sco5v6
|
||||
;;
|
||||
sco5)
|
||||
os=sco3.2v5
|
||||
;;
|
||||
sco4)
|
||||
os=sco3.2v4
|
||||
;;
|
||||
sco3.2.[4-9]*)
|
||||
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
|
||||
;;
|
||||
sco3.2v[4-9]* | sco5v6*)
|
||||
# Don't forget version if it is 3.2v4 or newer.
|
||||
;;
|
||||
scout)
|
||||
# Don't match below
|
||||
;;
|
||||
sco*)
|
||||
os=sco3.2v2
|
||||
;;
|
||||
psos*)
|
||||
os=psos
|
||||
;;
|
||||
# Now accept the basic system types.
|
||||
# The portable systems comes first.
|
||||
# Each alternative MUST end in a * to match a version number.
|
||||
# sysv* is not here because it comes later, after sysvr4.
|
||||
gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
|
||||
| *vms* | sco* | esix* | isc* | aix* | cnk* | sunos | sunos[34]*\
|
||||
| *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
|
||||
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
|
||||
| sym* | kopensolaris* | plan9* \
|
||||
| amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
|
||||
| aos* | aros* | cloudabi* | sortix* \
|
||||
| nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
|
||||
| clix* | riscos* | uniplus* | iris* | rtu* | xenix* \
|
||||
| hiux* | knetbsd* | mirbsd* | netbsd* \
|
||||
| knetbsd* | mirbsd* | netbsd* \
|
||||
| bitrig* | openbsd* | solidbsd* | libertybsd* \
|
||||
| ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
|
||||
| bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
|
||||
| ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
|
||||
| udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
|
||||
| chorusos* | chorusrdb* | cegcc* | glidix* \
|
||||
| cygwin* | msys* | pe* | psos* | moss* | proelf* | rtems* \
|
||||
| chorusrdb* | cegcc* | glidix* \
|
||||
| cygwin* | msys* | pe* | moss* | proelf* | rtems* \
|
||||
| midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
|
||||
| linux-newlib* | linux-musl* | linux-uclibc* \
|
||||
| uxpv* | beos* | mpeix* | udk* | moxiebox* \
|
||||
|
|
@ -1436,6 +1388,9 @@ case $os in
|
|||
;;
|
||||
esac
|
||||
;;
|
||||
hiux*)
|
||||
os=hiuxwe2
|
||||
;;
|
||||
nto-qnx*)
|
||||
;;
|
||||
nto*)
|
||||
|
|
@ -1445,20 +1400,23 @@ case $os in
|
|||
| windows* | osx | abug | netware* | os9* \
|
||||
| macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
|
||||
;;
|
||||
mac*)
|
||||
os=`echo "$os" | sed -e 's|mac|macos|'`
|
||||
;;
|
||||
linux-dietlibc)
|
||||
os=linux-dietlibc
|
||||
;;
|
||||
linux*)
|
||||
os=`echo $os | sed -e 's|linux|linux-gnu|'`
|
||||
;;
|
||||
sunos5*)
|
||||
os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
|
||||
lynx*178)
|
||||
os=lynxos178
|
||||
;;
|
||||
sunos6*)
|
||||
os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
|
||||
lynx*5)
|
||||
os=lynxos5
|
||||
;;
|
||||
lynx*)
|
||||
os=lynxos
|
||||
;;
|
||||
mac*)
|
||||
os=`echo "$os" | sed -e 's|mac|macos|'`
|
||||
;;
|
||||
opened*)
|
||||
os=openedition
|
||||
|
|
@ -1466,6 +1424,12 @@ case $os in
|
|||
os400*)
|
||||
os=os400
|
||||
;;
|
||||
sunos5*)
|
||||
os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
|
||||
;;
|
||||
sunos6*)
|
||||
os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
|
||||
;;
|
||||
wince*)
|
||||
os=wince
|
||||
;;
|
||||
|
|
@ -1599,6 +1563,9 @@ case $basic_machine in
|
|||
c8051-*)
|
||||
os=elf
|
||||
;;
|
||||
clipper-intergraph)
|
||||
os=clix
|
||||
;;
|
||||
hexagon-*)
|
||||
os=elf
|
||||
;;
|
||||
|
|
@ -1744,6 +1711,9 @@ case $basic_machine in
|
|||
*-atari*)
|
||||
os=mint
|
||||
;;
|
||||
*-wrs)
|
||||
os=vxworks
|
||||
;;
|
||||
*)
|
||||
os=none
|
||||
;;
|
||||
|
|
@ -1789,6 +1759,9 @@ case $basic_machine in
|
|||
genix*)
|
||||
vendor=ns
|
||||
;;
|
||||
clix*)
|
||||
vendor=intergraph
|
||||
;;
|
||||
mvs* | opened*)
|
||||
vendor=ibm
|
||||
;;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
% Load plain if necessary, i.e., if running under initex.
|
||||
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
|
||||
%
|
||||
\def\texinfoversion{2018-03-10.14}
|
||||
\def\texinfoversion{2018-06-02.09}
|
||||
%
|
||||
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
|
||||
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
|
|
@ -1528,6 +1528,9 @@ output) for that.)}
|
|||
\startlink attr{/Border [0 0 0]}%
|
||||
user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
|
||||
\endgroup}
|
||||
% \pdfgettoks - Surround page numbers in #1 with @pdflink. #1 may
|
||||
% be a simple number, or a list of numbers in the case of an index
|
||||
% entry.
|
||||
\def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
|
||||
\def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
|
||||
\def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
|
||||
|
|
|
|||
|
|
@ -293,10 +293,6 @@ struct permission_context {
|
|||
|
||||
int get_permissions (const char *, int, mode_t, struct permission_context *);
|
||||
int set_permissions (struct permission_context *, const char *, int);
|
||||
void free_permission_context (struct permission_context *)
|
||||
#if ! (defined USE_ACL && (HAVE_ACL_GET_FILE || defined GETACL))
|
||||
_GL_ATTRIBUTE_CONST
|
||||
#endif
|
||||
;
|
||||
void free_permission_context (struct permission_context *);
|
||||
|
||||
_GL_INLINE_HEADER_END
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
UMAX
|
||||
UMAX4_3
|
||||
VMS
|
||||
WINDOWS32 No-op for Windows95/NT.
|
||||
_WIN32 Native Windows (possibly also defined on Cygwin)
|
||||
__linux__ Linux: assumes /proc file system mounted.
|
||||
Support from Michael K. Johnson.
|
||||
__CYGWIN__ Cygwin emulates linux /proc/loadavg.
|
||||
|
|
@ -97,6 +97,10 @@
|
|||
|
||||
# include "intprops.h"
|
||||
|
||||
# if defined _WIN32 && ! defined __CYGWIN__
|
||||
# define WINDOWS32
|
||||
# endif
|
||||
|
||||
# if !defined (BSD) && defined (ultrix)
|
||||
/* Ultrix behaves like BSD on Vaxen. */
|
||||
# define BSD
|
||||
|
|
@ -324,7 +328,9 @@
|
|||
# define LDAV_SYMBOL "avenrun"
|
||||
# endif
|
||||
|
||||
# ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
# endif
|
||||
|
||||
/* LOAD_AVE_TYPE should only get defined if we're going to use the
|
||||
nlist method. */
|
||||
|
|
|
|||
18
lib/md5.c
18
lib/md5.c
|
|
@ -52,9 +52,9 @@
|
|||
# define md5_buffer __md5_buffer
|
||||
#endif
|
||||
|
||||
#include <byteswap.h>
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
# define SWAP(n) \
|
||||
(((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
|
||||
# define SWAP(n) bswap_32 (n)
|
||||
#else
|
||||
# define SWAP(n) (n)
|
||||
#endif
|
||||
|
|
@ -170,6 +170,14 @@ md5_stream (FILE *stream, void *resblock)
|
|||
/* Read block. Take care for partial reads. */
|
||||
while (1)
|
||||
{
|
||||
/* Either process a partial fread() from this loop,
|
||||
or the fread() in afalg_stream may have gotten EOF.
|
||||
We need to avoid a subsequent fread() as EOF may
|
||||
not be sticky. For details of such systems, see:
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=1190 */
|
||||
if (feof (stream))
|
||||
goto process_partial_block;
|
||||
|
||||
n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream);
|
||||
|
||||
sum += n;
|
||||
|
|
@ -189,12 +197,6 @@ md5_stream (FILE *stream, void *resblock)
|
|||
}
|
||||
goto process_partial_block;
|
||||
}
|
||||
|
||||
/* We've read at least one byte, so ignore errors. But always
|
||||
check for EOF, since feof may be true even though N > 0.
|
||||
Otherwise, we could end up calling fread after EOF. */
|
||||
if (feof (stream))
|
||||
goto process_partial_block;
|
||||
}
|
||||
|
||||
/* Process buffer with BLOCKSIZE bytes. Note that
|
||||
|
|
|
|||
18
lib/sha1.c
18
lib/sha1.c
|
|
@ -37,11 +37,11 @@
|
|||
# include "unlocked-io.h"
|
||||
#endif
|
||||
|
||||
#include <byteswap.h>
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
# define SWAP(n) (n)
|
||||
#else
|
||||
# define SWAP(n) \
|
||||
(((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
|
||||
# define SWAP(n) bswap_32 (n)
|
||||
#endif
|
||||
|
||||
#define BLOCKSIZE 32768
|
||||
|
|
@ -158,6 +158,14 @@ sha1_stream (FILE *stream, void *resblock)
|
|||
/* Read block. Take care for partial reads. */
|
||||
while (1)
|
||||
{
|
||||
/* Either process a partial fread() from this loop,
|
||||
or the fread() in afalg_stream may have gotten EOF.
|
||||
We need to avoid a subsequent fread() as EOF may
|
||||
not be sticky. For details of such systems, see:
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=1190 */
|
||||
if (feof (stream))
|
||||
goto process_partial_block;
|
||||
|
||||
n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream);
|
||||
|
||||
sum += n;
|
||||
|
|
@ -177,12 +185,6 @@ sha1_stream (FILE *stream, void *resblock)
|
|||
}
|
||||
goto process_partial_block;
|
||||
}
|
||||
|
||||
/* We've read at least one byte, so ignore errors. But always
|
||||
check for EOF, since feof may be true even though N > 0.
|
||||
Otherwise, we could end up calling fread after EOF. */
|
||||
if (feof (stream))
|
||||
goto process_partial_block;
|
||||
}
|
||||
|
||||
/* Process buffer with BLOCKSIZE bytes. Note that
|
||||
|
|
|
|||
18
lib/sha256.c
18
lib/sha256.c
|
|
@ -36,11 +36,11 @@
|
|||
# include "unlocked-io.h"
|
||||
#endif
|
||||
|
||||
#include <byteswap.h>
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
# define SWAP(n) (n)
|
||||
#else
|
||||
# define SWAP(n) \
|
||||
(((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
|
||||
# define SWAP(n) bswap_32 (n)
|
||||
#endif
|
||||
|
||||
#define BLOCKSIZE 32768
|
||||
|
|
@ -208,6 +208,14 @@ shaxxx_stream (FILE *stream, char const *alg, void *resblock,
|
|||
/* Read block. Take care for partial reads. */
|
||||
while (1)
|
||||
{
|
||||
/* Either process a partial fread() from this loop,
|
||||
or the fread() in afalg_stream may have gotten EOF.
|
||||
We need to avoid a subsequent fread() as EOF may
|
||||
not be sticky. For details of such systems, see:
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=1190 */
|
||||
if (feof (stream))
|
||||
goto process_partial_block;
|
||||
|
||||
n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream);
|
||||
|
||||
sum += n;
|
||||
|
|
@ -227,12 +235,6 @@ shaxxx_stream (FILE *stream, char const *alg, void *resblock,
|
|||
}
|
||||
goto process_partial_block;
|
||||
}
|
||||
|
||||
/* We've read at least one byte, so ignore errors. But always
|
||||
check for EOF, since feof may be true even though N > 0.
|
||||
Otherwise, we could end up calling fread after EOF. */
|
||||
if (feof (stream))
|
||||
goto process_partial_block;
|
||||
}
|
||||
|
||||
/* Process buffer with BLOCKSIZE bytes. Note that
|
||||
|
|
|
|||
25
lib/sha512.c
25
lib/sha512.c
|
|
@ -36,18 +36,11 @@
|
|||
# include "unlocked-io.h"
|
||||
#endif
|
||||
|
||||
#include <byteswap.h>
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
# define SWAP(n) (n)
|
||||
#else
|
||||
# define SWAP(n) \
|
||||
u64or (u64or (u64or (u64shl (n, 56), \
|
||||
u64shl (u64and (n, u64lo (0x0000ff00)), 40)), \
|
||||
u64or (u64shl (u64and (n, u64lo (0x00ff0000)), 24), \
|
||||
u64shl (u64and (n, u64lo (0xff000000)), 8))), \
|
||||
u64or (u64or (u64and (u64shr (n, 8), u64lo (0xff000000)), \
|
||||
u64and (u64shr (n, 24), u64lo (0x00ff0000))), \
|
||||
u64or (u64and (u64shr (n, 40), u64lo (0x0000ff00)), \
|
||||
u64shr (n, 56))))
|
||||
# define SWAP(n) bswap_64 (n)
|
||||
#endif
|
||||
|
||||
#define BLOCKSIZE 32768
|
||||
|
|
@ -216,6 +209,14 @@ shaxxx_stream (FILE *stream, char const *alg, void *resblock,
|
|||
/* Read block. Take care for partial reads. */
|
||||
while (1)
|
||||
{
|
||||
/* Either process a partial fread() from this loop,
|
||||
or the fread() in afalg_stream may have gotten EOF.
|
||||
We need to avoid a subsequent fread() as EOF may
|
||||
not be sticky. For details of such systems, see:
|
||||
https://sourceware.org/bugzilla/show_bug.cgi?id=1190 */
|
||||
if (feof (stream))
|
||||
goto process_partial_block;
|
||||
|
||||
n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream);
|
||||
|
||||
sum += n;
|
||||
|
|
@ -235,12 +236,6 @@ shaxxx_stream (FILE *stream, char const *alg, void *resblock,
|
|||
}
|
||||
goto process_partial_block;
|
||||
}
|
||||
|
||||
/* We've read at least one byte, so ignore errors. But always
|
||||
check for EOF, since feof may be true even though N > 0.
|
||||
Otherwise, we could end up calling fread after EOF. */
|
||||
if (feof (stream))
|
||||
goto process_partial_block;
|
||||
}
|
||||
|
||||
/* Process buffer with BLOCKSIZE bytes. Note that
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ AC_DEFUN([gl_PREREQ_GETLOADAVG],
|
|||
[
|
||||
# Figure out what our getloadavg.c needs.
|
||||
|
||||
AC_CHECK_HEADERS_ONCE([sys/param.h])
|
||||
AC_CHECK_HEADERS_ONCE([sys/param.h unistd.h])
|
||||
|
||||
# On HPUX9, an unprivileged user can get load averages this way.
|
||||
if test $gl_func_getloadavg_done = no; then
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# manywarnings.m4 serial 14
|
||||
# manywarnings.m4 serial 15
|
||||
dnl Copyright (C) 2008-2018 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
|
@ -108,12 +108,11 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)],
|
|||
# comm -3 \
|
||||
# <((sed -n 's/^ *\(-[^ 0-9][^ ]*\) .*/\1/p' manywarnings.m4; \
|
||||
# awk '/^[^#]/ {print $1}' ../build-aux/gcc-warning.spec) | sort) \
|
||||
# <(gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort)
|
||||
# <(LC_ALL=C gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort)
|
||||
|
||||
gl_manywarn_set=
|
||||
for gl_manywarn_item in -fno-common \
|
||||
-W \
|
||||
-Wabi \
|
||||
-Waddress \
|
||||
-Waggressive-loop-optimizations \
|
||||
-Wall \
|
||||
|
|
@ -128,7 +127,6 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)],
|
|||
-Wcast-align=strict \
|
||||
-Wcast-function-type \
|
||||
-Wchar-subscripts \
|
||||
-Wchkp \
|
||||
-Wclobbered \
|
||||
-Wcomment \
|
||||
-Wcomments \
|
||||
|
|
@ -176,7 +174,6 @@ m4_defun([gl_MANYWARN_ALL_GCC(C)],
|
|||
-Wint-to-pointer-cast \
|
||||
-Winvalid-memory-model \
|
||||
-Winvalid-pch \
|
||||
-Wjump-misses-init \
|
||||
-Wlogical-not-parentheses \
|
||||
-Wlogical-op \
|
||||
-Wmain \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue