Merge remote-tracking branch 'origin/core119' into kernel-4.14

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
Arne Fitzenreiter
2018-02-26 23:06:45 +01:00
182 changed files with 3693 additions and 4700 deletions

View File

@@ -1,78 +0,0 @@
#!/bin/sh
# Begin $rc_base/init.d/mysql
# Based on sysklogd script from LFS-3.1 and earlier.
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
#$LastChangedBy: bdubbs $
#$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $
. /etc/sysconfig/rc
. $rc_functions
PIDFILE=/srv/mysql/`/bin/hostname`.pid
KILLDELAY=20
case "$1" in
start)
boot_mesg -n "Starting MySQL daemon..."
failure=0
if [ -f "$PIDFILE" ]
then
if /bin/ps p `cat $PIDFILE` | grep mysqld >/dev/null
then
boot_mesg "mysqld already running!" ${WARNING}
echo_warning
exit 0
else
rm -f "$PIDFILE"
if [ -f "$PIDFILE" ]
then
failure=1
fi
fi
fi
if [ "$failure" = "1" ]
then
echo ""
echo_failure
else
echo ""
/usr/bin/mysqld_safe --user=mysql 2>&1 >/dev/null &
evaluate_retval
fi
;;
stop)
boot_mesg -n "Stopping MySQL daemon..."
if [ -e "$PIDFILE" ]
then
echo ""
killproc -p ${PIDFILE} /usr/bin/mysqld_safe
else
boot_mesg "mysqld not running!" ${WARNING}
echo_warning
if [ -e "$PIDFILE" ]
then
rm -f $PIDFILE
fi
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/mysqld
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
# End $rc_base/init.d/mysql

View File

@@ -97,10 +97,6 @@ case "${1}" in
if [ ! -e /var/run/dbus ]; then
mkdir -p /var/run/dbus
fi
if [ ! -e /var/run/mysql ]; then
mkdir -p /var/run/mysql
chown mysql:mysql /var/run/mysql
fi
if [ ! -e /var/run/saslauthd ]; then
mkdir -p /var/run/saslauthd
fi

View File

@@ -1,68 +0,0 @@
#!/bin/sh
########################################################################
# Begin $rc_base/init.d/mISDN
#
# Description : Start mISDN v2
#
# Authors : Arne Fitzenreiter - arne_f@ipfire.org
#
# Version : 01.00
#
# Notes :
#
########################################################################
. /etc/sysconfig/rc
. ${rc_functions}
case "${1}" in
start)
boot_mesg "Starting mISDNv2 ... "
# load mISDN modules
for module in mISDN_core hfcpci hfcsusb hfcmulti avmfritz speedfax mISDNinfineon xhfc; do
modprobe $module > /dev/null 2>&1;
done
modprobe mISDN_dsp
modprobe mISDN_dsp_oslec
if [ ${?} = 0 ]; then
echo_ok;
else
echo_failure;
fi
exit 0;
;;
stop)
boot_mesg "Stopping mISDNv2 ... "
# unload mISDN hardware modules
for module in mISDN_dsp_oslec mISDN_dsp hfcpci hfcsusb hfcmulti avmfritz speedfax mISDNinfineon xhfc mISDNipac mISDNisar; do
rmmod $module > /dev/null 2>&1;
done
rmmod mISDN_core > /dev/null 2>&1
echo_ok;
exit 0;
;;
config)
boot_mesg "mISDNv2 - config not needed!"
exit 0;
;;
scan)
boot_mesg "mISDNv2 - scan not supported!"
exit 0;
;;
*)
echo "Usage: ${0} {start}{stop}"
exit 1
;;
esac
# End $rc_base/init.d/mISDN

View File

@@ -210,10 +210,24 @@ write_forward_conf() {
;;
esac
echo "forward-zone:"
echo " name: ${zone}"
echo " forward-addr: ${server}"
echo
# Reverse-lookup zones must be stubs
case "${zone}" in
*.in-addr.arpa)
echo "stub-zone:"
echo " name: ${zone}."
echo " stub-addr: ${server}"
echo
echo "server:"
echo " local-zone: \"${zone}.\" transparent"
echo
;;
*)
echo "forward-zone:"
echo " name: ${zone}."
echo " forward-addr: ${server}"
echo
;;
esac
done < /var/ipfire/dnsforward/config
if [ -n "${insecure_zones}" ]; then

View File

@@ -1,50 +0,0 @@
#!/bin/bash
############################################################################
# #
# This file is part of the IPFire Firewall. #
# #
# IPFire 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 of the License, or #
# (at your option) any later version. #
# #
# IPFire is distributed in the hope that it will be useful, #
# 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 IPFire; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Copyright (C) 2007 IPFire-Team <info@ipfire.org>. #
# #
############################################################################
#
. /opt/pakfire/lib/functions.sh
extract_files
ln -svf ../init.d/mysql /etc/rc.d/rc0.d/K26mysql
ln -svf ../init.d/mysql /etc/rc.d/rc3.d/S34mysql
ln -svf ../init.d/mysql /etc/rc.d/rc6.d/K26mysql
# Initialise database
mysql_install_db --user=mysql
restore_backup "${NAME}"
start_service "${NAME}"
COUNTER=0
while [ "$COUNTER" -lt "10" ]; do
[ -e "/var/run/mysql/mysql.sock" ] && break
echo "MySQL server is still not running. Waiting 5 seconds."
sleep 5
COUNTER=$(($COUNTER + 1))
done
[ -e "/var/run/mysql/mysql.sock" ] || (echo "MySQL still noch running... Exiting."; \
exit 1)
mysqladmin -u root --password='' password 'mysqlfire'

View File

