mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
Merge remote-tracking branch 'pmueller/temp-cleanup-orphaned-items' into next
This commit is contained in:
8
lfs/bash
8
lfs/bash
@@ -1,7 +1,7 @@
|
||||
###############################################################################
|
||||
# #
|
||||
# IPFire.org - A linux based firewall #
|
||||
# Copyright (C) 2007-2020 IPFire Team <info@ipfire.org> #
|
||||
# Copyright (C) 2007-2021 IPFire Team <info@ipfire.org> #
|
||||
# #
|
||||
# This program is free software: you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
@@ -91,9 +91,9 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
cd $(DIR_APP) && patch -Np0 < $(DIR_SRC)/src/patches/bash/bash51-$$(printf "%03d" "$${i}") || exit 1; \
|
||||
done
|
||||
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/bash-4.0-paths-1.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/bash-4.0-profile-1.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/bash-3.2-ssh_source_bash.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/bash/bash-4.0-paths-1.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/bash/bash-4.0-profile-1.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/bash/bash-3.2-ssh_source_bash.patch
|
||||
|
||||
cd $(DIR_APP) && ./configure --prefix=$(PREFIX) $(CONFIGURE_OPTIONS)
|
||||
cd $(DIR_APP) && make $(MAKETUNING)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
###############################################################################
|
||||
# #
|
||||
# IPFire.org - A linux based firewall #
|
||||
# Copyright (C) 2007-2020 IPFire Team <info@ipfire.org> #
|
||||
# Copyright (C) 2007-2021 IPFire Team <info@ipfire.org> #
|
||||
# #
|
||||
# This program is free software: you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
@@ -93,8 +93,8 @@ $(subst %,%_MD5,$(objects)) :
|
||||
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
@$(PREBUILD)
|
||||
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/coreutils-8.27-uname-1.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/coreutils-8.32-i18n-1.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/coreutils/coreutils-8.27-uname-1.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/coreutils/coreutils-8.32-i18n-1.patch
|
||||
# this is upstream and also fix the aarch64 build
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/coreutils/ls-restore-8.31-behavior-on-removed-directories.patch
|
||||
cd $(DIR_APP) && FORCE_UNSAFE_CONFIGURE=1 && ./configure $(CONFIGURE_OPTIONS)
|
||||
|
||||
4
lfs/grub
4
lfs/grub
@@ -1,7 +1,7 @@
|
||||
###############################################################################
|
||||
# #
|
||||
# IPFire.org - A linux based firewall #
|
||||
# Copyright (C) 2007-2020 IPFire Team <info@ipfire.org> #
|
||||
# Copyright (C) 2007-2021 IPFire Team <info@ipfire.org> #
|
||||
# #
|
||||
# This program is free software: you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
@@ -99,7 +99,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
@rm -rf $(DIR_APP) $(DIR_APP_EFI) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
|
||||
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/grub/grub-2.04-BootHole.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/grub-2.02_disable_vga_fallback.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/grub/grub-2.02_disable_vga_fallback.patch
|
||||
cd $(DIR_APP) && autoreconf -vfi
|
||||
|
||||
# Install unifont
|
||||
|
||||
@@ -80,7 +80,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
|
||||
# Add patch for i586 to disable strong stack protector.
|
||||
ifeq "$(BUILD_ARCH)" "i586"
|
||||
cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/libloc-0.9.3-perl-i586-regular-stack-protector.patch
|
||||
cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/libloc/libloc-0.9.3-perl-i586-regular-stack-protector.patch
|
||||
endif
|
||||
|
||||
cd $(DIR_APP) && ./autogen.sh
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
diff -Naur Python-2.7-org/setup.py Python-2.7/setup.py
|
||||
--- Python-2.7-org/setup.py 2010-06-27 14:36:16.000000000 +0200
|
||||
+++ Python-2.7/setup.py 2010-07-13 22:23:04.000000000 +0200
|
||||
@@ -1125,7 +1125,7 @@
|
||||
'ndbm'):
|
||||
ndbm_libs = ['ndbm']
|
||||
else:
|
||||
- ndbm_libs = []
|
||||
+ ndbm_libs = ['gdbm', 'gdbm_compat' ]
|
||||
print "building dbm using ndbm"
|
||||
dbmext = Extension('dbm', ['dbmmodule.c'],
|
||||
define_macros=[
|
||||
@@ -1140,7 +1140,7 @@
|
||||
if self.compiler.find_library_file(lib_dirs,
|
||||
'gdbm_compat'):
|
||||
gdbm_libs.append('gdbm_compat')
|
||||
- if find_file("gdbm/ndbm.h", inc_dirs, []) is not None:
|
||||
+ if find_file("ndbm.h", inc_dirs, []) is not None:
|
||||
print "building dbm using gdbm"
|
||||
dbmext = Extension(
|
||||
'dbm', ['dbmmodule.c'],
|
||||
@@ -1,21 +0,0 @@
|
||||
diff -Naur Python-2.7-org/setup.py Python-2.7/setup.py
|
||||
--- Python-2.7-org/setup.py 2010-06-27 14:36:16.000000000 +0200
|
||||
+++ Python-2.7/setup.py 2010-07-13 22:23:04.000000000 +0200
|
||||
@@ -1125,7 +1125,7 @@
|
||||
'ndbm'):
|
||||
ndbm_libs = ['ndbm']
|
||||
else:
|
||||
- ndbm_libs = []
|
||||
+ ndbm_libs = ['gdbm', 'gdbm_compat' ]
|
||||
print "building dbm using ndbm"
|
||||
dbmext = Extension('dbm', ['dbmmodule.c'],
|
||||
define_macros=[
|
||||
@@ -1140,7 +1140,7 @@
|
||||
if self.compiler.find_library_file(lib_dirs,
|
||||
'gdbm_compat'):
|
||||
gdbm_libs.append('gdbm_compat')
|
||||
- if find_file("gdbm/ndbm.h", inc_dirs, []) is not None:
|
||||
+ if find_file("ndbm.h", inc_dirs, []) is not None:
|
||||
print "building dbm using gdbm"
|
||||
dbmext = Extension(
|
||||
'dbm', ['dbmmodule.c'],
|
||||
@@ -1,20 +0,0 @@
|
||||
diff -Nur arm.vanilla/src/util/hostnames.py arm/src/util/hostnames.py
|
||||
--- arm.vanilla/src/util/hostnames.py 2012-04-29 05:59:24.000000000 +0200
|
||||
+++ arm/src/util/hostnames.py 2013-07-31 17:59:19.245591564 +0200
|
||||
@@ -30,7 +30,6 @@
|
||||
import threading
|
||||
import itertools
|
||||
import Queue
|
||||
-import distutils.sysconfig
|
||||
|
||||
from util import log, sysTools
|
||||
|
||||
@@ -264,7 +263,7 @@
|
||||
# 'socket.gethostbyaddr'. The following checks if the system has the
|
||||
# gethostbyname_r function, which determines if python resolutions can be
|
||||
# done in parallel or not. If so, this is preferable.
|
||||
- isSocketResolutionParallel = distutils.sysconfig.get_config_var("HAVE_GETHOSTBYNAME_R")
|
||||
+ isSocketResolutionParallel = True #distutils.sysconfig.get_config_var("HAVE_GETHOSTBYNAME_R")
|
||||
self.useSocketResolution = CONFIG["queries.hostnames.useSocketModule"] and isSocketResolutionParallel
|
||||
|
||||
for _ in range(CONFIG["queries.hostnames.poolSize"]):
|
||||
@@ -1,24 +0,0 @@
|
||||
diff -Naur linux-3.14.76.org/arch/arm/mach-omap2/cclock3xxx_data.c linux-3.14.76/arch/arm/mach-omap2/cclock3xxx_data.c
|
||||
--- linux-3.14.76.org/arch/arm/mach-omap2/cclock3xxx_data.c 2016-08-18 06:26:02.000000000 +0200
|
||||
+++ linux-3.14.76/arch/arm/mach-omap2/cclock3xxx_data.c 2016-08-18 06:37:51.442186995 +0200
|
||||
@@ -250,7 +250,7 @@
|
||||
|
||||
static struct clk dpll1_ck;
|
||||
|
||||
-static struct clk_ops dpll1_ck_ops;
|
||||
+static clk_ops_no_const dpll1_ck_ops;
|
||||
|
||||
static struct clk_ops dpll1_ck_ops_34xx __initdata = {
|
||||
.init = &omap2_init_clk_clkdm,
|
||||
diff -Naur linux-3.14.76.org/net/ipv6/addrconf.c linux-3.14.76/net/ipv6/addrconf.c
|
||||
--- linux-3.14.76.org/net/ipv6/addrconf.c 2016-08-18 06:25:51.000000000 +0200
|
||||
+++ linux-3.14.76/net/ipv6/addrconf.c 2016-08-18 06:31:51.802186824 +0200
|
||||
@@ -4818,7 +4818,7 @@
|
||||
{
|
||||
struct inet6_dev *idev = ctl->extra1;
|
||||
int min_mtu = IPV6_MIN_MTU;
|
||||
- struct ctl_table lctl;
|
||||
+ ctl_table_no_const lctl;
|
||||
|
||||
lctl = *ctl;
|
||||
lctl.extra1 = &min_mtu;
|
||||
@@ -1,39 +0,0 @@
|
||||
diff -Naur compat-drivers-3.8.3-2-snpu.org/drivers/net/wireless/ath/regd.c compat-drivers-3.8.3-2-snpu/drivers/net/wireless/ath/regd.c
|
||||
--- compat-drivers-3.8.3-2-snpu.org/drivers/net/wireless/ath/regd.c 2013-03-15 22:55:09.000000000 +0100
|
||||
+++ compat-drivers-3.8.3-2-snpu/drivers/net/wireless/ath/regd.c 2013-08-22 11:51:36.793297656 +0200
|
||||
@@ -200,6 +200,8 @@
|
||||
u32 bandwidth = 0;
|
||||
int r;
|
||||
|
||||
+ return;
|
||||
+
|
||||
for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
|
||||
|
||||
if (!wiphy->bands[band])
|
||||
@@ -259,6 +261,8 @@
|
||||
u32 bandwidth = 0;
|
||||
int r;
|
||||
|
||||
+ return;
|
||||
+
|
||||
sband = wiphy->bands[IEEE80211_BAND_2GHZ];
|
||||
if (!sband)
|
||||
return;
|
||||
@@ -308,6 +312,8 @@
|
||||
struct ieee80211_channel *ch;
|
||||
unsigned int i;
|
||||
|
||||
+ return;
|
||||
+
|
||||
if (!wiphy->bands[IEEE80211_BAND_5GHZ])
|
||||
return;
|
||||
|
||||
@@ -514,6 +520,8 @@
|
||||
{
|
||||
const struct ieee80211_regdomain *regd;
|
||||
|
||||
+ return 0;
|
||||
+
|
||||
wiphy->reg_notifier = reg_notifier;
|
||||
wiphy->flags |= WIPHY_FLAG_STRICT_REGULATORY;
|
||||
|
||||
@@ -1,423 +0,0 @@
|
||||
diff -up cups-1.7.5/cgi-bin/ipp-var.c.str4609 cups-1.7.5/cgi-bin/ipp-var.c
|
||||
--- cups-1.7.5/cgi-bin/ipp-var.c.str4609 2014-05-22 15:59:21.000000000 +0200
|
||||
+++ cups-1.7.5/cgi-bin/ipp-var.c 2015-06-10 10:31:45.297965345 +0200
|
||||
@@ -1206,21 +1206,7 @@ cgiSetIPPObjectVars(
|
||||
* Rewrite URIs...
|
||||
*/
|
||||
|
||||
- if (!strcmp(name, "member_uris"))
|
||||
- {
|
||||
- char url[1024]; /* URL for class member... */
|
||||
-
|
||||
-
|
||||
- cgiRewriteURL(attr->values[i].string.text, url,
|
||||
- sizeof(url), NULL);
|
||||
-
|
||||
- snprintf(valptr, sizeof(value) - (valptr - value),
|
||||
- "<A HREF=\"%s\">%s</A>", url,
|
||||
- strrchr(attr->values[i].string.text, '/') + 1);
|
||||
- }
|
||||
- else
|
||||
- cgiRewriteURL(attr->values[i].string.text, valptr,
|
||||
- sizeof(value) - (valptr - value), NULL);
|
||||
+ cgiRewriteURL(attr->values[i].string.text, valptr, sizeof(value) - (valptr - value), NULL);
|
||||
break;
|
||||
}
|
||||
|
||||
diff -up cups-1.7.5/cgi-bin/template.c.str4609 cups-1.7.5/cgi-bin/template.c
|
||||
--- cups-1.7.5/cgi-bin/template.c.str4609 2014-03-05 22:11:32.000000000 +0100
|
||||
+++ cups-1.7.5/cgi-bin/template.c 2015-06-10 10:31:45.297965345 +0200
|
||||
@@ -659,39 +659,7 @@ cgi_puts(const char *s, /* I - String
|
||||
while (*s)
|
||||
{
|
||||
if (*s == '<')
|
||||
- {
|
||||
- /*
|
||||
- * Pass <A HREF="url"> and </A>, otherwise quote it...
|
||||
- */
|
||||
-
|
||||
- if (!_cups_strncasecmp(s, "<A HREF=\"", 9))
|
||||
- {
|
||||
- fputs("<A HREF=\"", out);
|
||||
- s += 9;
|
||||
-
|
||||
- while (*s && *s != '\"')
|
||||
- {
|
||||
- if (*s == '&')
|
||||
- fputs("&", out);
|
||||
- else
|
||||
- putc(*s, out);
|
||||
-
|
||||
- s ++;
|
||||
- }
|
||||
-
|
||||
- if (*s)
|
||||
- s ++;
|
||||
-
|
||||
- fputs("\">", out);
|
||||
- }
|
||||
- else if (!_cups_strncasecmp(s, "</A>", 4))
|
||||
- {
|
||||
- fputs("</A>", out);
|
||||
- s += 3;
|
||||
- }
|
||||
- else
|
||||
- fputs("<", out);
|
||||
- }
|
||||
+ fputs("<", out);
|
||||
else if (*s == '>')
|
||||
fputs(">", out);
|
||||
else if (*s == '\"')
|
||||
diff -up cups-1.7.5/scheduler/client.c.str4609 cups-1.7.5/scheduler/client.c
|
||||
--- cups-1.7.5/scheduler/client.c.str4609 2015-06-10 10:31:45.280965399 +0200
|
||||
+++ cups-1.7.5/scheduler/client.c 2015-06-10 10:31:45.300965335 +0200
|
||||
@@ -598,7 +598,12 @@ cupsdCloseClient(cupsd_client_t *con) /*
|
||||
httpClearCookie(HTTP(con));
|
||||
httpClearFields(HTTP(con));
|
||||
|
||||
- cupsdClearString(&con->filename);
|
||||
+ if (con->filename)
|
||||
+ {
|
||||
+ unlink(con->filename);
|
||||
+ cupsdClearString(&con->filename);
|
||||
+ }
|
||||
+
|
||||
cupsdClearString(&con->command);
|
||||
cupsdClearString(&con->options);
|
||||
cupsdClearString(&con->query_string);
|
||||
diff -up cups-1.7.5/scheduler/env.c.str4609 cups-1.7.5/scheduler/env.c
|
||||
--- cups-1.7.5/scheduler/env.c.str4609 2015-06-10 10:31:45.208965629 +0200
|
||||
+++ cups-1.7.5/scheduler/env.c 2015-06-10 10:31:45.300965335 +0200
|
||||
@@ -131,6 +131,13 @@ cupsdSetEnv(const char *name, /* I - Na
|
||||
return;
|
||||
|
||||
/*
|
||||
+ * Do not allow dynamic linker variables when running as root...
|
||||
+ */
|
||||
+
|
||||
+ if (!RunUser && (!strncmp(name, "DYLD_", 5) || !strncmp(name, "LD_", 3)))
|
||||
+ return;
|
||||
+
|
||||
+ /*
|
||||
* See if this variable has already been defined...
|
||||
*/
|
||||
|
||||
diff -up cups-1.7.5/scheduler/ipp.c.str4609 cups-1.7.5/scheduler/ipp.c
|
||||
--- cups-1.7.5/scheduler/ipp.c.str4609 2015-06-10 10:31:45.287965377 +0200
|
||||
+++ cups-1.7.5/scheduler/ipp.c 2015-06-10 10:31:45.299965339 +0200
|
||||
@@ -412,8 +412,7 @@ cupsdProcessIPPRequest(
|
||||
* Remote unauthenticated user masquerading as local root...
|
||||
*/
|
||||
|
||||
- _cupsStrFree(username->values[0].string.text);
|
||||
- username->values[0].string.text = _cupsStrAlloc(RemoteRoot);
|
||||
+ ippSetString(con->request, &username, 0, RemoteRoot);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1576,7 +1575,7 @@ add_job(cupsd_client_t *con, /* I - Cl
|
||||
cupsdSetString(&job->username, con->username);
|
||||
|
||||
if (attr)
|
||||
- cupsdSetString(&attr->values[0].string.text, con->username);
|
||||
+ ippSetString(job->attrs, &attr, 0, con->username);
|
||||
}
|
||||
else if (attr)
|
||||
{
|
||||
@@ -1594,9 +1593,8 @@ add_job(cupsd_client_t *con, /* I - Cl
|
||||
"job-originating-user-name", NULL, job->username);
|
||||
else
|
||||
{
|
||||
- attr->group_tag = IPP_TAG_JOB;
|
||||
- _cupsStrFree(attr->name);
|
||||
- attr->name = _cupsStrAlloc("job-originating-user-name");
|
||||
+ ippSetGroupTag(job->attrs, &attr, IPP_TAG_JOB);
|
||||
+ ippSetName(job->attrs, &attr, "job-originating-user-name");
|
||||
}
|
||||
|
||||
if (con->username[0] || auth_info)
|
||||
@@ -1630,48 +1628,11 @@ add_job(cupsd_client_t *con, /* I - Cl
|
||||
* Also, we can only have 1 value and it must be a name value.
|
||||
*/
|
||||
|
||||
- switch (attr->value_tag)
|
||||
- {
|
||||
- case IPP_TAG_STRING :
|
||||
- case IPP_TAG_TEXTLANG :
|
||||
- case IPP_TAG_NAMELANG :
|
||||
- case IPP_TAG_TEXT :
|
||||
- case IPP_TAG_NAME :
|
||||
- case IPP_TAG_KEYWORD :
|
||||
- case IPP_TAG_URI :
|
||||
- case IPP_TAG_URISCHEME :
|
||||
- case IPP_TAG_CHARSET :
|
||||
- case IPP_TAG_LANGUAGE :
|
||||
- case IPP_TAG_MIMETYPE :
|
||||
- /*
|
||||
- * Free old strings...
|
||||
- */
|
||||
-
|
||||
- for (i = 0; i < attr->num_values; i ++)
|
||||
- {
|
||||
- _cupsStrFree(attr->values[i].string.text);
|
||||
- attr->values[i].string.text = NULL;
|
||||
- if (attr->values[i].string.language)
|
||||
- {
|
||||
- _cupsStrFree(attr->values[i].string.language);
|
||||
- attr->values[i].string.language = NULL;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- default :
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- /*
|
||||
- * Use the default connection hostname instead...
|
||||
- */
|
||||
-
|
||||
- attr->value_tag = IPP_TAG_NAME;
|
||||
- attr->num_values = 1;
|
||||
- attr->values[0].string.text = _cupsStrAlloc(con->http.hostname);
|
||||
+ ippDeleteAttribute(job->attrs, attr);
|
||||
+ ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_NAME, "job-originating-host-name", NULL, con->http.hostname);
|
||||
}
|
||||
-
|
||||
- attr->group_tag = IPP_TAG_JOB;
|
||||
+ else
|
||||
+ ippSetGroupTag(job->attrs, &attr, IPP_TAG_JOB);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1767,8 +1728,8 @@ add_job(cupsd_client_t *con, /* I - Cl
|
||||
|
||||
attr = ippAddStrings(job->attrs, IPP_TAG_JOB, IPP_TAG_NAME, "job-sheets",
|
||||
2, NULL, NULL);
|
||||
- attr->values[0].string.text = _cupsStrRetain(printer->job_sheets[0]);
|
||||
- attr->values[1].string.text = _cupsStrRetain(printer->job_sheets[1]);
|
||||
+ ippSetString(job->attrs, &attr, 0, printer->job_sheets[0]);
|
||||
+ ippSetString(job->attrs, &attr, 1, printer->job_sheets[1]);
|
||||
}
|
||||
|
||||
job->job_sheets = attr;
|
||||
@@ -1794,7 +1755,7 @@ add_job(cupsd_client_t *con, /* I - Cl
|
||||
* Force the leading banner to have the classification on it...
|
||||
*/
|
||||
|
||||
- cupsdSetString(&attr->values[0].string.text, Classification);
|
||||
+ ippSetString(job->attrs, &attr, 0, Classification);
|
||||
|
||||
cupsdLogJob(job, CUPSD_LOG_NOTICE, "CLASSIFICATION FORCED "
|
||||
"job-sheets=\"%s,none\", "
|
||||
@@ -1811,7 +1772,7 @@ add_job(cupsd_client_t *con, /* I - Cl
|
||||
* Can't put two different security markings on the same document!
|
||||
*/
|
||||
|
||||
- cupsdSetString(&attr->values[1].string.text, attr->values[0].string.text);
|
||||
+ ippSetString(job->attrs, &attr, 1, attr->values[0].string.text);
|
||||
|
||||
cupsdLogJob(job, CUPSD_LOG_NOTICE, "CLASSIFICATION FORCED "
|
||||
"job-sheets=\"%s,%s\", "
|
||||
@@ -1851,18 +1812,18 @@ add_job(cupsd_client_t *con, /* I - Cl
|
||||
if (attr->num_values > 1 &&
|
||||
!strcmp(attr->values[0].string.text, attr->values[1].string.text))
|
||||
{
|
||||
- cupsdSetString(&(attr->values[0].string.text), Classification);
|
||||
- cupsdSetString(&(attr->values[1].string.text), Classification);
|
||||
+ ippSetString(job->attrs, &attr, 0, Classification);
|
||||
+ ippSetString(job->attrs, &attr, 1, Classification);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (attr->num_values == 1 ||
|
||||
strcmp(attr->values[0].string.text, "none"))
|
||||
- cupsdSetString(&(attr->values[0].string.text), Classification);
|
||||
+ ippSetString(job->attrs, &attr, 0, Classification);
|
||||
|
||||
if (attr->num_values > 1 &&
|
||||
strcmp(attr->values[1].string.text, "none"))
|
||||
- cupsdSetString(&(attr->values[1].string.text), Classification);
|
||||
+ ippSetString(job->attrs, &attr, 1, Classification);
|
||||
}
|
||||
|
||||
if (attr->num_values > 1)
|
||||
@@ -3098,8 +3059,8 @@ authenticate_job(cupsd_client_t *con, /
|
||||
|
||||
if (attr)
|
||||
{
|
||||
- attr->value_tag = IPP_TAG_KEYWORD;
|
||||
- cupsdSetString(&(attr->values[0].string.text), "no-hold");
|
||||
+ ippSetValueTag(job->attrs, &attr, IPP_TAG_KEYWORD);
|
||||
+ ippSetString(job->attrs, &attr, 0, "no-hold");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -8224,11 +8185,7 @@ print_job(cupsd_client_t *con, /* I -
|
||||
filetype->type);
|
||||
|
||||
if (format)
|
||||
- {
|
||||
- _cupsStrFree(format->values[0].string.text);
|
||||
-
|
||||
- format->values[0].string.text = _cupsStrAlloc(mimetype);
|
||||
- }
|
||||
+ ippSetString(con->request, &format, 0, mimetype);
|
||||
else
|
||||
ippAddString(con->request, IPP_TAG_JOB, IPP_TAG_MIMETYPE,
|
||||
"document-format", NULL, mimetype);
|
||||
@@ -8765,10 +8722,8 @@ release_job(cupsd_client_t *con, /* I -
|
||||
|
||||
if (attr)
|
||||
{
|
||||
- _cupsStrFree(attr->values[0].string.text);
|
||||
-
|
||||
- attr->value_tag = IPP_TAG_KEYWORD;
|
||||
- attr->values[0].string.text = _cupsStrAlloc("no-hold");
|
||||
+ ippSetValueTag(job->attrs, &attr, IPP_TAG_KEYWORD);
|
||||
+ ippSetString(job->attrs, &attr, 0, "no-hold");
|
||||
|
||||
cupsdAddEvent(CUPSD_EVENT_JOB_CONFIG_CHANGED, cupsdFindDest(job->dest), job,
|
||||
"Job job-hold-until value changed by user.");
|
||||
@@ -9461,11 +9416,7 @@ send_document(cupsd_client_t *con, /* I
|
||||
|
||||
if ((jformat = ippFindAttribute(job->attrs, "document-format",
|
||||
IPP_TAG_MIMETYPE)) != NULL)
|
||||
- {
|
||||
- _cupsStrFree(jformat->values[0].string.text);
|
||||
-
|
||||
- jformat->values[0].string.text = _cupsStrAlloc(mimetype);
|
||||
- }
|
||||
+ ippSetString(job->attrs, &jformat, 0, mimetype);
|
||||
else
|
||||
ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_MIMETYPE,
|
||||
"document-format", NULL, mimetype);
|
||||
diff -up cups-1.7.5/scheduler/job.c.str4609 cups-1.7.5/scheduler/job.c
|
||||
--- cups-1.7.5/scheduler/job.c.str4609 2015-06-10 10:31:45.288965374 +0200
|
||||
+++ cups-1.7.5/scheduler/job.c 2015-06-10 10:31:45.299965339 +0200
|
||||
@@ -375,7 +375,7 @@ cupsdCheckJobs(void)
|
||||
|
||||
if ((attr = ippFindAttribute(job->attrs, "job-actual-printer-uri",
|
||||
IPP_TAG_URI)) != NULL)
|
||||
- cupsdSetString(&attr->values[0].string.text, printer->uri);
|
||||
+ ippSetString(job->attrs, &attr, 0, printer->uri);
|
||||
else
|
||||
ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_URI,
|
||||
"job-actual-printer-uri", NULL, printer->uri);
|
||||
@@ -2109,7 +2109,7 @@ cupsdMoveJob(cupsd_job_t *job, /* I
|
||||
|
||||
if ((attr = ippFindAttribute(job->attrs, "job-printer-uri",
|
||||
IPP_TAG_URI)) != NULL)
|
||||
- cupsdSetString(&(attr->values[0].string.text), p->uri);
|
||||
+ ippSetString(job->attrs, &attr, 0, p->uri);
|
||||
|
||||
cupsdAddEvent(CUPSD_EVENT_JOB_STOPPED, p, job,
|
||||
"Job #%d moved from %s to %s.", job->id, olddest,
|
||||
@@ -2306,7 +2306,7 @@ cupsdSetJobHoldUntil(cupsd_job_t *job, /
|
||||
attr = ippFindAttribute(job->attrs, "job-hold-until", IPP_TAG_NAME);
|
||||
|
||||
if (attr)
|
||||
- cupsdSetString(&(attr->values[0].string.text), when);
|
||||
+ ippSetString(job->attrs, &attr, 0, when);
|
||||
else
|
||||
attr = ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_KEYWORD,
|
||||
"job-hold-until", NULL, when);
|
||||
@@ -2560,8 +2560,8 @@ cupsdSetJobState(
|
||||
|
||||
if (attr)
|
||||
{
|
||||
- attr->value_tag = IPP_TAG_KEYWORD;
|
||||
- cupsdSetString(&(attr->values[0].string.text), "no-hold");
|
||||
+ ippSetValueTag(job->attrs, &attr, IPP_TAG_KEYWORD);
|
||||
+ ippSetString(job->attrs, &attr, 0, "no-hold");
|
||||
}
|
||||
|
||||
default :
|
||||
@@ -4598,7 +4598,7 @@ start_job(cupsd_job_t *job, /* I -
|
||||
"job-printer-state-message",
|
||||
IPP_TAG_TEXT);
|
||||
if (job->printer_message)
|
||||
- cupsdSetString(&(job->printer_message->values[0].string.text), "");
|
||||
+ ippSetString(job->attrs, &job->printer_message, 0, "");
|
||||
|
||||
ippSetString(job->attrs, &job->reasons, 0, "job-printing");
|
||||
cupsdSetJobState(job, IPP_JOB_PROCESSING, CUPSD_JOB_DEFAULT, NULL);
|
||||
@@ -5216,15 +5216,14 @@ update_job_attrs(cupsd_job_t *job, /* I
|
||||
if (job->state_value != IPP_JOB_PROCESSING &&
|
||||
job->status_level == CUPSD_LOG_INFO)
|
||||
{
|
||||
- cupsdSetString(&(job->printer_message->values[0].string.text), "");
|
||||
+ ippSetString(job->attrs, &job->printer_message, 0, "");
|
||||
|
||||
job->dirty = 1;
|
||||
cupsdMarkDirty(CUPSD_DIRTY_JOBS);
|
||||
}
|
||||
else if (job->printer->state_message[0] && do_message)
|
||||
{
|
||||
- cupsdSetString(&(job->printer_message->values[0].string.text),
|
||||
- job->printer->state_message);
|
||||
+ ippSetString(job->attrs, &job->printer_message, 0, job->printer->state_message);
|
||||
|
||||
job->dirty = 1;
|
||||
cupsdMarkDirty(CUPSD_DIRTY_JOBS);
|
||||
diff -up cups-1.7.5/scheduler/main.c.str4609 cups-1.7.5/scheduler/main.c
|
||||
--- cups-1.7.5/scheduler/main.c.str4609 2015-06-10 10:31:45.265965447 +0200
|
||||
+++ cups-1.7.5/scheduler/main.c 2015-06-10 10:31:45.300965335 +0200
|
||||
@@ -1205,8 +1205,8 @@ cupsdAddString(cups_array_t **a, /* IO -
|
||||
if (!*a)
|
||||
*a = cupsArrayNew3((cups_array_func_t)strcmp, NULL,
|
||||
(cups_ahash_func_t)NULL, 0,
|
||||
- (cups_acopy_func_t)_cupsStrAlloc,
|
||||
- (cups_afree_func_t)_cupsStrFree);
|
||||
+ (cups_acopy_func_t)strdup,
|
||||
+ (cups_afree_func_t)free);
|
||||
|
||||
return (cupsArrayAdd(*a, (char *)s));
|
||||
}
|
||||
@@ -1236,7 +1236,7 @@ cupsdClearString(char **s) /* O - Strin
|
||||
{
|
||||
if (s && *s)
|
||||
{
|
||||
- _cupsStrFree(*s);
|
||||
+ free(*s);
|
||||
*s = NULL;
|
||||
}
|
||||
}
|
||||
@@ -1317,10 +1317,10 @@ cupsdSetString(char **s, /* O - N
|
||||
return;
|
||||
|
||||
if (*s)
|
||||
- _cupsStrFree(*s);
|
||||
+ free(*s);
|
||||
|
||||
if (v)
|
||||
- *s = _cupsStrAlloc(v);
|
||||
+ *s = strdup(v);
|
||||
else
|
||||
*s = NULL;
|
||||
}
|
||||
@@ -1351,13 +1351,13 @@ cupsdSetStringf(char **s, /* O -
|
||||
vsnprintf(v, sizeof(v), f, ap);
|
||||
va_end(ap);
|
||||
|
||||
- *s = _cupsStrAlloc(v);
|
||||
+ *s = strdup(v);
|
||||
}
|
||||
else
|
||||
*s = NULL;
|
||||
|
||||
if (olds)
|
||||
- _cupsStrFree(olds);
|
||||
+ free(olds);
|
||||
}
|
||||
|
||||
|
||||
@@ -1804,8 +1804,7 @@ process_children(void)
|
||||
}
|
||||
|
||||
if (job->printer_message)
|
||||
- cupsdSetString(&(job->printer_message->values[0].string.text),
|
||||
- message);
|
||||
+ ippSetString(job->attrs, &job->printer_message, 0, message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,111 +0,0 @@
|
||||
Submitted By: Dan Nicholson <dnicholson AT linuxfromscratch DOT org>
|
||||
Date: 2006-09-02
|
||||
Initial Package Version: 4.4.20
|
||||
Origin: Upstream - http://www.sleepycat.com/update/4.4.20/patch.4.4.20.html
|
||||
Description: Bug fixes provided by the developer. Contains patches 1-4.
|
||||
|
||||
diff -pNur db-4.4.20.orig/db/db_cam.c db-4.4.20/db/db_cam.c
|
||||
--- db-4.4.20.orig/db/db_cam.c 2006-01-10 16:19:21.000000000 +0000
|
||||
+++ db-4.4.20/db/db_cam.c 2006-08-03 14:31:20.220319610 +0000
|
||||
@@ -579,11 +579,12 @@ __db_c_get(dbc_arg, key, data, flags)
|
||||
flags == DB_NEXT || flags == DB_NEXT_DUP || flags == DB_PREV)) {
|
||||
if (tmp_rmw && (ret = dbc_arg->c_am_writelock(dbc_arg)) != 0)
|
||||
return (ret);
|
||||
- if ((ret = __db_c_idup(cp->opd, &opd, DB_POSITION)) != 0)
|
||||
+ if (F_ISSET(dbc_arg, DBC_TRANSIENT))
|
||||
+ opd = cp->opd;
|
||||
+ else if ((ret = __db_c_idup(cp->opd, &opd, DB_POSITION)) != 0)
|
||||
return (ret);
|
||||
|
||||
- switch (ret =
|
||||
- opd->c_am_get(opd, key, data, flags, NULL)) {
|
||||
+ switch (ret = opd->c_am_get(opd, key, data, flags, NULL)) {
|
||||
case 0:
|
||||
goto done;
|
||||
case DB_NOTFOUND:
|
||||
@@ -596,12 +597,18 @@ __db_c_get(dbc_arg, key, data, flags)
|
||||
if ((ret = __db_c_close(opd)) != 0)
|
||||
goto err;
|
||||
opd = NULL;
|
||||
+ if (F_ISSET(dbc_arg, DBC_TRANSIENT))
|
||||
+ cp->opd = NULL;
|
||||
break;
|
||||
}
|
||||
goto err;
|
||||
default:
|
||||
goto err;
|
||||
}
|
||||
+ } else if (cp->opd != NULL && F_ISSET(dbc_arg, DBC_TRANSIENT)) {
|
||||
+ if ((ret = __db_c_close(cp->opd)) != 0)
|
||||
+ goto err;
|
||||
+ cp->opd = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
diff -pNur db-4.4.20.orig/mp/mp_fget.c db-4.4.20/mp/mp_fget.c
|
||||
--- db-4.4.20.orig/mp/mp_fget.c 2005-10-12 17:53:36.000000000 +0000
|
||||
+++ db-4.4.20/mp/mp_fget.c 2006-08-03 14:31:20.223318410 +0000
|
||||
@@ -587,8 +587,11 @@ alloc: /*
|
||||
*/
|
||||
if (state != SECOND_MISS && bhp->ref == 1) {
|
||||
bhp->priority = UINT32_MAX;
|
||||
- SH_TAILQ_REMOVE(&hp->hash_bucket, bhp, hq, __bh);
|
||||
- SH_TAILQ_INSERT_TAIL(&hp->hash_bucket, bhp, hq);
|
||||
+ if (SH_TAILQ_FIRST(&hp->hash_bucket, __bh) !=
|
||||
+ SH_TAILQ_LAST(&hp->hash_bucket, hq, __bh)) {
|
||||
+ SH_TAILQ_REMOVE(&hp->hash_bucket, bhp, hq, __bh);
|
||||
+ SH_TAILQ_INSERT_TAIL(&hp->hash_bucket, bhp, hq);
|
||||
+ }
|
||||
hp->hash_priority =
|
||||
SH_TAILQ_FIRSTP(&hp->hash_bucket, __bh)->priority;
|
||||
}
|
||||
diff -pNur db-4.4.20.orig/qam/qam_files.c db-4.4.20/qam/qam_files.c
|
||||
--- db-4.4.20.orig/qam/qam_files.c 2005-10-20 18:57:12.000000000 +0000
|
||||
+++ db-4.4.20/qam/qam_files.c 2006-08-03 14:31:20.211323209 +0000
|
||||
@@ -411,6 +411,12 @@ __qam_fremove(dbp, pgnoaddr)
|
||||
DB_APP_DATA, buf, 0, NULL, &real_name)) != 0)
|
||||
goto err;
|
||||
#endif
|
||||
+
|
||||
+ mpf = array->mpfarray[offset].mpf;
|
||||
+ /* This extent my already be marked for delete and closed. */
|
||||
+ if (mpf == NULL)
|
||||
+ goto err;
|
||||
+
|
||||
/*
|
||||
* The log must be flushed before the file is deleted. We depend on
|
||||
* the log record of the last delete to recreate the file if we crash.
|
||||
@@ -418,7 +424,6 @@ __qam_fremove(dbp, pgnoaddr)
|
||||
if (LOGGING_ON(dbenv) && (ret = __log_flush(dbenv, NULL)) != 0)
|
||||
goto err;
|
||||
|
||||
- mpf = array->mpfarray[offset].mpf;
|
||||
(void)__memp_set_flags(mpf, DB_MPOOL_UNLINK, 1);
|
||||
/* Someone could be real slow, let them close it down. */
|
||||
if (array->mpfarray[offset].pinref != 0)
|
||||
diff -pNur db-4.4.20.orig/txn/txn.c db-4.4.20/txn/txn.c
|
||||
--- db-4.4.20.orig/txn/txn.c 2005-11-01 14:50:03.000000000 +0000
|
||||
+++ db-4.4.20/txn/txn.c 2006-08-03 14:31:20.215321609 +0000
|
||||
@@ -1049,12 +1049,14 @@ __txn_set_name(txn, name)
|
||||
return (ret);
|
||||
memcpy(txn->name, name, len);
|
||||
|
||||
+ TXN_SYSTEM_LOCK(dbenv);
|
||||
if (td->name != INVALID_ROFF) {
|
||||
__db_shalloc_free(
|
||||
&mgr->reginfo, R_ADDR(&mgr->reginfo, td->name));
|
||||
td->name = INVALID_ROFF;
|
||||
}
|
||||
if ((ret = __db_shalloc(&mgr->reginfo, len, 0, &p)) != 0) {
|
||||
+ TXN_SYSTEM_UNLOCK(dbenv);
|
||||
__db_err(dbenv,
|
||||
"Unable to allocate memory for transaction name");
|
||||
|
||||
@@ -1063,6 +1065,7 @@ __txn_set_name(txn, name)
|
||||
|
||||
return (ret);
|
||||
}
|
||||
+ TXN_SYSTEM_UNLOCK(dbenv);
|
||||
td->name = R_OFFSET(&mgr->reginfo, p);
|
||||
memcpy(p, name, len);
|
||||
|
||||
@@ -1,802 +0,0 @@
|
||||
Submitted by: Alexander E. Patrakov
|
||||
Date: 2005-08-13
|
||||
Initial Package Version: 2.8.1
|
||||
Upstream Status: Unknown, but required for LSB >= 2.0 certification
|
||||
Origin: RedHat
|
||||
Description: Fixes treatment of whitespace in multibyte locales.
|
||||
|
||||
--- diffutils-2.8.4/src/diff.c.i18n 2002-06-17 01:55:42.000000000 -0400
|
||||
+++ diffutils-2.8.4/src/diff.c 2002-11-16 18:41:37.000000000 -0500
|
||||
@@ -275,6 +275,13 @@
|
||||
re_set_syntax (RE_SYNTAX_GREP | RE_NO_POSIX_BACKTRACKING);
|
||||
excluded = new_exclude ();
|
||||
|
||||
+#ifdef HANDLE_MULTIBYTE
|
||||
+ if (MB_CUR_MAX > 1)
|
||||
+ lines_differ = lines_differ_multibyte;
|
||||
+ else
|
||||
+#endif
|
||||
+ lines_differ = lines_differ_singlebyte;
|
||||
+
|
||||
/* Decode the options. */
|
||||
|
||||
while ((c = getopt_long (argc, argv, shortopts, longopts, 0)) != -1)
|
||||
--- diffutils-2.8.4/src/diff.h.i18n 2002-11-16 18:31:32.000000000 -0500
|
||||
+++ diffutils-2.8.4/src/diff.h 2002-11-16 18:48:58.000000000 -0500
|
||||
@@ -23,6 +23,19 @@
|
||||
#include "system.h"
|
||||
#include <stdio.h>
|
||||
|
||||
+/* For platform which support the ISO C amendement 1 functionality we
|
||||
+ support user defined character classes. */
|
||||
+#if defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H
|
||||
+/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
|
||||
+# include <wchar.h>
|
||||
+# include <wctype.h>
|
||||
+# if defined (HAVE_MBRTOWC)
|
||||
+# define HANDLE_MULTIBYTE 1
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
+#define TAB_WIDTH 8
|
||||
+
|
||||
/* What kind of changes a hunk contains. */
|
||||
enum changes
|
||||
{
|
||||
@@ -350,7 +363,13 @@
|
||||
extern char const pr_program[];
|
||||
char *concat (char const *, char const *, char const *);
|
||||
char *dir_file_pathname (char const *, char const *);
|
||||
-bool lines_differ (char const *, char const *);
|
||||
+
|
||||
+bool (*lines_differ) (char const *, char const *);
|
||||
+bool lines_differ_singlebyte (char const *, char const *);
|
||||
+#ifdef HANDLE_MULTIBYTE
|
||||
+bool lines_differ_multibyte (char const *, char const *);
|
||||
+#endif
|
||||
+
|
||||
lin translate_line_number (struct file_data const *, lin);
|
||||
struct change *find_change (struct change *);
|
||||
struct change *find_reverse_change (struct change *);
|
||||
--- diffutils-2.8.4/src/io.c.i18n 2002-06-11 02:06:32.000000000 -0400
|
||||
+++ diffutils-2.8.4/src/io.c 2002-11-16 18:57:30.000000000 -0500
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <regex.h>
|
||||
#include <setmode.h>
|
||||
#include <xalloc.h>
|
||||
+#include <assert.h>
|
||||
|
||||
/* Rotate an unsigned value to the left. */
|
||||
#define ROL(v, n) ((v) << (n) | (v) >> (sizeof (v) * CHAR_BIT - (n)))
|
||||
@@ -213,6 +214,28 @@
|
||||
|
||||
/* Split the file into lines, simultaneously computing the equivalence
|
||||
class for each line. */
|
||||
+#ifdef HANDLE_MULTIBYTE
|
||||
+# define MBC2WC(P, END, MBLENGTH, WC, STATE, CONVFAIL) \
|
||||
+do \
|
||||
+{ \
|
||||
+ mbstate_t state_bak = STATE; \
|
||||
+ \
|
||||
+ CONVFAIL = 0; \
|
||||
+ MBLENGTH = mbrtowc (&WC, P, END - (char const *)P, &STATE); \
|
||||
+ \
|
||||
+ switch (MBLENGTH) \
|
||||
+ { \
|
||||
+ case (size_t)-2: \
|
||||
+ case (size_t)-1: \
|
||||
+ STATE = state_bak; \
|
||||
+ ++CONVFAIL; \
|
||||
+ /* Fall through. */ \
|
||||
+ case 0: \
|
||||
+ MBLENGTH = 1; \
|
||||
+ } \
|
||||
+} \
|
||||
+while (0)
|
||||
+#endif
|
||||
|
||||
static void
|
||||
find_and_hash_each_line (struct file_data *current)
|
||||
@@ -239,12 +262,280 @@
|
||||
bool same_length_diff_contents_compare_anyway =
|
||||
diff_length_compare_anyway | ignore_case;
|
||||
|
||||
+#ifdef HANDLE_MULTIBYTE
|
||||
+ wchar_t wc;
|
||||
+ size_t mblength;
|
||||
+ mbstate_t state;
|
||||
+ int convfail;
|
||||
+
|
||||
+ memset (&state, '\0', sizeof (mbstate_t));
|
||||
+#endif
|
||||
+
|
||||
while ((char const *) p < suffix_begin)
|
||||
{
|
||||
char const *ip = (char const *) p;
|
||||
|
||||
h = 0;
|
||||
+#ifdef HANDLE_MULTIBYTE
|
||||
+ if (MB_CUR_MAX > 1)
|
||||
+ {
|
||||
+ wchar_t lo_wc;
|
||||
+ char mbc[MB_LEN_MAX];
|
||||
+ mbstate_t state_wc;
|
||||
+
|
||||
+ /* Hash this line until we find a newline. */
|
||||
+ switch (ignore_white_space)
|
||||
+ {
|
||||
+ case IGNORE_ALL_SPACE:
|
||||
+ while (1)
|
||||
+ {
|
||||
+ if (*p == '\n')
|
||||
+ {
|
||||
+ ++p;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ MBC2WC (p, suffix_begin, mblength, wc, state, convfail);
|
||||
+
|
||||
+ if (convfail)
|
||||
+ mbc[0] = *p++;
|
||||
+ else if (!iswspace (wc))
|
||||
+ {
|
||||
+ bool flag = 0;
|
||||
+
|
||||
+ if (ignore_case)
|
||||
+ {
|
||||
+ lo_wc = towlower (wc);
|
||||
+ if (lo_wc != wc)
|
||||
+ {
|
||||
+ flag = 1;
|
||||
+
|
||||
+ p += mblength;
|
||||
+ memset (&state_wc, '\0', sizeof(mbstate_t));
|
||||
+ mblength = wcrtomb (mbc, lo_wc, &state_wc);
|
||||
+
|
||||
+ assert (mblength != (size_t)-1 &&
|
||||
+ mblength != (size_t)-2);
|
||||
+
|
||||
+ mblength = (mblength < 1) ? 1 : mblength;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!flag)
|
||||
+ {
|
||||
+ for (i = 0; i < mblength; i++)
|
||||
+ mbc[i] = *p++;
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ p += mblength;
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < mblength; i++)
|
||||
+ h = HASH (h, mbc[i]);
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ case IGNORE_SPACE_CHANGE:
|
||||
+ while (1)
|
||||
+ {
|
||||
+ if (*p == '\n')
|
||||
+ {
|
||||
+ ++p;
|
||||
+ break;
|
||||
+ }
|
||||
|
||||
+ MBC2WC (p, suffix_begin, mblength, wc, state, convfail);
|
||||
+
|
||||
+ if (!convfail && iswspace (wc))
|
||||
+ {
|
||||
+ while (1)
|
||||
+ {
|
||||
+ if (*p == '\n')
|
||||
+ {
|
||||
+ ++p;
|
||||
+ goto hashing_done;
|
||||
+ }
|
||||
+
|
||||
+ p += mblength;
|
||||
+ MBC2WC (p, suffix_begin, mblength, wc, state, convfail);
|
||||
+ if (convfail || (!convfail && !iswspace (wc)))
|
||||
+ break;
|
||||
+ }
|
||||
+ h = HASH (h, ' ');
|
||||
+ }
|
||||
+
|
||||
+ /* WC is now the first non-space. */
|
||||
+ if (convfail)
|
||||
+ mbc[0] = *p++;
|
||||
+ else
|
||||
+ {
|
||||
+ bool flag = 0;
|
||||
+
|
||||
+ if (ignore_case)
|
||||
+ {
|
||||
+ lo_wc = towlower (wc);
|
||||
+ if (lo_wc != wc)
|
||||
+ {
|
||||
+ flag = 1;
|
||||
+
|
||||
+ p += mblength;
|
||||
+ memset (&state_wc, '\0', sizeof(mbstate_t));
|
||||
+ mblength = wcrtomb (mbc, lo_wc, &state_wc);
|
||||
+
|
||||
+ assert (mblength != (size_t)-1 &&
|
||||
+ mblength != (size_t)-2);
|
||||
+
|
||||
+ mblength = (mblength < 1) ? 1 : mblength;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!flag)
|
||||
+ {
|
||||
+ for (i = 0; i < mblength; i++)
|
||||
+ mbc[i] = *p++;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < mblength; i++)
|
||||
+ h = HASH (h, mbc[i]);
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ case IGNORE_TAB_EXPANSION:
|
||||
+ {
|
||||
+ size_t column = 0;
|
||||
+
|
||||
+ while (1)
|
||||
+ {
|
||||
+ if (*p == '\n')
|
||||
+ {
|
||||
+ ++p;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ MBC2WC (p, suffix_begin, mblength, wc, state, convfail);
|
||||
+
|
||||
+ if (convfail)
|
||||
+ {
|
||||
+ h = HASH (h, *p++);
|
||||
+ ++column;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ bool flag;
|
||||
+
|
||||
+ switch (wc)
|
||||
+ {
|
||||
+ case L'\b':
|
||||
+ column -= 0 < column;
|
||||
+ h = HASH (h, '\b');
|
||||
+ ++p;
|
||||
+ break;
|
||||
+
|
||||
+ case L'\t':
|
||||
+ {
|
||||
+ int repetitions;
|
||||
+
|
||||
+ repetitions = TAB_WIDTH - column % TAB_WIDTH;
|
||||
+ column += repetitions;
|
||||
+ do
|
||||
+ h = HASH (h, ' ');
|
||||
+ while (--repetitions != 0);
|
||||
+ ++p;
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ case L'\r':
|
||||
+ column = 0;
|
||||
+ h = HASH (h, '\r');
|
||||
+ ++p;
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ flag = 0;
|
||||
+ column += wcwidth (wc);
|
||||
+ if (ignore_case)
|
||||
+ {
|
||||
+ lo_wc = towlower (wc);
|
||||
+ if (lo_wc != wc)
|
||||
+ {
|
||||
+ flag = 1;
|
||||
+ p += mblength;
|
||||
+ memset (&state_wc, '\0', sizeof(mbstate_t));
|
||||
+ mblength = wcrtomb (mbc, lo_wc, &state_wc);
|
||||
+
|
||||
+ assert (mblength != (size_t)-1 &&
|
||||
+ mblength != (size_t)-2);
|
||||
+
|
||||
+ mblength = (mblength < 1) ? 1 : mblength;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!flag)
|
||||
+ {
|
||||
+ for (i = 0; i < mblength; i++)
|
||||
+ mbc[i] = *p++;
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < mblength; i++)
|
||||
+ h = HASH (h, mbc[i]);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ while (1)
|
||||
+ {
|
||||
+ if (*p == '\n')
|
||||
+ {
|
||||
+ ++p;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ MBC2WC (p, suffix_begin, mblength, wc, state, convfail);
|
||||
+
|
||||
+ if (convfail)
|
||||
+ mbc[0] = *p++;
|
||||
+ else
|
||||
+ {
|
||||
+ int flag = 0;
|
||||
+
|
||||
+ if (ignore_case)
|
||||
+ {
|
||||
+ lo_wc = towlower (wc);
|
||||
+ if (lo_wc != wc)
|
||||
+ {
|
||||
+ flag = 1;
|
||||
+ p += mblength;
|
||||
+ memset (&state_wc, '\0', sizeof(mbstate_t));
|
||||
+ mblength = wcrtomb (mbc, lo_wc, &state_wc);
|
||||
+
|
||||
+ assert (mblength != (size_t)-1 &&
|
||||
+ mblength != (size_t)-2);
|
||||
+
|
||||
+ mblength = (mblength < 1) ? 1 : mblength;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!flag)
|
||||
+ {
|
||||
+ for (i = 0; i < mblength; i++)
|
||||
+ mbc[i] = *p++;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < mblength; i++)
|
||||
+ h = HASH (h, mbc[i]);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+#endif
|
||||
/* Hash this line until we find a newline. */
|
||||
if (ignore_case)
|
||||
switch (ignore_white_space)
|
||||
--- diffutils-2.8.4/src/side.c.i18n 2002-06-11 02:06:32.000000000 -0400
|
||||
+++ diffutils-2.8.4/src/side.c 2002-11-16 18:41:37.000000000 -0500
|
||||
@@ -73,11 +73,72 @@
|
||||
register size_t out_position = 0;
|
||||
register char const *text_pointer = line[0];
|
||||
register char const *text_limit = line[1];
|
||||
+#if defined HAVE_WCHAR_H && defined HAVE_WCTYPE_H
|
||||
+ unsigned char mbc[MB_LEN_MAX];
|
||||
+ wchar_t wc;
|
||||
+ mbstate_t state, state_bak;
|
||||
+ size_t mbc_pos, mblength;
|
||||
+ int mbc_loading_flag = 0;
|
||||
+ int wc_width;
|
||||
+
|
||||
+ memset (&state, '\0', sizeof (mbstate_t));
|
||||
+#endif
|
||||
|
||||
while (text_pointer < text_limit)
|
||||
{
|
||||
register unsigned char c = *text_pointer++;
|
||||
|
||||
+#if defined HAVE_WCHAR_H && defined HAVE_WCTYPE_H
|
||||
+ if (MB_CUR_MAX > 1 && mbc_loading_flag)
|
||||
+ {
|
||||
+ mbc_loading_flag = 0;
|
||||
+ state_bak = state;
|
||||
+ mbc[mbc_pos++] = c;
|
||||
+
|
||||
+process_mbc:
|
||||
+ mblength = mbrtowc (&wc, mbc, mbc_pos, &state);
|
||||
+
|
||||
+ switch (mblength)
|
||||
+ {
|
||||
+ case (size_t)-2: /* Incomplete multibyte character. */
|
||||
+ mbc_loading_flag = 1;
|
||||
+ state = state_bak;
|
||||
+ break;
|
||||
+
|
||||
+ case (size_t)-1: /* Invalid as a multibyte character. */
|
||||
+ if (in_position++ < out_bound)
|
||||
+ {
|
||||
+ out_position = in_position;
|
||||
+ putc (mbc[0], out);
|
||||
+ }
|
||||
+ memmove (mbc, mbc + 1, --mbc_pos);
|
||||
+ if (mbc_pos > 0)
|
||||
+ {
|
||||
+ mbc[mbc_pos] = '\0';
|
||||
+ goto process_mbc;
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ wc_width = wcwidth (wc);
|
||||
+ if (wc_width < 1) /* Unprintable multibyte character. */
|
||||
+ {
|
||||
+ if (in_position <= out_bound)
|
||||
+ fprintf (out, "%lc", (wint_t)wc);
|
||||
+ }
|
||||
+ else /* Printable multibyte character. */
|
||||
+ {
|
||||
+ in_position += wc_width;
|
||||
+ if (in_position <= out_bound)
|
||||
+ {
|
||||
+ out_position = in_position;
|
||||
+ fprintf (out, "%lc", (wint_t)wc);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ continue;
|
||||
+ }
|
||||
+#endif
|
||||
switch (c)
|
||||
{
|
||||
case '\t':
|
||||
@@ -135,8 +196,39 @@
|
||||
break;
|
||||
|
||||
default:
|
||||
- if (! ISPRINT (c))
|
||||
- goto control_char;
|
||||
+#if defined HAVE_WCHAR_H && defined HAVE_WCTYPE_H
|
||||
+ if (MB_CUR_MAX > 1)
|
||||
+ {
|
||||
+ memset (mbc, '\0', MB_LEN_MAX);
|
||||
+ mbc_pos = 0;
|
||||
+ mbc[mbc_pos++] = c;
|
||||
+ state_bak = state;
|
||||
+
|
||||
+ mblength = mbrtowc (&wc, mbc, mbc_pos, &state);
|
||||
+
|
||||
+ /* The value of mblength is always less than 2 here. */
|
||||
+ switch (mblength)
|
||||
+ {
|
||||
+ case (size_t)-2: /* Incomplete multibyte character. */
|
||||
+ state = state_bak;
|
||||
+ mbc_loading_flag = 1;
|
||||
+ continue;
|
||||
+
|
||||
+ case (size_t)-1: /* Invalid as a multibyte character. */
|
||||
+ state = state_bak;
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ if (! iswprint (wc))
|
||||
+ goto control_char;
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+#endif
|
||||
+ {
|
||||
+ if (! ISPRINT (c))
|
||||
+ goto control_char;
|
||||
+ }
|
||||
/* falls through */
|
||||
case ' ':
|
||||
if (in_position++ < out_bound)
|
||||
--- diffutils-2.8.4/src/util.c.i18n 2002-06-11 02:06:32.000000000 -0400
|
||||
+++ diffutils-2.8.4/src/util.c 2002-11-16 18:41:37.000000000 -0500
|
||||
@@ -321,7 +321,7 @@
|
||||
Return nonzero if the lines differ. */
|
||||
|
||||
bool
|
||||
-lines_differ (char const *s1, char const *s2)
|
||||
+lines_differ_singlebyte (char const *s1, char const *s2)
|
||||
{
|
||||
register unsigned char const *t1 = (unsigned char const *) s1;
|
||||
register unsigned char const *t2 = (unsigned char const *) s2;
|
||||
@@ -450,6 +450,293 @@
|
||||
|
||||
return 1;
|
||||
}
|
||||
+
|
||||
+#ifdef HANDLE_MULTIBYTE
|
||||
+# define MBC2WC(T, END, MBLENGTH, WC, STATE, CONVFAIL) \
|
||||
+do \
|
||||
+{ \
|
||||
+ mbstate_t bak = STATE; \
|
||||
+ \
|
||||
+ CONVFAIL = 0; \
|
||||
+ MBLENGTH = mbrtowc (&WC, T, END - T, &STATE); \
|
||||
+ \
|
||||
+ switch (MBLENGTH) \
|
||||
+ { \
|
||||
+ case (size_t)-2: \
|
||||
+ case (size_t)-1: \
|
||||
+ STATE = bak; \
|
||||
+ ++CONVFAIL; \
|
||||
+ /* Fall through. */ \
|
||||
+ case 0: \
|
||||
+ MBLENGTH = 1; \
|
||||
+ } \
|
||||
+} \
|
||||
+while (0)
|
||||
+
|
||||
+bool
|
||||
+lines_differ_multibyte (char const *s1, char const *s2)
|
||||
+{
|
||||
+ unsigned char const *end1, *end2;
|
||||
+ unsigned char c1, c2;
|
||||
+ wchar_t wc1, wc2, wc1_bak, wc2_bak;
|
||||
+ size_t mblen1, mblen2;
|
||||
+ mbstate_t state1, state2, state1_bak, state2_bak;
|
||||
+ int convfail1, convfail2, convfail1_bak, convfail2_bak;
|
||||
+
|
||||
+ unsigned char const *t1 = (unsigned char const *) s1;
|
||||
+ unsigned char const *t2 = (unsigned char const *) s2;
|
||||
+ unsigned char const *t1_bak, *t2_bak;
|
||||
+ size_t column = 0;
|
||||
+
|
||||
+ if (ignore_white_space == IGNORE_NO_WHITE_SPACE && !ignore_case)
|
||||
+ {
|
||||
+ while (*t1 != '\n')
|
||||
+ if (*t1++ != * t2++)
|
||||
+ return 1;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ memset (&state1, '\0', sizeof (mbstate_t));
|
||||
+ memset (&state2, '\0', sizeof (mbstate_t));
|
||||
+
|
||||
+ end1 = s1 + strlen (s1);
|
||||
+ end2 = s2 + strlen (s2);
|
||||
+
|
||||
+ while (1)
|
||||
+ {
|
||||
+ c1 = *t1;
|
||||
+ c2 = *t2;
|
||||
+ MBC2WC (t1, end1, mblen1, wc1, state1, convfail1);
|
||||
+ MBC2WC (t2, end2, mblen2, wc2, state2, convfail2);
|
||||
+
|
||||
+ /* Test for exact char equality first, since it's a common case. */
|
||||
+ if (convfail1 ^ convfail2)
|
||||
+ break;
|
||||
+ else if (convfail1 && convfail2 && c1 != c2)
|
||||
+ break;
|
||||
+ else if (!convfail1 && !convfail2 && wc1 != wc2)
|
||||
+ {
|
||||
+ switch (ignore_white_space)
|
||||
+ {
|
||||
+ case IGNORE_ALL_SPACE:
|
||||
+ /* For -w, just skip past any white space. */
|
||||
+ while (1)
|
||||
+ {
|
||||
+ if (convfail1)
|
||||
+ break;
|
||||
+ else if (wc1 == L'\n' || !iswspace (wc1))
|
||||
+ break;
|
||||
+
|
||||
+ t1 += mblen1;
|
||||
+ c1 = *t1;
|
||||
+ MBC2WC (t1, end1, mblen1, wc1, state1, convfail1);
|
||||
+ }
|
||||
+
|
||||
+ while (1)
|
||||
+ {
|
||||
+ if (convfail2)
|
||||
+ break;
|
||||
+ else if (wc2 == L'\n' || !iswspace (wc2))
|
||||
+ break;
|
||||
+
|
||||
+ t2 += mblen2;
|
||||
+ c2 = *t2;
|
||||
+ MBC2WC (t2, end2, mblen2, wc2, state2, convfail2);
|
||||
+ }
|
||||
+ t1 += mblen1;
|
||||
+ t2 += mblen2;
|
||||
+ break;
|
||||
+
|
||||
+ case IGNORE_SPACE_CHANGE:
|
||||
+ /* For -b, advance past any sequence of white space in
|
||||
+ line 1 and consider it just one space, or nothing at
|
||||
+ all if it is at the end of the line. */
|
||||
+ if (wc1 != L'\n' && iswspace (wc1))
|
||||
+ {
|
||||
+ size_t mblen_bak;
|
||||
+ mbstate_t state_bak;
|
||||
+
|
||||
+ do
|
||||
+ {
|
||||
+ t1 += mblen1;
|
||||
+ mblen_bak = mblen1;
|
||||
+ state_bak = state1;
|
||||
+ MBC2WC (t1, end1, mblen1, wc1, state1, convfail1);
|
||||
+ }
|
||||
+ while (!convfail1 && (wc1 != L'\n' && iswspace (wc1)));
|
||||
+
|
||||
+ state1 = state_bak;
|
||||
+ mblen1 = mblen_bak;
|
||||
+ t1 -= mblen1;
|
||||
+ convfail1 = 0;
|
||||
+ wc1 = L' ';
|
||||
+ }
|
||||
+
|
||||
+ /* Likewise for line 2. */
|
||||
+ if (wc2 != L'\n' && iswspace (wc2))
|
||||
+ {
|
||||
+ size_t mblen_bak;
|
||||
+ mbstate_t state_bak;
|
||||
+
|
||||
+ do
|
||||
+ {
|
||||
+ t2 += mblen2;
|
||||
+ mblen_bak = mblen2;
|
||||
+ state_bak = state2;
|
||||
+ MBC2WC (t2, end2, mblen2, wc2, state2, convfail2);
|
||||
+ }
|
||||
+ while (!convfail2 && (wc2 != L'\n' && iswspace (wc2)));
|
||||
+
|
||||
+ state2 = state_bak;
|
||||
+ mblen2 = mblen_bak;
|
||||
+ t2 -= mblen2;
|
||||
+ convfail2 = 0;
|
||||
+ wc2 = L' ';
|
||||
+ }
|
||||
+
|
||||
+ if (wc1 != wc2)
|
||||
+ {
|
||||
+ if (wc2 == L' ' && wc1 != L'\n' &&
|
||||
+ t1 > (unsigned char const *)s1 &&
|
||||
+ !convfail1_bak && iswspace (wc1_bak))
|
||||
+ {
|
||||
+ t1 = t1_bak;
|
||||
+ wc1 = wc1_bak;
|
||||
+ state1 = state1_bak;
|
||||
+ convfail1 = convfail1_bak;
|
||||
+ continue;
|
||||
+ }
|
||||
+ if (wc1 == L' ' && wc2 != L'\n'
|
||||
+ && t2 > (unsigned char const *)s2
|
||||
+ && !convfail2_bak && iswspace (wc2_bak))
|
||||
+ {
|
||||
+ t2 = t2_bak;
|
||||
+ wc2 = wc2_bak;
|
||||
+ state2 = state2_bak;
|
||||
+ convfail2 = convfail2_bak;
|
||||
+ continue;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ t1_bak = t1; t2_bak = t2;
|
||||
+ wc1_bak = wc1; wc2_bak = wc2;
|
||||
+ state1_bak = state1; state2_bak = state2;
|
||||
+ convfail1_bak = convfail1; convfail2_bak = convfail2;
|
||||
+
|
||||
+ if (wc1 == L'\n')
|
||||
+ wc1 = L' ';
|
||||
+ else
|
||||
+ t1 += mblen1;
|
||||
+
|
||||
+ if (wc2 == L'\n')
|
||||
+ wc2 = L' ';
|
||||
+ else
|
||||
+ t2 += mblen2;
|
||||
+
|
||||
+ break;
|
||||
+
|
||||
+ case IGNORE_TAB_EXPANSION:
|
||||
+ if ((wc1 == L' ' && wc2 == L'\t')
|
||||
+ || (wc1 == L'\t' && wc2 == L' '))
|
||||
+ {
|
||||
+ size_t column2 = column;
|
||||
+
|
||||
+ while (1)
|
||||
+ {
|
||||
+ if (convfail1)
|
||||
+ {
|
||||
+ ++t1;
|
||||
+ break;
|
||||
+ }
|
||||
+ else if (wc1 == L' ')
|
||||
+ column++;
|
||||
+ else if (wc1 == L'\t')
|
||||
+ column += TAB_WIDTH - column % TAB_WIDTH;
|
||||
+ else
|
||||
+ {
|
||||
+ t1 += mblen1;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ t1 += mblen1;
|
||||
+ c1 = *t1;
|
||||
+ MBC2WC (t1, end1, mblen1, wc1, state1, convfail1);
|
||||
+ }
|
||||
+
|
||||
+ while (1)
|
||||
+ {
|
||||
+ if (convfail2)
|
||||
+ {
|
||||
+ ++t2;
|
||||
+ break;
|
||||
+ }
|
||||
+ else if (wc2 == L' ')
|
||||
+ column2++;
|
||||
+ else if (wc2 == L'\t')
|
||||
+ column2 += TAB_WIDTH - column2 % TAB_WIDTH;
|
||||
+ else
|
||||
+ {
|
||||
+ t2 += mblen2;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ t2 += mblen2;
|
||||
+ c2 = *t2;
|
||||
+ MBC2WC (t2, end2, mblen2, wc2, state2, convfail2);
|
||||
+ }
|
||||
+
|
||||
+ if (column != column2)
|
||||
+ return 1;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ t1 += mblen1;
|
||||
+ t2 += mblen2;
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ case IGNORE_NO_WHITE_SPACE:
|
||||
+ t1 += mblen1;
|
||||
+ t2 += mblen2;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ /* Lowercase all letters if -i is specified. */
|
||||
+ if (ignore_case)
|
||||
+ {
|
||||
+ if (!convfail1)
|
||||
+ wc1 = towlower (wc1);
|
||||
+ if (!convfail2)
|
||||
+ wc2 = towlower (wc2);
|
||||
+ }
|
||||
+
|
||||
+ if (convfail1 ^ convfail2)
|
||||
+ break;
|
||||
+ else if (convfail1 && convfail2 && c1 != c2)
|
||||
+ break;
|
||||
+ else if (!convfail1 && !convfail2 && wc1 != wc2)
|
||||
+ break;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ t1_bak = t1; t2_bak = t2;
|
||||
+ wc1_bak = wc1; wc2_bak = wc2;
|
||||
+ state1_bak = state1; state2_bak = state2;
|
||||
+ convfail1_bak = convfail1; convfail2_bak = convfail2;
|
||||
+
|
||||
+ t1 += mblen1; t2 += mblen2;
|
||||
+ }
|
||||
+
|
||||
+ if (!convfail1 && wc1 == L'\n')
|
||||
+ return 0;
|
||||
+
|
||||
+ column += convfail1 ? 1 :
|
||||
+ (wc1 == L'\t') ? TAB_WIDTH - column % TAB_WIDTH : wcwidth (wc1);
|
||||
+ }
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+#endif
|
||||
|
||||
/* Find the consecutive changes at the start of the script START.
|
||||
Return the last link before the first gap. */
|
||||
@@ -1,35 +0,0 @@
|
||||
Don't read phy_idle_errors at dev_get_stats() because this can
|
||||
hung the userspace.
|
||||
|
||||
https://sourceforge.net/p/e1000/bugs/500/
|
||||
Why this is set to wont-fix?
|
||||
|
||||
I think it is better when phy errors are not reportet in the stats
|
||||
than a random hanging of the whole sytem.
|
||||
|
||||
diff -Naur igb-5.3.4.4.org/src/igb_main.c igb-5.3.4.4/src/igb_main.c
|
||||
--- igb-5.3.4.4.org/src/igb_main.c 2016-02-26 01:48:39.000000000 +0100
|
||||
+++ igb-5.3.4.4/src/igb_main.c 2016-03-31 09:22:10.671794282 +0200
|
||||
@@ -6032,14 +6032,14 @@
|
||||
|
||||
/* Tx Dropped needs to be maintained elsewhere */
|
||||
|
||||
- /* Phy Stats */
|
||||
- if (hw->phy.media_type == e1000_media_type_copper) {
|
||||
- if ((adapter->link_speed == SPEED_1000) &&
|
||||
- (!e1000_read_phy_reg(hw, PHY_1000T_STATUS, &phy_tmp))) {
|
||||
- phy_tmp &= PHY_IDLE_ERROR_COUNT_MASK;
|
||||
- adapter->phy_stats.idle_errors += phy_tmp;
|
||||
- }
|
||||
- }
|
||||
+// /* Phy Stats */
|
||||
+// if (hw->phy.media_type == e1000_media_type_copper) {
|
||||
+// if ((adapter->link_speed == SPEED_1000) &&
|
||||
+// (!e1000_read_phy_reg(hw, PHY_1000T_STATUS, &phy_tmp))) {
|
||||
+// phy_tmp &= PHY_IDLE_ERROR_COUNT_MASK;
|
||||
+// adapter->phy_stats.idle_errors += phy_tmp;
|
||||
+// }
|
||||
+// }
|
||||
|
||||
/* Management Stats */
|
||||
adapter->stats.mgptc += E1000_READ_REG(hw, E1000_MGTPTC);
|
||||
@@ -1,481 +0,0 @@
|
||||
diff -Naur iptables-1.4.6.org/extensions/.ipp2p-test iptables-1.4.6/extensions/.ipp2p-test
|
||||
--- iptables-1.4.6.org/extensions/.ipp2p-test 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ iptables-1.4.6/extensions/.ipp2p-test 2010-02-13 20:02:52.000000000 +0100
|
||||
@@ -0,0 +1,2 @@
|
||||
+#! /bin/sh
|
||||
+[ -f $KERNEL_DIR/include/linux/netfilter_ipv4/ipt_ipp2p.h ] && echo ipp2p
|
||||
diff -Naur iptables-1.4.6.org/extensions/libipt_ipp2p.c iptables-1.4.6/extensions/libipt_ipp2p.c
|
||||
--- iptables-1.4.6.org/extensions/libipt_ipp2p.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ iptables-1.4.6/extensions/libipt_ipp2p.c 2010-02-13 20:02:52.000000000 +0100
|
||||
@@ -0,0 +1,424 @@
|
||||
+#include <stdio.h>
|
||||
+#include <netdb.h>
|
||||
+#include <string.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <getopt.h>
|
||||
+#include <ctype.h>
|
||||
+
|
||||
+#include <iptables.h>
|
||||
+
|
||||
+#include <linux/netfilter_ipv4/ipt_ipp2p.h>
|
||||
+
|
||||
+#ifndef XTABLES_VERSION
|
||||
+#define XTABLES_VERSION IPTABLES_VERSION
|
||||
+#endif
|
||||
+
|
||||
+#ifdef IPT_LIB_DIR
|
||||
+#define xtables_target iptables_target
|
||||
+#define xtables_register_target register_target
|
||||
+#endif
|
||||
+
|
||||
+static void
|
||||
+help(void)
|
||||
+{
|
||||
+ printf(
|
||||
+ "IPP2P v%s options:\n"
|
||||
+ " --ipp2p Grab all known p2p packets\n"
|
||||
+ " --edk [TCP&UDP] All known eDonkey/eMule/Overnet packets\n"
|
||||
+ " --dc [TCP] All known Direct Connect packets\n"
|
||||
+ " --kazaa [TCP&UDP] All known KaZaA packets\n"
|
||||
+ " --gnu [TCP&UDP] All known Gnutella packets\n"
|
||||
+ " --bit [TCP&UDP] All known BitTorrent packets\n"
|
||||
+ " --apple [TCP] All known AppleJuice packets\n"
|
||||
+ " --winmx [TCP] All known WinMX\n"
|
||||
+ " --soul [TCP] All known SoulSeek\n"
|
||||
+ " --ares [TCP] All known Ares\n\n"
|
||||
+ " EXPERIMENTAL protocols (please send feedback to: ipp2p@ipp2p.org) :\n"
|
||||
+ " --mute [TCP] All known Mute packets\n"
|
||||
+ " --waste [TCP] All known Waste packets\n"
|
||||
+ " --xdcc [TCP] All known XDCC packets (only xdcc login)\n\n"
|
||||
+ " DEBUG SUPPPORT, use only if you know why\n"
|
||||
+ " --debug Generate kernel debug output, THIS WILL SLOW DOWN THE FILTER\n"
|
||||
+ "\nNote that the follwing options will have the same meaning:\n"
|
||||
+ " '--ipp2p' is equal to '--edk --dc --kazaa --gnu --bit --apple --winmx --soul --ares'\n"
|
||||
+ "\nIPP2P was intended for TCP only. Due to increasing usage of UDP we needed to change this.\n"
|
||||
+ "You can now use -p udp to search UDP packets only or without -p switch to search UDP and TCP packets.\n"
|
||||
+ "\nSee README included with this package for more details or visit http://www.ipp2p.org\n"
|
||||
+ "\nExamples:\n"
|
||||
+ " iptables -A FORWARD -m ipp2p --ipp2p -j MARK --set-mark 0x01\n"
|
||||
+ " iptables -A FORWARD -p udp -m ipp2p --kazaa --bit -j DROP\n"
|
||||
+ " iptables -A FORWARD -p tcp -m ipp2p --edk --soul -j DROP\n\n"
|
||||
+ , IPP2P_VERSION);
|
||||
+}
|
||||
+
|
||||
+static struct option opts[] = {
|
||||
+ { "ipp2p", 0, 0, '1' },
|
||||
+ { "edk", 0, 0, '2' },
|
||||
+ { "dc", 0, 0, '7' },
|
||||
+ { "gnu", 0, 0, '9' },
|
||||
+ { "kazaa", 0, 0, 'a' },
|
||||
+ { "bit", 0, 0, 'b' },
|
||||
+ { "apple", 0, 0, 'c' },
|
||||
+ { "soul", 0, 0, 'd' },
|
||||
+ { "winmx", 0, 0, 'e' },
|
||||
+ { "ares", 0, 0, 'f' },
|
||||
+ { "mute", 0, 0, 'g' },
|
||||
+ { "waste", 0, 0, 'h' },
|
||||
+ { "xdcc", 0, 0, 'i' },
|
||||
+ { "debug", 0, 0, 'j' },
|
||||
+ {0}
|
||||
+};
|
||||
+
|
||||
+
|
||||
+static void
|
||||
+#ifdef _XTABLES_H
|
||||
+init(struct xt_entry_match *m)
|
||||
+#else
|
||||
+init(struct ipt_entry_match *t, unsigned int *nfcache)
|
||||
+#endif
|
||||
+{
|
||||
+ struct ipt_p2p_info *info = (struct ipt_p2p_info *)m->data;
|
||||
+
|
||||
+#ifndef _XTABLES_H
|
||||
+ *nfcache |= NFC_UNKNOWN;
|
||||
+#endif
|
||||
+
|
||||
+ /*init the module with default values*/
|
||||
+ info->cmd = 0;
|
||||
+ info->debug = 0;
|
||||
+
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int
|
||||
+parse(int c, char **argv, int invert, unsigned int *flags,
|
||||
+#ifdef _XTABLES_H
|
||||
+ const void *entry, struct xt_entry_match **match)
|
||||
+#else
|
||||
+ const struct ipt_entry *entry, unsigned int *nfcache, struct ipt_entry_match **match)
|
||||
+#endif
|
||||
+{
|
||||
+ struct ipt_p2p_info *info = (struct ipt_p2p_info *)(*match)->data;
|
||||
+
|
||||
+ switch (c) {
|
||||
+ case '1': /*cmd: ipp2p*/
|
||||
+ if ((*flags & SHORT_HAND_IPP2P) == SHORT_HAND_IPP2P)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--ipp2p' may only be "
|
||||
+ "specified once!");
|
||||
+
|
||||
+/* if ((*flags & SHORT_HAND_DATA) == SHORT_HAND_DATA)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--ipp2p-data' may only be "
|
||||
+ "specified alone!");
|
||||
+*/
|
||||
+
|
||||
+ if ((*flags) != 0)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--ipp2p' may only be "
|
||||
+ "specified alone!");
|
||||
+ if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
|
||||
+ *flags += SHORT_HAND_IPP2P;
|
||||
+ info->cmd = *flags;
|
||||
+ break;
|
||||
+
|
||||
+ case '2': /*cmd: edk*/
|
||||
+ if ((*flags & IPP2P_EDK) == IPP2P_EDK)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--edk' may only be "
|
||||
+ "specified once");
|
||||
+ if ((*flags & SHORT_HAND_IPP2P) == SHORT_HAND_IPP2P)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--ipp2p' may only be "
|
||||
+ "specified alone!");
|
||||
+/* if ((*flags & SHORT_HAND_DATA) == SHORT_HAND_DATA)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--ipp2p-data' may only be "
|
||||
+ "specified alone!");*/
|
||||
+ if ((*flags & IPP2P_DATA_EDK) == IPP2P_DATA_EDK)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: use `--edk' OR `--edk-data' but not both of them!");
|
||||
+ if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
|
||||
+ *flags += IPP2P_EDK;
|
||||
+ info->cmd = *flags;
|
||||
+ break;
|
||||
+
|
||||
+
|
||||
+ case '7': /*cmd: dc*/
|
||||
+ if ((*flags & IPP2P_DC) == IPP2P_DC)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--dc' may only be "
|
||||
+ "specified once!");
|
||||
+ if ((*flags & SHORT_HAND_IPP2P) == SHORT_HAND_IPP2P)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--ipp2p' may only be "
|
||||
+ "specified alone!");
|
||||
+/* if ((*flags & SHORT_HAND_DATA) == SHORT_HAND_DATA)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--ipp2p-data' may only be "
|
||||
+ "specified alone!");*/
|
||||
+ if ((*flags & IPP2P_DATA_DC) == IPP2P_DATA_DC)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: use `--dc' OR `--dc-data' but not both of them!");
|
||||
+ if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
|
||||
+ *flags += IPP2P_DC;
|
||||
+ info->cmd = *flags;
|
||||
+ break;
|
||||
+
|
||||
+
|
||||
+ case '9': /*cmd: gnu*/
|
||||
+ if ((*flags & IPP2P_GNU) == IPP2P_GNU)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--gnu' may only be "
|
||||
+ "specified once!");
|
||||
+/* if ((*flags & SHORT_HAND_DATA) == SHORT_HAND_DATA)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--ipp2p-data' may only be "
|
||||
+ "specified alone!");*/
|
||||
+ if ((*flags & SHORT_HAND_IPP2P) == SHORT_HAND_IPP2P)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--ipp2p' may only be "
|
||||
+ "specified alone!");
|
||||
+ if ((*flags & IPP2P_DATA_GNU) == IPP2P_DATA_GNU)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: use `--gnu' OR `--gnu-data' but not both of them!");
|
||||
+ if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
|
||||
+ *flags += IPP2P_GNU;
|
||||
+ info->cmd = *flags;
|
||||
+ break;
|
||||
+
|
||||
+ case 'a': /*cmd: kazaa*/
|
||||
+ if ((*flags & IPP2P_KAZAA) == IPP2P_KAZAA)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--kazaa' may only be "
|
||||
+ "specified once!");
|
||||
+/* if ((*flags & SHORT_HAND_DATA) == SHORT_HAND_DATA)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--ipp2p-data' may only be "
|
||||
+ "specified alone!");*/
|
||||
+ if ((*flags & SHORT_HAND_IPP2P) == SHORT_HAND_IPP2P)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--ipp2p' may only be "
|
||||
+ "specified alone!");
|
||||
+ if ((*flags & IPP2P_DATA_KAZAA) == IPP2P_DATA_KAZAA)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: use `--kazaa' OR `--kazaa-data' but not both of them!");
|
||||
+ if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
|
||||
+ *flags += IPP2P_KAZAA;
|
||||
+ info->cmd = *flags;
|
||||
+ break;
|
||||
+
|
||||
+ case 'b': /*cmd: bit*/
|
||||
+ if ((*flags & IPP2P_BIT) == IPP2P_BIT)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--bit' may only be "
|
||||
+ "specified once!");
|
||||
+ if ((*flags & SHORT_HAND_IPP2P) == SHORT_HAND_IPP2P)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--ipp2p' may only be "
|
||||
+ "specified alone!");
|
||||
+ if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
|
||||
+ *flags += IPP2P_BIT;
|
||||
+ info->cmd = *flags;
|
||||
+ break;
|
||||
+
|
||||
+ case 'c': /*cmd: apple*/
|
||||
+ if ((*flags & IPP2P_APPLE) == IPP2P_APPLE)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--apple' may only be "
|
||||
+ "specified once!");
|
||||
+ if ((*flags & SHORT_HAND_IPP2P) == SHORT_HAND_IPP2P)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--ipp2p' may only be "
|
||||
+ "specified alone!");
|
||||
+ if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
|
||||
+ *flags += IPP2P_APPLE;
|
||||
+ info->cmd = *flags;
|
||||
+ break;
|
||||
+
|
||||
+
|
||||
+ case 'd': /*cmd: soul*/
|
||||
+ if ((*flags & IPP2P_SOUL) == IPP2P_SOUL)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--soul' may only be "
|
||||
+ "specified once!");
|
||||
+ if ((*flags & SHORT_HAND_IPP2P) == SHORT_HAND_IPP2P)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--ipp2p' may only be "
|
||||
+ "specified alone!");
|
||||
+ if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
|
||||
+ *flags += IPP2P_SOUL;
|
||||
+ info->cmd = *flags;
|
||||
+ break;
|
||||
+
|
||||
+
|
||||
+ case 'e': /*cmd: winmx*/
|
||||
+ if ((*flags & IPP2P_WINMX) == IPP2P_WINMX)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--winmx' may only be "
|
||||
+ "specified once!");
|
||||
+ if ((*flags & SHORT_HAND_IPP2P) == SHORT_HAND_IPP2P)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--ipp2p' may only be "
|
||||
+ "specified alone!");
|
||||
+ if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
|
||||
+ *flags += IPP2P_WINMX;
|
||||
+ info->cmd = *flags;
|
||||
+ break;
|
||||
+
|
||||
+ case 'f': /*cmd: ares*/
|
||||
+ if ((*flags & IPP2P_ARES) == IPP2P_ARES)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--ares' may only be "
|
||||
+ "specified once!");
|
||||
+ if ((*flags & SHORT_HAND_IPP2P) == SHORT_HAND_IPP2P)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--ipp2p' may only be "
|
||||
+ "specified alone!");
|
||||
+ if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
|
||||
+ *flags += IPP2P_ARES;
|
||||
+ info->cmd = *flags;
|
||||
+ break;
|
||||
+
|
||||
+ case 'g': /*cmd: mute*/
|
||||
+ if ((*flags & IPP2P_MUTE) == IPP2P_MUTE)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--mute' may only be "
|
||||
+ "specified once!");
|
||||
+ if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
|
||||
+ *flags += IPP2P_MUTE;
|
||||
+ info->cmd = *flags;
|
||||
+ break;
|
||||
+ case 'h': /*cmd: waste*/
|
||||
+ if ((*flags & IPP2P_WASTE) == IPP2P_WASTE)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--waste' may only be "
|
||||
+ "specified once!");
|
||||
+ if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
|
||||
+ *flags += IPP2P_WASTE;
|
||||
+ info->cmd = *flags;
|
||||
+ break;
|
||||
+ case 'i': /*cmd: xdcc*/
|
||||
+ if ((*flags & IPP2P_XDCC) == IPP2P_XDCC)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "ipp2p: `--ares' may only be "
|
||||
+ "specified once!");
|
||||
+ if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
|
||||
+ *flags += IPP2P_XDCC;
|
||||
+ info->cmd = *flags;
|
||||
+ break;
|
||||
+
|
||||
+ case 'j': /*cmd: debug*/
|
||||
+ if (invert) xtables_error(PARAMETER_PROBLEM, "ipp2p: invert [!] is not allowed!");
|
||||
+ info->debug = 1;
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+// xtables_error(PARAMETER_PROBLEM,
|
||||
+// "\nipp2p-parameter problem: for ipp2p usage type: iptables -m ipp2p --help\n");
|
||||
+ return 0;
|
||||
+ }
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void
|
||||
+final_check(unsigned int flags)
|
||||
+{
|
||||
+ if (!flags)
|
||||
+ xtables_error(PARAMETER_PROBLEM,
|
||||
+ "\nipp2p-parameter problem: for ipp2p usage type: iptables -m ipp2p --help\n");
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+#ifdef _XTABLES_H
|
||||
+print(const void *ip,
|
||||
+ const struct xt_entry_match *match,
|
||||
+#else
|
||||
+print(const struct ipt_ip *ip,
|
||||
+ const struct ipt_entry_match *match,
|
||||
+#endif
|
||||
+ int numeric)
|
||||
+{
|
||||
+ struct ipt_p2p_info *info = (struct ipt_p2p_info *)match->data;
|
||||
+
|
||||
+ printf("ipp2p v%s", IPP2P_VERSION);
|
||||
+ if ((info->cmd & SHORT_HAND_IPP2P) == SHORT_HAND_IPP2P) printf(" --ipp2p");
|
||||
+// if ((info->cmd & SHORT_HAND_DATA) == SHORT_HAND_DATA) printf(" --ipp2p-data");
|
||||
+ if ((info->cmd & IPP2P_KAZAA) == IPP2P_KAZAA) printf(" --kazaa");
|
||||
+// if ((info->cmd & IPP2P_DATA_KAZAA) == IPP2P_DATA_KAZAA) printf(" --kazaa-data");
|
||||
+// if ((info->cmd & IPP2P_DATA_GNU) == IPP2P_DATA_GNU) printf(" --gnu-data");
|
||||
+ if ((info->cmd & IPP2P_GNU) == IPP2P_GNU) printf(" --gnu");
|
||||
+ if ((info->cmd & IPP2P_EDK) == IPP2P_EDK) printf(" --edk");
|
||||
+// if ((info->cmd & IPP2P_DATA_EDK) == IPP2P_DATA_EDK) printf(" --edk-data");
|
||||
+// if ((info->cmd & IPP2P_DATA_DC) == IPP2P_DATA_DC) printf(" --dc-data");
|
||||
+ if ((info->cmd & IPP2P_DC) == IPP2P_DC) printf(" --dc");
|
||||
+ if ((info->cmd & IPP2P_BIT) == IPP2P_BIT) printf(" --bit");
|
||||
+ if ((info->cmd & IPP2P_APPLE) == IPP2P_APPLE) printf(" --apple");
|
||||
+ if ((info->cmd & IPP2P_SOUL) == IPP2P_SOUL) printf(" --soul");
|
||||
+ if ((info->cmd & IPP2P_WINMX) == IPP2P_WINMX) printf(" --winmx");
|
||||
+ if ((info->cmd & IPP2P_ARES) == IPP2P_ARES) printf(" --ares");
|
||||
+ if ((info->cmd & IPP2P_MUTE) == IPP2P_MUTE) printf(" --mute");
|
||||
+ if ((info->cmd & IPP2P_WASTE) == IPP2P_WASTE) printf(" --waste");
|
||||
+ if ((info->cmd & IPP2P_XDCC) == IPP2P_XDCC) printf(" --xdcc");
|
||||
+ if (info->debug != 0) printf(" --debug");
|
||||
+ printf(" ");
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+#ifdef _XTABLES_H
|
||||
+save(const void *ip,
|
||||
+ const struct xt_entry_match *match)
|
||||
+#else
|
||||
+save(const struct ipt_ip *ip,
|
||||
+ const struct ipt_entry_match *match)
|
||||
+#endif
|
||||
+{
|
||||
+ struct ipt_p2p_info *info = (struct ipt_p2p_info *)match->data;
|
||||
+
|
||||
+ if ((info->cmd & SHORT_HAND_IPP2P) == SHORT_HAND_IPP2P) printf("--ipp2p ");
|
||||
+// if ((info->cmd & SHORT_HAND_DATA) == SHORT_HAND_DATA) printf("--ipp2p-data ");
|
||||
+ if ((info->cmd & IPP2P_KAZAA) == IPP2P_KAZAA) printf("--kazaa ");
|
||||
+// if ((info->cmd & IPP2P_DATA_KAZAA) == IPP2P_DATA_KAZAA) printf("--kazaa-data ");
|
||||
+// if ((info->cmd & IPP2P_DATA_GNU) == IPP2P_DATA_GNU) printf("--gnu-data ");
|
||||
+ if ((info->cmd & IPP2P_GNU) == IPP2P_GNU) printf("--gnu ");
|
||||
+ if ((info->cmd & IPP2P_EDK) == IPP2P_EDK) printf("--edk ");
|
||||
+// if ((info->cmd & IPP2P_DATA_EDK) == IPP2P_DATA_EDK) printf("--edk-data ");
|
||||
+// if ((info->cmd & IPP2P_DATA_DC) == IPP2P_DATA_DC) printf("--dc-data ");
|
||||
+ if ((info->cmd & IPP2P_DC) == IPP2P_DC) printf("--dc ");
|
||||
+ if ((info->cmd & IPP2P_BIT) == IPP2P_BIT) printf("--bit ");
|
||||
+ if ((info->cmd & IPP2P_APPLE) == IPP2P_APPLE) printf("--apple ");
|
||||
+ if ((info->cmd & IPP2P_SOUL) == IPP2P_SOUL) printf("--soul ");
|
||||
+ if ((info->cmd & IPP2P_WINMX) == IPP2P_WINMX) printf("--winmx ");
|
||||
+ if ((info->cmd & IPP2P_ARES) == IPP2P_ARES) printf("--ares ");
|
||||
+ if ((info->cmd & IPP2P_MUTE) == IPP2P_MUTE) printf(" --mute");
|
||||
+ if ((info->cmd & IPP2P_WASTE) == IPP2P_WASTE) printf(" --waste");
|
||||
+ if ((info->cmd & IPP2P_XDCC) == IPP2P_XDCC) printf(" --xdcc");
|
||||
+ if (info->debug != 0) printf("--debug ");
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static
|
||||
+struct xtables_match ipp2p=
|
||||
+{
|
||||
+ .next = NULL,
|
||||
+ .name = "ipp2p",
|
||||
+ .version = XTABLES_VERSION,
|
||||
+ .size = XT_ALIGN(sizeof(struct ipt_p2p_info)),
|
||||
+ .userspacesize = XT_ALIGN(sizeof(struct ipt_p2p_info)),
|
||||
+ .help = &help,
|
||||
+ .init = &init,
|
||||
+ .parse = &parse,
|
||||
+ .final_check = &final_check,
|
||||
+ .print = &print,
|
||||
+ .save = &save,
|
||||
+ .extra_opts = opts
|
||||
+};
|
||||
+
|
||||
+
|
||||
+
|
||||
+void _init(void)
|
||||
+{
|
||||
+ xtables_register_match(&ipp2p);
|
||||
+}
|
||||
+
|
||||
diff -Naur iptables-1.4.6.org/extensions/libipt_ipp2p.man iptables-1.4.6/extensions/libipt_ipp2p.man
|
||||
--- iptables-1.4.6.org/extensions/libipt_ipp2p.man 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ iptables-1.4.6/extensions/libipt_ipp2p.man 2010-02-13 20:02:52.000000000 +0100
|
||||
@@ -0,0 +1,43 @@
|
||||
+This module matches certain packets in P2P flows. It is not
|
||||
+designed to match all packets belonging to a P2P connection -
|
||||
+use IPP2P together with CONNMARK for this purpose. Also visit
|
||||
+http://www.ipp2p.org for detailed information.
|
||||
+
|
||||
+Use it together with -p tcp or -p udp to search these protocols
|
||||
+only or without -p switch to search packets of both protocols.
|
||||
+
|
||||
+IPP2P provides the following options:
|
||||
+.TP
|
||||
+.B "--edk "
|
||||
+Matches as many eDonkey/eMule packets as possible.
|
||||
+.TP
|
||||
+.B "--kazaa "
|
||||
+Matches as many KaZaA packets as possible.
|
||||
+.TP
|
||||
+.B "--gnu "
|
||||
+Matches as many Gnutella packets as possible.
|
||||
+.TP
|
||||
+.B "--dc "
|
||||
+Matches as many Direct Connect packets as possible.
|
||||
+.TP
|
||||
+.B "--bit "
|
||||
+Matches BitTorrent packets.
|
||||
+.TP
|
||||
+.B "--apple "
|
||||
+Matches AppleJuice packets.
|
||||
+.TP
|
||||
+.B "--soul "
|
||||
+Matches some SoulSeek packets. Considered as beta, use careful!
|
||||
+.TP
|
||||
+.B "--winmx "
|
||||
+Matches some WinMX packets. Considered as beta, use careful!
|
||||
+.TP
|
||||
+.B "--ares "
|
||||
+Matches Ares and AresLite packets. Use together with -j DROP only.
|
||||
+.TP
|
||||
+.B "--ipp2p "
|
||||
+Short hand for: --edk --kazaa --gnu --dc
|
||||
+.TP
|
||||
+.B "--debug "
|
||||
+Prints some information about each hit into kernel logfile. May
|
||||
+produce huge logfiles so beware!
|
||||
@@ -1,150 +0,0 @@
|
||||
diff -urN iputils/clockdiff.c iputils.new/clockdiff.c
|
||||
--- iputils/clockdiff.c 2002-02-22 19:10:59.000000000 -0500
|
||||
+++ iputils.new/clockdiff.c 2003-09-10 09:20:28.000000000 -0400
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <stdio.h>
|
||||
+#include <linux/types.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
diff -urN iputils/ping6.c iputils.new/ping6.c
|
||||
--- iputils/ping6.c 2003-09-10 17:27:48.000000000 -0400
|
||||
+++ iputils.new/ping6.c 2003-09-10 17:22:43.000000000 -0400
|
||||
@@ -68,8 +68,44 @@
|
||||
*/
|
||||
#include "ping_common.h"
|
||||
|
||||
-#include <linux/in6.h>
|
||||
-#include <linux/ipv6.h>
|
||||
+struct ipv6_rt_hdr {
|
||||
+ __u8 nexthdr;
|
||||
+ __u8 hdrlen;
|
||||
+ __u8 type;
|
||||
+ __u8 segments_left;
|
||||
+
|
||||
+ /*
|
||||
+ * type specific data
|
||||
+ * variable length field
|
||||
+ */
|
||||
+};
|
||||
+
|
||||
+struct rt0_hdr {
|
||||
+ struct ipv6_rt_hdr rt_hdr;
|
||||
+ __u32 bitmap; /* strict/loose bit map */
|
||||
+ struct in6_addr addr[0];
|
||||
+
|
||||
+#define rt0_type rt_hdr.type;
|
||||
+};
|
||||
+#define IPV6_SRCRT_TYPE_0 0 /* IPv6 type 0 Routing Header */
|
||||
+struct ipv6hdr {
|
||||
+#if defined(__LITTLE_ENDIAN)
|
||||
+ __u8 priority:4,
|
||||
+ version:4;
|
||||
+#elif defined(__BIG_ENDIAN)
|
||||
+ __u8 version:4,
|
||||
+ priority:4;
|
||||
+#endif
|
||||
+ __u8 flow_lbl[3];
|
||||
+
|
||||
+ __u16 payload_len;
|
||||
+ __u8 nexthdr;
|
||||
+ __u8 hop_limit;
|
||||
+
|
||||
+ struct in6_addr saddr;
|
||||
+ struct in6_addr daddr;
|
||||
+};
|
||||
+
|
||||
#include <linux/icmpv6.h>
|
||||
|
||||
#define BIT_CLEAR(nr, addr) do { ((__u32 *)(addr))[(nr) >> 5] &= ~(1U << ((nr) & 31)); } while(0)
|
||||
diff -urN iputils/ping.c iputils.new/ping.c
|
||||
--- iputils/ping.c 2003-09-10 17:27:48.000000000 -0400
|
||||
+++ iputils.new/ping.c 2003-09-10 17:18:16.000000000 -0400
|
||||
@@ -60,8 +60,8 @@
|
||||
|
||||
#include "ping_common.h"
|
||||
|
||||
+#include <linux/icmp.h>
|
||||
#include <netinet/ip.h>
|
||||
-#include <netinet/ip_icmp.h>
|
||||
|
||||
|
||||
#define MAXIPLEN 60
|
||||
diff -urN iputils/ping_common.h iputils.new/ping_common.h
|
||||
--- iputils/ping_common.h 2002-09-20 11:08:11.000000000 -0400
|
||||
+++ iputils.new/ping_common.h 2003-09-10 17:16:16.000000000 -0400
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
+#include <linux/types.h>
|
||||
#include <linux/errqueue.h>
|
||||
|
||||
#include "SNAPSHOT.h"
|
||||
diff -urN iputils/tftpd.c iputils.new/tftpd.c
|
||||
--- iputils/tftpd.c 2002-01-23 19:31:41.000000000 -0500
|
||||
+++ iputils.new/tftpd.c 2003-09-10 09:39:45.000000000 -0400
|
||||
@@ -57,7 +57,6 @@
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
-#include <linux/in6.h>
|
||||
#include <netdb.h>
|
||||
|
||||
#include <setjmp.h>
|
||||
diff -urN iputils/tracepath6.c iputils.new/tracepath6.c
|
||||
--- iputils/tracepath6.c 2001-09-01 22:03:46.000000000 -0400
|
||||
+++ iputils.new/tracepath6.c 2003-09-10 09:40:18.000000000 -0400
|
||||
@@ -14,8 +14,7 @@
|
||||
#include <unistd.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
-
|
||||
-#include <linux/in6.h>
|
||||
+#include <linux/types.h>
|
||||
#include <linux/errqueue.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
diff -urN iputils/tracepath.c iputils.new/tracepath.c
|
||||
--- iputils/tracepath.c 2002-02-22 19:10:59.000000000 -0500
|
||||
+++ iputils.new/tracepath.c 2003-09-10 06:14:35.000000000 -0400
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/socket.h>
|
||||
+#include <linux/types.h>
|
||||
#include <linux/errqueue.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
diff -urN iputils/traceroute6.c iputils.new/traceroute6.c
|
||||
--- iputils/traceroute6.c 2002-09-20 11:44:22.000000000 -0400
|
||||
+++ iputils.new/traceroute6.c 2003-09-10 10:12:47.000000000 -0400
|
||||
@@ -246,9 +246,24 @@
|
||||
#include <netinet/ip_icmp.h>
|
||||
#include <netinet/udp.h>
|
||||
|
||||
-#include <linux/ipv6.h>
|
||||
-#include <linux/in6.h>
|
||||
+#include <linux/types.h>
|
||||
+struct ipv6hdr {
|
||||
+#if defined(__LITTLE_ENDIAN)
|
||||
+ __u8 priority:4,
|
||||
+ version:4;
|
||||
+#elif defined(__BIG_ENDIAN)
|
||||
+ __u8 version:4,
|
||||
+ priority:4;
|
||||
+#endif
|
||||
+ __u8 flow_lbl[3];
|
||||
+
|
||||
+ __u16 payload_len;
|
||||
+ __u8 nexthdr;
|
||||
+ __u8 hop_limit;
|
||||
|
||||
+ struct in6_addr saddr;
|
||||
+ struct in6_addr daddr;
|
||||
+};
|
||||
#include <linux/icmpv6.h>
|
||||
|
||||
#include <arpa/inet.h>
|
||||
@@ -1,31 +0,0 @@
|
||||
--- iputils/doc/Makefile.rh7 2002-02-23 01:17:57.000000000 +0100
|
||||
+++ iputils/doc/Makefile 2004-05-12 14:55:16.724448173 +0200
|
||||
@@ -2,7 +2,7 @@
|
||||
HTMLFILES=$(subst .sgml,.html,$(SGMLFILES)) index.html
|
||||
MANFILES=$(subst .sgml,.8,$(SGMLFILES))
|
||||
|
||||
-all: html
|
||||
+all:
|
||||
|
||||
html: $(HTMLFILES) iputils.html
|
||||
|
||||
--- iputils/Makefile.rh7 2002-09-20 20:23:55.000000000 +0200
|
||||
+++ iputils/Makefile 2004-05-12 15:08:25.638310270 +0200
|
||||
@@ -24,14 +24,14 @@
|
||||
CC=gcc
|
||||
# What a pity, all new gccs are buggy and -Werror does not work. Sigh.
|
||||
#CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g -Werror
|
||||
-CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
|
||||
-CFLAGS=$(CCOPT) $(GLIBCFIX) -I$(KERNEL_INCLUDE) -I../include $(DEFINES)
|
||||
+#CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
|
||||
+#CFLAGS=$(CCOPT) $(DEFINES)
|
||||
|
||||
IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
|
||||
IPV6_TARGETS=tracepath6 traceroute6 ping6
|
||||
TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS)
|
||||
|
||||
-all: check-kernel $(TARGETS)
|
||||
+all: $(TARGETS)
|
||||
|
||||
|
||||
tftpd: tftpd.o tftpsubs.o
|
||||
@@ -1,74 +0,0 @@
|
||||
diff -ru iputils/include-glibc/netinet/in.h iputils-clean/include-glibc/netinet/in.h
|
||||
--- iputils/include-glibc/netinet/in.h 2000-06-18 14:57:25.000000000 -0400
|
||||
+++ iputils-clean/include-glibc/netinet/in.h 2003-09-03 11:21:55.000000000 -0400
|
||||
@@ -8,4 +8,45 @@
|
||||
|
||||
#define SOL_IP 0
|
||||
|
||||
-#endif /* netinet/in.h */
|
||||
+/* Functions to convert between host and network byte order.
|
||||
+
|
||||
+ Please note that these functions normally take `unsigned long int' or
|
||||
+ `unsigned short int' values as arguments and also return them. But
|
||||
+ this was a short-sighted decision since on different systems the types
|
||||
+ may have different representations but the values are always the same. */
|
||||
+
|
||||
+extern u_int32_t ntohl (u_int32_t __netlong) __THROW __attribute__ ((__const__));
|
||||
+extern u_int16_t ntohs (u_int16_t __netshort)
|
||||
+ __THROW __attribute__ ((__const__));
|
||||
+extern u_int32_t htonl (u_int32_t __hostlong)
|
||||
+ __THROW __attribute__ ((__const__));
|
||||
+extern u_int16_t htons (u_int16_t __hostshort)
|
||||
+ __THROW __attribute__ ((__const__));
|
||||
+
|
||||
+#include <endian.h>
|
||||
+
|
||||
+/* Get machine dependent optimized versions of byte swapping functions. */
|
||||
+#include <bits/byteswap.h>
|
||||
+
|
||||
+#ifdef __OPTIMIZE__
|
||||
+/* We can optimize calls to the conversion functions. Either nothing has
|
||||
+ to be done or we are using directly the byte-swapping functions which
|
||||
+ often can be inlined. */
|
||||
+# if __BYTE_ORDER == __BIG_ENDIAN
|
||||
+/* The host byte order is the same as network byte order,
|
||||
+ so these functions are all just identity. */
|
||||
+# define ntohl(x) (x)
|
||||
+# define ntohs(x) (x)
|
||||
+# define htonl(x) (x)
|
||||
+# define htons(x) (x)
|
||||
+# else
|
||||
+# if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
+# define ntohl(x) __bswap_32 (x)
|
||||
+# define ntohs(x) __bswap_16 (x)
|
||||
+# define htonl(x) __bswap_32 (x)
|
||||
+# define htons(x) __bswap_16 (x)
|
||||
+# endif
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
+#endif /* netinet/in.h */
|
||||
diff -ru iputils/ping6.c iputils-clean/ping6.c
|
||||
--- iputils/ping6.c 2003-09-03 11:22:46.000000000 -0400
|
||||
+++ iputils-clean/ping6.c 2003-09-03 11:15:42.000000000 -0400
|
||||
@@ -879,7 +879,7 @@
|
||||
once = 1;
|
||||
|
||||
/* Patch bpflet for current identifier. */
|
||||
- insns[1] = (struct sock_filter)BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, __constant_htons(ident), 0, 1);
|
||||
+ insns[1] = (struct sock_filter)BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, htons(ident), 0, 1);
|
||||
|
||||
if (setsockopt(icmp_sock, SOL_SOCKET, SO_ATTACH_FILTER, &filter, sizeof(filter)))
|
||||
perror("WARNING: failed to install socket filter\n");
|
||||
diff -ru iputils/ping.c iputils-clean/ping.c
|
||||
--- iputils/ping.c 2003-09-03 11:22:46.000000000 -0400
|
||||
+++ iputils-clean/ping.c 2003-09-03 11:15:26.000000000 -0400
|
||||
@@ -1196,7 +1196,7 @@
|
||||
once = 1;
|
||||
|
||||
/* Patch bpflet for current identifier. */
|
||||
- insns[2] = (struct sock_filter)BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, __constant_htons(ident), 0, 1);
|
||||
+ insns[2] = (struct sock_filter)BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, htons(ident), 0, 1);
|
||||
|
||||
if (setsockopt(icmp_sock, SOL_SOCKET, SO_ATTACH_FILTER, &filter, sizeof(filter)))
|
||||
perror("WARNING: failed to install socket filter\n");
|
||||
@@ -1,232 +0,0 @@
|
||||
Submitted By: Alexander E. Patrakov
|
||||
Date: 2005-05-16
|
||||
Initial Package Version: 1.12
|
||||
Upstream Status: Not submitted, possibly incomplete
|
||||
Description: Makes Backspace and Delete keys consistent in all i386 keymaps.
|
||||
Obsoletes the /etc/kbd/bs-sends-del file for i386.
|
||||
|
||||
diff -urN kbd-1.12.orig/data/keymaps/i386/dvorak/dvorak-l.map kbd-1.12/data/keymaps/i386/dvorak/dvorak-l.map
|
||||
--- kbd-1.12.orig/data/keymaps/i386/dvorak/dvorak-l.map 2002-10-11 17:08:51.000000000 +0600
|
||||
+++ kbd-1.12/data/keymaps/i386/dvorak/dvorak-l.map 2005-05-16 19:54:48.000000000 +0600
|
||||
@@ -43,7 +43,7 @@
|
||||
keycode 11 = three numbersign
|
||||
keycode 12 = two at
|
||||
keycode 13 = one exclam
|
||||
- keycode 14 = BackSpace Delete
|
||||
+ keycode 14 = Delete Delete
|
||||
! --------------------------------------------------------------------------
|
||||
! Row 3
|
||||
! --------------------------------------------------------------------------
|
||||
diff -urN kbd-1.12.orig/data/keymaps/i386/dvorak/dvorak-r.map kbd-1.12/data/keymaps/i386/dvorak/dvorak-r.map
|
||||
--- kbd-1.12.orig/data/keymaps/i386/dvorak/dvorak-r.map 2002-10-11 17:08:51.000000000 +0600
|
||||
+++ kbd-1.12/data/keymaps/i386/dvorak/dvorak-r.map 2005-05-16 19:54:48.000000000 +0600
|
||||
@@ -43,7 +43,7 @@
|
||||
keycode 11 = slash question
|
||||
keycode 12 = bracketleft braceleft
|
||||
keycode 13 = bracketright braceright
|
||||
- keycode 14 = BackSpace Delete
|
||||
+ keycode 14 = Delete Delete
|
||||
! --------------------------------------------------------------------------
|
||||
! Row 3
|
||||
! --------------------------------------------------------------------------
|
||||
diff -urN kbd-1.12.orig/data/keymaps/i386/fgGIod/tr_f-latin5.map kbd-1.12/data/keymaps/i386/fgGIod/tr_f-latin5.map
|
||||
--- kbd-1.12.orig/data/keymaps/i386/fgGIod/tr_f-latin5.map 2002-10-13 06:21:12.000000000 +0600
|
||||
+++ kbd-1.12/data/keymaps/i386/fgGIod/tr_f-latin5.map 2005-05-16 19:54:48.000000000 +0600
|
||||
@@ -51,7 +51,7 @@
|
||||
alt keycode 12 = Meta_minus
|
||||
keycode 13 = minus underscore
|
||||
alt keycode 13 = Meta_equal
|
||||
-keycode 14 = BackSpace Delete
|
||||
+keycode 14 = Delete Delete
|
||||
alt keycode 14 = Meta_Delete
|
||||
keycode 15 = Tab Tab
|
||||
alt keycode 15 = Meta_Tab
|
||||
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/lt.l4.map kbd-1.12/data/keymaps/i386/qwerty/lt.l4.map
|
||||
--- kbd-1.12.orig/data/keymaps/i386/qwerty/lt.l4.map 2002-10-13 05:59:51.000000000 +0600
|
||||
+++ kbd-1.12/data/keymaps/i386/qwerty/lt.l4.map 2005-05-16 19:54:48.000000000 +0600
|
||||
@@ -205,7 +205,7 @@
|
||||
# edit this if you want the key above <Enter> to delete symbols above
|
||||
# cursor, not before.
|
||||
keycode 14 = \
|
||||
- BackSpace BackSpace BackSpace BackSpace \
|
||||
+ Delete Delete Delete Delete \
|
||||
Delete Delete Delete Delete \
|
||||
Meta_BackSpace Meta_BackSpace Meta_BackSpace Meta_BackSpace \
|
||||
Meta_Delete Meta_Delete Meta_Delete Meta_Delete
|
||||
@@ -506,7 +506,7 @@
|
||||
|
||||
# Edit this if you want strict VT100 emulation.
|
||||
string F111 = "\033[3$"
|
||||
-keycode 111 = Delete F111 Delete F111 \
|
||||
+keycode 111 = Remove F111 Remove F111 \
|
||||
Remove Remove Remove Remove \
|
||||
Meta_Delete Meta_Delete Meta_Delete Meta_Delete \
|
||||
Boot Boot Boot Boot
|
||||
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/lt.map kbd-1.12/data/keymaps/i386/qwerty/lt.map
|
||||
--- kbd-1.12.orig/data/keymaps/i386/qwerty/lt.map 2002-10-13 06:00:25.000000000 +0600
|
||||
+++ kbd-1.12/data/keymaps/i386/qwerty/lt.map 2005-05-16 19:54:48.000000000 +0600
|
||||
@@ -204,7 +204,7 @@
|
||||
# edit this if you want the key above <Enter> to delete symbols above
|
||||
# cursor, not before.
|
||||
keycode 14 = \
|
||||
- BackSpace BackSpace BackSpace BackSpace \
|
||||
+ Delete Delete Delete Delete \
|
||||
Delete Delete Delete Delete \
|
||||
Meta_BackSpace Meta_BackSpace Meta_BackSpace Meta_BackSpace \
|
||||
Meta_Delete Meta_Delete Meta_Delete Meta_Delete
|
||||
@@ -505,7 +505,7 @@
|
||||
|
||||
# Edit this if you want strict VT100 emulation.
|
||||
string F111 = "\033[3$"
|
||||
-keycode 111 = Delete F111 Delete F111 \
|
||||
+keycode 111 = Remove F111 Remove F111 \
|
||||
Remove Remove Remove Remove \
|
||||
Meta_Delete Meta_Delete Meta_Delete Meta_Delete \
|
||||
Boot Boot Boot Boot
|
||||
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/no-latin1.map kbd-1.12/data/keymaps/i386/qwerty/no-latin1.map
|
||||
--- kbd-1.12.orig/data/keymaps/i386/qwerty/no-latin1.map 2002-10-11 17:08:49.000000000 +0600
|
||||
+++ kbd-1.12/data/keymaps/i386/qwerty/no-latin1.map 2005-05-16 19:54:48.000000000 +0600
|
||||
@@ -3,7 +3,7 @@
|
||||
# Send comments to Kjetil T. Homme <kjetilho@ifi.uio.no>
|
||||
include "linux-with-alt-and-altgr"
|
||||
plain keycode 83 = KP_Comma
|
||||
- plain keycode 111 = Delete # "Remove" originally, weird...
|
||||
+ plain keycode 111 = Remove
|
||||
strings as usual
|
||||
|
||||
keycode 1 = Escape
|
||||
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/ru-ms.map kbd-1.12/data/keymaps/i386/qwerty/ru-ms.map
|
||||
--- kbd-1.12.orig/data/keymaps/i386/qwerty/ru-ms.map 2002-10-13 06:07:05.000000000 +0600
|
||||
+++ kbd-1.12/data/keymaps/i386/qwerty/ru-ms.map 2005-05-16 19:54:48.000000000 +0600
|
||||
@@ -89,8 +89,8 @@
|
||||
altgr alt keycode 13 = Meta_equal
|
||||
shift alt keycode 13 = Meta_plus
|
||||
altgr shift alt keycode 13 = Meta_plus
|
||||
- keycode 14 = BackSpace BackSpace BackSpace BackSpace
|
||||
-# keycode 14 = Delete Delete Delete Delete
|
||||
+# keycode 14 = BackSpace BackSpace BackSpace BackSpace
|
||||
+ keycode 14 = Delete Delete Delete Delete
|
||||
alt keycode 14 = Meta_Delete
|
||||
altgr alt keycode 14 = Meta_Delete
|
||||
keycode 15 = Tab Tab Tab Tab
|
||||
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/ru.map kbd-1.12/data/keymaps/i386/qwerty/ru.map
|
||||
--- kbd-1.12.orig/data/keymaps/i386/qwerty/ru.map 2002-10-13 06:02:19.000000000 +0600
|
||||
+++ kbd-1.12/data/keymaps/i386/qwerty/ru.map 2005-05-16 19:56:08.000000000 +0600
|
||||
@@ -37,7 +37,7 @@
|
||||
alt keycode 12 = Meta_minus
|
||||
keycode 13 = equal plus equal plus
|
||||
alt keycode 13 = Meta_equal
|
||||
- keycode 14 = BackSpace BackSpace BackSpace BackSpace
|
||||
+ keycode 14 = Delete Delete Delete Delete
|
||||
alt keycode 14 = Meta_Delete
|
||||
keycode 15 = Tab Tab Tab Tab
|
||||
alt keycode 15 = Meta_Tab
|
||||
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/ru1.map kbd-1.12/data/keymaps/i386/qwerty/ru1.map
|
||||
--- kbd-1.12.orig/data/keymaps/i386/qwerty/ru1.map 2002-10-13 06:02:30.000000000 +0600
|
||||
+++ kbd-1.12/data/keymaps/i386/qwerty/ru1.map 2005-05-16 19:55:32.000000000 +0600
|
||||
@@ -143,8 +143,8 @@
|
||||
|
||||
# The keycode "0xFF" is too dangerous for many programs (including emacs).
|
||||
# So let it be bracket instead of Hard Sign.
|
||||
-# altgr keycode 27 = +0xDF
|
||||
-# altgr shift keycode 27 = +0xFF
|
||||
+altgr keycode 27 = +0xDF
|
||||
+altgr shift keycode 27 = +0xFF
|
||||
control keycode 27 = Control_bracketright
|
||||
altgr control keycode 27 = Control_bracketright
|
||||
alt keycode 27 = Meta_bracketright
|
||||
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/ru2.map kbd-1.12/data/keymaps/i386/qwerty/ru2.map
|
||||
--- kbd-1.12.orig/data/keymaps/i386/qwerty/ru2.map 2002-10-13 06:05:47.000000000 +0600
|
||||
+++ kbd-1.12/data/keymaps/i386/qwerty/ru2.map 2005-05-16 19:56:52.000000000 +0600
|
||||
@@ -46,7 +46,7 @@
|
||||
alt keycode 12 = Meta_minus
|
||||
keycode 13 = equal plus equal plus
|
||||
alt keycode 13 = Meta_equal
|
||||
- keycode 14 = BackSpace BackSpace BackSpace BackSpace
|
||||
+ keycode 14 = Delete Delete Delete Delete
|
||||
alt keycode 14 = Meta_Delete
|
||||
keycode 15 = Tab Tab Tab Tab
|
||||
alt keycode 15 = Meta_Tab
|
||||
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/se-ir209.map kbd-1.12/data/keymaps/i386/qwerty/se-ir209.map
|
||||
--- kbd-1.12.orig/data/keymaps/i386/qwerty/se-ir209.map 2002-10-13 06:12:48.000000000 +0600
|
||||
+++ kbd-1.12/data/keymaps/i386/qwerty/se-ir209.map 2005-05-16 19:54:48.000000000 +0600
|
||||
@@ -345,7 +345,7 @@
|
||||
keycode 109 = Next Scroll_Forward
|
||||
keycode 110 = Insert
|
||||
|
||||
- keycode 111 = Delete # "Remove" originally, weird...
|
||||
+ keycode 111 = Remove
|
||||
control alt keycode 111 = Boot
|
||||
control altgr keycode 111 = Boot
|
||||
|
||||
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/se-lat6.map kbd-1.12/data/keymaps/i386/qwerty/se-lat6.map
|
||||
--- kbd-1.12.orig/data/keymaps/i386/qwerty/se-lat6.map 2002-10-13 06:13:01.000000000 +0600
|
||||
+++ kbd-1.12/data/keymaps/i386/qwerty/se-lat6.map 2005-05-16 19:54:48.000000000 +0600
|
||||
@@ -374,6 +374,6 @@
|
||||
keycode 109 = Next Scroll_Forward
|
||||
keycode 110 = Insert
|
||||
|
||||
- keycode 111 = Delete # "Remove" originally, weird...
|
||||
+ keycode 111 = Remove
|
||||
control alt keycode 111 = Boot
|
||||
control altgr keycode 111 = Boot
|
||||
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/tr_q-latin5.map kbd-1.12/data/keymaps/i386/qwerty/tr_q-latin5.map
|
||||
--- kbd-1.12.orig/data/keymaps/i386/qwerty/tr_q-latin5.map 2002-10-11 17:08:49.000000000 +0600
|
||||
+++ kbd-1.12/data/keymaps/i386/qwerty/tr_q-latin5.map 2005-05-16 19:54:48.000000000 +0600
|
||||
@@ -49,7 +49,7 @@
|
||||
alt keycode 12 = Meta_minus
|
||||
keycode 13 = minus underscore
|
||||
alt keycode 13 = Meta_equal
|
||||
-keycode 14 = BackSpace Delete
|
||||
+keycode 14 = Delete Delete
|
||||
alt keycode 14 = Meta_Delete
|
||||
keycode 15 = Tab Tab
|
||||
alt keycode 15 = Meta_Tab
|
||||
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/ua-utf-ws.map kbd-1.12/data/keymaps/i386/qwerty/ua-utf-ws.map
|
||||
--- kbd-1.12.orig/data/keymaps/i386/qwerty/ua-utf-ws.map 2002-10-13 06:07:56.000000000 +0600
|
||||
+++ kbd-1.12/data/keymaps/i386/qwerty/ua-utf-ws.map 2005-05-16 19:54:48.000000000 +0600
|
||||
@@ -260,7 +260,7 @@
|
||||
shift ctrll ctrlr keycode 13 = plus
|
||||
alt ctrll ctrlr keycode 13 = Meta_equal
|
||||
shift alt ctrll ctrlr keycode 13 = Meta_plus
|
||||
-keycode 14 = BackSpace Delete
|
||||
+keycode 14 = Delete Delete
|
||||
control keycode 14 = BackSpace
|
||||
alt keycode 14 = Meta_Delete
|
||||
ctrlr keycode 14 = BackSpace
|
||||
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/ua-utf.map kbd-1.12/data/keymaps/i386/qwerty/ua-utf.map
|
||||
--- kbd-1.12.orig/data/keymaps/i386/qwerty/ua-utf.map 2002-10-13 06:08:07.000000000 +0600
|
||||
+++ kbd-1.12/data/keymaps/i386/qwerty/ua-utf.map 2005-05-16 19:54:48.000000000 +0600
|
||||
@@ -250,7 +250,7 @@
|
||||
shift ctrll ctrlr keycode 13 = plus
|
||||
alt ctrll ctrlr keycode 13 = Meta_equal
|
||||
shift alt ctrll ctrlr keycode 13 = Meta_plus
|
||||
-keycode 14 = BackSpace Delete
|
||||
+keycode 14 = Delete Delete
|
||||
control keycode 14 = BackSpace
|
||||
alt keycode 14 = Meta_Delete
|
||||
ctrlr keycode 14 = BackSpace
|
||||
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/ua-ws.map kbd-1.12/data/keymaps/i386/qwerty/ua-ws.map
|
||||
--- kbd-1.12.orig/data/keymaps/i386/qwerty/ua-ws.map 2002-10-13 06:08:19.000000000 +0600
|
||||
+++ kbd-1.12/data/keymaps/i386/qwerty/ua-ws.map 2005-05-16 19:54:48.000000000 +0600
|
||||
@@ -260,7 +260,7 @@
|
||||
shift ctrll ctrlr keycode 13 = plus
|
||||
alt ctrll ctrlr keycode 13 = Meta_equal
|
||||
shift alt ctrll ctrlr keycode 13 = Meta_plus
|
||||
-keycode 14 = BackSpace Delete
|
||||
+keycode 14 = Delete Delete
|
||||
control keycode 14 = BackSpace
|
||||
alt keycode 14 = Meta_Delete
|
||||
ctrlr keycode 14 = BackSpace
|
||||
diff -urN kbd-1.12.orig/data/keymaps/i386/qwerty/ua.map kbd-1.12/data/keymaps/i386/qwerty/ua.map
|
||||
--- kbd-1.12.orig/data/keymaps/i386/qwerty/ua.map 2002-10-13 06:08:31.000000000 +0600
|
||||
+++ kbd-1.12/data/keymaps/i386/qwerty/ua.map 2005-05-16 19:54:48.000000000 +0600
|
||||
@@ -249,7 +249,7 @@
|
||||
shift ctrll ctrlr keycode 13 = plus
|
||||
alt ctrll ctrlr keycode 13 = Meta_equal
|
||||
shift alt ctrll ctrlr keycode 13 = Meta_plus
|
||||
-keycode 14 = BackSpace Delete
|
||||
+keycode 14 = Delete Delete
|
||||
control keycode 14 = BackSpace
|
||||
alt keycode 14 = Meta_Delete
|
||||
ctrlr keycode 14 = BackSpace
|
||||
@@ -1,54 +0,0 @@
|
||||
Submitted By: Matthew Burgess <matthew@linuxfromscratch.org>
|
||||
Date: 2005-07-28
|
||||
Initial Package Version: 1.12
|
||||
Upstream Status: Unknown
|
||||
Origin: http://cvs.fedora.redhat.com/viewcvs/devel/kbd/kbd-1.12-alias.patch?rev=1.2&view=markup
|
||||
Description: Fix violations of C aliasing rules, triggered by gcc4.
|
||||
|
||||
diff -Naur kbd-1.12.orig/src/psffontop.c kbd-1.12/src/psffontop.c
|
||||
--- kbd-1.12.orig/src/psffontop.c 2004-01-16 19:45:31.000000000 +0000
|
||||
+++ kbd-1.12/src/psffontop.c 2005-07-28 20:33:57.946088984 +0000
|
||||
@@ -59,7 +59,6 @@
|
||||
|
||||
static unsigned int
|
||||
assemble_ucs2(char **inptr, int cnt) {
|
||||
- unsigned char **in = (unsigned char **) inptr;
|
||||
unsigned int u1, u2;
|
||||
|
||||
if (cnt < 2) {
|
||||
@@ -68,8 +67,8 @@
|
||||
exit(EX_DATAERR);
|
||||
}
|
||||
|
||||
- u1 = *(*in)++;
|
||||
- u2 = *(*in)++;
|
||||
+ u1 = (unsigned char)*(*inptr)++;
|
||||
+ u2 = (unsigned char)*(*inptr)++;
|
||||
return (u1 | (u2 << 8));
|
||||
}
|
||||
|
||||
@@ -110,7 +109,6 @@
|
||||
*/
|
||||
static void
|
||||
get_uni_entry(char **inptr, char **endptr, struct unicode_list *up, int utf8) {
|
||||
- unsigned char **in = (unsigned char **) inptr;
|
||||
unsigned char uc;
|
||||
unicode unichar;
|
||||
int inseq = 0;
|
||||
@@ -126,14 +124,14 @@
|
||||
exit(EX_DATAERR);
|
||||
}
|
||||
if (utf8) {
|
||||
- uc = *(*in)++;
|
||||
+ uc = *(*inptr)++;
|
||||
if (uc == PSF2_SEPARATOR)
|
||||
break;
|
||||
if (uc == PSF2_STARTSEQ) {
|
||||
inseq = 1;
|
||||
continue;
|
||||
}
|
||||
- --(*in);
|
||||
+ --(*inptr);
|
||||
unichar = assemble_utf8(inptr, *endptr - *inptr);
|
||||
} else {
|
||||
unichar = assemble_ucs2(inptr, *endptr - *inptr);
|
||||
@@ -1,46 +0,0 @@
|
||||
Submitted By: Greg Schafer <greg at linuxfromscratch dot org>
|
||||
Date: 2004-01-07
|
||||
Initial Package Version: 1.10
|
||||
Origin: LFS Book and Anderson Lizardo <lizardo at linuxfromscratch dot org>
|
||||
(based on kbd-1.08-more-programs.patch)
|
||||
Description: Install additional programs included in kbd package,
|
||||
including their manpages. Note: setlogcons does not have
|
||||
a manpage.
|
||||
|
||||
diff -Naur kbd-1.10.orig/man/Makefile kbd-1.10/man/Makefile
|
||||
--- kbd-1.10.orig/man/Makefile 2002-10-11 22:12:53.000000000 +0000
|
||||
+++ kbd-1.10/man/Makefile 2004-01-07 02:36:13.471404128 +0000
|
||||
@@ -7,6 +7,9 @@
|
||||
install -d -m 755 $(MANDIR)/$$i; \
|
||||
install -m 644 $$i/*.[0-9] $(MANDIR)/$$i; \
|
||||
done
|
||||
+ install -d -m 755 $(MANDIR)/man8
|
||||
+ install -m 644 man8misc/setvesablank.8 $(MANDIR)/man8
|
||||
+ install -m 644 man8misc/getunimap.8 $(MANDIR)/man8
|
||||
rm -f $(MANDIR)/man5/keytables.5
|
||||
|
||||
clean:
|
||||
diff -Naur kbd-1.10.orig/src/Makefile.in kbd-1.10/src/Makefile.in
|
||||
--- kbd-1.10.orig/src/Makefile.in 2004-01-03 17:53:06.000000000 +0000
|
||||
+++ kbd-1.10/src/Makefile.in 2004-01-07 02:36:44.706655648 +0000
|
||||
@@ -46,8 +46,9 @@
|
||||
OLDPROGS= mapscrn loadunimap
|
||||
|
||||
# Not installed by default
|
||||
-MISC = screendump setlogcons setvesablank spawn_console spawn_login \
|
||||
- getunimap clrunimap outpsfheader setpalette
|
||||
+#MISC = screendump setlogcons setvesablank spawn_console spawn_login \
|
||||
+# getunimap clrunimap outpsfheader setpalette
|
||||
+MISC = setlogcons setvesablank getunimap
|
||||
|
||||
# Installed by default
|
||||
SHCMDS = unicode_start unicode_stop
|
||||
@@ -73,7 +74,7 @@
|
||||
install: all
|
||||
install -d -m 0755 $(BINDIR) $(LOADKEYS_BINDIR)
|
||||
install -s -m 0755 $(setowner) $(PROGS) $(OLDPROGS) $(BINDIR)
|
||||
-# install -s -m 0755 $(setowner) $(MISC) $(BINDIR)
|
||||
+ install -s -m 0755 $(setowner) $(MISC) $(BINDIR)
|
||||
install -c -m 0755 $(setowner) $(SHCMDS) $(BINDIR)
|
||||
for i in psfaddtable psfgettable psfstriptable; do \
|
||||
rm -f $(BINDIR)/$$i; ln -s psfxtable $(BINDIR)/$$i; \
|
||||
@@ -1,82 +0,0 @@
|
||||
diff -Naur linux-3.10.10/drivers/net/usb/smsc95xx.c linux-c1af7c6db316763b9dce7137495cb9ada8fa17b4/drivers/net/usb/smsc95xx.c
|
||||
--- linux-3.10.10/drivers/net/usb/smsc95xx.c 2013-08-29 18:47:51.000000000 +0200
|
||||
+++ linux-c1af7c6db316763b9dce7137495cb9ada8fa17b4/drivers/net/usb/smsc95xx.c 2013-08-30 20:12:54.000000000 +0200
|
||||
@@ -61,6 +61,7 @@
|
||||
#define SUSPEND_SUSPEND3 (0x08)
|
||||
#define SUSPEND_ALLMODES (SUSPEND_SUSPEND0 | SUSPEND_SUSPEND1 | \
|
||||
SUSPEND_SUSPEND2 | SUSPEND_SUSPEND3)
|
||||
+#define MAC_ADDR_LEN (6)
|
||||
|
||||
struct smsc95xx_priv {
|
||||
u32 mac_cr;
|
||||
@@ -76,6 +77,10 @@
|
||||
module_param(turbo_mode, bool, 0644);
|
||||
MODULE_PARM_DESC(turbo_mode, "Enable multiple frames per Rx transaction");
|
||||
|
||||
+static char *macaddr = ":";
|
||||
+module_param(macaddr, charp, 0);
|
||||
+MODULE_PARM_DESC(macaddr, "MAC address");
|
||||
+
|
||||
static int __must_check __smsc95xx_read_reg(struct usbnet *dev, u32 index,
|
||||
u32 *data, int in_pm)
|
||||
{
|
||||
@@ -765,8 +770,59 @@
|
||||
return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL);
|
||||
}
|
||||
|
||||
+/* Check the macaddr module parameter for a MAC address */
|
||||
+static int smsc95xx_is_macaddr_param(struct usbnet *dev, u8 *dev_mac)
|
||||
+{
|
||||
+ int i, j, got_num, num;
|
||||
+ u8 mtbl[MAC_ADDR_LEN];
|
||||
+
|
||||
+ if (macaddr[0] == ':')
|
||||
+ return 0;
|
||||
+
|
||||
+ i = 0;
|
||||
+ j = 0;
|
||||
+ num = 0;
|
||||
+ got_num = 0;
|
||||
+ while (j < MAC_ADDR_LEN) {
|
||||
+ if (macaddr[i] && macaddr[i] != ':') {
|
||||
+ got_num++;
|
||||
+ if ('0' <= macaddr[i] && macaddr[i] <= '9')
|
||||
+ num = num * 16 + macaddr[i] - '0';
|
||||
+ else if ('A' <= macaddr[i] && macaddr[i] <= 'F')
|
||||
+ num = num * 16 + 10 + macaddr[i] - 'A';
|
||||
+ else if ('a' <= macaddr[i] && macaddr[i] <= 'f')
|
||||
+ num = num * 16 + 10 + macaddr[i] - 'a';
|
||||
+ else
|
||||
+ break;
|
||||
+ i++;
|
||||
+ } else if (got_num == 2) {
|
||||
+ mtbl[j++] = (u8) num;
|
||||
+ num = 0;
|
||||
+ got_num = 0;
|
||||
+ i++;
|
||||
+ } else {
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (j == MAC_ADDR_LEN) {
|
||||
+ netif_dbg(dev, ifup, dev->net, "Overriding MAC address with: "
|
||||
+ "%02x:%02x:%02x:%02x:%02x:%02x\n", mtbl[0], mtbl[1], mtbl[2],
|
||||
+ mtbl[3], mtbl[4], mtbl[5]);
|
||||
+ for (i = 0; i < MAC_ADDR_LEN; i++)
|
||||
+ dev_mac[i] = mtbl[i];
|
||||
+ return 1;
|
||||
+ } else {
|
||||
+ return 0;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static void smsc95xx_init_mac_address(struct usbnet *dev)
|
||||
{
|
||||
+ /* Check module parameters */
|
||||
+ if (smsc95xx_is_macaddr_param(dev, dev->net->dev_addr))
|
||||
+ return;
|
||||
+
|
||||
/* try reading mac address from EEPROM */
|
||||
if (smsc95xx_read_eeprom(dev, EEPROM_MAC_OFFSET, ETH_ALEN,
|
||||
dev->net->dev_addr) == 0) {
|
||||
@@ -1,19 +0,0 @@
|
||||
diff -Naur linux-3.10.10.org/drivers/crypto/mv_cesa.c linux-3.10.10/drivers/crypto/mv_cesa.c
|
||||
--- linux-3.10.10.org/drivers/crypto/mv_cesa.c 2013-08-29 18:47:51.000000000 +0200
|
||||
+++ linux-3.10.10/drivers/crypto/mv_cesa.c 2013-09-04 13:06:35.000000000 +0200
|
||||
@@ -1120,6 +1120,7 @@
|
||||
else
|
||||
printk(KERN_WARNING MV_CESA "Could not register sha1 driver\n");
|
||||
|
||||
+/*
|
||||
ret = crypto_register_ahash(&mv_hmac_sha1_alg);
|
||||
if (ret == 0) {
|
||||
cpg->has_hmac_sha1 = 1;
|
||||
@@ -1127,6 +1128,7 @@
|
||||
printk(KERN_WARNING MV_CESA
|
||||
"Could not register hmac-sha1 driver\n");
|
||||
}
|
||||
+*/
|
||||
|
||||
return 0;
|
||||
err_unreg_ecb:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,12 +0,0 @@
|
||||
diff -Naur linux-3.14.79.ORG/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c linux-3.14.79/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c
|
||||
--- linux-3.14.79.ORG/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c 2017-06-16 19:58:56.000000000 +0200
|
||||
+++ linux-3.14.79/drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c 2017-06-17 09:32:51.645096482 +0200
|
||||
@@ -1776,7 +1776,7 @@
|
||||
** VC_RESUME_FAILED - Currently unused - no mechanism to fail resume exists.
|
||||
*/
|
||||
|
||||
-inline void
|
||||
+void
|
||||
set_suspend_state(VCHIQ_ARM_STATE_T *arm_state,
|
||||
enum vc_suspend_status new_state)
|
||||
{
|
||||
@@ -1,99 +0,0 @@
|
||||
From a44147a09baf8c46cc0b02332df3a4656e0659d5 Mon Sep 17 00:00:00 2001
|
||||
From: Arne Fitzenreiter <arne_f@ipfire.org>
|
||||
Date: Mon, 10 Dec 2018 13:12:00 +0100
|
||||
Subject: [PATCH] Revert "usb: dwc2: Fix DMA alignment to start at allocated
|
||||
boundary"
|
||||
|
||||
This reverts commit 68fc92a0f3913d539d1ac68a861f895e34099e46.
|
||||
---
|
||||
drivers/usb/dwc2/hcd.c | 44 +++++++++++++++++++++-----------------------
|
||||
1 file changed, 21 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
|
||||
index fa20ec4..4b81d08 100644
|
||||
--- a/drivers/usb/dwc2/hcd.c
|
||||
+++ b/drivers/usb/dwc2/hcd.c
|
||||
@@ -2644,29 +2644,34 @@ static int dwc2_alloc_split_dma_aligned_buf(struct dwc2_hsotg *hsotg,
|
||||
|
||||
#define DWC2_USB_DMA_ALIGN 4
|
||||
|
||||
+struct dma_aligned_buffer {
|
||||
+ void *kmalloc_ptr;
|
||||
+ void *old_xfer_buffer;
|
||||
+ u8 data[0];
|
||||
+};
|
||||
+
|
||||
static void dwc2_free_dma_aligned_buffer(struct urb *urb)
|
||||
{
|
||||
- void *stored_xfer_buffer;
|
||||
+ struct dma_aligned_buffer *temp;
|
||||
|
||||
if (!(urb->transfer_flags & URB_ALIGNED_TEMP_BUFFER))
|
||||
return;
|
||||
|
||||
- /* Restore urb->transfer_buffer from the end of the allocated area */
|
||||
- memcpy(&stored_xfer_buffer, urb->transfer_buffer +
|
||||
- urb->transfer_buffer_length, sizeof(urb->transfer_buffer));
|
||||
+ temp = container_of(urb->transfer_buffer,
|
||||
+ struct dma_aligned_buffer, data);
|
||||
|
||||
if (usb_urb_dir_in(urb))
|
||||
- memcpy(stored_xfer_buffer, urb->transfer_buffer,
|
||||
+ memcpy(temp->old_xfer_buffer, temp->data,
|
||||
urb->transfer_buffer_length);
|
||||
- kfree(urb->transfer_buffer);
|
||||
- urb->transfer_buffer = stored_xfer_buffer;
|
||||
+ urb->transfer_buffer = temp->old_xfer_buffer;
|
||||
+ kfree(temp->kmalloc_ptr);
|
||||
|
||||
urb->transfer_flags &= ~URB_ALIGNED_TEMP_BUFFER;
|
||||
}
|
||||
|
||||
static int dwc2_alloc_dma_aligned_buffer(struct urb *urb, gfp_t mem_flags)
|
||||
{
|
||||
- void *kmalloc_ptr;
|
||||
+ struct dma_aligned_buffer *temp, *kmalloc_ptr;
|
||||
size_t kmalloc_size;
|
||||
|
||||
if (urb->num_sgs || urb->sg ||
|
||||
@@ -2674,29 +2679,22 @@ static int dwc2_alloc_dma_aligned_buffer(struct urb *urb, gfp_t mem_flags)
|
||||
!((uintptr_t)urb->transfer_buffer & (DWC2_USB_DMA_ALIGN - 1)))
|
||||
return 0;
|
||||
|
||||
- /*
|
||||
- * Allocate a buffer with enough padding for original transfer_buffer
|
||||
- * pointer. This allocation is guaranteed to be aligned properly for
|
||||
- * DMA
|
||||
- */
|
||||
+ /* Allocate a buffer with enough padding for alignment */
|
||||
kmalloc_size = urb->transfer_buffer_length +
|
||||
- sizeof(urb->transfer_buffer);
|
||||
+ sizeof(struct dma_aligned_buffer) + DWC2_USB_DMA_ALIGN - 1;
|
||||
|
||||
kmalloc_ptr = kmalloc(kmalloc_size, mem_flags);
|
||||
if (!kmalloc_ptr)
|
||||
return -ENOMEM;
|
||||
|
||||
- /*
|
||||
- * Position value of original urb->transfer_buffer pointer to the end
|
||||
- * of allocation for later referencing
|
||||
- */
|
||||
- memcpy(kmalloc_ptr + urb->transfer_buffer_length,
|
||||
- &urb->transfer_buffer, sizeof(urb->transfer_buffer));
|
||||
-
|
||||
+ /* Position our struct dma_aligned_buffer such that data is aligned */
|
||||
+ temp = PTR_ALIGN(kmalloc_ptr + 1, DWC2_USB_DMA_ALIGN) - 1;
|
||||
+ temp->kmalloc_ptr = kmalloc_ptr;
|
||||
+ temp->old_xfer_buffer = urb->transfer_buffer;
|
||||
if (usb_urb_dir_out(urb))
|
||||
- memcpy(kmalloc_ptr, urb->transfer_buffer,
|
||||
+ memcpy(temp->data, urb->transfer_buffer,
|
||||
urb->transfer_buffer_length);
|
||||
- urb->transfer_buffer = kmalloc_ptr;
|
||||
+ urb->transfer_buffer = temp->data;
|
||||
|
||||
urb->transfer_flags |= URB_ALIGNED_TEMP_BUFFER;
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
diff -Naur linux-4.9.8.org/drivers/net/wireless/ralink/rt2x00/rt2800usb.c linux-4.9.8/drivers/net/wireless/ralink/rt2x00/rt2800usb.c
|
||||
--- linux-4.9.8.org/drivers/net/wireless/ralink/rt2x00/rt2800usb.c 2017-02-04 09:47:29.000000000 +0100
|
||||
+++ linux-4.9.8/drivers/net/wireless/ralink/rt2x00/rt2800usb.c 2017-02-11 10:50:04.909859370 +0100
|
||||
@@ -448,7 +448,7 @@
|
||||
|
||||
rt2x00usb_register_read(rt2x00dev, TXRXQ_PCNT, ®);
|
||||
if (rt2x00_get_field32(reg, TXRXQ_PCNT_TX0Q)) {
|
||||
- rt2x00_warn(rt2x00dev, "TX HW queue 0 timed out, invoke forced kick\n");
|
||||
+ rt2x00_dbg(rt2x00dev, "TX HW queue 0 timed out, invoke forced kick\n");
|
||||
|
||||
rt2x00usb_register_write(rt2x00dev, PBF_CFG, 0xf40012);
|
||||
|
||||
@@ -463,7 +463,7 @@
|
||||
|
||||
rt2x00usb_register_read(rt2x00dev, TXRXQ_PCNT, ®);
|
||||
if (rt2x00_get_field32(reg, TXRXQ_PCNT_TX1Q)) {
|
||||
- rt2x00_warn(rt2x00dev, "TX HW queue 1 timed out, invoke forced kick\n");
|
||||
+ rt2x00_dbg(rt2x00dev, "TX HW queue 1 timed out, invoke forced kick\n");
|
||||
|
||||
rt2x00usb_register_write(rt2x00dev, PBF_CFG, 0xf4000a);
|
||||
|
||||
@@ -613,7 +613,7 @@
|
||||
|
||||
if (unlikely(test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags) ||
|
||||
!test_bit(ENTRY_DATA_STATUS_PENDING, &entry->flags))) {
|
||||
- rt2x00_warn(rt2x00dev, "Data pending for entry %u in queue %u\n",
|
||||
+ rt2x00_dbg(rt2x00dev, "Data pending for entry %u in queue %u\n",
|
||||
entry->entry_idx, qid);
|
||||
break;
|
||||
}
|
||||
diff -Naur linux-4.9.8.org/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c linux-4.9.8/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
|
||||
--- linux-4.9.8.org/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c 2017-02-04 09:47:29.000000000 +0100
|
||||
+++ linux-4.9.8/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c 2017-02-11 10:50:04.909859370 +0100
|
||||
@@ -524,7 +524,7 @@
|
||||
|
||||
static void rt2x00usb_watchdog_tx_dma(struct data_queue *queue)
|
||||
{
|
||||
- rt2x00_warn(queue->rt2x00dev, "TX queue %d DMA timed out, invoke forced forced reset\n",
|
||||
+ rt2x00_dbg(queue->rt2x00dev, "TX queue %d DMA timed out, invoke forced reset\n",
|
||||
queue->qid);
|
||||
|
||||
rt2x00queue_stop_queue(queue);
|
||||
@@ -1,245 +0,0 @@
|
||||
diff --git a/minilzo/minilzo.c b/minilzo/minilzo.c
|
||||
index 34ce0f0..ecfdf66 100644
|
||||
--- a/minilzo/minilzo.c
|
||||
+++ b/minilzo/minilzo.c
|
||||
@@ -3547,6 +3547,8 @@ DO_COMPRESS ( const lzo_bytep in , lzo_uint in_len,
|
||||
#undef TEST_LBO
|
||||
#undef NEED_IP
|
||||
#undef NEED_OP
|
||||
+#undef TEST_IV
|
||||
+#undef TEST_OV
|
||||
#undef HAVE_TEST_IP
|
||||
#undef HAVE_TEST_OP
|
||||
#undef HAVE_NEED_IP
|
||||
@@ -3561,6 +3563,7 @@ DO_COMPRESS ( const lzo_bytep in , lzo_uint in_len,
|
||||
# if (LZO_TEST_OVERRUN_INPUT >= 2)
|
||||
# define NEED_IP(x) \
|
||||
if ((lzo_uint)(ip_end - ip) < (lzo_uint)(x)) goto input_overrun
|
||||
+# define TEST_IV(x) if ((x) > (lzo_uint)0 - (511)) goto input_overrun
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -3572,6 +3575,7 @@ DO_COMPRESS ( const lzo_bytep in , lzo_uint in_len,
|
||||
# undef TEST_OP
|
||||
# define NEED_OP(x) \
|
||||
if ((lzo_uint)(op_end - op) < (lzo_uint)(x)) goto output_overrun
|
||||
+# define TEST_OV(x) if ((x) > (lzo_uint)0 - (511)) goto output_overrun
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -3602,11 +3606,13 @@ DO_COMPRESS ( const lzo_bytep in , lzo_uint in_len,
|
||||
# define HAVE_NEED_IP 1
|
||||
#else
|
||||
# define NEED_IP(x) ((void) 0)
|
||||
+# define TEST_IV(x) ((void) 0)
|
||||
#endif
|
||||
#if defined(NEED_OP)
|
||||
# define HAVE_NEED_OP 1
|
||||
#else
|
||||
# define NEED_OP(x) ((void) 0)
|
||||
+# define TEST_OV(x) ((void) 0)
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_TEST_IP) || defined(HAVE_NEED_IP)
|
||||
@@ -3687,6 +3693,7 @@ DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len,
|
||||
{
|
||||
t += 255;
|
||||
ip++;
|
||||
+ TEST_IV(t);
|
||||
NEED_IP(1);
|
||||
}
|
||||
t += 15 + *ip++;
|
||||
@@ -3835,6 +3842,7 @@ match:
|
||||
{
|
||||
t += 255;
|
||||
ip++;
|
||||
+ TEST_OV(t);
|
||||
NEED_IP(1);
|
||||
}
|
||||
t += 31 + *ip++;
|
||||
@@ -3879,6 +3887,7 @@ match:
|
||||
{
|
||||
t += 255;
|
||||
ip++;
|
||||
+ TEST_OV(t);
|
||||
NEED_IP(1);
|
||||
}
|
||||
t += 7 + *ip++;
|
||||
@@ -4073,6 +4082,8 @@ lookbehind_overrun:
|
||||
#undef TEST_LBO
|
||||
#undef NEED_IP
|
||||
#undef NEED_OP
|
||||
+#undef TEST_IV
|
||||
+#undef TEST_OV
|
||||
#undef HAVE_TEST_IP
|
||||
#undef HAVE_TEST_OP
|
||||
#undef HAVE_NEED_IP
|
||||
@@ -4087,6 +4098,7 @@ lookbehind_overrun:
|
||||
# if (LZO_TEST_OVERRUN_INPUT >= 2)
|
||||
# define NEED_IP(x) \
|
||||
if ((lzo_uint)(ip_end - ip) < (lzo_uint)(x)) goto input_overrun
|
||||
+# define TEST_IV(x) if ((x) > (lzo_uint)0 - (511)) goto input_overrun
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -4098,6 +4110,7 @@ lookbehind_overrun:
|
||||
# undef TEST_OP
|
||||
# define NEED_OP(x) \
|
||||
if ((lzo_uint)(op_end - op) < (lzo_uint)(x)) goto output_overrun
|
||||
+# define TEST_OV(x) if ((x) > (lzo_uint)0 - (511)) goto output_overrun
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -4128,11 +4141,13 @@ lookbehind_overrun:
|
||||
# define HAVE_NEED_IP 1
|
||||
#else
|
||||
# define NEED_IP(x) ((void) 0)
|
||||
+# define TEST_IV(x) ((void) 0)
|
||||
#endif
|
||||
#if defined(NEED_OP)
|
||||
# define HAVE_NEED_OP 1
|
||||
#else
|
||||
# define NEED_OP(x) ((void) 0)
|
||||
+# define TEST_OV(x) ((void) 0)
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_TEST_IP) || defined(HAVE_NEED_IP)
|
||||
@@ -4213,6 +4228,7 @@ DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len,
|
||||
{
|
||||
t += 255;
|
||||
ip++;
|
||||
+ TEST_IV(t);
|
||||
NEED_IP(1);
|
||||
}
|
||||
t += 15 + *ip++;
|
||||
@@ -4361,6 +4377,7 @@ match:
|
||||
{
|
||||
t += 255;
|
||||
ip++;
|
||||
+ TEST_OV(t);
|
||||
NEED_IP(1);
|
||||
}
|
||||
t += 31 + *ip++;
|
||||
@@ -4405,6 +4422,7 @@ match:
|
||||
{
|
||||
t += 255;
|
||||
ip++;
|
||||
+ TEST_OV(t);
|
||||
NEED_IP(1);
|
||||
}
|
||||
t += 7 + *ip++;
|
||||
diff --git a/src/lzo1_d.ch b/src/lzo1_d.ch
|
||||
index 40a5bfd..c442d9c 100644
|
||||
--- a/src/lzo1_d.ch
|
||||
+++ b/src/lzo1_d.ch
|
||||
@@ -76,6 +76,8 @@
|
||||
#undef TEST_LBO
|
||||
#undef NEED_IP
|
||||
#undef NEED_OP
|
||||
+#undef TEST_IV
|
||||
+#undef TEST_OV
|
||||
#undef HAVE_TEST_IP
|
||||
#undef HAVE_TEST_OP
|
||||
#undef HAVE_NEED_IP
|
||||
@@ -91,6 +93,7 @@
|
||||
# if (LZO_TEST_OVERRUN_INPUT >= 2)
|
||||
# define NEED_IP(x) \
|
||||
if ((lzo_uint)(ip_end - ip) < (lzo_uint)(x)) goto input_overrun
|
||||
+# define TEST_IV(x) if ((x) > (lzo_uint)0 - (511)) goto input_overrun
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -102,6 +105,7 @@
|
||||
# undef TEST_OP /* don't need both of the tests here */
|
||||
# define NEED_OP(x) \
|
||||
if ((lzo_uint)(op_end - op) < (lzo_uint)(x)) goto output_overrun
|
||||
+# define TEST_OV(x) if ((x) > (lzo_uint)0 - (511)) goto output_overrun
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -135,11 +139,13 @@
|
||||
# define HAVE_NEED_IP 1
|
||||
#else
|
||||
# define NEED_IP(x) ((void) 0)
|
||||
+# define TEST_IV(x) ((void) 0)
|
||||
#endif
|
||||
#if defined(NEED_OP)
|
||||
# define HAVE_NEED_OP 1
|
||||
#else
|
||||
# define NEED_OP(x) ((void) 0)
|
||||
+# define TEST_OV(x) ((void) 0)
|
||||
#endif
|
||||
|
||||
|
||||
diff --git a/src/lzo1b_d.ch b/src/lzo1b_d.ch
|
||||
index fe5f361..36b4b6b 100644
|
||||
--- a/src/lzo1b_d.ch
|
||||
+++ b/src/lzo1b_d.ch
|
||||
@@ -187,6 +187,7 @@ match:
|
||||
{
|
||||
t += 255;
|
||||
ip++;
|
||||
+ TEST_OV(t);
|
||||
NEED_IP(1);
|
||||
}
|
||||
t += (M4_MIN_LEN - M3_MIN_LEN) + *ip++;
|
||||
diff --git a/src/lzo1f_d.ch b/src/lzo1f_d.ch
|
||||
index 9e942f5..0c2199e 100644
|
||||
--- a/src/lzo1f_d.ch
|
||||
+++ b/src/lzo1f_d.ch
|
||||
@@ -84,6 +84,7 @@ DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len,
|
||||
{
|
||||
t += 255;
|
||||
ip++;
|
||||
+ TEST_IV(t);
|
||||
NEED_IP(1);
|
||||
}
|
||||
t += 31 + *ip++;
|
||||
@@ -138,6 +139,7 @@ match:
|
||||
{
|
||||
t += 255;
|
||||
ip++;
|
||||
+ TEST_OV(t);
|
||||
NEED_IP(1);
|
||||
}
|
||||
t += 31 + *ip++;
|
||||
diff --git a/src/lzo1x_d.ch b/src/lzo1x_d.ch
|
||||
index 49cf326..c804cc7 100644
|
||||
--- a/src/lzo1x_d.ch
|
||||
+++ b/src/lzo1x_d.ch
|
||||
@@ -120,6 +120,7 @@ DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len,
|
||||
{
|
||||
t += 255;
|
||||
ip++;
|
||||
+ TEST_IV(t);
|
||||
NEED_IP(1);
|
||||
}
|
||||
t += 15 + *ip++;
|
||||
@@ -273,6 +274,7 @@ match:
|
||||
{
|
||||
t += 255;
|
||||
ip++;
|
||||
+ TEST_OV(t);
|
||||
NEED_IP(1);
|
||||
}
|
||||
t += 31 + *ip++;
|
||||
@@ -317,6 +319,7 @@ match:
|
||||
{
|
||||
t += 255;
|
||||
ip++;
|
||||
+ TEST_OV(t);
|
||||
NEED_IP(1);
|
||||
}
|
||||
t += 7 + *ip++;
|
||||
diff --git a/src/lzo2a_d.ch b/src/lzo2a_d.ch
|
||||
index 48e51ca..954f07e 100644
|
||||
--- a/src/lzo2a_d.ch
|
||||
+++ b/src/lzo2a_d.ch
|
||||
@@ -131,6 +131,7 @@ DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len,
|
||||
{
|
||||
t += 255;
|
||||
ip++;
|
||||
+ TEST_OV(t);
|
||||
NEED_IP(1);
|
||||
}
|
||||
t += *ip++;
|
||||
@@ -1,202 +0,0 @@
|
||||
The getline function used in a couple of places in netpbm-free is also
|
||||
defined by POSIX:2008, and so netpbm-free fails to build with newer
|
||||
versions of (e)glibc. Here's a patch to rename it.
|
||||
|
||||
* Rename getline functions to get_line to avoid conflict with POSIX:2008.
|
||||
|
||||
--- netpbm-free-10.0.orig/ppm/xvminitoppm.c
|
||||
+++ netpbm-free-10.0/ppm/xvminitoppm.c
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "ppm.h"
|
||||
#define BUFSIZE 256
|
||||
|
||||
-static void getline ARGS((FILE *fp, char *buf));
|
||||
+static void get_line ARGS((FILE *fp, char *buf));
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
@@ -48,18 +48,18 @@
|
||||
i++;
|
||||
}
|
||||
|
||||
- getline(ifp, buf);
|
||||
+ get_line(ifp, buf);
|
||||
if( strncmp(buf, "P7 332", 6) != 0 )
|
||||
pm_error("bad magic number - not a XV thumbnail picture");
|
||||
|
||||
while(1) {
|
||||
- getline(ifp, buf);
|
||||
+ get_line(ifp, buf);
|
||||
if( strncmp(buf, "#END_OF_COMMENTS", 16)==0 )
|
||||
break;
|
||||
if( strncmp(buf, "#BUILTIN", 8)==0 )
|
||||
pm_error("cannot convert builtin XV thumbnail pictures");
|
||||
}
|
||||
- getline(ifp, buf);
|
||||
+ get_line(ifp, buf);
|
||||
if( sscanf(buf, "%d %d %d", &cols, &rows, &maxval) != 3 )
|
||||
pm_error("error parsing dimension info");
|
||||
if( maxval != 255 )
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
|
||||
static void
|
||||
-getline(fp, buf)
|
||||
+get_line(fp, buf)
|
||||
FILE *fp;
|
||||
char *buf;
|
||||
{
|
||||
--- netpbm-free-10.0.orig/ppm/xpmtoppm.c
|
||||
+++ netpbm-free-10.0/ppm/xpmtoppm.c
|
||||
@@ -114,7 +114,7 @@
|
||||
|
||||
|
||||
static void
|
||||
-getline(char * const line, int const size, FILE * const stream) {
|
||||
+get_line(char * const line, int const size, FILE * const stream) {
|
||||
/*----------------------------------------------------------------------------
|
||||
Read the next line from the input file 'stream', through the one-line
|
||||
buffer lastInputLine[].
|
||||
@@ -130,7 +130,7 @@
|
||||
Exit program if the line doesn't fit in the buffer.
|
||||
-----------------------------------------------------------------------------*/
|
||||
if (size > MAX_LINE+1)
|
||||
- pm_error("INTERNAL ERROR: getline() received 'size' parameter "
|
||||
+ pm_error("INTERNAL ERROR: get_line() received 'size' parameter "
|
||||
"which is out of bounds");
|
||||
|
||||
if (backup) {
|
||||
@@ -346,7 +346,7 @@
|
||||
int * const transparentP) {
|
||||
/*----------------------------------------------------------------------------
|
||||
Read the header of the XPM file on stream 'stream'. Assume the
|
||||
- getline() stream is presently positioned to the beginning of the
|
||||
+ get_line() stream is presently positioned to the beginning of the
|
||||
file and it is a Version 3 XPM file. Leave the stream positioned
|
||||
after the header.
|
||||
|
||||
@@ -377,25 +377,25 @@
|
||||
*widthP = *heightP = *ncolorsP = *chars_per_pixelP = -1;
|
||||
|
||||
/* Read the XPM signature comment */
|
||||
- getline(line, sizeof(line), stream);
|
||||
+ get_line(line, sizeof(line), stream);
|
||||
if (strncmp(line, xpm3_signature, strlen(xpm3_signature)) != 0)
|
||||
pm_error("Apparent XPM 3 file does not start with '/* XPM */'. "
|
||||
"First line is '%s'", xpm3_signature);
|
||||
|
||||
/* Read the assignment line */
|
||||
- getline(line, sizeof(line), stream);
|
||||
+ get_line(line, sizeof(line), stream);
|
||||
if (strncmp(line, "static char", 11) != 0)
|
||||
pm_error("Cannot find data structure declaration. Expected a "
|
||||
"line starting with 'static char', but found the line "
|
||||
"'%s'.", line);
|
||||
|
||||
/* Read the hints line */
|
||||
- getline(line, sizeof(line), stream);
|
||||
+ get_line(line, sizeof(line), stream);
|
||||
/* skip the comment line if any */
|
||||
if (!strncmp(line, "/*", 2)) {
|
||||
while (!strstr(line, "*/"))
|
||||
- getline(line, sizeof(line), stream);
|
||||
- getline(line, sizeof(line), stream);
|
||||
+ get_line(line, sizeof(line), stream);
|
||||
+ get_line(line, sizeof(line), stream);
|
||||
}
|
||||
if (sscanf(line, "\"%d %d %d %d\",", widthP, heightP,
|
||||
ncolorsP, chars_per_pixelP) != 4)
|
||||
@@ -427,10 +427,10 @@
|
||||
*transparentP = -1; /* initial value */
|
||||
|
||||
for (seqNum = 0; seqNum < *ncolorsP; seqNum++) {
|
||||
- getline(line, sizeof(line), stream);
|
||||
+ get_line(line, sizeof(line), stream);
|
||||
/* skip the comment line if any */
|
||||
if (!strncmp(line, "/*", 2))
|
||||
- getline(line, sizeof(line), stream);
|
||||
+ get_line(line, sizeof(line), stream);
|
||||
|
||||
interpretXpm3ColorTableLine(line, seqNum, *chars_per_pixelP,
|
||||
*colorsP, *ptabP, transparentP);
|
||||
@@ -445,7 +445,7 @@
|
||||
pixel ** const colorsP, int ** const ptabP) {
|
||||
/*----------------------------------------------------------------------------
|
||||
Read the header of the XPM file on stream 'stream'. Assume the
|
||||
- getline() stream is presently positioned to the beginning of the
|
||||
+ get_line() stream is presently positioned to the beginning of the
|
||||
file and it is a Version 1 XPM file. Leave the stream positioned
|
||||
after the header.
|
||||
|
||||
@@ -464,7 +464,7 @@
|
||||
/* Read the initial defines. */
|
||||
processedStaticChar = FALSE;
|
||||
while (!processedStaticChar) {
|
||||
- getline(line, sizeof(line), stream);
|
||||
+ get_line(line, sizeof(line), stream);
|
||||
|
||||
if (sscanf(line, "#define %s %d", str1, &v) == 2) {
|
||||
char *t1;
|
||||
@@ -512,7 +512,7 @@
|
||||
/* If there's a monochrome color table, skip it. */
|
||||
if (!strncmp(t1, "mono", 4)) {
|
||||
for (;;) {
|
||||
- getline(line, sizeof(line), stream);
|
||||
+ get_line(line, sizeof(line), stream);
|
||||
if (!strncmp(line, "static char", 11))
|
||||
break;
|
||||
}
|
||||
@@ -533,7 +533,7 @@
|
||||
|
||||
/* Read color table. */
|
||||
for (i = 0; i < *ncolorsP; ++i) {
|
||||
- getline(line, sizeof(line), stream);
|
||||
+ get_line(line, sizeof(line), stream);
|
||||
|
||||
if ((t1 = strchr(line, '"')) == NULL)
|
||||
pm_error("D error scanning color table");
|
||||
@@ -569,7 +569,7 @@
|
||||
"static char ...").
|
||||
*/
|
||||
for (;;) {
|
||||
- getline(line, sizeof(line), stream);
|
||||
+ get_line(line, sizeof(line), stream);
|
||||
if (strncmp(line, "static char", 11) == 0)
|
||||
break;
|
||||
}
|
||||
@@ -660,7 +660,7 @@
|
||||
backup = FALSE;
|
||||
|
||||
/* Read the header line */
|
||||
- getline(line, sizeof(line), stream);
|
||||
+ get_line(line, sizeof(line), stream);
|
||||
backup = TRUE; /* back up so next read reads this line again */
|
||||
|
||||
rc = sscanf(line, "/* %s */", str1);
|
||||
@@ -681,7 +681,7 @@
|
||||
pm_error("Could not get %d bytes of memory for image", totalpixels);
|
||||
cursor = *dataP;
|
||||
maxcursor = *dataP + totalpixels - 1;
|
||||
- getline(line, sizeof(line), stream);
|
||||
+ get_line(line, sizeof(line), stream);
|
||||
/* read next line (first line may not always start with comment) */
|
||||
while (cursor <= maxcursor) {
|
||||
if (strncmp(line, "/*", 2) == 0) {
|
||||
@@ -691,7 +691,7 @@
|
||||
ncolors, ptab, &cursor, maxcursor);
|
||||
}
|
||||
if (cursor <= maxcursor)
|
||||
- getline(line, sizeof(line), stream);
|
||||
+ get_line(line, sizeof(line), stream);
|
||||
}
|
||||
if (ptab) free(ptab);
|
||||
}
|
||||
|
||||
Thanks,
|
||||
|
||||
--
|
||||
Colin Watson [cjwatson@ubuntu.com]
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
diff -up openssl-1.0.0-beta5/Configure.enginesdir openssl-1.0.0-beta5/Configure
|
||||
--- openssl-1.0.0-beta5/Configure.enginesdir 2010-01-20 18:07:05.000000000 +0100
|
||||
+++ openssl-1.0.0-beta5/Configure 2010-01-20 18:10:48.000000000 +0100
|
||||
@@ -622,6 +622,7 @@ my $idx_multilib = $idx++;
|
||||
my $prefix="";
|
||||
my $libdir="";
|
||||
my $openssldir="";
|
||||
+my $enginesdir="";
|
||||
my $exe_ext="";
|
||||
my $install_prefix= "$ENV{'INSTALL_PREFIX'}";
|
||||
my $cross_compile_prefix="";
|
||||
@@ -833,6 +834,10 @@ PROCESS_ARGS:
|
||||
{
|
||||
$openssldir=$1;
|
||||
}
|
||||
+ elsif (/^--enginesdir=(.*)$/)
|
||||
+ {
|
||||
+ $enginesdir=$1;
|
||||
+ }
|
||||
elsif (/^--install.prefix=(.*)$/)
|
||||
{
|
||||
$install_prefix=$1;
|
||||
@@ -1053,7 +1058,7 @@ chop $prefix if $prefix =~ /.\/$/;
|
||||
|
||||
$openssldir=$prefix . "/ssl" if $openssldir eq "";
|
||||
$openssldir=$prefix . "/" . $openssldir if $openssldir !~ /(^\/|^[a-zA-Z]:[\\\/])/;
|
||||
-
|
||||
+$enginesdir="$prefix/lib/engines" if $enginesdir eq "";
|
||||
|
||||
print "IsMK1MF=$IsMK1MF\n";
|
||||
|
||||
@@ -1673,7 +1678,7 @@ while (<IN>)
|
||||
}
|
||||
elsif (/^#define\s+ENGINESDIR/)
|
||||
{
|
||||
- my $foo = "$prefix/$libdir/engines";
|
||||
+ my $foo = "$enginesdir";
|
||||
$foo =~ s/\\/\\\\/g;
|
||||
print OUT "#define ENGINESDIR \"$foo\"\n";
|
||||
}
|
||||
diff -up openssl-1.0.0-beta5/engines/Makefile.enginesdir openssl-1.0.0-beta5/engines/Makefile
|
||||
--- openssl-1.0.0-beta5/engines/Makefile.enginesdir 2010-01-16 21:06:09.000000000 +0100
|
||||
+++ openssl-1.0.0-beta5/engines/Makefile 2010-01-20 18:07:05.000000000 +0100
|
||||
@@ -124,7 +124,7 @@ install:
|
||||
sfx=".so"; \
|
||||
cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
|
||||
fi; \
|
||||
- chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
|
||||
+ chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \
|
||||
mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
|
||||
done; \
|
||||
fi
|
||||
@@ -1,115 +0,0 @@
|
||||
diff -up openssl-1.0.2e/Configure.rpmbuild openssl-1.0.2e/Configure
|
||||
--- openssl-1.0.2e/Configure.rpmbuild 2015-12-03 15:04:23.000000000 +0100
|
||||
+++ openssl-1.0.2e/Configure 2015-12-04 13:20:22.996835604 +0100
|
||||
@@ -365,8 +365,8 @@ my %table=(
|
||||
####
|
||||
# *-generic* is endian-neutral target, but ./config is free to
|
||||
# throw in -D[BL]_ENDIAN, whichever appropriate...
|
||||
-"linux-generic32","gcc:-O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
-"linux-ppc", "gcc:-DB_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc32_asm}:linux32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"linux-generic32","gcc:-Wall \$(RPM_OPT_FLAGS)::-D_REENTRANT::-Wl,-z,relro -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC:\$(RPM_OPT_FLAGS):.so.\$(SHLIB_SONAMEVER)",
|
||||
+"linux-ppc", "gcc:-DB_ENDIAN -Wall \$(RPM_OPT_FLAGS)::-D_REENTRANT::-Wl,-z,relro -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc32_asm}:linux32:dlfcn:linux-shared:-fPIC:\$(RPM_OPT_FLAGS):.so.\$(SHLIB_SONAMEVER)",
|
||||
|
||||
#######################################################################
|
||||
# Note that -march is not among compiler options in below linux-armv4
|
||||
@@ -395,31 +395,31 @@ my %table=(
|
||||
#
|
||||
# ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8
|
||||
#
|
||||
-"linux-armv4", "gcc: -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
-"linux-aarch64","gcc: -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${aarch64_asm}:linux64:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"linux-armv4", "gcc:-Wall \$(RPM_OPT_FLAGS)::-D_REENTRANT::-Wl,-z,relro -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC:\$(RPM_OPT_FLAGS):.so.\$(SHLIB_SONAMEVER)",
|
||||
+"linux-aarch64","gcc:-DL_ENDIAN -Wall \$(RPM_OPT_FLAGS)::-D_REENTRANT::-Wl,-z,relro -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${aarch64_asm}:linux64:dlfcn:linux-shared:-fPIC:\$(RPM_OPT_FLAGS):.so.\$(SHLIB_SONAMEVER):::64",
|
||||
# Configure script adds minimally required -march for assembly support,
|
||||
# if no -march was specified at command line. mips32 and mips64 below
|
||||
# refer to contemporary MIPS Architecture specifications, MIPS32 and
|
||||
# MIPS64, rather than to kernel bitness.
|
||||
-"linux-mips32", "gcc:-mabi=32 -O3 -Wall -DBN_DIV3W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
-"linux-mips64", "gcc:-mabi=n32 -O3 -Wall -DBN_DIV3W::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips64_asm}:n32:dlfcn:linux-shared:-fPIC:-mabi=n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::32",
|
||||
-"linux64-mips64", "gcc:-mabi=64 -O3 -Wall -DBN_DIV3W::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips64_asm}:64:dlfcn:linux-shared:-fPIC:-mabi=64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
||||
+"linux-mips32", "gcc:-mabi=32 -Wall \$(RPM_OPT_FLAGS) -DBN_DIV3W::-D_REENTRANT::-Wl,-z,relro -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC:\$(RPM_OPT_FLAGS):.so.\$(SHLIB_SONAMEVER)",
|
||||
+"linux-mips64", "gcc:-mabi=n32 -Wall \$(RPM_OPT_FLAGS) -DBN_DIV3W::-D_REENTRANT::-Wl,-z,relro -ldl:SIXTY_FOUR_BIT RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips64_asm}:n32:dlfcn:linux-shared:-fPIC:-mabi=n32 \$(RPM_OPT_FLAGS):.so.\$(SHLIB_SONAMEVER):::32",
|
||||
+"linux64-mips64", "gcc:-mabi=64 -Wall \$(RPM_OPT_FLAGS) -DBN_DIV3W::-D_REENTRANT::-Wl,-z,relro -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips64_asm}:64:dlfcn:linux-shared:-fPIC:-mabi=64 \$(RPM_OPT_FLAGS):.so.\$(SHLIB_SONAMEVER):::64",
|
||||
#### IA-32 targets...
|
||||
"linux-ia32-icc", "icc:-DL_ENDIAN -O2::-D_REENTRANT::-ldl -no_cpprt:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-KPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
-"linux-elf", "gcc:-DL_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"linux-elf", "gcc:-DL_ENDIAN -Wall \$(RPM_OPT_FLAGS)::-D_REENTRANT::-Wl,-z,relro -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC:\$(RPM_OPT_FLAGS):.so.\$(SHLIB_SONAMEVER)",
|
||||
"linux-aout", "gcc:-DL_ENDIAN -O3 -fomit-frame-pointer -march=i486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:a.out",
|
||||
####
|
||||
-"linux-generic64","gcc:-O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
-"linux-ppc64", "gcc:-m64 -DB_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc64_asm}:linux64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
||||
-"linux-ppc64le","gcc:-m64 -DL_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:$ppc64_asm:linux64le:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::",
|
||||
-"linux-ia64", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"linux-generic64","gcc:-Wall \$(RPM_OPT_FLAGS)::-D_REENTRANT::-Wl,-z,relro -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC:\$(RPM_OPT_FLAGS):.so.\$(SHLIB_SONAMEVER):::64",
|
||||
+"linux-ppc64", "gcc:-m64 -DB_ENDIAN -Wall \$(RPM_OPT_FLAGS)::-D_REENTRANT::-Wl,-z,relro -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:${ppc64_asm}:linux64:dlfcn:linux-shared:-fPIC:-m64 \$(RPM_OPT_FLAGS):.so.\$(SHLIB_SONAMEVER):::64",
|
||||
+"linux-ppc64le","gcc:-m64 -DL_ENDIAN -Wall \$(RPM_OPT_FLAGS)::-D_REENTRANT::-Wl,-z,relro -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL:$ppc64_asm:linux64le:dlfcn:linux-shared:-fPIC:-m64 \$(RPM_OPT_FLAGS):.so.\$(SHLIB_SONAMEVER):::64",
|
||||
+"linux-ia64", "gcc:-DL_ENDIAN -Wall \$(RPM_OPT_FLAGS)::-D_REENTRANT::-Wl,-z,relro -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC:\$(RPM_OPT_FLAGS):.so.\$(SHLIB_SONAMEVER)",
|
||||
"linux-ia64-icc","icc:-DL_ENDIAN -O2 -Wall::-D_REENTRANT::-ldl -no_cpprt:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
-"linux-x86_64", "gcc:-m64 -DL_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
||||
+"linux-x86_64", "gcc:-m64 -DL_ENDIAN -Wall \$(RPM_OPT_FLAGS)::-D_REENTRANT::-Wl,-z,relro -ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64 \$(RPM_OPT_FLAGS):.so.\$(SHLIB_SONAMEVER):::64",
|
||||
"linux-x86_64-clang", "clang: -m64 -DL_ENDIAN -O3 -Wall -Wextra $clang_disabled_warnings -Qunused-arguments::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
||||
"debug-linux-x86_64-clang", "clang: -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -m64 -DL_ENDIAN -g -Wall -Wextra $clang_disabled_warnings -Qunused-arguments::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
||||
"linux-x86_64-icc", "icc:-DL_ENDIAN -O2::-D_REENTRANT::-ldl -no_cpprt:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
||||
"linux-x32", "gcc:-mx32 -DL_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-mx32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::x32",
|
||||
-"linux64-s390x", "gcc:-m64 -DB_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${s390x_asm}:64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
||||
+"linux64-s390x", "gcc:-m64 -DB_ENDIAN -Wall \$(RPM_OPT_FLAGS)::-D_REENTRANT::-Wl,-z,relro -ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${s390x_asm}:64:dlfcn:linux-shared:-fPIC:-m64 \$(RPM_OPT_FLAGS):.so.\$(SHLIB_SONAMEVER):::64",
|
||||
#### So called "highgprs" target for z/Architecture CPUs
|
||||
# "Highgprs" is kernel feature first implemented in Linux 2.6.32, see
|
||||
# /proc/cpuinfo. The idea is to preserve most significant bits of
|
||||
@@ -437,12 +437,12 @@ my %table=(
|
||||
#### SPARC Linux setups
|
||||
# Ray Miller <ray.miller@computing-services.oxford.ac.uk> has patiently
|
||||
# assisted with debugging of following two configs.
|
||||
-"linux-sparcv8","gcc:-mcpu=v8 -DB_ENDIAN -O3 -fomit-frame-pointer -Wall -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"linux-sparcv8","gcc:-mcpu=v8 -DB_ENDIAN -Wall \$(RPM_OPT_FLAGS) -DBN_DIV2W::-D_REENTRANT::-Wl,-z,relro -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv8_asm}:dlfcn:linux-shared:-fPIC:\$(RPM_OPT_FLAGS):.so.\$(SHLIB_SONAMEVER)",
|
||||
# it's a real mess with -mcpu=ultrasparc option under Linux, but
|
||||
# -Wa,-Av8plus should do the trick no matter what.
|
||||
-"linux-sparcv9","gcc:-m32 -mcpu=ultrasparc -DB_ENDIAN -O3 -fomit-frame-pointer -Wall -Wa,-Av8plus -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC:-m32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||
+"linux-sparcv9","gcc:-m32 -mcpu=ultrasparc -DB_ENDIAN -Wall \$(RPM_OPT_FLAGS) -Wa,-Av8plus -DBN_DIV2W::-D_REENTRANT:ULTRASPARC:-Wl,-z,relro -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC:-m32 \$(RPM_OPT_FLAGS):.so.\$(SHLIB_SONAMEVER)",
|
||||
# GCC 3.1 is a requirement
|
||||
-"linux64-sparcv9","gcc:-m64 -mcpu=ultrasparc -DB_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT:ULTRASPARC:-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
||||
+"linux64-sparcv9","gcc:-m64 -mcpu=ultrasparc -DB_ENDIAN -Wall \$(RPM_OPT_FLAGS)::-D_REENTRANT:ULTRASPARC:-Wl,-z,relro -ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:${sparcv9_asm}:dlfcn:linux-shared:-fPIC:-m64 \$(RPM_OPT_FLAGS):.so.\$(SHLIB_SONAMEVER):::64",
|
||||
#### Alpha Linux with GNU C and Compaq C setups
|
||||
# Special notes:
|
||||
# - linux-alpha+bwx-gcc is ment to be used from ./config only. If you
|
||||
@@ -1767,7 +1767,7 @@ while (<IN>)
|
||||
elsif ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*\.[^\.]*$/)
|
||||
{
|
||||
my $sotmp = $1;
|
||||
- s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
|
||||
+ s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_SONAMEVER) .s$sotmp/;
|
||||
}
|
||||
elsif ($shared_extension ne "" && $shared_extension =~ /^\.[^\.]*\.[^\.]*\.dylib$/)
|
||||
{
|
||||
diff -up openssl-1.0.2e/Makefile.org.rpmbuild openssl-1.0.2e/Makefile.org
|
||||
--- openssl-1.0.2e/Makefile.org.rpmbuild 2015-12-03 15:04:23.000000000 +0100
|
||||
+++ openssl-1.0.2e/Makefile.org 2015-12-04 13:18:44.913538616 +0100
|
||||
@@ -10,6 +10,7 @@ SHLIB_VERSION_HISTORY=
|
||||
SHLIB_MAJOR=
|
||||
SHLIB_MINOR=
|
||||
SHLIB_EXT=
|
||||
+SHLIB_SONAMEVER=10
|
||||
PLATFORM=dist
|
||||
OPTIONS=
|
||||
CONFIGURE_ARGS=
|
||||
@@ -341,10 +342,9 @@ clean-shared:
|
||||
link-shared:
|
||||
@ set -e; for i in $(SHLIBDIRS); do \
|
||||
$(MAKE) -f $(HERE)/Makefile.shared -e $(BUILDENV) \
|
||||
- LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
|
||||
+ LIBNAME=$$i LIBVERSION=$(SHLIB_SONAMEVER) \
|
||||
LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
|
||||
symlink.$(SHLIB_TARGET); \
|
||||
- libs="$$libs -l$$i"; \
|
||||
done
|
||||
|
||||
build-shared: do_$(SHLIB_TARGET) link-shared
|
||||
@@ -355,7 +355,7 @@ do_$(SHLIB_TARGET):
|
||||
libs="$(LIBKRB5) $$libs"; \
|
||||
fi; \
|
||||
$(CLEARENV) && $(MAKE) -f Makefile.shared -e $(BUILDENV) \
|
||||
- LIBNAME=$$i LIBVERSION=$(SHLIB_MAJOR).$(SHLIB_MINOR) \
|
||||
+ LIBNAME=$$i LIBVERSION=$(SHLIB_SONAMEVER) \
|
||||
LIBCOMPATVERSIONS=";$(SHLIB_VERSION_HISTORY)" \
|
||||
LIBDEPS="$$libs $(EX_LIBS)" \
|
||||
link_a.$(SHLIB_TARGET); \
|
||||
@@ -1,11 +0,0 @@
|
||||
diff -Naur openssl-1.0.2a.org/crypto/x86cpuid.pl openssl-1.0.2a/crypto/x86cpuid.pl
|
||||
--- openssl-1.0.2a.org/crypto/x86cpuid.pl 2015-03-19 14:30:36.000000000 +0100
|
||||
+++ openssl-1.0.2a/crypto/x86cpuid.pl 2015-04-28 13:47:57.853521020 +0200
|
||||
@@ -71,6 +71,7 @@
|
||||
&mov ("eax",1);
|
||||
&xor ("ecx","ecx");
|
||||
&cpuid ();
|
||||
+ &and ("ecx",0xfffffdff); # clear SSSE3 because it is incredible slow on AMD's
|
||||
&bt ("edx",28);
|
||||
&jnc (&label("generic"));
|
||||
&shr ("ebx",16);
|
||||
@@ -1,18 +0,0 @@
|
||||
diff -up openssl-1.0.2g/ssl/ssl_lib.c.v2v3 openssl-1.0.2g/ssl/ssl_lib.c
|
||||
--- openssl-1.0.2g/ssl/ssl_lib.c.v2v3 2016-03-01 16:38:26.879142021 +0100
|
||||
+++ openssl-1.0.2g/ssl/ssl_lib.c 2016-03-01 16:41:32.977353769 +0100
|
||||
@@ -2055,11 +2055,11 @@ SSL_CTX *SSL_CTX_new(const SSL_METHOD *m
|
||||
ret->options |= SSL_OP_LEGACY_SERVER_CONNECT;
|
||||
|
||||
/*
|
||||
- * Disable SSLv2 by default, callers that want to enable SSLv2 will have to
|
||||
- * explicitly clear this option via either of SSL_CTX_clear_options() or
|
||||
+ * Disable SSLv2 and SSLv3 by default, callers that want to enable these will have to
|
||||
+ * explicitly clear these options via either of SSL_CTX_clear_options() or
|
||||
* SSL_clear_options().
|
||||
*/
|
||||
- ret->options |= SSL_OP_NO_SSLv2;
|
||||
+ ret->options |= SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3;
|
||||
|
||||
return (ret);
|
||||
err:
|
||||
@@ -1,28 +0,0 @@
|
||||
From 8e508f23bf5ed727649c99bbd540f7b1c2c2bd35 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stevan=20Baji=C4=87?= <stevan@bajic.ch>
|
||||
Date: Mon, 9 Jul 2012 09:43:11 +0200
|
||||
Subject: [PATCH] RLIMIT_* variables are no longer defined unless you
|
||||
explicitly include sys/resource.h.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
|
||||
|
||||
modules/pam_unix/pam_unix_acct.c: Include sys/resource.h.
|
||||
---
|
||||
modules/pam_unix/pam_unix_acct.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/modules/pam_unix/pam_unix_acct.c b/modules/pam_unix/pam_unix_acct.c
|
||||
index 8e90cc9..4a362f8 100644
|
||||
--- a/modules/pam_unix/pam_unix_acct.c
|
||||
+++ b/modules/pam_unix/pam_unix_acct.c
|
||||
@@ -41,6 +41,7 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
+#include <sys/resource.h>
|
||||
#include <syslog.h>
|
||||
#include <pwd.h>
|
||||
#include <shadow.h>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,12 +0,0 @@
|
||||
--- setup.py~ 2008-04-22 17:00:45.000000000 +0300
|
||||
+++ setup.py 2008-07-03 21:53:36.000000000 +0300
|
||||
@@ -97,8 +97,7 @@
|
||||
else:
|
||||
extra_compile_args.append(e)
|
||||
libs = split_quoted(
|
||||
- os.popen("'%s' --libs" % CURL_CONFIG).read()+\
|
||||
- os.popen("'%s' --static-libs" % CURL_CONFIG).read())
|
||||
+ os.popen("'%s' --libs" % CURL_CONFIG).read())
|
||||
for e in libs:
|
||||
if e[:2] == "-l":
|
||||
libraries.append(e[2:])
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +0,0 @@
|
||||
diff -Naur systemd-208.org/src/udev/mtd_probe/mtd_probe.h systemd-208/src/udev/mtd_probe/mtd_probe.h
|
||||
--- systemd-208.org/src/udev/mtd_probe/mtd_probe.h 2013-08-13 22:02:47.000000000 +0200
|
||||
+++ systemd-208/src/udev/mtd_probe/mtd_probe.h 2017-02-07 18:08:33.492985563 +0100
|
||||
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <mtd/mtd-user.h>
|
||||
+#include <stdint.h>
|
||||
|
||||
/* Full oob structure as written on the flash */
|
||||
struct sm_oob {
|
||||
@@ -1,12 +0,0 @@
|
||||
diff -Naur systemd-208.org/src/libudev/libudev-util.c systemd-208/src/libudev/libudev-util.c
|
||||
--- systemd-208.org/src/libudev/libudev-util.c 2013-09-23 21:31:55.000000000 +0200
|
||||
+++ systemd-208/src/libudev/libudev-util.c 2013-11-19 23:18:10.326350131 +0100
|
||||
@@ -481,7 +481,7 @@
|
||||
if (fd < 0)
|
||||
return -errno;
|
||||
|
||||
- len = snprintf(text, sizeof(text), "<30>systemd-udevd[%u]: ", getpid());
|
||||
+ len = snprintf(text, sizeof(text), "udevd[%u]: ", getpid());
|
||||
|
||||
va_start(ap, fmt);
|
||||
len += vsnprintf(text + len, sizeof(text) - len, fmt, ap);
|
||||
Reference in New Issue
Block a user