@@ -1,35 +0,0 @@
#!/bin/bash
############################################################################
# #
# This file is part of the IPFire Firewall. #
# #
# IPFire 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 of the License, or #
# (at your option) any later version. #
# #
# IPFire is distributed in the hope that it will be useful, #
# 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 IPFire; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Copyright (C) 2007 IPFire-Team <info@ipfire.org>. #
# #
############################################################################
#
. /opt/pakfire/lib/functions.sh
# Stop the mysql service
stop_service "${NAME}"
# Make backup
make_backup "${NAME}"
remove_files
# Remove start links.
rm -rvf /etc/rc.d/rc*.d/*mysql

View File

@@ -1,50 +0,0 @@
#!/bin/bash
############################################################################
# #
# This file is part of the IPFire Firewall. #
# #
# IPFire 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 of the License, or #
# (at your option) any later version. #
# #
# IPFire is distributed in the hope that it will be useful, #
# 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 IPFire; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Copyright (C) 2007 IPFire-Team <info@ipfire.org>. #
# #
############################################################################
#
. /opt/pakfire/lib/functions.sh
# Create backup include file if it is missing.
if [ ! -e "/var/ipfire/backup/addons/includes/mysql" ]; then
cat <<EOF > /var/ipfire/backup/addons/includes/mysql
/etc/my.cnf
/srv/mysql
EOF
fi
# Stop the mysql service
stop_service "${NAME}"
# Make backup
make_backup "${NAME}"
# Update files
remove_files
extract_files
# Restore backup
restore_backup "${NAME}"
# Restart the service
start_service "${NAME}"
exit 0

View File

@@ -0,0 +1,26 @@
commit e94f50bbbe7318eec5b6b165ff73d94bbc9d20b0
Author: Michael Tremer <michael.tremer@ipfire.org>
Date: Sun Feb 11 11:05:43 2018 +0000
crypto: Don't limit to TLSv1 only
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
diff --git a/crypto.c b/crypto.c
index 897b55bfdcfc..440c882880b5 100644
--- a/crypto.c
+++ b/crypto.c
@@ -93,7 +93,12 @@ smtp_init_crypto(int fd, int feature)
SSL_library_init();
SSL_load_error_strings();
- meth = TLSv1_client_method();
+ // Allow any possible version
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ meth = TLS_client_method();
+#else
+ meth = SSLv23_client_method();
+#endif
ctx = SSL_CTX_new(meth);
if (ctx == NULL) {

View File

@@ -1,73 +0,0 @@
diff -up flac-1.2.1/src/libFLAC/stream_decoder.c.asm flac-1.2.1/src/libFLAC/stream_decoder.c
--- flac-1.2.1/src/libFLAC/stream_decoder.c.asm 2007-09-13 17:38:05.000000000 +0200
+++ flac-1.2.1/src/libFLAC/stream_decoder.c 2008-01-29 10:32:17.000000000 +0100
@@ -421,7 +421,7 @@ static FLAC__StreamDecoderInitStatus ini
#ifdef FLAC__CPU_IA32
FLAC__ASSERT(decoder->private_->cpuinfo.type == FLAC__CPUINFO_TYPE_IA32);
#ifdef FLAC__HAS_NASM
-#if 1 /*@@@@@@ OPT: not clearly faster, needs more testing */
+#if 0 /*@@@@@@ OPT: not clearly faster, needs more testing */
if(decoder->private_->cpuinfo.data.ia32.bswap)
decoder->private_->local_bitreader_read_rice_signed_block = FLAC__bitreader_read_rice_signed_block_asm_ia32_bswap;
#endif
diff -up flac-1.2.1/src/libFLAC/ia32/lpc_asm.nasm.asm flac-1.2.1/src/libFLAC/ia32/lpc_asm.nasm
--- flac-1.2.1/src/libFLAC/ia32/lpc_asm.nasm.asm 2007-03-22 05:13:05.000000000 +0100
+++ flac-1.2.1/src/libFLAC/ia32/lpc_asm.nasm 2008-01-29 10:34:09.000000000 +0100
@@ -1507,5 +1507,5 @@ cident FLAC__lpc_restore_signal_asm_ia32
end
%ifdef OBJ_FORMAT_elf
- section .note.GNU-stack noalloc
+ section .note.GNU-stack progbits noalloc noexec nowrite align=1
%endif
diff -up flac-1.2.1/src/libFLAC/ia32/Makefile.am.asm flac-1.2.1/src/libFLAC/ia32/Makefile.am
--- flac-1.2.1/src/libFLAC/ia32/Makefile.am.asm 2007-04-04 02:01:13.000000000 +0200
+++ flac-1.2.1/src/libFLAC/ia32/Makefile.am 2008-03-17 14:04:37.000000000 +0100
@@ -37,7 +37,6 @@ STRIP_NON_ASM = sh $(top_srcdir)/strip_n
noinst_LTLIBRARIES = libFLAC-asm.la
libFLAC_asm_la_SOURCES = \
- bitreader_asm.nasm \
cpu_asm.nasm \
fixed_asm.nasm \
lpc_asm.nasm \
diff -up flac-1.2.1/src/libFLAC/ia32/bitreader_asm.nasm.asm flac-1.2.1/src/libFLAC/ia32/bitreader_asm.nasm
--- flac-1.2.1/src/libFLAC/ia32/bitreader_asm.nasm.asm 2007-03-30 02:54:53.000000000 +0200
+++ flac-1.2.1/src/libFLAC/ia32/bitreader_asm.nasm 2008-01-29 10:32:57.000000000 +0100
@@ -564,5 +564,5 @@ cident FLAC__bitreader_read_rice_signed_
end
%ifdef OBJ_FORMAT_elf
- section .note.GNU-stack noalloc
+ section .note.GNU-stack progbits noalloc noexec nowrite align=1
%endif
diff -up flac-1.2.1/src/libFLAC/ia32/fixed_asm.nasm.asm flac-1.2.1/src/libFLAC/ia32/fixed_asm.nasm
--- flac-1.2.1/src/libFLAC/ia32/fixed_asm.nasm.asm 2007-03-22 05:13:05.000000000 +0100
+++ flac-1.2.1/src/libFLAC/ia32/fixed_asm.nasm 2008-01-29 10:33:52.000000000 +0100
@@ -308,5 +308,5 @@ cident FLAC__fixed_compute_best_predicto
end
%ifdef OBJ_FORMAT_elf
- section .note.GNU-stack noalloc
+ section .note.GNU-stack progbits noalloc noexec nowrite align=1
%endif
diff -up flac-1.2.1/src/libFLAC/ia32/cpu_asm.nasm.asm flac-1.2.1/src/libFLAC/ia32/cpu_asm.nasm
--- flac-1.2.1/src/libFLAC/ia32/cpu_asm.nasm.asm 2007-03-22 05:13:05.000000000 +0100
+++ flac-1.2.1/src/libFLAC/ia32/cpu_asm.nasm 2008-01-29 10:33:24.000000000 +0100
@@ -117,5 +117,5 @@ cident FLAC__cpu_info_extended_amd_asm_i
end
%ifdef OBJ_FORMAT_elf
- section .note.GNU-stack noalloc
+ section .note.GNU-stack progbits noalloc noexec nowrite align=1
%endif
diff -up flac-1.2.1/src/libFLAC/ia32/stream_encoder_asm.nasm.asm flac-1.2.1/src/libFLAC/ia32/stream_encoder_asm.nasm
--- flac-1.2.1/src/libFLAC/ia32/stream_encoder_asm.nasm.asm 2007-06-19 22:01:27.000000000 +0200
+++ flac-1.2.1/src/libFLAC/ia32/stream_encoder_asm.nasm 2008-01-29 10:34:40.000000000 +0100
@@ -155,5 +155,5 @@ cident precompute_partition_info_sums_32
end
%ifdef OBJ_FORMAT_elf
- section .note.GNU-stack noalloc
+ section .note.GNU-stack progbits noalloc noexec nowrite align=1
%endif

View File

@@ -1,558 +0,0 @@
Index: src/libFLAC/bitreader.c
===================================================================
RCS file: /cvsroot/flac/flac/src/libFLAC/bitreader.c,v
retrieving revision 1.15
diff -u -r1.15 bitreader.c
--- src/libFLAC/bitreader.c 28 Feb 2008 05:34:26 -0000 1.15
+++ src/libFLAC/bitreader.c 14 Mar 2008 11:07:07 -0000
@@ -69,13 +69,12 @@
#endif
/* counts the # of zero MSBs in a word */
#define COUNT_ZERO_MSBS(word) ( \
- (word) <= 0xffff ? \
- ( (word) <= 0xff? byte_to_unary_table[word] + 24 : byte_to_unary_table[(word) >> 8] + 16 ) : \
- ( (word) <= 0xffffff? byte_to_unary_table[word >> 16] + 8 : byte_to_unary_table[(word) >> 24] ) \
+ word > 0xffffff ? byte_to_unary_table[(word) >> 24] : \
+ !word ? 32 : \
+ word > 0xffff ? byte_to_unary_table[word >> 16] + 8 : \
+ word > 0xff ? byte_to_unary_table[(word) >> 8] + 16 : \
+ byte_to_unary_table[word] + 24 \
)
-/* this alternate might be slightly faster on some systems/compilers: */
-#define COUNT_ZERO_MSBS2(word) ( (word) <= 0xff ? byte_to_unary_table[word] + 24 : ((word) <= 0xffff ? byte_to_unary_table[(word) >> 8] + 16 : ((word) <= 0xffffff ? byte_to_unary_table[(word) >> 16] + 8 : byte_to_unary_table[(word) >> 24])) )
-
/*
* This should be at least twice as large as the largest number of words
Index: src/libFLAC/bitreader.c
===================================================================
RCS file: /cvsroot/flac/flac/src/libFLAC/bitreader.c,v
retrieving revision 1.15
diff -u -r1.15 bitreader.c
--- src/libFLAC/bitreader.c 28 Feb 2008 05:34:26 -0000 1.15
+++ src/libFLAC/bitreader.c 14 Mar 2008 13:19:46 -0000
@@ -149,6 +148,7 @@
FLAC__CPUInfo cpu_info;
};
+#if FLAC__BYTES_PER_WORD == 4 && FLAC__CPU_IA32
#ifdef _MSC_VER
/* OPT: an MSVC built-in would be better */
static _inline FLAC__uint32 local_swap32_(FLAC__uint32 x)
@@ -173,6 +173,15 @@
done1:
}
}
+#elif __GNUC__
+static void local_swap32_block_(FLAC__uint32 *start, FLAC__uint32 len)
+{
+ FLAC__uint32 *end;
+
+ for(end = start + len; start < end; start++)
+ asm ("bswap %0" : "=r"(*start) : "0"(*start));
+}
+#endif
#endif
static FLaC__INLINE void crc16_update_word_(FLAC__BitReader *br, brword word)
@@ -263,7 +272,7 @@
#if WORDS_BIGENDIAN
#else
end = (br->words*FLAC__BYTES_PER_WORD + br->bytes + bytes + (FLAC__BYTES_PER_WORD-1)) / FLAC__BYTES_PER_WORD;
-# if defined(_MSC_VER) && (FLAC__BYTES_PER_WORD == 4)
+# if FLAC__CPU_IA32 && (__GNUC__ || defined(_MSC_VER)) && FLAC__BYTES_PER_WORD == 4
if(br->cpu_info.type == FLAC__CPUINFO_TYPE_IA32 && br->cpu_info.data.ia32.bswap) {
start = br->words;
local_swap32_block_(br->buffer + start, end - start);
Index: src/libFLAC/bitreader.c
===================================================================
RCS file: /cvsroot/flac/flac/src/libFLAC/bitreader.c,v
retrieving revision 1.15
diff -u -r1.15 bitreader.c
--- src/libFLAC/bitreader.c 28 Feb 2008 05:34:26 -0000 1.15
+++ src/libFLAC/bitreader.c 17 Mar 2008 15:42:57 -0000
@@ -803,379 +812,144 @@
}
/* this is by far the most heavily used reader call. it ain't pretty but it's fast */
-/* a lot of the logic is copied, then adapted, from FLAC__bitreader_read_unary_unsigned() and FLAC__bitreader_read_raw_uint32() */
FLAC__bool FLAC__bitreader_read_rice_signed_block(FLAC__BitReader *br, int vals[], unsigned nvals, unsigned parameter)
-/* OPT: possibly faster version for use with MSVC */
-#ifdef _MSC_VER
{
- unsigned i;
- unsigned uval = 0;
- unsigned bits; /* the # of binary LSBs left to read to finish a rice codeword */
-
/* try and get br->consumed_words and br->consumed_bits into register;
* must remember to flush them back to *br before calling other
- * bitwriter functions that use them, and before returning */
- register unsigned cwords;
- register unsigned cbits;
+ * bitreader functions that use them, and before returning */
+ unsigned cwords, words, lsbs, msbs, x, y;
+ unsigned ucbits; /* keep track of the number of unconsumed bits in word */
+ brword b;
+ int *val, *end;
FLAC__ASSERT(0 != br);
FLAC__ASSERT(0 != br->buffer);
/* WATCHOUT: code does not work with <32bit words; we can make things much faster with this assertion */
FLAC__ASSERT(FLAC__BITS_PER_WORD >= 32);
FLAC__ASSERT(parameter < 32);
- /* the above two asserts also guarantee that the binary part never straddles more that 2 words, so we don't have to loop to read it */
-
- if(nvals == 0)
- return true;
-
- cbits = br->consumed_bits;
- cwords = br->consumed_words;
+ /* the above two asserts also guarantee that the binary part never straddles more than 2 words, so we don't have to loop to read it */
- while(1) {
+ val = vals;
+ end = vals + nvals;
- /* read unary part */
- while(1) {
- while(cwords < br->words) { /* if we've not consumed up to a partial tail word... */
- brword b = br->buffer[cwords] << cbits;
- if(b) {
-#if 0 /* slower, probably due to bad register allocation... */ && defined FLAC__CPU_IA32 && !defined FLAC__NO_ASM && FLAC__BITS_PER_WORD == 32
- __asm {
- bsr eax, b
- not eax
- and eax, 31
- mov i, eax
- }
-#else
- i = COUNT_ZERO_MSBS(b);
-#endif
- uval += i;
- bits = parameter;
- i++;
- cbits += i;
- if(cbits == FLAC__BITS_PER_WORD) {
- crc16_update_word_(br, br->buffer[cwords]);
- cwords++;
- cbits = 0;
- }
- goto break1;
- }
- else {
- uval += FLAC__BITS_PER_WORD - cbits;
- crc16_update_word_(br, br->buffer[cwords]);
- cwords++;
- cbits = 0;
- /* didn't find stop bit yet, have to keep going... */
- }
- }
- /* at this point we've eaten up all the whole words; have to try
- * reading through any tail bytes before calling the read callback.
- * this is a repeat of the above logic adjusted for the fact we
- * don't have a whole word. note though if the client is feeding
- * us data a byte at a time (unlikely), br->consumed_bits may not
- * be zero.
- */
- if(br->bytes) {
- const unsigned end = br->bytes * 8;
- brword b = (br->buffer[cwords] & (FLAC__WORD_ALL_ONES << (FLAC__BITS_PER_WORD-end))) << cbits;
- if(b) {
- i = COUNT_ZERO_MSBS(b);
- uval += i;
- bits = parameter;
- i++;
- cbits += i;
- FLAC__ASSERT(cbits < FLAC__BITS_PER_WORD);
- goto break1;
- }
- else {
- uval += end - cbits;
- cbits += end;
- FLAC__ASSERT(cbits < FLAC__BITS_PER_WORD);
- /* didn't find stop bit yet, have to keep going... */
- }
- }
- /* flush registers and read; bitreader_read_from_client_() does
- * not touch br->consumed_bits at all but we still need to set
- * it in case it fails and we have to return false.
- */
- br->consumed_bits = cbits;
- br->consumed_words = cwords;
- if(!bitreader_read_from_client_(br))
+ if(parameter == 0) {
+ while(val < end) {
+ /* read the unary MSBs and end bit */
+ if(!FLAC__bitreader_read_unary_unsigned(br, &msbs))
return false;
- cwords = br->consumed_words;
- }
-break1:
- /* read binary part */
- FLAC__ASSERT(cwords <= br->words);
-
- if(bits) {
- while((br->words-cwords)*FLAC__BITS_PER_WORD + br->bytes*8 - cbits < bits) {
- /* flush registers and read; bitreader_read_from_client_() does
- * not touch br->consumed_bits at all but we still need to set
- * it in case it fails and we have to return false.
- */
- br->consumed_bits = cbits;
- br->consumed_words = cwords;
- if(!bitreader_read_from_client_(br))
- return false;
- cwords = br->consumed_words;
- }
- if(cwords < br->words) { /* if we've not consumed up to a partial tail word... */
- if(cbits) {
- /* this also works when consumed_bits==0, it's just a little slower than necessary for that case */
- const unsigned n = FLAC__BITS_PER_WORD - cbits;
- const brword word = br->buffer[cwords];
- if(bits < n) {
- uval <<= bits;
- uval |= (word & (FLAC__WORD_ALL_ONES >> cbits)) >> (n-bits);
- cbits += bits;
- goto break2;
- }
- uval <<= n;
- uval |= word & (FLAC__WORD_ALL_ONES >> cbits);
- bits -= n;
- crc16_update_word_(br, word);
- cwords++;
- cbits = 0;
- if(bits) { /* if there are still bits left to read, there have to be less than 32 so they will all be in the next word */
- uval <<= bits;
- uval |= (br->buffer[cwords] >> (FLAC__BITS_PER_WORD-bits));
- cbits = bits;
- }
- goto break2;
- }
- else {
- FLAC__ASSERT(bits < FLAC__BITS_PER_WORD);
- uval <<= bits;
- uval |= br->buffer[cwords] >> (FLAC__BITS_PER_WORD-bits);
- cbits = bits;
- goto break2;
- }
- }
- else {
- /* in this case we're starting our read at a partial tail word;
- * the reader has guaranteed that we have at least 'bits' bits
- * available to read, which makes this case simpler.
- */
- uval <<= bits;
- if(cbits) {
- /* this also works when consumed_bits==0, it's just a little slower than necessary for that case */
- FLAC__ASSERT(cbits + bits <= br->bytes*8);
- uval |= (br->buffer[cwords] & (FLAC__WORD_ALL_ONES >> cbits)) >> (FLAC__BITS_PER_WORD-cbits-bits);
- cbits += bits;
- goto break2;
- }
- else {
- uval |= br->buffer[cwords] >> (FLAC__BITS_PER_WORD-bits);
- cbits += bits;
- goto break2;
- }
- }
- }
-break2:
- /* compose the value */
- *vals = (int)(uval >> 1 ^ -(int)(uval & 1));
- /* are we done? */
- --nvals;
- if(nvals == 0) {
- br->consumed_bits = cbits;
- br->consumed_words = cwords;
- return true;
+ *val++ = (int)(msbs >> 1) ^ -(int)(msbs & 1);
}
- uval = 0;
- ++vals;
-
+ return true;
}
-}
-#else
-{
- unsigned i;
- unsigned uval = 0;
- /* try and get br->consumed_words and br->consumed_bits into register;
- * must remember to flush them back to *br before calling other
- * bitwriter functions that use them, and before returning */
- register unsigned cwords;
- register unsigned cbits;
- unsigned ucbits; /* keep track of the number of unconsumed bits in the buffer */
+ FLAC__ASSERT(parameter > 0);
- FLAC__ASSERT(0 != br);
- FLAC__ASSERT(0 != br->buffer);
- /* WATCHOUT: code does not work with <32bit words; we can make things much faster with this assertion */
- FLAC__ASSERT(FLAC__BITS_PER_WORD >= 32);
- FLAC__ASSERT(parameter < 32);
- /* the above two asserts also guarantee that the binary part never straddles more than 2 words, so we don't have to loop to read it */
+ cwords = br->consumed_words;
+ words = br->words;
- if(nvals == 0)
- return true;
+ /* if we've not consumed up to a partial tail word... */
+ if(cwords >= words) {
+ x = 0;
+ goto process_tail;
+ }
+
+ ucbits = FLAC__BITS_PER_WORD - br->consumed_bits;
+ b = br->buffer[cwords] << br->consumed_bits; /* keep unconsumed bits aligned to left */
+
+ while(val < end) {
+ /* read the unary MSBs and end bit */
+ x = y = COUNT_ZERO_MSBS(b);
+ if(x == FLAC__BITS_PER_WORD) {
+ x = ucbits;
+ do {
+ /* didn't find stop bit yet, have to keep going... */
+ crc16_update_word_(br, br->buffer[cwords++]);
+ if (cwords >= words)
+ goto incomplete_msbs;
+ b = br->buffer[cwords];
+ y = COUNT_ZERO_MSBS(b);
+ x += y;
+ } while(y == FLAC__BITS_PER_WORD);
+ }
+ b <<= y;
+ b <<= 1; /* account for stop bit */
+ ucbits = (ucbits - x - 1) % FLAC__BITS_PER_WORD;
+ msbs = x;
+
+ /* read the binary LSBs */
+ x = b >> (FLAC__BITS_PER_WORD - parameter);
+ if(parameter <= ucbits) {
+ ucbits -= parameter;
+ b <<= parameter;
+ } else {
+ /* there are still bits left to read, they will all be in the next word */
+ crc16_update_word_(br, br->buffer[cwords++]);
+ if (cwords >= words)
+ goto incomplete_lsbs;
+ b = br->buffer[cwords];
+ ucbits += FLAC__BITS_PER_WORD - parameter;
+ x |= b >> ucbits;
+ b <<= FLAC__BITS_PER_WORD - ucbits;
+ }
+ lsbs = x;
- cbits = br->consumed_bits;
- cwords = br->consumed_words;
- ucbits = (br->words-cwords)*FLAC__BITS_PER_WORD + br->bytes*8 - cbits;
+ /* compose the value */
+ x = (msbs << parameter) | lsbs;
+ *val++ = (int)(x >> 1) ^ -(int)(x & 1);
- while(1) {
+ continue;
- /* read unary part */
- while(1) {
- while(cwords < br->words) { /* if we've not consumed up to a partial tail word... */
- brword b = br->buffer[cwords] << cbits;
- if(b) {
-#if 0 /* is not discernably faster... */ && defined FLAC__CPU_IA32 && !defined FLAC__NO_ASM && FLAC__BITS_PER_WORD == 32 && defined __GNUC__
- asm volatile (
- "bsrl %1, %0;"
- "notl %0;"
- "andl $31, %0;"
- : "=r"(i)
- : "r"(b)
- );
-#else
- i = COUNT_ZERO_MSBS(b);
-#endif
- uval += i;
- cbits += i;
- cbits++; /* skip over stop bit */
- if(cbits >= FLAC__BITS_PER_WORD) { /* faster way of testing if(cbits == FLAC__BITS_PER_WORD) */
- crc16_update_word_(br, br->buffer[cwords]);
- cwords++;
- cbits = 0;
- }
- goto break1;
- }
- else {
- uval += FLAC__BITS_PER_WORD - cbits;
- crc16_update_word_(br, br->buffer[cwords]);
- cwords++;
- cbits = 0;
- /* didn't find stop bit yet, have to keep going... */
- }
- }
- /* at this point we've eaten up all the whole words; have to try
- * reading through any tail bytes before calling the read callback.
- * this is a repeat of the above logic adjusted for the fact we
- * don't have a whole word. note though if the client is feeding
- * us data a byte at a time (unlikely), br->consumed_bits may not
- * be zero.
- */
- if(br->bytes) {
- const unsigned end = br->bytes * 8;
- brword b = (br->buffer[cwords] & ~(FLAC__WORD_ALL_ONES >> end)) << cbits;
- if(b) {
- i = COUNT_ZERO_MSBS(b);
- uval += i;
- cbits += i;
- cbits++; /* skip over stop bit */
- FLAC__ASSERT(cbits < FLAC__BITS_PER_WORD);
- goto break1;
- }
- else {
- uval += end - cbits;
- cbits += end;
- FLAC__ASSERT(cbits < FLAC__BITS_PER_WORD);
- /* didn't find stop bit yet, have to keep going... */
- }
+ /* at this point we've eaten up all the whole words */
+process_tail:
+ do {
+ if(0) {
+incomplete_msbs:
+ br->consumed_bits = 0;
+ br->consumed_words = cwords;
}
- /* flush registers and read; bitreader_read_from_client_() does
- * not touch br->consumed_bits at all but we still need to set
- * it in case it fails and we have to return false.
- */
- br->consumed_bits = cbits;
- br->consumed_words = cwords;
- if(!bitreader_read_from_client_(br))
+
+ /* read the unary MSBs and end bit */
+ if(!FLAC__bitreader_read_unary_unsigned(br, &msbs))
return false;
- cwords = br->consumed_words;
- ucbits = (br->words-cwords)*FLAC__BITS_PER_WORD + br->bytes*8 - cbits + uval;
- /* + uval to offset our count by the # of unary bits already
- * consumed before the read, because we will add these back
- * in all at once at break1
- */
- }
-break1:
- ucbits -= uval;
- ucbits--; /* account for stop bit */
-
- /* read binary part */
- FLAC__ASSERT(cwords <= br->words);
-
- if(parameter) {
- while(ucbits < parameter) {
- /* flush registers and read; bitreader_read_from_client_() does
- * not touch br->consumed_bits at all but we still need to set
- * it in case it fails and we have to return false.
- */
- br->consumed_bits = cbits;
+ msbs += x;
+ x = ucbits = 0;
+
+ if(0) {
+incomplete_lsbs:
+ br->consumed_bits = 0;
br->consumed_words = cwords;
- if(!bitreader_read_from_client_(br))
- return false;
- cwords = br->consumed_words;
- ucbits = (br->words-cwords)*FLAC__BITS_PER_WORD + br->bytes*8 - cbits;
- }
- if(cwords < br->words) { /* if we've not consumed up to a partial tail word... */
- if(cbits) {
- /* this also works when consumed_bits==0, it's just slower than necessary for that case */
- const unsigned n = FLAC__BITS_PER_WORD - cbits;
- const brword word = br->buffer[cwords];
- if(parameter < n) {
- uval <<= parameter;
- uval |= (word & (FLAC__WORD_ALL_ONES >> cbits)) >> (n-parameter);
- cbits += parameter;
- }
- else {
- uval <<= n;
- uval |= word & (FLAC__WORD_ALL_ONES >> cbits);
- crc16_update_word_(br, word);
- cwords++;
- cbits = parameter - n;
- if(cbits) { /* parameter > n, i.e. if there are still bits left to read, there have to be less than 32 so they will all be in the next word */
- uval <<= cbits;
- uval |= (br->buffer[cwords] >> (FLAC__BITS_PER_WORD-cbits));
- }
- }
- }
- else {
- cbits = parameter;
- uval <<= parameter;
- uval |= br->buffer[cwords] >> (FLAC__BITS_PER_WORD-cbits);
- }
}
- else {
- /* in this case we're starting our read at a partial tail word;
- * the reader has guaranteed that we have at least 'parameter'
- * bits available to read, which makes this case simpler.
- */
- uval <<= parameter;
- if(cbits) {
- /* this also works when consumed_bits==0, it's just a little slower than necessary for that case */
- FLAC__ASSERT(cbits + parameter <= br->bytes*8);
- uval |= (br->buffer[cwords] & (FLAC__WORD_ALL_ONES >> cbits)) >> (FLAC__BITS_PER_WORD-cbits-parameter);
- cbits += parameter;
- }
- else {
- cbits = parameter;
- uval |= br->buffer[cwords] >> (FLAC__BITS_PER_WORD-cbits);
- }
- }
- }
- ucbits -= parameter;
-
- /* compose the value */
- *vals = (int)(uval >> 1 ^ -(int)(uval & 1));
+ /* read the binary LSBs */
+ if(!FLAC__bitreader_read_raw_uint32(br, &lsbs, parameter - ucbits))
+ return false;
+ lsbs = x | lsbs;
- /* are we done? */
- --nvals;
- if(nvals == 0) {
- br->consumed_bits = cbits;
- br->consumed_words = cwords;
- return true;
- }
+ /* compose the value */
+ x = (msbs << parameter) | lsbs;
+ *val++ = (int)(x >> 1) ^ -(int)(x & 1);
+ x = 0;
- uval = 0;
- ++vals;
+ cwords = br->consumed_words;
+ words = br->words;
+ ucbits = FLAC__BITS_PER_WORD - br->consumed_bits;
+ b = br->buffer[cwords] << br->consumed_bits;
+ } while(cwords >= words && val < end);
+ }
+ if(ucbits == 0 && cwords < words) {
+ /* don't leave the head word with no unconsumed bits */
+ crc16_update_word_(br, br->buffer[cwords++]);
+ ucbits = FLAC__BITS_PER_WORD;
}
+
+ br->consumed_bits = FLAC__BITS_PER_WORD - ucbits;
+ br->consumed_words = cwords;
+
+ return true;
}
-#endif
#if 0 /* UNUSED */
FLAC__bool FLAC__bitreader_read_golomb_signed(FLAC__BitReader *br, int *val, unsigned parameter)

View File

@@ -1,45 +0,0 @@
diff -up flac-1.2.1/src/libFLAC/Makefile.am.cflags flac-1.2.1/src/libFLAC/Makefile.am
--- flac-1.2.1/src/libFLAC/Makefile.am.cflags 2007-09-14 23:06:17.000000000 +0200
+++ flac-1.2.1/src/libFLAC/Makefile.am 2008-03-17 14:19:29.000000000 +0100
@@ -41,7 +41,7 @@ CPUCFLAGS = -faltivec -force_cpusubtype_
else
# Linux-gcc for PPC does not have -force_cpusubtype_ALL, it is Darwin-specific
#@@@ PPC optimizations temporarily disabled
-CPUCFLAGS = -maltivec -mabi=altivec -DFLAC__NO_ASM
+CPUCFLAGS = -DFLAC__NO_ASM
endif
endif
@@ -69,7 +69,7 @@ endif
endif
endif
-libFLAC_la_LIBADD = $(LOCAL_EXTRA_LIBADD) @OGG_LIBS@
+libFLAC_la_LIBADD = $(LOCAL_EXTRA_LIBADD) @OGG_LIBS@ libFLAC_extracflags.la
SUBDIRS = $(ARCH_SUBDIRS) include .
@@ -112,7 +112,10 @@ libFLAC_la_SOURCES = \
metadata_iterators.c \
metadata_object.c \
stream_decoder.c \
- stream_encoder.c \
stream_encoder_framing.c \
window.c \
$(extra_ogg_sources)
+
+noinst_LTLIBRARIES = libFLAC_extracflags.la
+libFLAC_extracflags_la_SOURCES = stream_encoder.c
+libFLAC_extracflags_la_CFLAGS = $(AM_CFLAGS) -funroll-loops
diff -up flac-1.2.1/configure.in.cflags flac-1.2.1/configure.in
--- flac-1.2.1/configure.in.cflags 2007-09-13 17:48:42.000000000 +0200
+++ flac-1.2.1/configure.in 2008-03-17 14:17:08.000000000 +0100
@@ -301,7 +301,7 @@ else
CPPFLAGS="-DNDEBUG $CPPFLAGS"
if test "x$GCC" = xyes; then
CPPFLAGS="-DFLaC__INLINE=__inline__ $CPPFLAGS"
- CFLAGS="-O3 -funroll-loops -finline-functions -Wall -W -Winline $CFLAGS"
+ CFLAGS="-Wall -W -Winline $CFLAGS"
fi
fi

View File

@@ -1,11 +0,0 @@
diff -up flac-1.2.1/examples/cpp/encode/file/main.cpp.gcc43 flac-1.2.1/examples/cpp/encode/file/main.cpp
--- flac-1.2.1/examples/cpp/encode/file/main.cpp.gcc43 2007-09-13 17:58:03.000000000 +0200
+++ flac-1.2.1/examples/cpp/encode/file/main.cpp 2008-01-08 10:27:39.000000000 +0100
@@ -29,6 +29,7 @@
#endif
#include <stdio.h>
+#include <string.h>
#include <stdlib.h>
#include "FLAC++/metadata.h"
#include "FLAC++/encoder.h"

View File

@@ -1,39 +0,0 @@
diff -up flac-1.2.1/src/libFLAC/include/private/ogg_helper.h.hidesyms flac-1.2.1/src/libFLAC/include/private/ogg_helper.h
--- flac-1.2.1/src/libFLAC/include/private/ogg_helper.h.hidesyms 2007-02-02 07:22:40.000000000 +0100
+++ flac-1.2.1/src/libFLAC/include/private/ogg_helper.h 2008-01-29 15:27:13.000000000 +0100
@@ -35,9 +35,13 @@
#include <ogg/ogg.h>
#include "FLAC/stream_encoder.h" /* for FLAC__StreamEncoder */
+__attribute__((__visibility__("hidden")))
void simple_ogg_page__init(ogg_page *page);
+__attribute__((__visibility__("hidden")))
void simple_ogg_page__clear(ogg_page *page);
+__attribute__((__visibility__("hidden")))
FLAC__bool simple_ogg_page__get_at(FLAC__StreamEncoder *encoder, FLAC__uint64 position, ogg_page *page, FLAC__StreamEncoderSeekCallback seek_callback, FLAC__StreamEncoderReadCallback read_callback, void *client_data);
+__attribute__((__visibility__("hidden")))
FLAC__bool simple_ogg_page__set_at(FLAC__StreamEncoder *encoder, FLAC__uint64 position, ogg_page *page, FLAC__StreamEncoderSeekCallback seek_callback, FLAC__StreamEncoderWriteCallback write_callback, void *client_data);
#endif
diff -up flac-1.2.1/src/libFLAC/include/private/bitreader.h.hidesyms flac-1.2.1/src/libFLAC/include/private/bitreader.h
--- flac-1.2.1/src/libFLAC/include/private/bitreader.h.hidesyms 2007-07-10 22:22:19.000000000 +0200
+++ flac-1.2.1/src/libFLAC/include/private/bitreader.h 2008-01-29 15:27:13.000000000 +0100
@@ -95,5 +95,6 @@ FLAC__bool FLAC__bitreader_read_golomb_u
FLAC__bool FLAC__bitreader_read_utf8_uint32(FLAC__BitReader *br, FLAC__uint32 *val, FLAC__byte *raw, unsigned *rawlen);
FLAC__bool FLAC__bitreader_read_utf8_uint64(FLAC__BitReader *br, FLAC__uint64 *val, FLAC__byte *raw, unsigned *rawlen);
+__attribute__((__visibility__("hidden")))
FLAC__bool bitreader_read_from_client_(FLAC__BitReader *br);
#endif
diff -up flac-1.2.1/src/libFLAC/ia32/stream_encoder_asm.nasm.hidesyms flac-1.2.1/src/libFLAC/ia32/stream_encoder_asm.nasm
--- flac-1.2.1/src/libFLAC/ia32/stream_encoder_asm.nasm.hidesyms 2008-01-29 15:27:13.000000000 +0100
+++ flac-1.2.1/src/libFLAC/ia32/stream_encoder_asm.nasm 2008-01-29 15:28:32.000000000 +0100
@@ -34,7 +34,7 @@
data_section
-cglobal precompute_partition_info_sums_32bit_asm_ia32_
+cglobal precompute_partition_info_sums_32bit_asm_ia32_:function hidden
code_section

View File

@@ -1,41 +0,0 @@
diff -up flac-1.2.1/test/test_seeking.sh.tests flac-1.2.1/test/test_seeking.sh
--- flac-1.2.1/test/test_seeking.sh.tests 2007-09-11 09:33:04.000000000 +0200
+++ flac-1.2.1/test/test_seeking.sh 2008-01-29 13:52:03.000000000 +0100
@@ -103,7 +103,7 @@ tiny_seek_count=100
if [ "$FLAC__TEST_LEVEL" -gt 1 ] ; then
small_seek_count=10000
else
- small_seek_count=100000
+ small_seek_count=100
fi
for suffix in '' '-s' ; do
diff -up flac-1.2.1/test/test_streams.sh.tests flac-1.2.1/test/test_streams.sh
--- flac-1.2.1/test/test_streams.sh.tests 2007-06-16 21:58:39.000000000 +0200
+++ flac-1.2.1/test/test_streams.sh 2008-03-17 13:57:39.000000000 +0100
@@ -39,6 +39,10 @@ if [ x"$FLAC__TEST_LEVEL" = x ] ; then
FLAC__TEST_LEVEL=1
fi
+if [ "$FLAC__TEST_LEVEL" -eq 0 ] ; then
+ exit 0
+fi
+
flac --help 1>/dev/null 2>/dev/null || die "ERROR can't find flac executable"
run_flac ()
diff -up flac-1.2.1/src/test_streams/main.c.tests flac-1.2.1/src/test_streams/main.c
--- flac-1.2.1/src/test_streams/main.c.tests 2007-08-31 07:54:49.000000000 +0200
+++ flac-1.2.1/src/test_streams/main.c 2008-01-29 13:53:46.000000000 +0100
@@ -898,9 +898,9 @@ int main(int argc, char *argv[])
if(!generate_noise("noise.raw", 65536 * 8 * 3)) return 1;
if(!generate_noise("noise8m32.raw", 32)) return 1;
if(!generate_wackywavs()) return 1;
- for(channels = 1; channels <= 8; channels++) {
+ for(channels = 1; channels <= 2; channels++) {
unsigned bits_per_sample;
- for(bits_per_sample = 4; bits_per_sample <= 24; bits_per_sample++) {
+ for(bits_per_sample = 8; bits_per_sample <= 24; bits_per_sample += 8) {
static const unsigned nsamples[] = { 1, 111, 4777 } ;
unsigned samples;
for(samples = 0; samples < sizeof(nsamples)/sizeof(nsamples[0]); samples++) {

View File

@@ -0,0 +1,767 @@
Backport of https://github.com/westes/flex/commit/24fd0551333e7eded87b64dd36062da3df2f6380
Bug: https://bugs.gentoo.org/628744
--- a/configure
+++ b/configure
@@ -3605,13 +3605,142 @@ test -z "$SED" && SED=sed
Xsed="$SED -e 1s/^X//"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if ${ac_cv_prog_CPP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+ done
+ ac_cv_prog_CPP=$CPP
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
@@ -3744,91 +3873,208 @@ $as_echo "$ac_cv_path_EGREP" >&6; }
EGREP="$ac_cv_path_EGREP"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
-$as_echo_n "checking for fgrep... " >&6; }
-if ${ac_cv_path_FGREP+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
$as_echo_n "(cached) " >&6
else
- if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
- then ac_cv_path_FGREP="$GREP -F"
- else
- if test -z "$FGREP"; then
- ac_path_FGREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in fgrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_FGREP" || continue
-# Check for GNU ac_path_FGREP and select it if it is found.
- # Check for GNU $ac_path_FGREP
-case `"$ac_path_FGREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'FGREP' >> "conftest.nl"
- "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_FGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_FGREP="$ac_path_FGREP"
- ac_path_FGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
- $ac_path_FGREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_FGREP"; then
- as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_FGREP=$FGREP
-fi
+int
+main ()
+{
- fi
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
-$as_echo "$ac_cv_path_FGREP" >&6; }
- FGREP="$ac_cv_path_FGREP"
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-test -z "$GREP" && GREP=grep
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+fi
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+fi
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+fi
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+ ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
+if test "x$ac_cv_header_minix_config_h" = xyes; then :
+ MINIX=yes
+else
+ MINIX=
+fi
+
+
+ if test "$MINIX" = yes; then
+$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
+$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
+
+
+$as_echo "#define _MINIX 1" >>confdefs.h
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if ${ac_cv_safe_to_define___extensions__+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# define __EXTENSIONS__ 1
+ $ac_includes_default
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_safe_to_define___extensions__=yes
+else
+ ac_cv_safe_to_define___extensions__=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
+ test $ac_cv_safe_to_define___extensions__ = yes &&
+ $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
+
+ $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
+
+ $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+
+ $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+ $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
+
+
+for ac_header in dlfcn.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_dlfcn_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DLFCN_H 1
+_ACEOF
+
+fi
+
+done
# Check whether --with-gnu-ld was given.
@@ -6898,288 +7144,6 @@ func_munge_path_list ()
esac
}
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if ${ac_cv_prog_CPP+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
- break
-fi
-
- done
- ac_cv_prog_CPP=$CPP
-
-fi
- CPP=$ac_cv_prog_CPP
-else
- ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
-else
- ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-for ac_header in dlfcn.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
-"
-if test "x$ac_cv_header_dlfcn_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DLFCN_H 1
-_ACEOF
-
-fi
-
-done
-
-
-
# Set options
--- a/src/config.h.in
+++ b/src/config.h.in
@@ -207,6 +207,9 @@
/* Define to the m4 executable name. */
#undef M4
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
/* Name of package */
#undef PACKAGE
@@ -239,6 +242,28 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
/* Version number of package */
#undef VERSION
@@ -246,6 +271,16 @@
`char[]'. */
#undef YYTEXT_POINTER
+/* Define to 1 if on MINIX. */
+#undef _MINIX
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+ this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#undef _POSIX_SOURCE
+
/* Define to empty if `const' does not conform to ANSI C. */
#undef const

View File

@@ -1,11 +1,10 @@
diff -Nrup a/localedata/Makefile b/localedata/Makefile
--- a/localedata/Makefile 2012-06-05 07:42:49.000000000 -0600
+++ b/localedata/Makefile 2012-06-07 12:15:21.776318827 -0600
@@ -211,6 +211,7 @@ $(INSTALL-SUPPORTED-LOCALES): install-lo
--- glibc-2.27/localedata/Makefile~ 2018-02-07 22:31:00.968944449 +0000
+++ glibc-2.27/localedata/Makefile 2018-02-07 22:31:26.201764894 +0000
@@ -223,6 +223,7 @@ $(INSTALL-SUPPORTED-LOCALES): install-lo
echo -n '...'; \
input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \
$(LOCALEDEF) --alias-file=../intl/locale.alias \
$(LOCALEDEF) $$flags --alias-file=../intl/locale.alias \
+ --no-archive \
-i locales/$$input -c -f charmaps/$$charset \
-i locales/$$input -f charmaps/$$charset \
$(addprefix --prefix=,$(install_root)) $$locale \
&& echo ' done'; \

View File

@@ -1,23 +0,0 @@
diff --git a/malloc/hooks.c b/malloc/hooks.c
index 4398c0a017..2c6cebc889 100644
--- a/malloc/hooks.c
+++ b/malloc/hooks.c
@@ -347,11 +347,18 @@ realloc_check (void *oldmem, size_t bytes, const void *caller)
newmem = _int_realloc (&main_arena, oldp, oldsize, nb);
}
+ DIAG_PUSH_NEEDS_COMMENT;
+#if __GNUC_PREREQ (7, 0)
+ /* GCC 7 warns about magic_p may be used uninitialized. But we never
+ reach here if magic_p is uninitialized. */
+ DIAG_IGNORE_NEEDS_COMMENT (7, "-Wmaybe-uninitialized");
+#endif
/* mem2chunk_check changed the magic byte in the old chunk.
If newmem is NULL, then the old chunk will still be used though,
so we need to invert that change here. */
if (newmem == NULL)
*magic_p ^= 0xFF;
+ DIAG_POP_NEEDS_COMMENT;
__libc_lock_unlock (main_arena.mutex);

View File

@@ -1,69 +0,0 @@
diff -up hostname/Makefile.rh hostname/Makefile
--- hostname/Makefile.rh 2013-11-04 10:12:59.670379153 +0100
+++ hostname/Makefile 2013-11-04 10:15:04.957314495 +0100
@@ -10,21 +10,17 @@ OBJS=hostname.o
hostname: $(OBJS)
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS) -lnsl
- ln -fs hostname dnsdomainname
- ln -fs hostname domainname
- ln -fs hostname ypdomainname
- ln -fs hostname nisdomainname
install: hostname
install -d ${BASEDIR}$(MANDIR)/man1
- install -o root -g root -m 0644 hostname.1 ${BASEDIR}$(MANDIR)/man1
+ install -m 0644 hostname.1 ${BASEDIR}$(MANDIR)/man1
ln -fs hostname.1 ${BASEDIR}$(MANDIR)/man1/dnsdomainname.1
ln -fs hostname.1 ${BASEDIR}$(MANDIR)/man1/domainname.1
ln -fs hostname.1 ${BASEDIR}$(MANDIR)/man1/ypdomainname.1
ln -fs hostname.1 ${BASEDIR}$(MANDIR)/man1/nisdomainname.1
install -d ${BASEDIR}$(BINDIR)
- install -o root -g root -m 0755 hostname ${BASEDIR}$(BINDIR)
+ install -m 0755 hostname ${BASEDIR}$(BINDIR)
ln -fs hostname ${BASEDIR}$(BINDIR)/dnsdomainname
ln -fs hostname ${BASEDIR}$(BINDIR)/domainname
ln -fs hostname ${BASEDIR}$(BINDIR)/nisdomainname
diff -up hostname/hostname.1.rh hostname/hostname.1
--- hostname/hostname.1.rh 2013-11-03 15:24:23.000000000 +0100
+++ hostname/hostname.1 2013-11-04 10:12:59.670379153 +0100
@@ -80,6 +80,28 @@ complete FQDN of the system is returned
.B "THE FQDN"
below).
+.LP
+The function
+.BR gethostname(2)
+is used to get the hostname. When the
+.BR "hostname \-a, \-d, \-f or \-i"
+is called will
+.BR gethostbyname(3)
+be called. The difference in
+.BR gethostname(2)
+and
+.BR gethostbyname(3)
+is that
+.BR gethostbyname(3)
+is network aware, so it consults
+.IR /etc/nsswitch.conf
+and
+.IR /etc/host.conf
+to decide whether to read information in
+.IR /etc/hostname
+or
+.IR /etc/hosts
+
.SS "SET NAME"
When called with one argument or with the
.B \-\-file
@@ -105,8 +127,7 @@ command (see
.B "THE FQDN"
below).
.LP
-The host name is usually set once at system startup in
-.I /etc/init.d/hostname.sh
+The host name is usually set once at system startup
(normally by reading the contents of a file which contains
the host name, e.g.
.IR /etc/hostname ).

View File

@@ -1,176 +0,0 @@
diff -Naur a/doc/arpd.sgml b/doc/arpd.sgml
--- a/doc/arpd.sgml
+++ b/doc/arpd.sgml
@@ -1,130 +0,0 @@
-<!doctype linuxdoc system>
-
-<article>
-
-<title>ARPD Daemon
-<author>Alexey Kuznetsov, <tt/kuznet@ms2.inr.ac.ru/
-<date>some_negative_number, 20 Sep 2001
-<abstract>
-<tt/arpd/ is daemon collecting gratuitous ARP information, saving
-it on local disk and feeding it to kernel on demand to avoid
-redundant broadcasting due to limited size of kernel ARP cache.
-</abstract>
-
-
-<p><bf/Description/
-
-<p>The format of the command is:
-
-<tscreen><verb>
- arpd OPTIONS [ INTERFACE [ INTERFACE ... ] ]
-</verb></tscreen>
-
-<p> <tt/OPTIONS/ are:
-
-<itemize>
-
-<item><tt/-l/ - dump <tt/arpd/ database to stdout and exit. Output consists
-of three columns: interface index, IP address and MAC address.
-Negative entries for dead hosts are also shown, in this case MAC address
-is replaced by word <tt/FAILED/ followed by colon and time when the fact
-that host is dead was proven the last time.
-
-<item><tt/-f FILE/ - read and load <tt/arpd/ database from <tt/FILE/
-in text format similar dumped by option <tt/-l/. Exit after load,
-probably listing resulting database, if option <tt/-l/ is also given.
-If <tt/FILE/ is <tt/-/, <tt/stdin/ is read to get ARP table.
-
-<item><tt/-b DATABASE/ - location of database file. Default location is
-<tt>/var/lib/arpd/arpd.db</tt>.
-
-<item><tt/-a NUMBER/ - <tt/arpd/ not only passively listens ARP on wire, but
-also send brodcast queries itself. <tt/NUMBER/ is number of such queries
-to make before destination is considered as dead. When <tt/arpd/ is started
-as kernel helper (i.e. with <tt/app_solicit/ enabled in <tt/sysctl/
-or even with option <tt/-k/) without this option and still did not learn enough
-information, you can observe 1 second gaps in service. Not fatal, but
-not good.
-
-<item><tt/-k/ - suppress sending broadcast queries by kernel. It takes
-sense together with option <tt/-a/.
-
-<item><tt/-n TIME/ - timeout of negative cache. When resolution fails <tt/arpd/
-suppresses further attempts to resolve for this period. It makes sense
-only together with option <tt/-k/. This timeout should not be too much
-longer than boot time of a typical host not supporting gratuitous ARP.
-Default value is 60 seconds.
-
-<item><tt/-R RATE/ - maximal steady rate of broadcasts sent by <tt/arpd/
-in packets per second. Default value is 1.
-
-<item><tt/-B NUMBER/ - number of broadcasts sent by <tt/arpd/ back to back.
-Default value is 3. Together with option <tt/-R/ this option allows
-to police broadcasting not to exceed <tt/B+R*T/ over any interval
-of time <tt/T/.
-
-</itemize>
-
-<p><tt/INTERFACE/ is name of networking inteface to watch.
-If no interfaces given, <tt/arpd/ monitors all the interfaces.
-In this case <tt/arpd/ does not adjust <tt/sysctl/ parameters,
-it is supposed user does this himself after <tt/arpd/ is started.
-
-
-<p> Signals
-
-<p> <tt/arpd/ exits gracefully syncing database and restoring adjusted
-<tt/sysctl/ parameters, when receives <tt/SIGINT/ or <tt/SIGTERM/.
-<tt/SIGHUP/ syncs database to disk. <tt/SIGUSR1/ sends some statistics
-to <tt/syslog/. Effect of another signals is undefined, they may corrupt
-database and leave <tt/sysctl/ parameters in an unpredictable state.
-
-<p> Note
-
-<p> In order to <tt/arpd/ be able to serve as ARP resolver, kernel must be
-compiled with the option <tt/CONFIG_ARPD/ and, in the case when interface list
-is not given on command line, variable <tt/app_solicit/
-on interfaces of interest should be set in <tt>/proc/sys/net/ipv4/neigh/*</tt>.
-If this is not made <tt/arpd/ still collects gratuitous ARP information
-in its database.
-
-<p> Examples
-
-<enum>
-<item> Start <tt/arpd/ to collect gratuitous ARP, but not messing
-with kernel functionality:
-
-<tscreen><verb>
- arpd -b /var/tmp/arpd.db
-</verb></tscreen>
-
-<item> Look at result after some time:
-
-<tscreen><verb>
- killall arpd
- arpd -l -b /var/tmp/arpd.db
-</verb></tscreen>
-
-<item> To enable kernel helper, leaving leading role to kernel:
-
-<tscreen><verb>
- arpd -b /var/tmp/arpd.db -a 1 eth0 eth1
-</verb></tscreen>
-
-<item> Completely replace kernel resolution on interfaces <tt/eth0/
-and <tt/eth1/. In this case kernel still does unicast probing to
-validate entries, but all the broadcast activity is suppressed
-and made under authority of <tt/arpd/:
-
-<tscreen><verb>
- arpd -b /var/tmp/arpd.db -a 3 -k eth0 eth1
-</verb></tscreen>
-
-This is mode which <tt/arpd/ is supposed to work normally.
-It is not default just to prevent occasional enabling of too aggressive
-mode occasionally.
-
-</enum>
-
-</article>
-
diff -Naur a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,6 @@
DATADIR?=$(PREFIX)/share
DOCDIR?=$(DATADIR)/doc/iproute2
MANDIR?=$(DATADIR)/man
-ARPDDIR?=/var/lib/arpd
KERNEL_INCLUDE?=/usr/include
BASH_COMPDIR?=$(DATADIR)/bash-completion/completions
@@ -62,7 +61,6 @@
install: all
install -m 0755 -d $(DESTDIR)$(SBINDIR)
install -m 0755 -d $(DESTDIR)$(CONFDIR)
- install -m 0755 -d $(DESTDIR)$(ARPDDIR)
install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples
install -m 0755 -d $(DESTDIR)$(DOCDIR)/examples/diffserv
install -m 0644 README.iproute2+tc $(shell find examples -maxdepth 1 -type f) \
diff -Naur a/man/man8/Makefile b/man/man8/Makefile
--- a/man/man8/Makefile
+++ b/man/man8/Makefile
@@ -1,6 +1,6 @@
TARGETS = ip-address.8 ip-link.8 ip-route.8
-MAN8PAGES = $(TARGETS) ip.8 arpd.8 lnstat.8 routel.8 rtacct.8 rtmon.8 rtpr.8 ss.8 \
+MAN8PAGES = $(TARGETS) ip.8 lnstat.8 routel.8 rtacct.8 rtmon.8 rtpr.8 ss.8 \
tc.8 tc-bfifo.8 tc-bpf.8 tc-cbq.8 tc-cbq-details.8 tc-choke.8 tc-codel.8 \
tc-fq.8 \
tc-drr.8 tc-ematch.8 tc-fq_codel.8 tc-hfsc.8 tc-htb.8 tc-pie.8 \
diff -Naur a/tc/Makefile b/tc/Makefile
--- a/tc/Makefile
+++ b/tc/Makefile
@@ -89,7 +89,7 @@
CFLAGS += -DTC_CONFIG_XT_H
TCSO += m_xt_old.so
else
- TCMODULES += m_ipt.o
+ TCMODULES +=
endif
endif
endif

View File

@@ -0,0 +1,12 @@
diff --git a/src/xdr_sizeof.c b/src/xdr_sizeof.c
index d23fbd1..79d6707 100644
--- a/src/xdr_sizeof.c
+++ b/src/xdr_sizeof.c
@@ -39,6 +39,7 @@
#include <rpc/xdr.h>
#include <sys/types.h>
#include <stdlib.h>
+#include <stdint.h>
#include "un-namespace.h"
/* ARGSUSED */

View File

@@ -0,0 +1,67 @@
From 193f1e81edd6b1b56b0eb0ff8aa4b41c7b4257b4 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Sun, 24 Sep 2017 09:12:58 -0400
Subject: glob: Do not assume glibc glob internals.
It has been proposed that glibc glob start using gl_lstat,
which the API allows it to do. GNU 'make' should not get in
the way of this. See:
https://sourceware.org/ml/libc-alpha/2017-09/msg00409.html
* dir.c (local_lstat): New function, like local_stat.
(dir_setup_glob): Use it to initialize gl_lstat too, as the API
requires.
---
dir.c | 29 +++++++++++++++++++++++++++--
1 file changed, 27 insertions(+), 2 deletions(-)
diff --git a/dir.c b/dir.c
index adbb8a9..c343e4c 100644
--- a/dir.c
+++ b/dir.c
@@ -1299,15 +1299,40 @@ local_stat (const char *path, struct stat *buf)
}
#endif
+/* Similarly for lstat. */
+#if !defined(lstat) && !defined(WINDOWS32) || defined(VMS)
+# ifndef VMS
+# ifndef HAVE_SYS_STAT_H
+int lstat (const char *path, struct stat *sbuf);
+# endif
+# else
+ /* We are done with the fake lstat. Go back to the real lstat */
+# ifdef lstat
+# undef lstat
+# endif
+# endif
+# define local_lstat lstat
+#elif defined(WINDOWS32)
+/* Windows doesn't support lstat(). */
+# define local_lstat local_stat
+#else
+static int
+local_lstat (const char *path, struct stat *buf)
+{
+ int e;
+ EINTRLOOP (e, lstat (path, buf));
+ return e;
+}
+#endif
+
void
dir_setup_glob (glob_t *gl)
{
gl->gl_opendir = open_dirstream;
gl->gl_readdir = read_dirstream;
gl->gl_closedir = free;
+ gl->gl_lstat = local_lstat;
gl->gl_stat = local_stat;
- /* We don't bother setting gl_lstat, since glob never calls it.
- The slot is only there for compatibility with 4.4 BSD. */
}
void
--
cgit v1.0-41-gc330

View File

@@ -0,0 +1,11 @@
--- make-4.2.1/configure.ac~ 2018-02-08 12:31:17.105922978 +0000
+++ make-4.2.1/configure.ac 2018-02-08 12:31:35.249509647 +0000
@@ -402,7 +402,7 @@ AC_CACHE_CHECK([if system libc has GNU g
#define GLOB_INTERFACE_VERSION 1
#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
# include <gnu-versions.h>
-# if _GNU_GLOB_INTERFACE_VERSION == GLOB_INTERFACE_VERSION
+# if _GNU_GLOB_INTERFACE_VERSION >= GLOB_INTERFACE_VERSION
gnu glob
# endif
#endif],

View File

@@ -0,0 +1,10 @@
--- nfs-utils-1.3.3/support/nsm/rpc.c~ 2018-02-11 17:01:31.137039166 +0000
+++ nfs-utils-1.3.3/support/nsm/rpc.c 2018-02-11 17:01:45.683511380 +0000
@@ -40,6 +40,7 @@
#include <time.h>
#include <stdbool.h>
+#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>

View File

@@ -1,12 +0,0 @@
diff -Naur postfix-2.10.0.org/makedefs postfix-2.10.0/makedefs
--- postfix-2.10.0.org/makedefs 2013-02-04 02:33:13.000000000 +0100
+++ postfix-2.10.0/makedefs 2017-02-08 10:10:56.713314716 +0100
@@ -347,7 +347,7 @@
fi;;
esac
;;
- Linux.3*) SYSTYPE=LINUX3
+ Linux.[34]*) SYSTYPE=LINUX3
case "$CCARGS" in
*-DNO_DB*) ;;
*) if [ -f /usr/include/db.h ]

View File

@@ -0,0 +1,57 @@
Upstream-Status: Backport
Signed-off-by: Ross Burton <ross.burton@intel.com>
From 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Tue, 28 Nov 2017 11:51:27 +0100
Subject: [PATCH] memfd: fix configure test
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Recent glibc added memfd_create in sys/mman.h. This conflicts with
the definition in util/memfd.c:
/builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12: error: static declaration of memfd_create follows non-static declaration
Fix the configure test, and remove the sys/memfd.h inclusion since the
file actually does not exist---it is a typo in the memfd_create(2) man
page.
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 2 +-
util/memfd.c | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/configure b/configure
index 9c8aa5a98b..99ccc1725a 100755
--- a/configure
+++ b/configure
@@ -3923,7 +3923,7 @@ fi
# check if memfd is supported
memfd=no
cat > $TMPC << EOF
-#include <sys/memfd.h>
+#include <sys/mman.h>
int main(void)
{
diff --git a/util/memfd.c b/util/memfd.c
index 4571d1aba8..412e94a405 100644
--- a/util/memfd.c
+++ b/util/memfd.c
@@ -31,9 +31,7 @@
#include "qemu/memfd.h"
-#ifdef CONFIG_MEMFD
-#include <sys/memfd.h>
-#elif defined CONFIG_LINUX
+#if defined CONFIG_LINUX && !defined CONFIG_MEMFD
#include <sys/syscall.h>
#include <asm/unistd.h>
--
2.11.0

View File

@@ -25,7 +25,7 @@ struct knic knics[20] = { { "" , "" , "" , "" } };
int main(int argc, char *argv[])
{
int choice;
char *sections[11]; /* need to fill this out AFTER knowning lang */
char *sections[8]; /* need to fill this out AFTER knowning lang */
int rc;
struct keyvalue *kv;
char lang[STRING_SIZE] = "en_US.utf8";
@@ -69,10 +69,9 @@ int main(int argc, char *argv[])
sections[2] = _("Hostname");
sections[3] = _("Domain name");
sections[4] = _("Networking");
sections[5] = _("ISDN");
sections[6] = _("'root' password");
sections[7] = _("'admin' password");
sections[8] = NULL;
sections[5] = _("'root' password");
sections[6] = _("'admin' password");
sections[7] = NULL;
newtInit();
newtCls();
@@ -124,14 +123,10 @@ int main(int argc, char *argv[])
break;
case 5:
handleisdn();
break;
case 6:
handlerootpassword();
break;
case 7:
case 6:
handleadminpassword();
break;
@@ -154,8 +149,6 @@ int main(int argc, char *argv[])
goto EXIT;
if (!(handleadminpassword()))
goto EXIT;
if (!(handleisdn()))
goto EXIT;
if (!(handlenetworking()))
goto EXIT;
if (!(handledhcp()))

View File

@@ -139,13 +139,3 @@ int writehostsfiles(void)
return 1;
}
int handleisdn(void)
{
char command[STRING_SIZE];
sprintf(command, "/etc/rc.d/init.d/mISDN config");
if (runcommandwithstatus(command, _("ISDN"), _("Scanning and configuring ISDN devices."), NULL))
errorbox(_("Unable to scan for ISDN devices."));
// Need to write some lines that count the cards and say the names...
return 1;
}

View File

@@ -32,7 +32,6 @@ int handleadminpassword(void);
/* misc.c */
int writehostsfiles(void);
int handleisdn(void);
/* keymap.c */
int handlekeymap(void);