(2007-04-11) Kable-distro

This commit is contained in:
2007-04-11 00:00:00 +02:00
commit 85f73f180f
548 changed files with 51134 additions and 0 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,723 @@
Submitted By: Jeremy Huntwork (jhuntwork at linuxfromscratch dot org)
Date: 2006-04-11
Initial Package Version: 3.1
Origin: http://ftp.gnu.org/gnu/bash/bash-3.1-patches/
Upstream Status: From Upstream
Description: Contains patches 001-017 from upstream
diff -Naur bash-3.1.orig/arrayfunc.c bash-3.1/arrayfunc.c
--- bash-3.1.orig/arrayfunc.c 2005-07-04 17:25:58.000000000 -0700
+++ bash-3.1/arrayfunc.c 2006-04-19 15:59:29.000000000 -0700
@@ -592,11 +592,7 @@
exp = (char *)xmalloc (len);
strncpy (exp, s, len - 1);
exp[len - 1] = '\0';
-#if 0
- t = expand_string_to_string (exp, 0);
-#else
- t = expand_string_to_string (exp, Q_DOUBLE_QUOTES);
-#endif
+ t = expand_arith_string (exp, 0);
this_command_name = (char *)NULL;
val = evalexp (t, &expok);
free (t);
diff -Naur bash-3.1.orig/doc/bash.1 bash-3.1/doc/bash.1
--- bash-3.1.orig/doc/bash.1 2005-10-12 08:40:52.000000000 -0700
+++ bash-3.1/doc/bash.1 2006-04-19 15:58:34.000000000 -0700
@@ -6,12 +6,12 @@
.\" Case Western Reserve University
.\" chet@po.cwru.edu
.\"
-.\" Last Change: Sat Aug 27 13:28:44 EDT 2005
+.\" Last Change: Wed Dec 28 19:58:45 EST 2005
.\"
.\" bash_builtins, strip all but Built-Ins section
.if \n(zZ=1 .ig zZ
.if \n(zY=1 .ig zY
-.TH BASH 1 "2005 Aug 27" "GNU Bash-3.1-beta1"
+.TH BASH 1 "2005 Dec 28" "GNU Bash-3.1"
.\"
.\" There's some problem with having a `@'
.\" in a tagged paragraph with the BSD man macros.
@@ -677,8 +677,8 @@
.B nocasematch
is enabled, the match is performed without regard to the case
of alphabetic characters.
-The return value is 0 if the string matches or does not match
-the pattern, respectively, and 1 otherwise.
+The return value is 0 if the string matches (\fB==\fP) or does not match
+(\fB!=\fP) the pattern, and 1 otherwise.
Any part of the pattern may be quoted to force it to be matched as a
string.
.if t .sp 0.5
@@ -807,6 +807,12 @@
as for pathname expansion (see
.B Pathname Expansion
below).
+The \fIword\fP is expanded using tilde
+expansion, parameter and variable expansion, arithmetic substituion,
+command substitution, process substitution and quote removal.
+Each \fIpattern\fP examined is expanded using tilde
+expansion, parameter and variable expansion, arithmetic substituion,
+command substitution, and process substitution.
If the shell option
.B nocasematch
is enabled, the match is performed without regard to the case
@@ -8484,7 +8490,7 @@
returns true if any of the arguments are found, false if
none are found.
.TP
-\fBulimit\fP [\fB\-SHacdflmnpstuv\fP [\fIlimit\fP]]
+\fBulimit\fP [\fB\-SHacdfilmnpqstuvx\fP [\fIlimit\fP]]
Provides control over the resources available to the shell and to
processes started by it, on systems that allow such control.
The \fB\-H\fP and \fB\-S\fP options specify that the hard or soft limit is
@@ -8523,6 +8529,9 @@
.B \-f
The maximum size of files created by the shell
.TP
+.B \-i
+The maximum number of pending signals
+.TP
.B \-l
The maximum size that may be locked into memory
.TP
@@ -8536,6 +8545,9 @@
.B \-p
The pipe size in 512-byte blocks (this may not be set)
.TP
+.B \-q
+The maximum number of bytes in POSIX message queues
+.TP
.B \-s
The maximum stack size
.TP
@@ -8547,6 +8559,9 @@
.TP
.B \-v
The maximum amount of virtual memory available to the shell
+.TP
+.B \-x
+The maximum number of file locks
.PD
.PP
If
diff -Naur bash-3.1.orig/doc/bashref.texi bash-3.1/doc/bashref.texi
--- bash-3.1.orig/doc/bashref.texi 2005-10-03 12:07:21.000000000 -0700
+++ bash-3.1/doc/bashref.texi 2006-04-19 15:58:34.000000000 -0700
@@ -961,8 +961,8 @@
(see the description of @code{shopt} in @ref{Bash Builtins})
is enabled, the match is performed without regard to the case
of alphabetic characters.
-The return value is 0 if the string matches or does not match
-the pattern, respectively, and 1 otherwise.
+The return value is 0 if the string matches (@samp{==}) or does not
+match (@samp{!=})the pattern, and 1 otherwise.
Any part of the pattern may be quoted to force it to be matched as a
string.
@@ -2598,7 +2598,7 @@
Builtin commands are necessary to implement functionality impossible
or inconvenient to obtain with separate utilities.
-This section briefly the builtins which Bash inherits from
+This section briefly describes the builtins which Bash inherits from
the Bourne Shell, as well as the builtin commands which are unique
to or have been extended in Bash.
@@ -3833,7 +3833,7 @@
@item ulimit
@btindex ulimit
@example
-ulimit [-acdflmnpstuvSH] [@var{limit}]
+ulimit [-acdfilmnpqstuvxSH] [@var{limit}]
@end example
@code{ulimit} provides control over the resources available to processes
started by the shell, on systems that allow such control. If an
@@ -3857,6 +3857,9 @@
@item -f
The maximum size of files created by the shell.
+@item -i
+The maximum number of pending signals.
+
@item -l
The maximum size that may be locked into memory.
@@ -3869,6 +3872,9 @@
@item -p
The pipe buffer size.
+@item -q
+The maximum number of bytes in POSIX message queues.
+
@item -s
The maximum stack size.
@@ -3881,6 +3887,9 @@
@item -v
The maximum amount of virtual memory available to the process.
+@item -x
+The maximum number of file locks.
+
@end table
If @var{limit} is given, it is the new value of the specified resource;
@@ -4089,8 +4098,8 @@
Print shell input lines as they are read.
@item -x
-Print a trace of simple commands, \fBfor\fP commands, \fBcase\fP
-commands, \fBselect\fP commands, and arithmetic \fBfor\fP commands
+Print a trace of simple commands, @code{for} commands, @code{case}
+commands, @code{select} commands, and arithmetic @code{for} commands
and their arguments or associated word lists after they are
expanded and before they are executed. The value of the @env{PS4}
variable is expanded and the resultant value is printed before
diff -Naur bash-3.1.orig/doc/version.texi bash-3.1/doc/version.texi
--- bash-3.1.orig/doc/version.texi 2005-09-20 11:52:56.000000000 -0700
+++ bash-3.1/doc/version.texi 2006-04-19 15:58:34.000000000 -0700
@@ -2,9 +2,9 @@
Copyright (C) 1988-2005 Free Software Foundation, Inc.
@end ignore
-@set LASTCHANGE Mon Sep 5 11:47:04 EDT 2005
+@set LASTCHANGE Fri Dec 30 10:50:51 EST 2005
-@set EDITION 3.1-beta1
-@set VERSION 3.1-beta1
-@set UPDATED 5 September 2005
-@set UPDATED-MONTH September 2005
+@set EDITION 3.1
+@set VERSION 3.1
+@set UPDATED 30 December 2005
+@set UPDATED-MONTH December 2005
diff -Naur bash-3.1.orig/jobs.c bash-3.1/jobs.c
--- bash-3.1.orig/jobs.c 2005-11-11 20:13:27.000000000 -0800
+++ bash-3.1/jobs.c 2006-04-19 15:58:34.000000000 -0700
@@ -619,8 +619,11 @@
* once in the parent and once in each child. This is where
* the parent gives it away.
*
+ * Don't give the terminal away if this shell is an asynchronous
+ * subshell.
+ *
*/
- if (job_control && newjob->pgrp)
+ if (job_control && newjob->pgrp && (subshell_environment&SUBSHELL_ASYNC) == 0)
give_terminal_to (newjob->pgrp, 0);
}
}
@@ -844,9 +847,10 @@
realloc_jobs_list ()
{
sigset_t set, oset;
- int nsize, i, j;
+ int nsize, i, j, ncur, nprev;
JOB **nlist;
+ ncur = nprev = NO_JOB;
nsize = ((js.j_njobs + JOB_SLOTS - 1) / JOB_SLOTS);
nsize *= JOB_SLOTS;
i = js.j_njobs % JOB_SLOTS;
@@ -854,17 +858,51 @@
nsize += JOB_SLOTS;
BLOCK_CHILD (set, oset);
- nlist = (JOB **) xmalloc (nsize * sizeof (JOB *));
+ nlist = (js.j_jobslots == nsize) ? jobs : (JOB **) xmalloc (nsize * sizeof (JOB *));
+
for (i = j = 0; i < js.j_jobslots; i++)
if (jobs[i])
- nlist[j++] = jobs[i];
+ {
+ if (i == js.j_current)
+ ncur = j;
+ if (i == js.j_previous)
+ nprev = j;
+ nlist[j++] = jobs[i];
+ }
+
+#if defined (DEBUG)
+ itrace ("realloc_jobs_list: resize jobs list from %d to %d", js.j_jobslots, nsize);
+ itrace ("realloc_jobs_list: j_lastj changed from %d to %d", js.j_lastj, (j > 0) ? j - 1 : 0);
+ itrace ("realloc_jobs_list: j_njobs changed from %d to %d", js.j_njobs, (j > 0) ? j - 1 : 0);
+#endif
js.j_firstj = 0;
- js.j_lastj = (j > 0) ? j - 1: 0;
+ js.j_lastj = (j > 0) ? j - 1 : 0;
+ js.j_njobs = j;
js.j_jobslots = nsize;
- free (jobs);
- jobs = nlist;
+ /* Zero out remaining slots in new jobs list */
+ for ( ; j < nsize; j++)
+ nlist[j] = (JOB *)NULL;
+
+ if (jobs != nlist)
+ {
+ free (jobs);
+ jobs = nlist;
+ }
+
+ if (ncur != NO_JOB)
+ js.j_current = ncur;
+ if (nprev != NO_JOB)
+ js.j_previous = nprev;
+
+ /* Need to reset these */
+ if (js.j_current == NO_JOB || js.j_previous == NO_JOB || js.j_current > js.j_lastj || js.j_previous > js.j_lastj)
+ reset_current ();
+
+#ifdef DEBUG
+ itrace ("realloc_jobs_list: reset js.j_current (%d) and js.j_previous (%d)", js.j_current, js.j_previous);
+#endif
UNBLOCK_CHILD (oset);
}
@@ -1655,7 +1693,7 @@
In this case, we don't want to give the terminal to the
shell's process group (we could be in the middle of a
pipeline, for example). */
- if (async_p == 0 && pipeline_pgrp != shell_pgrp)
+ if (async_p == 0 && pipeline_pgrp != shell_pgrp && ((subshell_environment&SUBSHELL_ASYNC) == 0))
give_terminal_to (pipeline_pgrp, 0);
#if defined (PGRP_PIPE)
@@ -2198,7 +2236,11 @@
/* This is possibly a race condition -- should it go in stop_pipeline? */
wait_sigint_received = 0;
if (job_control == 0)
- old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler);
+ {
+ old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler);
+ if (old_sigint_handler == SIG_IGN)
+ set_signal_handler (SIGINT, old_sigint_handler);
+ }
termination_state = last_command_exit_value;
diff -Naur bash-3.1.orig/lib/glob/glob.c bash-3.1/lib/glob/glob.c
--- bash-3.1.orig/lib/glob/glob.c 2005-03-24 09:42:27.000000000 -0800
+++ bash-3.1/lib/glob/glob.c 2006-04-19 15:58:34.000000000 -0700
@@ -360,6 +360,7 @@
count = lose = skip = 0;
firstmalloc = 0;
+ nalloca = 0;
/* If PAT is empty, skip the loop, but return one (empty) filename. */
if (pat == 0 || *pat == '\0')
@@ -546,6 +547,8 @@
firstmalloc = 0;
tmplink = lastlink;
}
+ else
+ tmplink = 0;
free (lastlink->name);
lastlink = lastlink->next;
FREE (tmplink);
diff -Naur bash-3.1.orig/lib/glob/sm_loop.c bash-3.1/lib/glob/sm_loop.c
--- bash-3.1.orig/lib/glob/sm_loop.c 2005-10-16 18:21:04.000000000 -0700
+++ bash-3.1/lib/glob/sm_loop.c 2006-04-19 15:58:34.000000000 -0700
@@ -638,12 +638,13 @@
CHAR *psub; /* pointer to sub-pattern */
CHAR *pnext; /* pointer to next sub-pattern */
CHAR *srest; /* pointer to rest of string */
- int m1, m2;
+ int m1, m2, xflags; /* xflags = flags passed to recursive matches */
#if DEBUG_MATCHING
fprintf(stderr, "extmatch: xc = %c\n", xc);
fprintf(stderr, "extmatch: s = %s; se = %s\n", s, se);
fprintf(stderr, "extmatch: p = %s; pe = %s\n", p, pe);
+fprintf(stderr, "extmatch: flags = %d\n", flags);
#endif
prest = PATSCAN (p + (*p == L('(')), pe, 0); /* ) */
@@ -677,8 +678,12 @@
string matches the rest of the pattern. Also handle
multiple matches of the pattern. */
if (m1)
- m2 = (GMATCH (srest, se, prest, pe, flags) == 0) ||
- (s != srest && GMATCH (srest, se, p - 1, pe, flags) == 0);
+ {
+ /* if srest > s, we are not at start of string */
+ xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags;
+ m2 = (GMATCH (srest, se, prest, pe, xflags) == 0) ||
+ (s != srest && GMATCH (srest, se, p - 1, pe, xflags) == 0);
+ }
if (m1 && m2)
return (0);
}
@@ -704,8 +709,10 @@
srest = (prest == pe) ? se : s;
for ( ; srest <= se; srest++)
{
+ /* if srest > s, we are not at start of string */
+ xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags;
if (GMATCH (s, srest, psub, pnext - 1, flags) == 0 &&
- GMATCH (srest, se, prest, pe, flags) == 0)
+ GMATCH (srest, se, prest, pe, xflags) == 0)
return (0);
}
if (pnext == prest)
@@ -726,7 +733,9 @@
if (pnext == prest)
break;
}
- if (m1 == 0 && GMATCH (srest, se, prest, pe, flags) == 0)
+ /* if srest > s, we are not at start of string */
+ xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags;
+ if (m1 == 0 && GMATCH (srest, se, prest, pe, xflags) == 0)
return (0);
}
return (FNM_NOMATCH);
diff -Naur bash-3.1.orig/lib/readline/display.c bash-3.1/lib/readline/display.c
--- bash-3.1.orig/lib/readline/display.c 2005-11-30 11:05:02.000000000 -0800
+++ bash-3.1/lib/readline/display.c 2006-04-19 15:58:34.000000000 -0700
@@ -1983,11 +1983,15 @@
int pchar;
{
int len;
- char *pmt;
+ char *pmt, *p;
rl_save_prompt ();
- if (saved_local_prompt == 0)
+ /* We've saved the prompt, and can do anything with the various prompt
+ strings we need before they're restored. We want the unexpanded
+ portion of the prompt string after any final newline. */
+ p = rl_prompt ? strrchr (rl_prompt, '\n') : 0;
+ if (p == 0)
{
len = (rl_prompt && *rl_prompt) ? strlen (rl_prompt) : 0;
pmt = (char *)xmalloc (len + 2);
@@ -1998,19 +2002,17 @@
}
else
{
- len = *saved_local_prompt ? strlen (saved_local_prompt) : 0;
+ p++;
+ len = strlen (p);
pmt = (char *)xmalloc (len + 2);
if (len)
- strcpy (pmt, saved_local_prompt);
+ strcpy (pmt, p);
pmt[len] = pchar;
pmt[len+1] = '\0';
- local_prompt = savestring (pmt);
- prompt_last_invisible = saved_last_invisible;
- prompt_visible_length = saved_visible_length + 1;
- }
+ }
+ /* will be overwritten by expand_prompt, called from rl_message */
prompt_physical_chars = saved_physical_chars + 1;
-
return pmt;
}
diff -Naur bash-3.1.orig/lib/readline/readline.c bash-3.1/lib/readline/readline.c
--- bash-3.1.orig/lib/readline/readline.c 2005-07-04 19:29:35.000000000 -0700
+++ bash-3.1/lib/readline/readline.c 2006-04-19 15:58:34.000000000 -0700
@@ -282,6 +282,7 @@
{
FREE (rl_prompt);
rl_prompt = prompt ? savestring (prompt) : (char *)NULL;
+ rl_display_prompt = rl_prompt ? rl_prompt : "";
rl_visible_prompt_length = rl_expand_prompt (rl_prompt);
return 0;
diff -Naur bash-3.1.orig/lib/readline/terminal.c bash-3.1/lib/readline/terminal.c
--- bash-3.1.orig/lib/readline/terminal.c 2005-11-12 17:46:54.000000000 -0800
+++ bash-3.1/lib/readline/terminal.c 2006-04-19 15:58:34.000000000 -0700
@@ -122,7 +122,7 @@
static char *_rl_visible_bell;
/* Non-zero means the terminal can auto-wrap lines. */
-int _rl_term_autowrap;
+int _rl_term_autowrap = -1;
/* Non-zero means that this terminal has a meta key. */
static int term_has_meta;
@@ -274,6 +274,9 @@
_rl_set_screen_size (rows, cols)
int rows, cols;
{
+ if (_rl_term_autowrap == -1)
+ _rl_init_terminal_io (rl_terminal_name);
+
if (rows > 0)
_rl_screenheight = rows;
if (cols > 0)
diff -Naur bash-3.1.orig/parse.y bash-3.1/parse.y
--- bash-3.1.orig/parse.y 2005-11-11 20:14:18.000000000 -0800
+++ bash-3.1/parse.y 2006-04-19 15:58:34.000000000 -0700
@@ -2716,6 +2716,7 @@
#define P_ALLOWESC 0x02
#define P_DQUOTE 0x04
#define P_COMMAND 0x08 /* parsing a command, so look for comments */
+#define P_BACKQUOTE 0x10 /* parsing a backquoted command substitution */
static char matched_pair_error;
static char *
@@ -2725,12 +2726,12 @@
int *lenp, flags;
{
int count, ch, was_dollar, in_comment, check_comment;
- int pass_next_character, nestlen, ttranslen, start_lineno;
+ int pass_next_character, backq_backslash, nestlen, ttranslen, start_lineno;
char *ret, *nestret, *ttrans;
int retind, retsize, rflags;
count = 1;
- pass_next_character = was_dollar = in_comment = 0;
+ pass_next_character = backq_backslash = was_dollar = in_comment = 0;
check_comment = (flags & P_COMMAND) && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0;
/* RFLAGS is the set of flags we want to pass to recursive calls. */
@@ -2742,11 +2743,8 @@
start_lineno = line_number;
while (count)
{
-#if 0
- ch = shell_getc ((qc != '\'' || (flags & P_ALLOWESC)) && pass_next_character == 0);
-#else
- ch = shell_getc (qc != '\'' && pass_next_character == 0);
-#endif
+ ch = shell_getc (qc != '\'' && pass_next_character == 0 && backq_backslash == 0);
+
if (ch == EOF)
{
free (ret);
@@ -2771,9 +2769,16 @@
continue;
}
/* Not exactly right yet */
- else if (check_comment && in_comment == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || whitespace (ret[retind -1])))
+ else if MBTEST(check_comment && in_comment == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || whitespace (ret[retind - 1])))
in_comment = 1;
+ /* last char was backslash inside backquoted command substitution */
+ if (backq_backslash)
+ {
+ backq_backslash = 0;
+ /* Placeholder for adding special characters */
+ }
+
if (pass_next_character) /* last char was backslash */
{
pass_next_character = 0;
@@ -2814,6 +2819,8 @@
{
if MBTEST((flags & P_ALLOWESC) && ch == '\\')
pass_next_character++;
+ else if MBTEST((flags & P_BACKQUOTE) && ch == '\\')
+ backq_backslash++;
continue;
}
@@ -2898,7 +2905,11 @@
}
else if MBTEST(qc == '`' && (ch == '"' || ch == '\'') && in_comment == 0)
{
- nestret = parse_matched_pair (0, ch, ch, &nestlen, rflags);
+ /* Add P_BACKQUOTE so backslash quotes the next character and
+ shell_getc does the right thing with \<newline>. We do this for
+ a measure of backwards compatibility -- it's not strictly the
+ right POSIX thing. */
+ nestret = parse_matched_pair (0, ch, ch, &nestlen, rflags|P_BACKQUOTE);
goto add_nestret;
}
else if MBTEST(was_dollar && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */
@@ -2907,7 +2918,7 @@
if (open == ch) /* undo previous increment */
count--;
if (ch == '(') /* ) */
- nestret = parse_matched_pair (0, '(', ')', &nestlen, rflags);
+ nestret = parse_matched_pair (0, '(', ')', &nestlen, rflags & ~P_DQUOTE);
else if (ch == '{') /* } */
nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|rflags);
else if (ch == '[') /* ] */
@@ -3578,7 +3589,7 @@
FREE (ttok);
all_digit_token = 0;
compound_assignment = 1;
-#if 0
+#if 1
goto next_character;
#else
goto got_token; /* ksh93 seems to do this */
@@ -3695,7 +3706,9 @@
struct builtin *b;
b = builtin_address_internal (token, 0);
if (b && (b->flags & ASSIGNMENT_BUILTIN))
- parser_state |= PST_ASSIGNOK;
+ parser_state |= PST_ASSIGNOK;
+ else if (STREQ (token, "eval") || STREQ (token, "let"))
+ parser_state |= PST_ASSIGNOK;
}
yylval.word = the_word;
@@ -4686,18 +4699,21 @@
int *retlenp;
{
WORD_LIST *wl, *rl;
- int tok, orig_line_number, orig_token_size;
+ int tok, orig_line_number, orig_token_size, orig_last_token, assignok;
char *saved_token, *ret;
saved_token = token;
orig_token_size = token_buffer_size;
orig_line_number = line_number;
+ orig_last_token = last_read_token;
last_read_token = WORD; /* WORD to allow reserved words here */
token = (char *)NULL;
token_buffer_size = 0;
+ assignok = parser_state&PST_ASSIGNOK; /* XXX */
+
wl = (WORD_LIST *)NULL; /* ( */
parser_state |= PST_COMPASSIGN;
@@ -4740,7 +4756,7 @@
jump_to_top_level (DISCARD);
}
- last_read_token = WORD;
+ last_read_token = orig_last_token; /* XXX - was WORD? */
if (wl)
{
rl = REVERSE_LIST (wl, WORD_LIST *);
@@ -4752,6 +4768,10 @@
if (retlenp)
*retlenp = (ret && *ret) ? strlen (ret) : 0;
+
+ if (assignok)
+ parser_state |= PST_ASSIGNOK;
+
return ret;
}
diff -Naur bash-3.1.orig/patchlevel.h bash-3.1/patchlevel.h
--- bash-3.1.orig/patchlevel.h 2005-07-20 10:58:20.000000000 -0700
+++ bash-3.1/patchlevel.h 2006-04-19 15:59:29.000000000 -0700
@@ -25,6 +25,6 @@
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */
-#define PATCHLEVEL 0
+#define PATCHLEVEL 17
#endif /* _PATCHLEVEL_H_ */
diff -Naur bash-3.1.orig/subst.c bash-3.1/subst.c
--- bash-3.1.orig/subst.c 2005-10-24 06:51:13.000000000 -0700
+++ bash-3.1/subst.c 2006-04-19 15:59:29.000000000 -0700
@@ -2187,7 +2187,7 @@
if (mklocal && variable_context)
{
v = find_variable (name);
- if (v == 0 || array_p (v) == 0)
+ if (v == 0 || array_p (v) == 0 || v->context != variable_context)
v = make_local_array_variable (name);
v = assign_array_var_from_string (v, value, flags);
}
@@ -2575,6 +2575,13 @@
return (expand_string_to_string_internal (string, quoted, expand_string_assignment));
}
+char *
+expand_arith_string (string, quoted)
+ char *string;
+{
+ return (expand_string_if_necessary (string, quoted, expand_string));
+}
+
#if defined (COND_COMMAND)
/* Just remove backslashes in STRING. Returns a new string. */
char *
@@ -5248,7 +5255,7 @@
else
t = (char *)0;
- temp1 = expand_string_if_necessary (substr, Q_DOUBLE_QUOTES, expand_string);
+ temp1 = expand_arith_string (substr, Q_DOUBLE_QUOTES);
*e1p = evalexp (temp1, &expok);
free (temp1);
if (expok == 0)
@@ -5293,7 +5300,7 @@
{
t++;
temp2 = savestring (t);
- temp1 = expand_string_if_necessary (temp2, Q_DOUBLE_QUOTES, expand_string);
+ temp1 = expand_arith_string (temp2, Q_DOUBLE_QUOTES);
free (temp2);
t[-1] = ':';
*e2p = evalexp (temp1, &expok);
@@ -6435,7 +6442,7 @@
temp2[t_index] = '\0';
/* Expand variables found inside the expression. */
- temp1 = expand_string_if_necessary (temp2, Q_DOUBLE_QUOTES, expand_string);
+ temp1 = expand_arith_string (temp2, Q_DOUBLE_QUOTES);
free (temp2);
arithsub:
@@ -6477,7 +6484,7 @@
zindex = t_index;
/* Do initial variable expansion. */
- temp1 = expand_string_if_necessary (temp, Q_DOUBLE_QUOTES, expand_string);
+ temp1 = expand_arith_string (temp, Q_DOUBLE_QUOTES);
goto arithsub;
@@ -6795,6 +6802,12 @@
if (temp && *temp && t_index > 0)
{
temp1 = bash_tilde_expand (temp, tflag);
+ if (temp1 && *temp1 == '~' && STREQ (temp, temp1))
+ {
+ FREE (temp);
+ FREE (temp1);
+ goto add_character; /* tilde expansion failed */
+ }
free (temp);
temp = temp1;
sindex += t_index;
diff -Naur bash-3.1.orig/subst.h bash-3.1/subst.h
--- bash-3.1.orig/subst.h 2004-11-07 12:12:28.000000000 -0800
+++ bash-3.1/subst.h 2006-04-19 15:59:29.000000000 -0700
@@ -151,6 +151,9 @@
extern char *expand_string_unsplit_to_string __P((char *, int));
extern char *expand_assignment_string_to_string __P((char *, int));
+/* Expand an arithmetic expression string */
+extern char *expand_arith_string __P((char *, int));
+
/* De-quoted quoted characters in STRING. */
extern char *dequote_string __P((char *));
diff -Naur bash-3.1.orig/variables.c bash-3.1/variables.c
--- bash-3.1.orig/variables.c 2005-11-12 18:22:37.000000000 -0800
+++ bash-3.1/variables.c 2006-04-19 15:58:34.000000000 -0700
@@ -860,9 +860,11 @@
{
char val[INT_STRLEN_BOUND(int) + 1], *v;
+#if defined (READLINE)
/* If we are currently assigning to LINES or COLUMNS, don't do anything. */
if (winsize_assignment)
return;
+#endif
v = inttostr (lines, val, sizeof (val));
bind_variable ("LINES", v, 0);

BIN
base-source/bash-3.1.tar.gz Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,35 @@
Submitted By: Ken Moffat <ken@kenmoffat.uklinux.net>
Date: 2005-08-09
Initial Package Version: 1.0.3
Upstream Status: Unknown.
Origin: Jyri Ryska (RedHat) for fedora3
Description: Fixes filename sanitisation in bzgrep.
This fixes CAN-2005-0758 (if a user can be tricked into running
bzgrep in an untrusted directory containing files with carefully
crafted filenames, arbitrary commands could be executed as the user
running bzgrep). Risk is reported as low. I've modified it to force
the interpreter to be bash, some of the other shells in use won't
like the bash syntax.
diff -Naur bzip2-1.0.3/bzgrep bzip2-1.0.3-new/bzgrep
--- bzip2-1.0.3/bzgrep 2004-10-09 12:29:32.000000000 +0100
+++ bzip2-1.0.3-new/bzgrep 2005-08-09 21:36:37.000000000 +0100
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Bzgrep wrapped for bzip2,
# adapted from zgrep by Philippe Troin <phil@fifi.org> for Debian GNU/Linux.
@@ -63,7 +63,11 @@
bzip2 -cdfq "$i" | $grep $opt "$pat"
r=$?
else
- bzip2 -cdfq "$i" | $grep $opt "$pat" | sed "s|^|${i}:|"
+ j=${i//\\/\\\\}
+ j=${j//|/\\|}
+ j=${j//&/\\&}
+ j=`printf "%s" "$j" | tr '\n' ' '`
+ bzip2 -cdfq "$i" | $grep $opt "$pat" | sed "s|^|${j}:|"
r=$?
fi
test "$r" -ne 0 && res="$r"

View File

@@ -0,0 +1,41 @@
Submitted By: Matthew Burgess <matthew@linuxfromscratch.org>
Date: 2005-08-03
Initial Package Version: 1.0.3
Upstream Status: Not submitted
Origin: Randy McMurchy & Steve Crosby
Description: Installs pre-formatted documentation
diff -Naur bzip2-1.0.3.orig/Makefile bzip2-1.0.3/Makefile
--- bzip2-1.0.3.orig/Makefile 2005-02-17 11:28:24.000000000 +0000
+++ bzip2-1.0.3/Makefile 2005-08-14 13:08:25.626703640 +0000
@@ -12,6 +12,7 @@
# Where you want it installed when you do 'make install'
PREFIX=/usr
+DOCDIR=share/doc/$(DISTNAME)
OBJS= blocksort.o \
@@ -61,6 +62,7 @@
if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi
if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi
if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fi
+ if ( test ! -d $(PREFIX)/$(DOCDIR) ) ; then mkdir -p $(PREFIX)/$(DOCDIR); fi
if ( test ! -d $(PREFIX)/include ) ; then mkdir -p $(PREFIX)/include ; fi
cp -f bzip2 $(PREFIX)/bin/bzip2
cp -f bzip2 $(PREFIX)/bin/bunzip2
@@ -94,6 +96,14 @@
echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzfgrep.1
echo ".so man1/bzmore.1" > $(PREFIX)/man/man1/bzless.1
echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1
+ cp -f manual.html $(PREFIX)/$(DOCDIR)
+ cp -f manual.pdf $(PREFIX)/$(DOCDIR)
+ cp -f manual.ps $(PREFIX)/$(DOCDIR)
+ cp -f bzip2.txt $(PREFIX)/$(DOCDIR)
+ chmod a+r $(PREFIX)/$(DOCDIR)/manual.html
+ chmod a+r $(PREFIX)/$(DOCDIR)/manual.pdf
+ chmod a+r $(PREFIX)/$(DOCDIR)/manual.ps
+ chmod a+r $(PREFIX)/$(DOCDIR)/bzip2.txt
clean:
rm -f *.o libbz2.a bzip2 bzip2recover \

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,272 @@
Submitted By: Matthew Burgess <matthew at linuxfromscratch dot org>
Date: 2006-03-15
Initial Package Version: 5.94
Origin: original suppress_hotname_uptame_kill_su patch (Robert Connolly)
Upstream Status: N/A
Description: This patch supresses the building of uptime, and kill. The su
command is built so the testsuite can run, use './src/su', but it will not
be installed. Also see:
http://www.linuxfromscratch.org/patches/downloads/coreutils/
coreutils-5.0-dupes-2.patch
diff -Naur coreutils-5.94.orig/AUTHORS coreutils-5.94/AUTHORS
--- coreutils-5.94.orig/AUTHORS 2004-11-03 23:10:50.000000000 +0000
+++ coreutils-5.94/AUTHORS 2006-03-15 22:20:49.000000000 +0000
@@ -34,7 +34,6 @@
hostname: Jim Meyering
id: Arnold Robbins, David MacKenzie
join: Mike Haertel
-kill: Paul Eggert
link: Michael Stone
ln: Mike Parker, David MacKenzie
logname: FIXME: unknown
@@ -83,7 +82,6 @@
unexpand: David MacKenzie
uniq: Richard Stallman, David MacKenzie
unlink: Michael Stone
-uptime: Joseph Arceneaux, David MacKenzie, Kaveh Ghazi
users: Joseph Arceneaux, David MacKenzie
vdir: Richard Stallman, David MacKenzie
wc: Paul Rubin, David MacKenzie
diff -Naur coreutils-5.94.orig/Makefile.in coreutils-5.94/Makefile.in
--- coreutils-5.94.orig/Makefile.in 2006-02-13 12:52:03.000000000 +0000
+++ coreutils-5.94/Makefile.in 2006-03-15 22:20:49.000000000 +0000
@@ -148,7 +148,7 @@
$(top_srcdir)/m4/ullong_max.m4 $(top_srcdir)/m4/ulonglong.m4 \
$(top_srcdir)/m4/unicodeio.m4 $(top_srcdir)/m4/unistd-safer.m4 \
$(top_srcdir)/m4/unlink-busy.m4 $(top_srcdir)/m4/unlinkdir.m4 \
- $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/uptime.m4 \
+ $(top_srcdir)/m4/unlocked-io.m4 \
$(top_srcdir)/m4/userspec.m4 $(top_srcdir)/m4/utimbuf.m4 \
$(top_srcdir)/m4/utime.m4 $(top_srcdir)/m4/utimecmp.m4 \
$(top_srcdir)/m4/utimens.m4 $(top_srcdir)/m4/utimes-null.m4 \
diff -Naur coreutils-5.94.orig/README coreutils-5.94/README
--- coreutils-5.94.orig/README 2005-09-28 18:34:26.000000000 +0000
+++ coreutils-5.94/README 2006-03-15 22:20:49.000000000 +0000
@@ -9,11 +9,11 @@
[ basename cat chgrp chmod chown chroot cksum comm cp csplit cut date dd
df dir dircolors dirname du echo env expand expr factor false fmt fold
- ginstall groups head hostid hostname id join kill link ln logname ls
+ ginstall groups head hostid hostname id join link ln logname ls
md5sum mkdir mkfifo mknod mv nice nl nohup od paste pathchk pinky pr
printenv printf ptx pwd readlink rm rmdir seq sha1sum shred sleep sort
split stat stty su sum sync tac tail tee test touch tr true tsort tty
- uname unexpand uniq unlink uptime users vdir wc who whoami yes
+ uname unexpand uniq unlink users vdir wc who whoami yes
See the file NEWS for a list of major changes in the current release.
diff -Naur coreutils-5.94.orig/configure coreutils-5.94/configure
--- coreutils-5.94.orig/configure 2006-02-13 12:52:04.000000000 +0000
+++ coreutils-5.94/configure 2006-03-15 22:20:49.000000000 +0000
@@ -50418,8 +50418,7 @@
{ echo "$as_me:$LINENO: result: $gnulib_cv_have_boot_time" >&5
echo "${ECHO_T}$gnulib_cv_have_boot_time" >&6; }
if test $gnulib_cv_have_boot_time = yes; then
- OPTIONAL_BIN_PROGS="$OPTIONAL_BIN_PROGS uptime\$(EXEEXT)"
- MAN="$MAN uptime.1"
+echo "uptime is suppressed"
fi
diff -Naur coreutils-5.94.orig/man/Makefile.in coreutils-5.94/man/Makefile.in
--- coreutils-5.94.orig/man/Makefile.in 2006-02-13 12:51:58.000000000 +0000
+++ coreutils-5.94/man/Makefile.in 2006-03-15 22:20:50.000000000 +0000
@@ -142,7 +142,7 @@
$(top_srcdir)/m4/ullong_max.m4 $(top_srcdir)/m4/ulonglong.m4 \
$(top_srcdir)/m4/unicodeio.m4 $(top_srcdir)/m4/unistd-safer.m4 \
$(top_srcdir)/m4/unlink-busy.m4 $(top_srcdir)/m4/unlinkdir.m4 \
- $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/uptime.m4 \
+ $(top_srcdir)/m4/unlocked-io.m4 \
$(top_srcdir)/m4/userspec.m4 $(top_srcdir)/m4/utimbuf.m4 \
$(top_srcdir)/m4/utime.m4 $(top_srcdir)/m4/utimecmp.m4 \
$(top_srcdir)/m4/utimens.m4 $(top_srcdir)/m4/utimes-null.m4 \
@@ -303,13 +303,13 @@
basename.1 cat.1 chgrp.1 chmod.1 chown.1 chroot.1 cksum.1 comm.1 \
cp.1 csplit.1 cut.1 date.1 dd.1 df.1 dir.1 dircolors.1 dirname.1 du.1 \
echo.1 env.1 expand.1 expr.1 factor.1 false.1 fmt.1 fold.1 groups.1 \
- head.1 hostid.1 hostname.1 id.1 install.1 join.1 kill.1 \
+ head.1 hostid.1 hostname.1 id.1 install.1 join.1 \
link.1 ln.1 logname.1 \
ls.1 md5sum.1 mkdir.1 mkfifo.1 mknod.1 mv.1 nice.1 nl.1 nohup.1 od.1 \
paste.1 pathchk.1 pinky.1 pr.1 printenv.1 printf.1 ptx.1 pwd.1 readlink.1 \
rm.1 rmdir.1 seq.1 sha1sum.1 shred.1 sleep.1 sort.1 split.1 stat.1 stty.1 \
- su.1 sum.1 sync.1 tac.1 tail.1 tee.1 test.1 touch.1 tr.1 true.1 tsort.1 \
- tty.1 uname.1 unexpand.1 uniq.1 unlink.1 uptime.1 users.1 vdir.1 wc.1 \
+ sum.1 sync.1 tac.1 tail.1 tee.1 test.1 touch.1 tr.1 true.1 tsort.1 \
+ tty.1 uname.1 unexpand.1 uniq.1 unlink.1 users.1 vdir.1 wc.1 \
who.1 whoami.1 yes.1
man_aux = $(dist_man_MANS:.1=.x)
@@ -575,7 +575,6 @@
id.1: $(common_dep) $(srcdir)/id.x ../src/id.c
install.1: $(common_dep) $(srcdir)/install.x ../src/install.c
join.1: $(common_dep) $(srcdir)/join.x ../src/join.c
-kill.1: $(common_dep) $(srcdir)/kill.x ../src/kill.c
link.1: $(common_dep) $(srcdir)/link.x ../src/link.c
ln.1: $(common_dep) $(srcdir)/ln.x ../src/ln.c
logname.1: $(common_dep) $(srcdir)/logname.x ../src/logname.c
@@ -608,7 +607,6 @@
split.1: $(common_dep) $(srcdir)/split.x ../src/split.c
stat.1: $(common_dep) $(srcdir)/stat.x ../src/stat.c
stty.1: $(common_dep) $(srcdir)/stty.x ../src/stty.c
-su.1: $(common_dep) $(srcdir)/su.x ../src/su.c
sum.1: $(common_dep) $(srcdir)/sum.x ../src/sum.c
sync.1: $(common_dep) $(srcdir)/sync.x ../src/sync.c
tac.1: $(common_dep) $(srcdir)/tac.x ../src/tac.c
@@ -624,7 +622,6 @@
unexpand.1: $(common_dep) $(srcdir)/unexpand.x ../src/unexpand.c
uniq.1: $(common_dep) $(srcdir)/uniq.x ../src/uniq.c
unlink.1: $(common_dep) $(srcdir)/unlink.x ../src/unlink.c
-uptime.1: $(common_dep) $(srcdir)/uptime.x ../src/uptime.c
users.1: $(common_dep) $(srcdir)/users.x ../src/users.c
vdir.1: $(common_dep) $(srcdir)/vdir.x ../src/ls.c
wc.1: $(common_dep) $(srcdir)/wc.x ../src/wc.c
@@ -656,7 +653,7 @@
check-x-vs-1:
PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \
t=ls-files.$$$$; \
- (cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\
+ (cd $(srcdir) && ls -1 *.x) | grep -v -e 'kill.x' -e 'su.x' -e 'uptime.x' | sed 's/\.x$$//' | $(ASSORT) > $$t;\
echo $(dist_man_MANS) | tr -s ' ' '\n' | sed 's/\.1$$//' \
| $(ASSORT) | diff - $$t || { rm $$t; exit 1; }; \
rm $$t
diff -Naur coreutils-5.94.orig/src/Makefile.in coreutils-5.94/src/Makefile.in
--- coreutils-5.94.orig/src/Makefile.in 2006-02-13 13:08:11.000000000 +0000
+++ coreutils-5.94/src/Makefile.in 2006-03-15 22:20:50.000000000 +0000
@@ -39,7 +39,7 @@
host_triplet = @host@
EXTRA_PROGRAMS = chroot$(EXEEXT) df$(EXEEXT) hostid$(EXEEXT) \
nice$(EXEEXT) pinky$(EXEEXT) stty$(EXEEXT) su$(EXEEXT) \
- uname$(EXEEXT) uptime$(EXEEXT) users$(EXEEXT) who$(EXEEXT)
+ uname$(EXEEXT) users$(EXEEXT) who$(EXEEXT)
bin_PROGRAMS = [$(EXEEXT) chgrp$(EXEEXT) chown$(EXEEXT) chmod$(EXEEXT) \
cp$(EXEEXT) dd$(EXEEXT) dircolors$(EXEEXT) du$(EXEEXT) \
ginstall$(EXEEXT) link$(EXEEXT) ln$(EXEEXT) dir$(EXEEXT) \
@@ -56,7 +56,7 @@
uniq$(EXEEXT) wc$(EXEEXT) basename$(EXEEXT) date$(EXEEXT) \
dirname$(EXEEXT) echo$(EXEEXT) env$(EXEEXT) expr$(EXEEXT) \
factor$(EXEEXT) false$(EXEEXT) hostname$(EXEEXT) id$(EXEEXT) \
- kill$(EXEEXT) logname$(EXEEXT) pathchk$(EXEEXT) \
+ logname$(EXEEXT) pathchk$(EXEEXT) \
printenv$(EXEEXT) printf$(EXEEXT) pwd$(EXEEXT) seq$(EXEEXT) \
sleep$(EXEEXT) tee$(EXEEXT) test$(EXEEXT) true$(EXEEXT) \
tty$(EXEEXT) whoami$(EXEEXT) yes$(EXEEXT) $(am__EXEEXT_1) \
@@ -169,7 +169,7 @@
$(top_srcdir)/m4/ullong_max.m4 $(top_srcdir)/m4/ulonglong.m4 \
$(top_srcdir)/m4/unicodeio.m4 $(top_srcdir)/m4/unistd-safer.m4 \
$(top_srcdir)/m4/unlink-busy.m4 $(top_srcdir)/m4/unlinkdir.m4 \
- $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/uptime.m4 \
+ $(top_srcdir)/m4/unlocked-io.m4 \
$(top_srcdir)/m4/userspec.m4 $(top_srcdir)/m4/utimbuf.m4 \
$(top_srcdir)/m4/utime.m4 $(top_srcdir)/m4/utimecmp.m4 \
$(top_srcdir)/m4/utimens.m4 $(top_srcdir)/m4/utimes-null.m4 \
@@ -350,11 +350,6 @@
join_LDADD = $(LDADD)
join_DEPENDENCIES = ../lib/libcoreutils.a $(am__DEPENDENCIES_1) \
../lib/libcoreutils.a
-kill_SOURCES = kill.c
-kill_OBJECTS = kill.$(OBJEXT)
-kill_LDADD = $(LDADD)
-kill_DEPENDENCIES = ../lib/libcoreutils.a $(am__DEPENDENCIES_1) \
- ../lib/libcoreutils.a
link_SOURCES = link.c
link_OBJECTS = link.$(OBJEXT)
link_LDADD = $(LDADD)
@@ -577,9 +572,6 @@
unlink_LDADD = $(LDADD)
unlink_DEPENDENCIES = ../lib/libcoreutils.a $(am__DEPENDENCIES_1) \
../lib/libcoreutils.a
-uptime_SOURCES = uptime.c
-uptime_OBJECTS = uptime.$(OBJEXT)
-uptime_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1)
users_SOURCES = users.c
users_OBJECTS = users.$(OBJEXT)
users_LDADD = $(LDADD)
@@ -622,28 +614,28 @@
csplit.c cut.c date.c dd.c df.c $(dir_SOURCES) dircolors.c \
dirname.c du.c echo.c env.c expand.c expr.c factor.c false.c \
fmt.c fold.c $(ginstall_SOURCES) head.c hostid.c hostname.c \
- id.c join.c kill.c link.c ln.c logname.c $(ls_SOURCES) \
+ id.c join.c link.c ln.c logname.c $(ls_SOURCES) \
$(md5sum_SOURCES) mkdir.c mkfifo.c mknod.c $(mv_SOURCES) \
nice.c nl.c nohup.c od.c paste.c pathchk.c pinky.c pr.c \
printenv.c printf.c ptx.c pwd.c readlink.c $(rm_SOURCES) \
rmdir.c seq.c setuidgid.c $(sha1sum_SOURCES) shred.c sleep.c \
sort.c split.c stat.c stty.c su.c sum.c sync.c tac.c tail.c \
tee.c test.c touch.c tr.c true.c tsort.c tty.c uname.c \
- unexpand.c uniq.c unlink.c uptime.c users.c $(vdir_SOURCES) \
+ unexpand.c uniq.c unlink.c users.c $(vdir_SOURCES) \
wc.c who.c whoami.c yes.c
DIST_SOURCES = $(__SOURCES) basename.c cat.c $(chgrp_SOURCES) chmod.c \
$(chown_SOURCES) chroot.c cksum.c comm.c $(cp_SOURCES) \
csplit.c cut.c date.c dd.c df.c $(dir_SOURCES) dircolors.c \
dirname.c du.c echo.c env.c expand.c expr.c factor.c false.c \
fmt.c fold.c $(ginstall_SOURCES) head.c hostid.c hostname.c \
- id.c join.c kill.c link.c ln.c logname.c $(ls_SOURCES) \
+ id.c join.c link.c ln.c logname.c $(ls_SOURCES) \
$(md5sum_SOURCES) mkdir.c mkfifo.c mknod.c $(mv_SOURCES) \
nice.c nl.c nohup.c od.c paste.c pathchk.c pinky.c pr.c \
printenv.c printf.c ptx.c pwd.c readlink.c $(rm_SOURCES) \
rmdir.c seq.c setuidgid.c $(sha1sum_SOURCES) shred.c sleep.c \
sort.c split.c stat.c stty.c su.c sum.c sync.c tac.c tail.c \
tee.c test.c touch.c tr.c true.c tsort.c tty.c uname.c \
- unexpand.c uniq.c unlink.c uptime.c users.c $(vdir_SOURCES) \
+ unexpand.c uniq.c unlink.c users.c $(vdir_SOURCES) \
wc.c who.c whoami.c yes.c
HEADERS = $(noinst_HEADERS)
ETAGS = etags
@@ -840,7 +832,6 @@
nanosec_libs = $(LDADD) $(POW_LIB) $(LIB_NANOSLEEP)
sleep_LDADD = $(nanosec_libs)
tail_LDADD = $(nanosec_libs)
-uptime_LDADD = $(LDADD) $(GETLOADAVG_LIBS)
su_LDADD = $(LDADD) $(LIB_CRYPT)
SUFFIXES = .sh
installed_su = $(DESTDIR)$(bindir)/`echo su|sed '$(transform)'`
@@ -1076,9 +1067,6 @@
join$(EXEEXT): $(join_OBJECTS) $(join_DEPENDENCIES)
@rm -f join$(EXEEXT)
$(LINK) $(join_LDFLAGS) $(join_OBJECTS) $(join_LDADD) $(LIBS)
-kill$(EXEEXT): $(kill_OBJECTS) $(kill_DEPENDENCIES)
- @rm -f kill$(EXEEXT)
- $(LINK) $(kill_LDFLAGS) $(kill_OBJECTS) $(kill_LDADD) $(LIBS)
link$(EXEEXT): $(link_OBJECTS) $(link_DEPENDENCIES)
@rm -f link$(EXEEXT)
$(LINK) $(link_LDFLAGS) $(link_OBJECTS) $(link_LDADD) $(LIBS)
@@ -1226,9 +1214,6 @@
unlink$(EXEEXT): $(unlink_OBJECTS) $(unlink_DEPENDENCIES)
@rm -f unlink$(EXEEXT)
$(LINK) $(unlink_LDFLAGS) $(unlink_OBJECTS) $(unlink_LDADD) $(LIBS)
-uptime$(EXEEXT): $(uptime_OBJECTS) $(uptime_DEPENDENCIES)
- @rm -f uptime$(EXEEXT)
- $(LINK) $(uptime_LDFLAGS) $(uptime_OBJECTS) $(uptime_LDADD) $(LIBS)
users$(EXEEXT): $(users_OBJECTS) $(users_DEPENDENCIES)
@rm -f users$(EXEEXT)
$(LINK) $(users_LDFLAGS) $(users_OBJECTS) $(users_LDADD) $(LIBS)
@@ -1322,7 +1307,6 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/id.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/install.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/join.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kill.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lbracket.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/link.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ln.Po@am__quote@
@@ -1378,7 +1362,6 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unexpand.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uniq.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unlink.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uptime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/users.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/who.Po@am__quote@
@@ -1606,7 +1589,7 @@
&& can_create_suid_root_executable=yes; \
rm -f $$TMPFILE; \
if test $$can_create_suid_root_executable = yes; then \
- $(INSTALL_SU); \
+ echo "Installation of su is suppressed"; \
else \
echo "WARNING: insufficient access; not installing su"; \
echo "NOTE: to install su, run 'make install-root' as root"; \

View File

@@ -0,0 +1,182 @@
Submitted By: Matthew Burgess <matthew at linuxfromscratch dot org>
Date: 2005-10-23
Initial Package Version: 5.92
Upstream Status: pending
Origin: Scot McPherson
Description: Fix the output of uname once and for all.
$ uname -m # This always worked.
i686
$ uname -i # Used to report 'unknown'.
i386
$ uname -p # Likewise.
athlon-4
diff -Naur coreutils-5.92.orig/src/uname.c coreutils-5.92/src/uname.c
--- coreutils-5.92.orig/src/uname.c 2005-09-15 20:34:42.000000000 +0000
+++ coreutils-5.92/src/uname.c 2005-10-23 10:14:06.000000000 +0000
@@ -29,6 +29,12 @@
# include <sys/systeminfo.h>
#endif
+#ifdef linux
+#define cpuid(in,a,b,c,d)\
+ asm("cpuid": "=a" (a), "=b" (b), "=c" (c), "=d" (d) : "a" (in));
+int has_sse( void );
+#endif
+
#if HAVE_SYS_SYSCTL_H
# if HAVE_SYS_PARAM_H
# include <sys/param.h> /* needed for OpenBSD 3.0 */
@@ -256,6 +262,96 @@
if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor))
element = processor;
}
+#else
+ {
+ struct utsname u;
+ uname (&u);
+ element = u.machine;
+#ifdef linux
+/******************************************************************************
+ *
+ * Hello, major hack. I shouldn't have to do this. struct utsname should
+ * have another element with this info in it. There's probably a struct
+ * somewhere that has this info, I just don't know where it is.
+ *
+ *****************************************************************************/
+
+ if( !strcmp( element, "i586" ) || !strcmp( element, "i686" ) ) {
+ int eax, ebx, ecx, edx, unused;
+ int model, family, sse;
+
+ cpuid(0,unused,ebx,ecx,edx);
+ cpuid(1,eax,unused,unused,unused);
+ model = (eax >> 4) & 0xf;
+ family = (eax >> 8) & 0xf;
+
+ switch(ebx) {
+ case 0x756e6547: // Intel
+ switch( family ) {
+ case 5: // Pentium
+ if( model <= 3 )
+ element="pentium";
+ if( model > 3 )
+ element="pentium-mmx";
+ break;
+ case 6: // PentiumPro - Pentium III
+ if( model == 1 ) // Pentium Pro
+ element="pentiumpro";
+ if( ( model == 3 ) || ( model == 5 ) ||
+ ( model == 6 ) ) // Pentium II
+ element="pentium2";
+ if( ( model == 7 ) || ( model == 8 ) ||
+ ( model == 10 ) || ( model == 11 ) ) // These are all Pentium III
+ element="pentium3";
+ break;
+ case 15: // Pentium4
+ element="pentium4";
+ break;
+ default:
+ break;
+ } // end switch( family )
+ break;
+ case 0x68747541: // AMD
+ switch(family) {
+ case 5:
+ if( ( model == 0 ) || ( model == 1 ) ||
+ ( model == 2 ) || ( model == 3 ) ) // K5
+ element="i586";
+ if( ( model == 6 ) || ( model == 7 ) ) // K6
+ element="k6";
+ if( model == 8 ) // K6-2
+ element="k6-2";
+ if( model == 9 ) // K6-3
+ element="k6-3";
+ break;
+ case 6:
+ if( model <= 4 )
+ element="athlon";
+ if( model > 4 ) {
+ sse = has_sse();
+ if( sse == 0 )
+ element="athlon";
+ if( sse == 1 )
+ element="athlon-4";
+ }
+ break;
+ case 15:
+ element="athlon-4";
+ break;
+ default:
+ break;
+ } // end switch( family )
+ break;
+ case 0x69727943: // Cyrix
+ element="i386"; // who knows what cyrix supports, lets be safe
+ break;
+ default:
+ break;
+ } // end switch(ebx)
+ }
+
+#endif
+ }
#endif
#ifdef UNAME_PROCESSOR
if (element == unknown)
@@ -293,7 +389,7 @@
if (toprint & PRINT_HARDWARE_PLATFORM)
{
- char const *element = unknown;
+ char *element = unknown;
#if HAVE_SYSINFO && defined SI_PLATFORM
{
static char hardware_platform[257];
@@ -301,6 +397,15 @@
hardware_platform, sizeof hardware_platform))
element = hardware_platform;
}
+#else
+ {
+ struct utsname u;
+ uname (&u);
+ element = u.machine;
+ if (strlen (element) == 4 && element[0] == 'i' && element[2] == '8'
+ && element[3] == '6')
+ element[1] = '3';
+ }
#endif
#ifdef UNAME_HARDWARE_PLATFORM
if (element == unknown)
@@ -323,3 +428,29 @@
exit (EXIT_SUCCESS);
}
+
+#ifdef linux
+
+/******************************************************************************
+ *
+ * int has_sse( void )
+ * Checks Athlon CPU's to see if they support SSE.
+ *
+ *****************************************************************************/
+
+int has_sse( void )
+{
+ unsigned long edx, unused;
+ int sse;
+ cpuid(1,unused,unused,unused,edx);
+ // I think, I need this tested on a Duron with SSE
+ // and one without it.
+ sse = edx & 0x2000000;
+ if( sse == 0 ) {
+ return 0;
+ } else {
+ return 1;
+ }
+
+}
+#endif

Binary file not shown.

View File

@@ -0,0 +1,53 @@
Submitted By: Matthew Burgess <matthew@linuxfromscratch.org>
Date: 2004-11-12
Initial Package Version: 1.11.2
Upstream Status: Not submitted
Origin: BLFS Dev Post
Description: Links against system zlib instead of the
internal zlib.
$LastChangedBy: igor $
$Date: 2005-10-28 09:20:09 -0500 (Fri, 28 Oct 2005) $
diff -Naur cvs-1.11.18.orig/src/Makefile.in cvs-1.11.18/src/Makefile.in
--- cvs-1.11.18.orig/src/Makefile.in 2004-11-11 18:17:20.000000000 +0000
+++ cvs-1.11.18/src/Makefile.in 2004-11-12 19:58:14.962293296 +0000
@@ -86,7 +86,7 @@
version.$(OBJEXT) vers_ts.$(OBJEXT) watch.$(OBJEXT) \
wrapper.$(OBJEXT) zlib.$(OBJEXT)
cvs_OBJECTS = $(am_cvs_OBJECTS)
-cvs_DEPENDENCIES = ../diff/libdiff.a ../lib/libcvs.a ../zlib/libz.a
+cvs_DEPENDENCIES = ../diff/libdiff.a ../lib/libcvs.a
binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
SCRIPTS = $(bin_SCRIPTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
@@ -199,7 +199,7 @@
# some namespace hackery going on that maybe shouldn't be. Long term fix is to
# try and remove naming ocnflicts and fix Automake to allow particular includes
# to be attached only to particular object files. Short term fix is either or.
-INCLUDES = -I$(top_srcdir)/lib -I$(top_srcdir)/diff -I$(top_srcdir)/zlib $(includeopt)
+INCLUDES = -I$(top_srcdir)/lib -I$(top_srcdir)/diff $(includeopt)
bin_SCRIPTS = cvsbug
# The cvs executable
@@ -278,7 +278,7 @@
cvs_LDADD = \
../diff/libdiff.a \
../lib/libcvs.a \
- ../zlib/libz.a
+ -lz
# extra clean targets
diff -Naur cvs-1.11.18.orig/src/zlib.c cvs-1.11.18/src/zlib.c
--- cvs-1.11.18.orig/src/zlib.c 2004-03-19 19:18:57.000000000 +0000
+++ cvs-1.11.18/src/zlib.c 2004-11-12 19:58:55.531125896 +0000
@@ -22,7 +22,7 @@
#if defined (SERVER_SUPPORT) || defined (CLIENT_SUPPORT)
-#include "zlib.h"
+#include <zlib.h>
/* OS/2 doesn't have EIO. FIXME: this whole notion of turning
a different error into EIO strikes me as pretty dubious. */

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,802 @@
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. */

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,217 @@
Submitted By: LFS Book <lfs-book@linuxfromscratch.org>
Date: 2003-10-05
Initial Package Version: 5.38
Origin: Redhat RPM (Patch by HJ Lu)
Description: NA
diff -uNr expect-5.38.orig/exp_chan.c expect-5.38/exp_chan.c
--- expect-5.38.orig/exp_chan.c 2002-02-12 13:00:55.000000000 +1100
+++ expect-5.38/exp_chan.c 2003-03-01 10:36:18.000000000 +1100
@@ -519,6 +519,7 @@
esPtr->buffer = Tcl_NewStringObj("",0);
Tcl_IncrRefCount(esPtr->buffer);
esPtr->umsize = exp_default_match_max;
+ esPtr->umsize_changed = exp_default_match_max_changed;
/* this will reallocate object with an appropriate sized buffer */
expAdjust(esPtr);
diff -uNr expect-5.38.orig/exp_command.h expect-5.38/exp_command.h
--- expect-5.38.orig/exp_command.h 2002-04-08 08:57:20.000000000 +1000
+++ expect-5.38/exp_command.h 2003-03-01 10:36:18.000000000 +1100
@@ -25,6 +25,7 @@
EXTERN char * exp_get_var _ANSI_ARGS_((Tcl_Interp *,char *));
EXTERN int exp_default_match_max;
+EXTERN int exp_default_match_max_changed;
EXTERN int exp_default_parity;
EXTERN int exp_default_rm_nulls;
@@ -97,6 +98,7 @@
int msize; /* # of bytes that buffer can hold (max) */
int umsize; /* # of bytes (min) that is guaranteed to match */
/* this comes from match_max command */
+ int umsize_changed; /* is umsize changed by user? */
int printed; /* # of bytes written to stdout (if logging on) */
/* but not actually returned via a match yet */
int echoed; /* additional # of bytes (beyond "printed" above) */
diff -uNr expect-5.38.orig/expect.c expect-5.38/expect.c
--- expect-5.38.orig/expect.c 2002-04-08 09:00:33.000000000 +1000
+++ expect-5.38/expect.c 2003-03-01 10:36:18.000000000 +1100
@@ -41,8 +41,17 @@
#include "tcldbg.h"
#endif
+/* The initial length is 2000. We increment it by 2000. The maximum
+ is 8MB (0x800000). */
+#define EXP_MATCH_MAX 2000
+#define EXP_MATCH_INC 2000
+#define EXP_MATCH_STEP_LIMIT 0x700000
+#define EXP_MATCH_LIMIT 0x800000
+#define EXP_MATCH_LIMIT_QUOTE "0x800000"
+
/* initial length of strings that we can guarantee patterns can match */
-int exp_default_match_max = 2000;
+int exp_default_match_max = EXP_MATCH_MAX;
+int exp_default_match_max_changed = 0;
#define INIT_EXPECT_TIMEOUT_LIT "10" /* seconds */
#define INIT_EXPECT_TIMEOUT 10 /* seconds */
int exp_default_parity = TRUE;
@@ -1618,6 +1627,76 @@
return newsize;
}
+/* returns # of bytes until we see a newline at the end or EOF. */
+/*ARGSUSED*/
+static int
+expReadNewLine(interp,esPtr,save_flags) /* INTL */
+Tcl_Interp *interp;
+ExpState *esPtr;
+int save_flags;
+{
+ int size;
+ int exp_size;
+ int full_size;
+ int count;
+ char *str;
+
+ count = 0;
+ for (;;) {
+ exp_size = expSizeGet(esPtr);
+
+ /* When we reach the limit, we will only read one char at a
+ time. */
+ if (esPtr->umsize >= EXP_MATCH_STEP_LIMIT)
+ size = TCL_UTF_MAX;
+ else
+ size = exp_size;
+
+ if (exp_size + TCL_UTF_MAX >= esPtr->msize) {
+ if (esPtr->umsize >= EXP_MATCH_LIMIT) {
+ expDiagLogU("WARNING: interact buffer is full. probably your program\r\n");
+ expDiagLogU("is not interactive or has a very long output line. The\r\n");
+ expDiagLogU("current limit is " EXP_MATCH_LIMIT_QUOTE ".\r\n");
+ expDiagLogU("Dumping first half of buffer in order to continue\r\n");
+ expDiagLogU("Recommend you enlarge the buffer.\r\n");
+ exp_buffer_shuffle(interp,esPtr,save_flags,EXPECT_OUT,"expect");
+ return count;
+ }
+ else {
+ esPtr->umsize += EXP_MATCH_INC;
+ expAdjust(esPtr);
+ }
+ }
+
+ full_size = esPtr->msize - (size / TCL_UTF_MAX);
+ size = Tcl_ReadChars(esPtr->channel,
+ esPtr->buffer,
+ full_size,
+ 1 /* append */);
+ if (size > 0) {
+ count += size;
+ /* We try again if there are more to read and we haven't
+ seen a newline at the end. */
+ if (size == full_size) {
+ str = Tcl_GetStringFromObj(esPtr->buffer, &size);
+ if (str[size - 1] != '\n')
+ continue;
+ }
+ }
+ else {
+ /* It is even trickier. We got an error from read. We have
+ to recover from it. Let's make sure the size of
+ buffer is correct. It can be corrupted. */
+ str = Tcl_GetString(esPtr->buffer);
+ Tcl_SetObjLength(esPtr->buffer, strlen(str));
+ }
+
+ break;
+ }
+
+ return count;
+}
+
/* returns # of bytes read or (non-positive) error of form EXP_XXX */
/* returns 0 for end of file */
/* If timeout is non-zero, set an alarm before doing the read, else assume */
@@ -1632,6 +1711,8 @@
{
int cc = EXP_TIMEOUT;
int size = expSizeGet(esPtr);
+ int full_size;
+ int count;
if (size + TCL_UTF_MAX >= esPtr->msize)
exp_buffer_shuffle(interp,esPtr,save_flags,EXPECT_OUT,"expect");
@@ -1648,11 +1729,43 @@
}
#endif
-
+ /* FIXME: If we ask less than what is available in the tcl buffer
+ when tcl has seen EOF, we will throw away the remaining data
+ since the next read will get EOF. Since expect is line-oriented,
+ we exand our buffer to get EOF or the next newline at the end of
+ the input buffer. I don't know if it is the right fix. H.J. */
+ count = 0;
+ full_size = esPtr->msize - (size / TCL_UTF_MAX);
cc = Tcl_ReadChars(esPtr->channel,
- esPtr->buffer,
- esPtr->msize - (size / TCL_UTF_MAX),
- 1 /* append */);
+ esPtr->buffer,
+ full_size,
+ 1 /* append */);
+ if (cc > 0) {
+ count += cc;
+ /* It gets very tricky. There are more to read. We will expand
+ our buffer and get EOF or a newline at the end unless the
+ buffer length has been changed. */
+ if (cc == full_size) {
+ char *str;
+ str = Tcl_GetStringFromObj(esPtr->buffer, &size);
+ if (str[size - 1] != '\n') {
+ if (esPtr->umsize_changed) {
+ char buf[20]; /* big enough for 64bit int in hex. */
+ snprintf(buf,sizeof(buf),"0x%x", esPtr->umsize);
+ expDiagLogU("WARNING: interact buffer is not large enough to hold\r\n");
+ expDiagLogU("all output. probably your program is not interactive or\r\n");
+ expDiagLogU("has a very long output line. The current limit is ");
+ expDiagLogU(buf);
+ expDiagLogU(".\r\n");
+ }
+ else {
+ cc = expReadNewLine(interp,esPtr,save_flags);
+ if (cc > 0)
+ count += cc;
+ }
+ }
+ }
+ }
i_read_errno = errno;
#ifdef SIMPLE_EVENT
@@ -1673,7 +1786,7 @@
}
}
#endif
- return cc;
+ return count > 0 ? count : cc;
}
/*
@@ -2746,8 +2859,14 @@
return(TCL_ERROR);
}
- if (Default) exp_default_match_max = size;
- else esPtr->umsize = size;
+ if (Default) {
+ exp_default_match_max = size;
+ exp_default_match_max_changed = 1;
+ }
+ else {
+ esPtr->umsize = size;
+ esPtr->umsize_changed = 1;
+ }
return(TCL_OK);
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,43 @@
Submitted By: Matthew Burgess <matthew@linuxfromscratch.org>
Date: 2005-09-24
Initial Package Version: 3.1.5
Upstream Status: From Upstream
Origin: http://lists.gnu.org/archive/html/bug-gnu-utils/2005-08/msg00047.html
Description: Fixes a bug which causes gawk to segfault when operating on a non-existent file.
diff -Naur gawk-3.1.5.orig/io.c gawk-3.1.5/io.c
--- gawk-3.1.5.orig/io.c 2005-07-26 18:07:43.000000000 +0000
+++ gawk-3.1.5/io.c 2005-09-24 14:43:13.771380264 +0000
@@ -2480,9 +2480,12 @@
{
struct stat sbuf;
struct open_hook *oh;
+ int iop_malloced = FALSE;
- if (iop == NULL)
+ if (iop == NULL) {
emalloc(iop, IOBUF *, sizeof(IOBUF), "iop_alloc");
+ iop_malloced = TRUE;
+ }
memset(iop, '\0', sizeof(IOBUF));
iop->flag = 0;
iop->fd = fd;
@@ -2495,7 +2498,8 @@
}
if (iop->fd == INVALID_HANDLE) {
- free(iop);
+ if (iop_malloced)
+ free(iop);
return NULL;
}
if (isatty(iop->fd))
@@ -2503,7 +2507,7 @@
iop->readsize = iop->size = optimal_bufsize(iop->fd, & sbuf);
iop->sbuf = sbuf;
if (do_lint && S_ISREG(sbuf.st_mode) && sbuf.st_size == 0)
- lintwarn(_("data file `%s' is empty"), name);
+ lintwarn(_("data file `%s' is empty"), name);
errno = 0;
iop->count = iop->scanoff = 0;
emalloc(iop->buf, char *, iop->size += 2, "iop_alloc");

Binary file not shown.

View File

@@ -0,0 +1,359 @@
Submitted By: DJ Lucas <dj_AT_linuxfromscratch_DOT_org>
Date: 2004-12-19
Initial Package Version: 3.3.3
Origin: gcc-3.4.1-linkonce-1.patch
Upstream Status: Applied
Description: Fixes linkone/comdat issue
Details of this patch can be found on the following link
http://gcc.gnu.org/ml/gcc-patches/2004-08/msg00653.html
$LastChangedBy: randy $
$Date: 2005-08-17 11:33:20 -0500 (Wed, 17 Aug 2005) $
diff -Naur gcc-3.3.3-orig/gcc/config/alpha/alpha.c gcc-3.3.3/gcc/config/alpha/alpha.c
--- gcc-3.3.3-orig/gcc/config/alpha/alpha.c 2004-01-11 17:53:17.000000000 -0600
+++ gcc-3.3.3/gcc/config/alpha/alpha.c 2004-12-19 22:51:55.974168040 -0600
@@ -250,6 +250,8 @@
# define TARGET_SECTION_TYPE_FLAGS unicosmk_section_type_flags
# undef TARGET_ASM_UNIQUE_SECTION
# define TARGET_ASM_UNIQUE_SECTION unicosmk_unique_section
+#undef TARGET_ASM_FUNCTION_RODATA_SECTION
+#define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section
# undef TARGET_ASM_GLOBALIZE_LABEL
# define TARGET_ASM_GLOBALIZE_LABEL hook_FILEptr_constcharptr_void
#endif
diff -Naur gcc-3.3.3-orig/gcc/config/arm/pe.h gcc-3.3.3/gcc/config/arm/pe.h
--- gcc-3.3.3-orig/gcc/config/arm/pe.h 2002-05-19 00:23:00.000000000 -0500
+++ gcc-3.3.3/gcc/config/arm/pe.h 2004-12-19 22:51:56.018161352 -0600
@@ -101,6 +101,7 @@
#define MULTIPLE_SYMBOL_SPACES
#define TARGET_ASM_UNIQUE_SECTION arm_pe_unique_section
+#define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section
#define SUPPORTS_ONE_ONLY 1
diff -Naur gcc-3.3.3-orig/gcc/config/avr/avr.c gcc-3.3.3/gcc/config/avr/avr.c
--- gcc-3.3.3-orig/gcc/config/avr/avr.c 2002-10-24 15:07:21.000000000 -0500
+++ gcc-3.3.3/gcc/config/avr/avr.c 2004-12-19 22:51:56.042157704 -0600
@@ -221,6 +221,8 @@
#define TARGET_ATTRIBUTE_TABLE avr_attribute_table
#undef TARGET_ASM_UNIQUE_SECTION
#define TARGET_ASM_UNIQUE_SECTION avr_unique_section
+#undef TARGET_ASM_FUNCTION_RODATA_SECTION
+#define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO avr_encode_section_info
#undef TARGET_SECTION_TYPE_FLAGS
diff -Naur gcc-3.3.3-orig/gcc/config/darwin.h gcc-3.3.3/gcc/config/darwin.h
--- gcc-3.3.3-orig/gcc/config/darwin.h 2003-08-08 16:17:57.000000000 -0500
+++ gcc-3.3.3/gcc/config/darwin.h 2004-12-19 22:51:56.091150256 -0600
@@ -677,6 +677,9 @@
#undef TARGET_ASM_SELECT_RTX_SECTION
#define TARGET_ASM_SELECT_RTX_SECTION machopic_select_rtx_section
+#undef TARGET_ASM_FUNCTION_RODATA_SECTION
+#define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section
+
#define ASM_DECLARE_UNRESOLVED_REFERENCE(FILE,NAME) \
do { \
if (FILE) { \
diff -Naur gcc-3.3.3-orig/gcc/config/i386/cygwin.h gcc-3.3.3/gcc/config/i386/cygwin.h
--- gcc-3.3.3-orig/gcc/config/i386/cygwin.h 2003-04-29 08:56:28.000000000 -0500
+++ gcc-3.3.3/gcc/config/i386/cygwin.h 2004-12-19 22:51:56.112147064 -0600
@@ -331,6 +331,7 @@
extern void i386_pe_unique_section PARAMS ((TREE, int));
#define TARGET_ASM_UNIQUE_SECTION i386_pe_unique_section
+#define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section
#define SUPPORTS_ONE_ONLY 1
diff -Naur gcc-3.3.3-orig/gcc/config/i386/i386-interix.h gcc-3.3.3/gcc/config/i386/i386-interix.h
--- gcc-3.3.3-orig/gcc/config/i386/i386-interix.h 2002-11-25 22:54:48.000000000 -0600
+++ gcc-3.3.3/gcc/config/i386/i386-interix.h 2004-12-19 22:51:56.113146912 -0600
@@ -330,6 +330,7 @@
extern void i386_pe_unique_section PARAMS ((tree, int));
#define TARGET_ASM_UNIQUE_SECTION i386_pe_unique_section
+#define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section
#define SUPPORTS_ONE_ONLY 1
#endif /* 0 */
diff -Naur gcc-3.3.3-orig/gcc/config/ip2k/ip2k.c gcc-3.3.3/gcc/config/ip2k/ip2k.c
--- gcc-3.3.3-orig/gcc/config/ip2k/ip2k.c 2003-01-14 14:13:45.000000000 -0600
+++ gcc-3.3.3/gcc/config/ip2k/ip2k.c 2004-12-19 22:51:56.167138704 -0600
@@ -95,6 +95,9 @@
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO encode_section_info
+#undef TARGET_ASM_FUNCTION_RODATA_SECTION
+#define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section
+
#undef TARGET_ATTRIBUTE_TABLE
#define TARGET_ATTRIBUTE_TABLE ip2k_attribute_table
diff -Naur gcc-3.3.3-orig/gcc/config/mcore/mcore.c gcc-3.3.3/gcc/config/mcore/mcore.c
--- gcc-3.3.3-orig/gcc/config/mcore/mcore.c 2003-12-31 18:24:24.000000000 -0600
+++ gcc-3.3.3/gcc/config/mcore/mcore.c 2004-12-19 22:51:56.199133840 -0600
@@ -157,6 +157,8 @@
#define TARGET_ATTRIBUTE_TABLE mcore_attribute_table
#undef TARGET_ASM_UNIQUE_SECTION
#define TARGET_ASM_UNIQUE_SECTION mcore_unique_section
+#undef TARGET_ASM_FUNCTION_RODATA_SECTION
+#define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section
#undef TARGET_ENCODE_SECTION_INFO
#define TARGET_ENCODE_SECTION_INFO mcore_encode_section_info
#undef TARGET_STRIP_NAME_ENCODING
diff -Naur gcc-3.3.3-orig/gcc/config/rs6000/xcoff.h gcc-3.3.3/gcc/config/rs6000/xcoff.h
--- gcc-3.3.3-orig/gcc/config/rs6000/xcoff.h 2002-10-22 18:05:22.000000000 -0500
+++ gcc-3.3.3/gcc/config/rs6000/xcoff.h 2004-12-19 22:51:56.246126696 -0600
@@ -164,6 +164,7 @@
#define TARGET_ASM_SELECT_SECTION rs6000_xcoff_select_section
#define TARGET_ASM_SELECT_RTX_SECTION rs6000_xcoff_select_rtx_section
#define TARGET_ASM_UNIQUE_SECTION rs6000_xcoff_unique_section
+#define TARGET_ASM_FUNCTION_RODATA_SECTION default_no_function_rodata_section
#define TARGET_ENCODE_SECTION_INFO rs6000_xcoff_encode_section_info
#define TARGET_STRIP_NAME_ENCODING rs6000_xcoff_strip_name_encoding
#define TARGET_SECTION_TYPE_FLAGS rs6000_xcoff_section_type_flags
diff -Naur gcc-3.3.3-orig/gcc/doc/tm.texi gcc-3.3.3/gcc/doc/tm.texi
--- gcc-3.3.3-orig/gcc/doc/tm.texi 2003-12-12 10:10:09.000000000 -0600
+++ gcc-3.3.3/gcc/doc/tm.texi 2004-12-19 22:51:56.317115904 -0600
@@ -5902,6 +5902,15 @@
Whatever the actual target object format, this is often good enough.
@end deftypefn
+@deftypefn {Target Hook} void TARGET_ASM_FUNCTION_RODATA_SECTION (tree @var{decl})
+Switches to a readonly data section associated with
+@samp{DECL_SECTION_NAME (@var{decl})}.
+The default version of this function switches to @code{.gnu.linkonce.r.name}
+section if function's section is @code{.gnu.linkonce.t.name}, to
+@code{.rodata.name} if function is in @code{.text.name} section
+and otherwise switches to the normal readonly data section.
+@end deftypefn
+
@deftypefn {Target Hook} void TARGET_ASM_SELECT_RTX_SECTION (enum machine_mode @var{mode}, rtx @var{x}, unsigned HOST_WIDE_INT @var{align})
Switches to the appropriate section for output of constant pool entry
@var{x} in @var{mode}. You can assume that @var{x} is some kind of
diff -Naur gcc-3.3.3-orig/gcc/final.c gcc-3.3.3/gcc/final.c
--- gcc-3.3.3-orig/gcc/final.c 2003-12-01 02:18:36.000000000 -0600
+++ gcc-3.3.3/gcc/final.c 2004-12-19 22:51:56.373107392 -0600
@@ -2258,7 +2258,7 @@
{
int log_align;
- readonly_data_section ();
+ targetm.asm_out.function_rodata_section (current_function_decl);
#ifdef ADDR_VEC_ALIGN
log_align = ADDR_VEC_ALIGN (NEXT_INSN (insn));
diff -Naur gcc-3.3.3-orig/gcc/output.h gcc-3.3.3/gcc/output.h
--- gcc-3.3.3-orig/gcc/output.h 2002-12-12 18:17:20.000000000 -0600
+++ gcc-3.3.3/gcc/output.h 2004-12-19 22:51:56.420100248 -0600
@@ -525,6 +525,8 @@
unsigned HOST_WIDE_INT, int));
extern void default_unique_section PARAMS ((tree, int));
extern void default_unique_section_1 PARAMS ((tree, int, int));
+extern void default_function_rodata_section (tree);
+extern void default_no_function_rodata_section (tree);
extern void default_select_rtx_section PARAMS ((enum machine_mode, rtx,
unsigned HOST_WIDE_INT));
extern void default_elf_select_rtx_section PARAMS ((enum machine_mode, rtx,
diff -Naur gcc-3.3.3-orig/gcc/target-def.h gcc-3.3.3/gcc/target-def.h
--- gcc-3.3.3-orig/gcc/target-def.h 2002-12-09 17:53:59.000000000 -0600
+++ gcc-3.3.3/gcc/target-def.h 2004-12-19 22:51:56.443096752 -0600
@@ -75,6 +75,10 @@
#define TARGET_ASM_UNIQUE_SECTION default_unique_section
#endif
+#ifndef TARGET_ASM_FUNCTION_RODATA_SECTION
+#define TARGET_ASM_FUNCTION_RODATA_SECTION default_function_rodata_section
+#endif
+
#ifndef TARGET_ASM_SELECT_RTX_SECTION
#define TARGET_ASM_SELECT_RTX_SECTION default_select_rtx_section
#endif
@@ -175,6 +179,7 @@
TARGET_ASM_SELECT_SECTION, \
TARGET_ASM_SELECT_RTX_SECTION, \
TARGET_ASM_UNIQUE_SECTION, \
+ TARGET_ASM_FUNCTION_RODATA_SECTION, \
TARGET_ASM_CONSTRUCTOR, \
TARGET_ASM_DESTRUCTOR, \
TARGET_ASM_OUTPUT_MI_THUNK, \
diff -Naur gcc-3.3.3-orig/gcc/target.h gcc-3.3.3/gcc/target.h
--- gcc-3.3.3-orig/gcc/target.h 2002-12-09 17:53:59.000000000 -0600
+++ gcc-3.3.3/gcc/target.h 2004-12-19 22:51:56.463093712 -0600
@@ -114,6 +114,10 @@
for SELECT_SECTION. */
void (* unique_section) PARAMS ((tree, int));
+ /* Tell assembler to switch to the readonly data section associated
+ with function DECL. */
+ void (* function_rodata_section) (tree);
+
/* Output a constructor for a symbol with a given priority. */
void (* constructor) PARAMS ((rtx, int));
diff -Naur gcc-3.3.3-orig/gcc/testsuite/g++.old-deja/g++.other/comdat4-aux.cc gcc-3.3.3/gcc/testsuite/g++.old-deja/g++.other/comdat4-aux.cc
--- gcc-3.3.3-orig/gcc/testsuite/g++.old-deja/g++.other/comdat4-aux.cc 1969-12-31 18:00:00.000000000 -0600
+++ gcc-3.3.3/gcc/testsuite/g++.old-deja/g++.other/comdat4-aux.cc 2004-12-19 22:51:56.484090520 -0600
@@ -0,0 +1,40 @@
+extern void
+bar (int x);
+
+inline void
+foo (int i)
+{
+ switch (i)
+ {
+ case 3:
+ case 5:
+ case 6:
+ case 9:
+ case 15:
+ bar (1);
+ break;
+ case 2:
+ case 4:
+ case 7:
+ case 10:
+ case 11:
+ case 12:
+ bar (2);
+ break;
+ case 0:
+ case 1:
+ case 8:
+ case 13:
+ case 16:
+ bar (3);
+ break;
+ case 14:
+ bar (4);
+ break;
+ default:
+ bar (5);
+ break;
+ }
+}
+
+void *fooaddr2 = (void *) foo;
diff -Naur gcc-3.3.3-orig/gcc/testsuite/g++.old-deja/g++.other/comdat4.C gcc-3.3.3/gcc/testsuite/g++.old-deja/g++.other/comdat4.C
--- gcc-3.3.3-orig/gcc/testsuite/g++.old-deja/g++.other/comdat4.C 1969-12-31 18:00:00.000000000 -0600
+++ gcc-3.3.3/gcc/testsuite/g++.old-deja/g++.other/comdat4.C 2004-12-19 22:51:56.485090368 -0600
@@ -0,0 +1,57 @@
+// PR c++/16276
+// { dg-do link }
+// { dg-additional-sources " comdat4-aux.cc" }
+// { dg-options "-O2" }
+
+extern void
+bar (int x);
+
+inline void
+foo (int i)
+{
+ switch (i)
+ {
+ case 3:
+ case 5:
+ case 6:
+ case 9:
+ case 15:
+ bar (1);
+ break;
+ case 2:
+ case 4:
+ case 7:
+ case 10:
+ case 11:
+ case 12:
+ bar (2);
+ break;
+ case 0:
+ case 1:
+ case 8:
+ case 13:
+ case 16:
+ bar (3);
+ break;
+ case 14:
+ bar (4);
+ break;
+ default:
+ bar (5);
+ break;
+ }
+}
+
+void *fooaddr = (void *) foo;
+
+void
+bar (int x)
+{
+ __asm __volatile ("" : : "r" (x));
+}
+
+int
+main (void)
+{
+ return 0;
+}
diff -Naur gcc-3.3.3-orig/gcc/varasm.c gcc-3.3.3/gcc/varasm.c
--- gcc-3.3.3-orig/gcc/varasm.c 2004-01-12 12:23:08.000000000 -0600
+++ gcc-3.3.3/gcc/varasm.c 2004-12-19 22:51:56.528083832 -0600
@@ -568,6 +568,53 @@
text_section ();
}
+/* Switch to read-only data section associated with function DECL. */
+
+void
+default_function_rodata_section (tree decl)
+{
+ if (decl != NULL_TREE && DECL_SECTION_NAME (decl))
+ {
+ const char *name = TREE_STRING_POINTER (DECL_SECTION_NAME (decl));
+
+ /* For .gnu.linkonce.t.foo we want to use .gnu.linkonce.r.foo. */
+ if (DECL_ONE_ONLY (decl) && strncmp (name, ".gnu.linkonce.t.", 16) == 0)
+ {
+ size_t len = strlen (name) + 1;
+ char *rname = alloca (len);
+
+ memcpy (rname, name, len);
+ rname[14] = 'r';
+ named_section_flags (rname, SECTION_LINKONCE);
+ return;
+ }
+ /* For .text.foo we want to use .rodata.foo. */
+ else if (flag_function_sections && flag_data_sections
+ && strncmp (name, ".text.", 6) == 0)
+ {
+ size_t len = strlen (name) + 1;
+ char *rname = alloca (len + 2);
+
+ memcpy (rname, ".rodata", 7);
+ memcpy (rname + 7, name + 5, len - 5);
+ named_section_flags (rname, 0);
+ return;
+ }
+ }
+
+ readonly_data_section ();
+}
+
+/* Switch to read-only data section associated with function DECL
+ for targets where that section should be always the single
+ readonly data section. */
+
+void
+default_no_function_rodata_section (tree decl ATTRIBUTE_UNUSED)
+{
+ readonly_data_section ();
+}
+
/* Switch to section for variable DECL. RELOC is the same as the
argument to SELECT_SECTION. */

View File

@@ -0,0 +1,30 @@
Submitted By: Ronald Hummelink <ronald at hummelink dot xs4all dot nl>
Date: 2003-08-16
Initial Package Version: 3.3.1
Origin: Originally developed for GCC 3.2 by Greg Schafer <gschafer at zip dot com dot au>
Description: Prevent fixincludes script from running.
$LastChangedBy: randy $
$Date: 2005-08-17 11:33:20 -0500 (Wed, 17 Aug 2005) $
--- gcc-3.3.1.orig/gcc/Makefile.in 2003-08-03 15:48:36.000000000 +0000
+++ gcc-3.3.1/gcc/Makefile.in 2003-08-15 23:40:28.000000000 +0000
@@ -2335,10 +2335,6 @@
rm -f include/limits.h
cp xlimits.h include/limits.h
chmod a+r include/limits.h
-# Install the README
- rm -f include/README
- cp $(srcdir)/README-fixinc include/README
- chmod a+r include/README
$(STAMP) $@
# fixinc.sh depends on this, not on specs directly.
@@ -2369,7 +2365,6 @@
(TARGET_MACHINE='$(target)'; srcdir=`cd $(srcdir); ${PWD_COMMAND}`; \
SHELL='$(SHELL)' ;\
export TARGET_MACHINE srcdir SHELL ; \
- $(SHELL) ./fixinc.sh `${PWD_COMMAND}`/include $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); \
rm -f include/syslimits.h; \
if [ -f include/limits.h ]; then \
mv include/limits.h include/syslimits.h; \

Binary file not shown.

View File

@@ -0,0 +1,336 @@
Submitted By: Robert Connolly <robert at linuxfromscratch dot org> (ashes)
Date: 2006-01-16
Initial Package Version: 4.0.0
Upstream Status: Not Sent - LFS Specfic
Origin: Idea originally developed by Ryan Oliver and Greg Schafer for
the Pure LFS project.
More architectures added by Zack Winkles.
Further fine tunings by Greg Schafer.
Modified for gcc 3.3.2 by Oliver Brakmann.
Rediffed against gcc 3.4.0 by Zack Winkles.
Rediffed against gcc 3.4.3 by Jim Gifford.
Rediffed against gcc 4.0.0 by Robert Connolly.
Description: This patch modifies the location of the dynamic linker for
the GCC Pass 2 build in LFS Chapter 5.
diff -Naur gcc-20050116.orig/gcc/config/alpha/linux-elf.h gcc-20050116/gcc/config/alpha/linux-elf.h
--- gcc-20050116.orig/gcc/config/alpha/linux-elf.h 2005-01-17 00:45:16.000000000 +0000
+++ gcc-20050116/gcc/config/alpha/linux-elf.h 2005-01-17 00:46:14.560651027 +0000
@@ -27,7 +27,7 @@
#define SUBTARGET_EXTRA_SPECS \
{ "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
-#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#define ELF_DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
%{O*:-O3} %{!O*:-O1} \
diff -Naur gcc-20050116.orig/gcc/config/arm/linux-elf.h gcc-20050116/gcc/config/arm/linux-elf.h
--- gcc-20050116.orig/gcc/config/arm/linux-elf.h 2005-01-17 00:45:16.000000000 +0000
+++ gcc-20050116/gcc/config/arm/linux-elf.h 2005-01-17 00:46:50.538578614 +0000
@@ -87,7 +87,7 @@
%{shared:-shared} \
%{symbolic:-Bsymbolic} \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld-linux.so.2} \
-X \
%{mbig-endian:-EB}" \
SUBTARGET_EXTRA_LINK_SPEC
diff -Naur gcc-20050116.orig/gcc/config/frv/linux.h gcc-20050116/gcc/config/frv/linux.h
--- gcc-20050116.orig/gcc/config/frv/linux.h 2005-01-17 00:45:16.000000000 +0000
+++ gcc-20050116/gcc/config/frv/linux.h 2005-01-17 01:33:50.600805260 +0000
@@ -41,7 +41,7 @@
%{mfdpic: -m elf32frvfd -z text} %{shared} %{pie} \
%{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}} \
%{static}}"
/* Support for compile-time default CPU. */
diff -Naur gcc-20050116.orig/gcc/config/i386/gnu.h gcc-20050116/gcc/config/i386/gnu.h
--- gcc-20050116.orig/gcc/config/i386/gnu.h 2005-01-17 00:45:16.000000000 +0000
+++ gcc-20050116/gcc/config/i386/gnu.h 2005-01-17 01:34:11.142021939 +0000
@@ -27,7 +27,7 @@
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld.so}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so}} \
%{static:-static}}"
#undef STARTFILE_SPEC
diff -Naur gcc-20050116.orig/gcc/config/i386/linux.h gcc-20050116/gcc/config/i386/linux.h
--- gcc-20050116.orig/gcc/config/i386/linux.h 2005-01-17 00:45:16.000000000 +0000
+++ gcc-20050116/gcc/config/i386/linux.h 2005-01-17 00:49:27.412667132 +0000
@@ -105,7 +105,7 @@
/* If ELF is the default format, we should not use /lib/elf. */
#define LINK_EMULATION "elf_i386"
-#define DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#define DYNAMIC_LINKER "/tools/lib/ld-linux.so.2"
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
diff -Naur gcc-20050116.orig/gcc/config/i386/linux64.h gcc-20050116/gcc/config/i386/linux64.h
--- gcc-20050116.orig/gcc/config/i386/linux64.h 2005-01-17 00:45:16.000000000 +0000
+++ gcc-20050116/gcc/config/i386/linux64.h 2005-01-17 00:50:23.055094690 +0000
@@ -60,8 +60,8 @@
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
- %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
+ %{m32:%{!dynamic-linker:-dynamic-linker /tools/lib/ld-linux.so.2}} \
+ %{!m32:%{!dynamic-linker:-dynamic-linker /tools/lib64/ld-linux-x86-64.so.2}}} \
%{static:-static}}"
#define MULTILIB_DEFAULTS { "m64" }
diff -Naur gcc-20050116.orig/gcc/config/ia64/linux.h gcc-20050116/gcc/config/ia64/linux.h
--- gcc-20050116.orig/gcc/config/ia64/linux.h 2005-01-17 00:45:17.000000000 +0000
+++ gcc-20050116/gcc/config/ia64/linux.h 2005-01-17 00:50:43.146472133 +0000
@@ -43,7 +43,7 @@
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld-linux-ia64.so.2}} \
%{static:-static}}"
diff -Naur gcc-20050116.orig/gcc/config/linux.h gcc-20050116/gcc/config/linux.h
--- gcc-20050116.orig/gcc/config/linux.h 2005-01-17 00:45:16.000000000 +0000
+++ gcc-20050116/gcc/config/linux.h 2005-01-17 00:51:14.101809663 +0000
@@ -104,3 +104,7 @@
#define TARGET_C99_FUNCTIONS 1
#define TARGET_HAS_F_SETLKW
+
+/* Remove /usr/include from the end of the include search path. */
+#undef STANDARD_INCLUDE_DIR
+#define STANDARD_INCLUDE_DIR 0
diff -Naur gcc-20050116.orig/gcc/config/m32r/linux.h gcc-20050116/gcc/config/m32r/linux.h
--- gcc-20050116.orig/gcc/config/m32r/linux.h 2005-01-17 00:45:17.000000000 +0000
+++ gcc-20050116/gcc/config/m32r/linux.h 2005-01-17 00:51:39.720640870 +0000
@@ -66,7 +66,7 @@
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld-linux.so.2}} \
%{static:-static}}}"
#else
#define LINK_SPEC "%(link_cpu) -m m32relf_linux %{shared:-shared} \
@@ -74,7 +74,7 @@
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld-linux.so.2}} \
%{static:-static}}}"
#endif
diff -Naur gcc-20050116.orig/gcc/config/m68k/linux.h gcc-20050116/gcc/config/m68k/linux.h
--- gcc-20050116.orig/gcc/config/m68k/linux.h 2005-01-17 00:45:17.000000000 +0000
+++ gcc-20050116/gcc/config/m68k/linux.h 2005-01-17 00:52:07.633830392 +0000
@@ -132,7 +132,7 @@
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \
+ %{!dynamic-linker*:-dynamic-linker /tools/lib/ld.so.1}} \
%{static}}"
/* For compatibility with linux/a.out */
diff -Naur gcc-20050116.orig/gcc/config/mips/linux.h gcc-20050116/gcc/config/mips/linux.h
--- gcc-20050116.orig/gcc/config/mips/linux.h 2005-01-17 00:45:17.000000000 +0000
+++ gcc-20050116/gcc/config/mips/linux.h 2005-01-17 00:52:28.348034505 +0000
@@ -115,7 +115,7 @@
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}} \
%{static:-static}}}"
#undef SUBTARGET_ASM_SPEC
diff -Naur gcc-20050116.orig/gcc/config/mips/linux64.h gcc-20050116/gcc/config/mips/linux64.h
--- gcc-20050116.orig/gcc/config/mips/linux64.h 2005-01-17 00:45:17.000000000 +0000
+++ gcc-20050116/gcc/config/mips/linux64.h 2005-01-17 00:53:04.645878728 +0000
@@ -60,9 +60,9 @@
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker: \
- %{mabi=n32: -dynamic-linker /lib32/ld.so.1} \
- %{mabi=64: -dynamic-linker /lib64/ld.so.1} \
- %{mabi=32: -dynamic-linker /lib/ld.so.1}}} \
+ %{mabi=n32: -dynamic-linker /tools/lib32/ld.so.1} \
+ %{mabi=64: -dynamic-linker /tools/lib64/ld.so.1} \
+ %{mabi=32: -dynamic-linker /tools/lib/ld.so.1}}} \
%{static:-static}}} \
%{mabi=n32:-melf32%{EB:b}%{EL:l}tsmipn32} \
%{mabi=64:-melf64%{EB:b}%{EL:l}tsmip} \
diff -Naur gcc-20050116.orig/gcc/config/mn10300/linux.h gcc-20050116/gcc/config/mn10300/linux.h
--- gcc-20050116.orig/gcc/config/mn10300/linux.h 2005-01-17 00:45:17.000000000 +0000
+++ gcc-20050116/gcc/config/mn10300/linux.h 2005-01-17 00:53:23.477610026 +0000
@@ -37,7 +37,7 @@
#define LINK_SPEC "%{mrelax:--relax} %{shared:-shared} \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}} \
%{static:-static}"
#undef LIB_SPEC
diff -Naur gcc-20050116.orig/gcc/config/pa/pa-linux.h gcc-20050116/gcc/config/pa/pa-linux.h
--- gcc-20050116.orig/gcc/config/pa/pa-linux.h 2005-01-17 00:45:17.000000000 +0000
+++ gcc-20050116/gcc/config/pa/pa-linux.h 2005-01-17 00:53:45.334495141 +0000
@@ -88,7 +88,7 @@
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}} \
%{static:-static}}"
/* glibc's profiling functions don't need gcc to allocate counters. */
diff -Naur gcc-20050116.orig/gcc/config/rs6000/linux64.h gcc-20050116/gcc/config/rs6000/linux64.h
--- gcc-20050116.orig/gcc/config/rs6000/linux64.h 2005-01-17 00:45:17.000000000 +0000
+++ gcc-20050116/gcc/config/rs6000/linux64.h 2005-01-17 00:54:28.524412534 +0000
@@ -351,11 +351,11 @@
#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}}}"
#define LINK_OS_LINUX_SPEC64 "-m elf64ppc %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib64/ld64.so.1}}}"
+ %{!dynamic-linker:-dynamic-linker /tools/lib64/ld64.so.1}}}"
#undef TOC_SECTION_ASM_OP
#define TOC_SECTION_ASM_OP \
diff -Naur gcc-20050116.orig/gcc/config/rs6000/sysv4.h gcc-20050116/gcc/config/rs6000/sysv4.h
--- gcc-20050116.orig/gcc/config/rs6000/sysv4.h 2005-01-17 00:45:17.000000000 +0000
+++ gcc-20050116/gcc/config/rs6000/sysv4.h 2005-01-17 01:26:39.126999460 +0000
@@ -1131,7 +1131,7 @@
#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}}}"
#if defined(HAVE_LD_EH_FRAME_HDR)
# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
@@ -1162,7 +1162,7 @@
#define LINK_OS_GNU_SPEC "-m elf32ppclinux %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}}}"
#define CPP_OS_GNU_SPEC "-D__unix__ -D__gnu_hurd__ -D__GNU__ \
%{!undef: \
diff -Naur gcc-20050116.orig/gcc/config/s390/linux.h gcc-20050116/gcc/config/s390/linux.h
--- gcc-20050116.orig/gcc/config/s390/linux.h 2005-01-17 00:45:17.000000000 +0000
+++ gcc-20050116/gcc/config/s390/linux.h 2005-01-17 01:26:58.672523211 +0000
@@ -86,8 +86,8 @@
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker: \
- %{m31:-dynamic-linker /lib/ld.so.1} \
- %{m64:-dynamic-linker /lib/ld64.so.1}}}}"
+ %{m31:-dynamic-linker /tools/lib/ld.so.1} \
+ %{m64:-dynamic-linker /tools/lib/ld64.so.1}}}}"
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
diff -Naur gcc-20050116.orig/gcc/config/sh/linux.h gcc-20050116/gcc/config/sh/linux.h
--- gcc-20050116.orig/gcc/config/sh/linux.h 2005-01-17 00:45:18.000000000 +0000
+++ gcc-20050116/gcc/config/sh/linux.h 2005-01-17 01:27:19.588663163 +0000
@@ -70,7 +70,7 @@
"%{shared:-shared} \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld-linux.so.2}} \
%{static:-static}"
#undef LIB_SPEC
diff -Naur gcc-20050116.orig/gcc/config/sparc/linux.h gcc-20050116/gcc/config/sparc/linux.h
--- gcc-20050116.orig/gcc/config/sparc/linux.h 2005-01-17 00:45:18.000000000 +0000
+++ gcc-20050116/gcc/config/sparc/linux.h 2005-01-17 01:30:07.282688639 +0000
@@ -131,13 +131,13 @@
/* If ELF is the default format, we should not use /lib/elf. */
#undef LINK_SPEC
-#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
+#define LINK_SPEC "-m elf32_sparc -Y P,/tools/lib %{shared:-shared} \
%{!mno-relax:%{!r:-relax}} \
%{!shared: \
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld-linux.so.2}} \
%{static:-static}}}"
/* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
diff -Naur gcc-20050116.orig/gcc/config/sparc/linux64.h gcc-20050116/gcc/config/sparc/linux64.h
--- gcc-20050116.orig/gcc/config/sparc/linux64.h 2005-01-17 00:45:18.000000000 +0000
+++ gcc-20050116/gcc/config/sparc/linux64.h 2005-01-17 01:31:18.242712476 +0000
@@ -167,21 +167,21 @@
{ "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
{ "link_arch", LINK_ARCH_SPEC },
-#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
+#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/tools/lib %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld-linux.so.2}} \
%{static:-static}}} \
"
-#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
+#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,/tools/lib64 %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib64/ld-linux.so.2}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib64/ld-linux.so.2}} \
%{static:-static}}} \
"
@@ -257,12 +257,12 @@
#else /* !SPARC_BI_ARCH */
#undef LINK_SPEC
-#define LINK_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
+#define LINK_SPEC "-m elf64_sparc -Y P,/tools/lib64 %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib64/ld-linux.so.2}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib64/ld-linux.so.2}} \
%{static:-static}}} \
%{mlittle-endian:-EL} \
%{!mno-relax:%{!r:-relax}} \
diff -Naur gcc-20050116.orig/gcc/config/xtensa/linux.h gcc-20050116/gcc/config/xtensa/linux.h
--- gcc-20050116.orig/gcc/config/xtensa/linux.h 2005-01-17 00:45:18.000000000 +0000
+++ gcc-20050116/gcc/config/xtensa/linux.h 2005-01-17 01:32:08.951429623 +0000
@@ -50,7 +50,7 @@
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
+ %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}} \
%{static:-static}}}"
#undef LOCAL_LABEL_PREFIX

Binary file not shown.

BIN
base-source/gdb-6.4.tar.bz2 Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,33 @@
Submitted By: DJ Lucas <dj at linuxfromscratch dot org>
Date: 2006-04-05
Initial Package Version: 2.3.6
Upstream Status: Committed
Origin: Glibc CVS
Description: Fixes build errors where linux/types.h is included after sys/kd.h.
diff -Naur glibc-2.3.6-orig/sysdeps/unix/sysv/linux/sys/kd.h glibc-2.3.6/sysdeps/unix/sysv/linux/sys/kd.h
--- glibc-2.3.6-orig/sysdeps/unix/sysv/linux/sys/kd.h 2001-07-05 23:56:21.000000000 -0500
+++ glibc-2.3.6/sysdeps/unix/sysv/linux/sys/kd.h 2006-04-04 21:40:50.000000000 -0500
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,9 +21,15 @@
/* Make sure the <linux/types.h> header is not loaded. */
#ifndef _LINUX_TYPES_H
-# define _LINUX_TYPES_H 1
+# define _LINUX_TYPES_H 1
+# define __undef_LINUX_TYPES_H
#endif
#include <linux/kd.h>
+#ifdef __undef_LINUX_TYPES_H
+# undef _LINUX_TYPES_H
+# undef __undef_LINUX_TYPES_H
+#endif
+
#endif /* sys/kd.h */

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,18 @@
Submitted By: Alexander E. Patrakov semzx at newmail.ru
Date: 2003-10-03
Initial Package Version: 1.20.1
Origin: http://archives.linuxfromscratch.org/mail-archives/blfs-dev/2003-May/002916.html
Description: Prevent Segfault under certain conditions.
diff -urN gpm-1.20.1.old/src/lib/liblow.c gpm-1.20.1/src/lib/liblow.c
--- gpm-1.20.1.old/src/lib/liblow.c 2002-12-25 03:57:16.000000000 +0500
+++ gpm-1.20.1/src/lib/liblow.c 2003-05-02 21:51:37.000000000 +0600
@@ -199,7 +199,8 @@
Gpm_Stst *new = NULL;
char* sock_name = 0;
- option.consolename = NULL;
+ if (!checked_con)
+ option.consolename = NULL;
gpm_report(GPM_PR_DEBUG,"VC: %d",flag);

View File

@@ -0,0 +1,29 @@
Submitted By: Alexander E. Patrakov semzx at newmail.ru
Date: 2003-10-03
Initial Package Version: 1.20.1
Origin: http://archives.linuxfromscratch.org/mail-archives/blfs-dev/2003-May/002916.html
Description: Don't output debug messages on screen.
diff -ur gpm-1.20.1.orig/src/lib/report-lib.c gpm-1.20.1/src/lib/report-lib.c
--- gpm-1.20.1.orig/src/lib/report-lib.c 2002-12-25 03:57:16.000000000 +0500
+++ gpm-1.20.1/src/lib/report-lib.c 2003-05-09 20:09:25.000000000 +0600
@@ -28,6 +28,8 @@
{
char *string = NULL;
va_list ap;
+ if (stat != GPM_STAT_OOPS)
+ return;
va_start(ap,text);
switch(stat) {
diff -ur gpm-1.20.1.orig/src/report.c gpm-1.20.1/src/report.c
--- gpm-1.20.1.orig/src/report.c 2002-12-25 03:57:16.000000000 +0500
+++ gpm-1.20.1/src/report.c 2003-05-09 20:10:46.000000000 +0600
@@ -73,6 +73,8 @@
FILE *console = NULL;
va_list ap;
+ if (stat <= GPM_STAT_INFO)
+ return;
va_start(ap,text);
switch(option.run_status) {

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,63 @@
Submitted By: Matthew Burgess (matthew at linuxfromscratch dot org)
Origin: http://security.ubuntu.com/ubuntu/pool/main/g/gzip/gzip_1.3.5-9ubuntu3.1.diff.gz
Date: 2005-05-12
Initial package version: 1.3.5
Description: Fix two security vulnerabilities in gzip: A path traversal
bug when using the -N option (CAN-2005-1228) and a race condition in the
file permission restore code (CAN-2005-0998).
diff -Naur gzip-1.3.5.orig/gzip.c gzip-1.3.5/gzip.c
--- gzip-1.3.5.orig/gzip.c 2002-09-28 07:38:43.000000000 +0000
+++ gzip-1.3.5/gzip.c 2005-05-12 19:15:14.796031360 +0000
@@ -875,8 +875,11 @@
}
close(ifd);
- if (!to_stdout && close(ofd)) {
- write_error();
+ if (!to_stdout) {
+ /* Copy modes, times, ownership, and remove the input file */
+ copy_stat(&istat);
+ if (close(ofd))
+ write_error();
}
if (method == -1) {
if (!to_stdout) xunlink (ofname);
@@ -896,10 +899,6 @@
}
fprintf(stderr, "\n");
}
- /* Copy modes, times, ownership, and remove the input file */
- if (!to_stdout) {
- copy_stat(&istat);
- }
}
/* ========================================================================
@@ -1324,6 +1323,8 @@
error("corrupted input -- file name too large");
}
}
+ char *base2 = base_name (base);
+ strcpy(base, base2);
/* If necessary, adapt the name to local OS conventions: */
if (!list) {
MAKE_LEGAL_NAME(base);
@@ -1725,7 +1726,7 @@
reset_times(ofname, ifstat);
#endif
/* Copy the protection modes */
- if (chmod(ofname, ifstat->st_mode & 07777)) {
+ if (fchmod(ofd, ifstat->st_mode & 07777)) {
int e = errno;
WARN((stderr, "%s: ", progname));
if (!quiet) {
@@ -1734,7 +1735,7 @@
}
}
#ifndef NO_CHOWN
- chown(ofname, ifstat->st_uid, ifstat->st_gid); /* Copy ownership */
+ fchown(ofd, ifstat->st_uid, ifstat->st_gid); /* Copy ownership */
#endif
remove_ofname = 0;
/* It's now safe to remove the input file: */

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,37 @@
Submitted By: Matthew Burgess <matthew@linuxfromscratch.org>
Date: 2005-08-30
Initial Package Version: 1.4.2
Upstream Status: From upstream
Origin: Greg Schafer <gschafer@zip.com.au> (http://www.diy-linux.org/downloads/patches/GCC4/inetutils-1.4.2-gcc4-fixes-1.patch)
Description: Fix compilation issues with gcc4
diff -Naur inetutils-1.4.2.orig/ftp/ftp_var.h inetutils-1.4.2/ftp/ftp_var.h
--- inetutils-1.4.2.orig/ftp/ftp_var.h 2000-07-08 01:00:53.000000000 +0000
+++ inetutils-1.4.2/ftp/ftp_var.h 2005-08-30 20:25:27.205932304 +0000
@@ -36,8 +36,6 @@
#include <sys/param.h>
#include <setjmp.h>
-#include "extern.h"
-
#ifndef FTP_EXTERN
#define FTP_EXTERN extern
#endif
@@ -129,3 +127,5 @@
FTP_EXTERN int macnum; /* number of defined macros */
FTP_EXTERN struct macel macros[16];
FTP_EXTERN char macbuf[4096];
+
+#include "extern.h"
diff -Naur inetutils-1.4.2.orig/libinetutils/ttymsg.c inetutils-1.4.2/libinetutils/ttymsg.c
--- inetutils-1.4.2.orig/libinetutils/ttymsg.c 2001-11-01 15:52:19.000000000 +0000
+++ inetutils-1.4.2/libinetutils/ttymsg.c 2005-08-30 20:24:27.168059448 +0000
@@ -132,7 +132,7 @@
}
if (wret)
{
- (char *)iov->iov_base += wret;
+ iov->iov_base = (char *)iov->iov_base + wret;
iov->iov_len -= wret;
}
continue;

View File

@@ -0,0 +1,116 @@
Submitted By: Greg Schafer <gschafer at zip dot com dot au>
Date: 2003-12-11
Initial Package Version: 1.4.2
Origin: Greg Schafer
Description: Prevent installation of unwanted server man pages.
diff -Naur inetutils-1.4.2.orig/ftpd/Makefile.in inetutils-1.4.2/ftpd/Makefile.in
--- inetutils-1.4.2.orig/ftpd/Makefile.in 2002-12-23 04:30:12.000000000 +0000
+++ inetutils-1.4.2/ftpd/Makefile.in 2003-12-11 02:21:24.222010104 +0000
@@ -177,7 +177,6 @@
noinst_HEADERS = extern.h
-man_MANS = ftpd.8
INCLUDES = $(PATHDEF_FTPWELCOME) $(PATHDEF_FTPUSERS) \
$(PATHDEF_FTPLOGINMESG) $(PATHDEF_FTPCHROOT) $(PATHDEF_FTPDPID) \
diff -Naur inetutils-1.4.2.orig/inetd/Makefile.in inetutils-1.4.2/inetd/Makefile.in
--- inetutils-1.4.2.orig/inetd/Makefile.in 2002-12-23 04:30:13.000000000 +0000
+++ inetutils-1.4.2/inetd/Makefile.in 2003-12-11 02:21:24.223009952 +0000
@@ -172,7 +172,6 @@
inetd_SOURCES = inetd.c
-man_MANS = inetd.8
INCLUDES = $(PATHDEF_INETDCONF) $(PATHDEF_INETDDIR) -I$(top_builddir)/include
diff -Naur inetutils-1.4.2.orig/logger/Makefile.in inetutils-1.4.2/logger/Makefile.in
--- inetutils-1.4.2.orig/logger/Makefile.in 2002-12-23 04:30:16.000000000 +0000
+++ inetutils-1.4.2/logger/Makefile.in 2003-12-11 02:21:24.224009800 +0000
@@ -175,7 +175,6 @@
logger_SOURCES = logger.c
-man_MANS = logger.1
EXTRA_DIST = $(man_MANS)
subdir = logger
diff -Naur inetutils-1.4.2.orig/rexecd/Makefile.in inetutils-1.4.2/rexecd/Makefile.in
--- inetutils-1.4.2.orig/rexecd/Makefile.in 2002-12-23 04:30:17.000000000 +0000
+++ inetutils-1.4.2/rexecd/Makefile.in 2003-12-11 02:21:24.225009648 +0000
@@ -173,7 +173,6 @@
rexecd_SOURCES = rexecd.c
-man_MANS = rexecd.8
INCLUDES = $(PATHDEF_DEFPATH) $(PATHDEF_BSHELL) -I$(top_builddir)/include
diff -Naur inetutils-1.4.2.orig/rlogind/Makefile.in inetutils-1.4.2/rlogind/Makefile.in
--- inetutils-1.4.2.orig/rlogind/Makefile.in 2002-12-23 04:30:18.000000000 +0000
+++ inetutils-1.4.2/rlogind/Makefile.in 2003-12-11 02:21:24.225009648 +0000
@@ -173,7 +173,6 @@
rlogind_SOURCES = rlogind.c
-man_MANS = rlogind.8
INCLUDES = $(PATHDEF_DEV) $(PATHDEF_LOGIN) -I$(top_builddir)/include
diff -Naur inetutils-1.4.2.orig/rshd/Makefile.in inetutils-1.4.2/rshd/Makefile.in
--- inetutils-1.4.2.orig/rshd/Makefile.in 2002-12-23 04:30:19.000000000 +0000
+++ inetutils-1.4.2/rshd/Makefile.in 2003-12-11 02:21:24.226009496 +0000
@@ -172,7 +172,6 @@
rshd_SOURCES = rshd.c
-man_MANS = rshd.8
INCLUDES = $(PATHDEF_BSHELL) $(PATHDEF_NOLOGIN) $(PATHDEF_DEFPATH) -I$(top_builddir)/include
diff -Naur inetutils-1.4.2.orig/syslogd/Makefile.in inetutils-1.4.2/syslogd/Makefile.in
--- inetutils-1.4.2.orig/syslogd/Makefile.in 2002-12-23 04:30:19.000000000 +0000
+++ inetutils-1.4.2/syslogd/Makefile.in 2003-12-11 02:21:24.226009496 +0000
@@ -172,7 +172,6 @@
syslogd_SOURCES = syslogd.c
-man_MANS = syslog.conf.5 syslogd.8
INCLUDES = $(PATHDEF_LOG) $(PATHDEF_LOGCONF) $(PATHDEF_LOGPID) \
$(PATHDEF_CONSOLE) -I$(top_builddir)/include
diff -Naur inetutils-1.4.2.orig/talkd/Makefile.in inetutils-1.4.2/talkd/Makefile.in
--- inetutils-1.4.2.orig/talkd/Makefile.in 2002-12-23 04:30:20.000000000 +0000
+++ inetutils-1.4.2/talkd/Makefile.in 2003-12-11 02:21:24.227009344 +0000
@@ -180,7 +180,6 @@
intalkd.h
-man_MANS = talkd.8
INCLUDES = $(PATHDEF_DEV) -I${top_srcdir}/libinetutils -I$(top_builddir)/include
diff -Naur inetutils-1.4.2.orig/telnetd/Makefile.in inetutils-1.4.2/telnetd/Makefile.in
--- inetutils-1.4.2.orig/telnetd/Makefile.in 2002-12-23 04:30:21.000000000 +0000
+++ inetutils-1.4.2/telnetd/Makefile.in 2003-12-11 02:21:24.228009192 +0000
@@ -176,7 +176,6 @@
noinst_HEADERS = telnetd.h
-man_MANS = telnetd.8
INCLUDES = $(PATHDEF_DEV) $(PATHDEF_TTY) $(PATHDEF_LOGIN) -I$(top_builddir)/include \
-I$(top_srcdir) @INCAUTH@
diff -Naur inetutils-1.4.2.orig/tftpd/Makefile.in inetutils-1.4.2/tftpd/Makefile.in
--- inetutils-1.4.2.orig/tftpd/Makefile.in 2002-12-23 04:30:22.000000000 +0000
+++ inetutils-1.4.2/tftpd/Makefile.in 2003-12-11 02:21:24.229009040 +0000
@@ -174,7 +174,6 @@
tftpd_SOURCES = tftpd.c
-man_MANS = tftpd.8
LDADD = -L../libinetutils -linetutils

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,232 @@
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

View File

@@ -0,0 +1,54 @@
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);

Binary file not shown.

BIN
base-source/less-394.tar.gz Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,380 @@
Submitted by: Alexander E. Patrakov <patrakov@ums.usu.ru>
Signed-off-by: Alexander E. Patrakov <patrakov@ums.usu.ru>
Date: 2005-10-18
Initial Package Version: 2.6.15
Upstream Status: Rejected: they say it modifies the meaning of an existing ioctl
Origin: http://chris.heathens.co.nz/linux/downloads/patches-2.6.4-cdh1.tar.gz
Porting to linux-2.6.16 by Alexander E. Patrakov
Description: This patch fixes dead keys and copy/paste of non-ASCII characters
in UTF-8 mode on Linux console.
See more details about the original patch at:
http://chris.heathens.co.nz/linux/utf8.html
diff -ur linux-2.6.15-rc6.orig/drivers/char/consolemap.c linux-2.6.15-rc6.my/drivers/char/consolemap.c
--- linux-2.6.15-rc6.orig/drivers/char/consolemap.c 2005-12-25 10:00:12.000000000 +0500
+++ linux-2.6.15-rc6.my/drivers/char/consolemap.c 2005-12-25 10:01:22.000000000 +0500
@@ -178,6 +178,7 @@
unsigned long refcount;
unsigned long sum;
unsigned char *inverse_translations[4];
+ u16 *inverse_trans_unicode;
int readonly;
};
@@ -208,6 +209,41 @@
}
}
+static void set_inverse_trans_unicode(struct vc_data *conp,
+ struct uni_pagedir *p)
+{
+ int i, j, k, glyph;
+ u16 **p1, *p2;
+ u16 *q;
+
+ if (!p) return;
+ q = p->inverse_trans_unicode;
+ if (!q) {
+ q = p->inverse_trans_unicode =
+ kmalloc(MAX_GLYPH * sizeof(u16), GFP_KERNEL);
+ if (!q)
+ return;
+ }
+ memset(q, 0, MAX_GLYPH * sizeof(u16));
+
+ for (i = 0; i < 32; i++) {
+ p1 = p->uni_pgdir[i];
+ if (!p1)
+ continue;
+ for (j = 0; j < 32; j++) {
+ p2 = p1[j];
+ if (!p2)
+ continue;
+ for (k = 0; k < 64; k++) {
+ glyph = p2[k];
+ if (glyph >= 0 && glyph < MAX_GLYPH
+ && q[glyph] < 32)
+ q[glyph] = (i << 11) + (j << 6) + k;
+ }
+ }
+ }
+}
+
unsigned short *set_translate(int m, struct vc_data *vc)
{
inv_translate[vc->vc_num] = m;
@@ -218,19 +254,29 @@
* Inverse translation is impossible for several reasons:
* 1. The font<->character maps are not 1-1.
* 2. The text may have been written while a different translation map
- * was active, or using Unicode.
+ * was active.
* Still, it is now possible to a certain extent to cut and paste non-ASCII.
*/
-unsigned char inverse_translate(struct vc_data *conp, int glyph)
+u16 inverse_translate(struct vc_data *conp, int glyph, int use_unicode)
{
struct uni_pagedir *p;
+ int m;
if (glyph < 0 || glyph >= MAX_GLYPH)
return 0;
- else if (!(p = (struct uni_pagedir *)*conp->vc_uni_pagedir_loc) ||
- !p->inverse_translations[inv_translate[conp->vc_num]])
+ else if (!(p = (struct uni_pagedir *)*conp->vc_uni_pagedir_loc))
return glyph;
- else
- return p->inverse_translations[inv_translate[conp->vc_num]][glyph];
+ else if (use_unicode) {
+ if (!p->inverse_trans_unicode)
+ return glyph;
+ else
+ return p->inverse_trans_unicode[glyph];
+ } else {
+ m = inv_translate[conp->vc_num];
+ if (!p->inverse_translations[m])
+ return glyph;
+ else
+ return p->inverse_translations[m][glyph];
+ }
}
static void update_user_maps(void)
@@ -244,6 +290,7 @@
p = (struct uni_pagedir *)*vc_cons[i].d->vc_uni_pagedir_loc;
if (p && p != q) {
set_inverse_transl(vc_cons[i].d, p, USER_MAP);
+ set_inverse_trans_unicode(vc_cons[i].d, p);
q = p;
}
}
@@ -354,6 +401,10 @@
kfree(p->inverse_translations[i]);
p->inverse_translations[i] = NULL;
}
+ if (p->inverse_trans_unicode) {
+ kfree(p->inverse_trans_unicode);
+ p->inverse_trans_unicode = NULL;
+ }
}
void con_free_unimap(struct vc_data *vc)
@@ -512,6 +563,7 @@
for (i = 0; i <= 3; i++)
set_inverse_transl(vc, p, i); /* Update all inverse translations */
+ set_inverse_trans_unicode(vc, p);
return err;
}
@@ -562,6 +614,7 @@
for (i = 0; i <= 3; i++)
set_inverse_transl(vc, p, i); /* Update all inverse translations */
+ set_inverse_trans_unicode(vc, p);
dflt = p;
return err;
}
@@ -618,6 +671,19 @@
p->readonly = rdonly;
}
+/* may be called during an interrupt */
+u32 conv_8bit_to_uni(unsigned char c)
+{
+ /*
+ * Always use USER_MAP. This function is used by the keyboard,
+ * which shouldn't be affected by G0/G1 switching, etc.
+ * If the user map still contains default values, i.e. the
+ * direct-to-font mapping, then assume user is using Latin1.
+ */
+ unsigned short uni = translations[USER_MAP][c];
+ return uni == (0xf000 | c) ? c : uni;
+}
+
int
conv_uni_to_pc(struct vc_data *conp, long ucs)
{
diff -ur linux-2.6.15-rc6.orig/drivers/char/keyboard.c linux-2.6.15-rc6.my/drivers/char/keyboard.c
--- linux-2.6.15-rc6.orig/drivers/char/keyboard.c 2005-12-25 10:00:12.000000000 +0500
+++ linux-2.6.15-rc6.my/drivers/char/keyboard.c 2005-12-25 10:01:22.000000000 +0500
@@ -34,6 +34,7 @@
#include <linux/init.h>
#include <linux/slab.h>
+#include <linux/consolemap.h>
#include <linux/kbd_kern.h>
#include <linux/kbd_diacr.h>
#include <linux/vt_kern.h>
@@ -329,10 +330,9 @@
* Many other routines do put_queue, but I think either
* they produce ASCII, or they produce some user-assigned
* string, and in both cases we might assume that it is
- * in utf-8 already. UTF-8 is defined for words of up to 31 bits,
- * but we need only 16 bits here
+ * in utf-8 already.
*/
-static void to_utf8(struct vc_data *vc, ushort c)
+static void to_utf8(struct vc_data *vc, uint c)
{
if (c < 0x80)
/* 0******* */
@@ -341,14 +341,33 @@
/* 110***** 10****** */
put_queue(vc, 0xc0 | (c >> 6));
put_queue(vc, 0x80 | (c & 0x3f));
- } else {
+ } else if (c < 0x10000) {
+ if (c >= 0xD800 && c < 0xE000)
+ return;
+ if (c == 0xFFFF)
+ return;
/* 1110**** 10****** 10****** */
put_queue(vc, 0xe0 | (c >> 12));
put_queue(vc, 0x80 | ((c >> 6) & 0x3f));
put_queue(vc, 0x80 | (c & 0x3f));
+ } else if (c < 0x110000) {
+ /* 11110*** 10****** 10****** 10****** */
+ put_queue(vc, 0xf0 | (c >> 18));
+ put_queue(vc, 0x80 | ((c >> 12) & 0x3f));
+ put_queue(vc, 0x80 | ((c >> 6) & 0x3f));
+ put_queue(vc, 0x80 | (c & 0x3f));
}
}
+static void put_8bit(struct vc_data *vc, u8 c)
+{
+ if (kbd->kbdmode != VC_UNICODE || c < 32 || c == 127)
+ /* Don't translate control chars */
+ put_queue(vc, c);
+ else
+ to_utf8(vc, conv_8bit_to_uni(c));
+}
+
/*
* Called after returning from RAW mode or when changing consoles - recompute
* shift_down[] and shift_state from key_down[] maybe called when keymap is
@@ -409,7 +428,7 @@
if (ch == ' ' || ch == d)
return d;
- put_queue(vc, d);
+ put_8bit(vc, d);
return ch;
}
@@ -419,7 +438,7 @@
static void fn_enter(struct vc_data *vc, struct pt_regs *regs)
{
if (diacr) {
- put_queue(vc, diacr);
+ put_8bit(vc, diacr);
diacr = 0;
}
put_queue(vc, 13);
@@ -628,7 +647,7 @@
diacr = value;
return;
}
- put_queue(vc, value);
+ put_8bit(vc, value);
}
/*
@@ -774,7 +793,7 @@
/* kludge */
if (up_flag && shift_state != old_state && npadch != -1) {
if (kbd->kbdmode == VC_UNICODE)
- to_utf8(vc, npadch & 0xffff);
+ to_utf8(vc, npadch);
else
put_queue(vc, npadch & 0xff);
npadch = -1;
diff -ur linux-2.6.15-rc6.orig/drivers/char/selection.c linux-2.6.15-rc6.my/drivers/char/selection.c
--- linux-2.6.15-rc6.orig/drivers/char/selection.c 2005-12-25 10:00:12.000000000 +0500
+++ linux-2.6.15-rc6.my/drivers/char/selection.c 2005-12-25 10:01:22.000000000 +0500
@@ -20,6 +20,7 @@
#include <asm/uaccess.h>
+#include <linux/kbd_kern.h>
#include <linux/vt_kern.h>
#include <linux/consolemap.h>
#include <linux/selection.h>
@@ -34,6 +35,7 @@
/* Variables for selection control. */
/* Use a dynamic buffer, instead of static (Dec 1994) */
struct vc_data *sel_cons; /* must not be disallocated */
+static int use_unicode;
static volatile int sel_start = -1; /* cleared by clear_selection */
static int sel_end;
static int sel_buffer_lth;
@@ -54,10 +56,11 @@
complement_pos(sel_cons, where);
}
-static unsigned char
+static u16
sel_pos(int n)
{
- return inverse_translate(sel_cons, screen_glyph(sel_cons, n));
+ return inverse_translate(sel_cons, screen_glyph(sel_cons, n),
+ use_unicode);
}
/* remove the current selection highlight, if any,
@@ -86,8 +89,8 @@
0xFF7FFFFF /* latin-1 accented letters, not division sign */
};
-static inline int inword(const unsigned char c) {
- return ( inwordLut[c>>5] >> (c & 0x1F) ) & 1;
+static inline int inword(const u16 c) {
+ return c > 0xff || (( inwordLut[c>>5] >> (c & 0x1F) ) & 1);
}
/* set inwordLut contents. Invoked by ioctl(). */
@@ -108,13 +111,36 @@
return (v > u) ? u : v;
}
+/* stores the char in UTF8 and returns the number of bytes used (1-3) */
+int store_utf8(u16 c, char *p)
+{
+ if (c < 0x80) {
+ /* 0******* */
+ p[0] = c;
+ return 1;
+ } else if (c < 0x800) {
+ /* 110***** 10****** */
+ p[0] = 0xc0 | (c >> 6);
+ p[1] = 0x80 | (c & 0x3f);
+ return 2;
+ } else {
+ /* 1110**** 10****** 10****** */
+ p[0] = 0xe0 | (c >> 12);
+ p[1] = 0x80 | ((c >> 6) & 0x3f);
+ p[2] = 0x80 | (c & 0x3f);
+ return 3;
+ }
+}
+
/* set the current selection. Invoked by ioctl() or by kernel code. */
int set_selection(const struct tiocl_selection __user *sel, struct tty_struct *tty)
{
struct vc_data *vc = vc_cons[fg_console].d;
int sel_mode, new_sel_start, new_sel_end, spc;
char *bp, *obp;
- int i, ps, pe;
+ int i, ps, pe, multiplier;
+ u16 c;
+ struct kbd_struct *kbd = kbd_table + fg_console;
poke_blanked_console();
@@ -158,7 +184,8 @@
clear_selection();
sel_cons = vc_cons[fg_console].d;
}
-
+ use_unicode = kbd && kbd->kbdmode == VC_UNICODE;
+
switch (sel_mode)
{
case TIOCL_SELCHAR: /* character-by-character selection */
@@ -240,7 +267,8 @@
sel_end = new_sel_end;
/* Allocate a new buffer before freeing the old one ... */
- bp = kmalloc((sel_end-sel_start)/2+1, GFP_KERNEL);
+ multiplier = use_unicode ? 3 : 1; /* chars can take up to 3 bytes */
+ bp = kmalloc((sel_end-sel_start)/2*multiplier+1, GFP_KERNEL);
if (!bp) {
printk(KERN_WARNING "selection: kmalloc() failed\n");
clear_selection();
@@ -251,8 +279,12 @@
obp = bp;
for (i = sel_start; i <= sel_end; i += 2) {
- *bp = sel_pos(i);
- if (!isspace(*bp++))
+ c = sel_pos(i);
+ if (use_unicode)
+ bp += store_utf8(c, bp);
+ else
+ *bp++ = c;
+ if (!isspace(c))
obp = bp;
if (! ((i + 2) % vc->vc_size_row)) {
/* strip trailing blanks from line and add newline,
diff -ur linux-2.6.15-rc6.orig/include/linux/consolemap.h linux-2.6.15-rc6.my/include/linux/consolemap.h
--- linux-2.6.15-rc6.orig/include/linux/consolemap.h 2005-12-25 10:00:13.000000000 +0500
+++ linux-2.6.15-rc6.my/include/linux/consolemap.h 2005-12-25 10:01:22.000000000 +0500
@@ -10,6 +10,7 @@
struct vc_data;
-extern unsigned char inverse_translate(struct vc_data *conp, int glyph);
+extern u16 inverse_translate(struct vc_data *conp, int glyph, int use_unicode);
extern unsigned short *set_translate(int m, struct vc_data *vc);
extern int conv_uni_to_pc(struct vc_data *conp, long ucs);
+extern u32 conv_8bit_to_uni(unsigned char c);

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
base-source/m4-1.4.4.tar.gz Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,111 @@
Submitted By: Tushar Teredesai <tushar@linuxfromscratch.org>
Date: 2005-07-25
Initial Package Version: 1.5
Upstream Status: Sent, no response yet.
Origin: http://archive.linuxfromscratch.org/mail-archives/lfs-dev/2003-April/033602.html
http://archive.linuxfromscratch.org/mail-archives/lfs-dev/2003-June/035234.html
http://linuxfromscratch.org/pipermail/lfs-dev/2005-June/051908.html
Description: Add tempfile wrapper script. Use "make install-tempfile" to install it.
diff -Naur mktemp-1.5.orig/Makefile.in mktemp-1.5/Makefile.in
--- mktemp-1.5.orig/Makefile.in 2003-03-23 18:09:56.000000000 -0700
+++ mktemp-1.5/Makefile.in 2005-07-25 11:11:11.000000000 -0600
@@ -113,6 +113,9 @@
install-man:
$(INSTALL) -m 0444 $(srcdir)/$(PROG).$(mantype) $(mandir)/man1/$(PROG).1
+install-tempfile: $(srcdir)/tempfile
+ $(INSTALL) -m 0555 $(srcdir)/tempfile $(bindir)/tempfile
+
check:
@echo nothing to check
diff -Naur mktemp-1.5.orig/tempfile mktemp-1.5/tempfile
--- mktemp-1.5.orig/tempfile 1969-12-31 17:00:00.000000000 -0700
+++ mktemp-1.5/tempfile 2005-07-25 11:13:41.000000000 -0600
@@ -0,0 +1,85 @@
+#!/bin/bash
+# A tempfile wrapper for mktemp
+# Note: If you can, avoid using tempfile and use mktemp instead.
+# This wrapper is provided for compatibility since some scripts use
+# tempfile. If possible, the best solution is to patch the scripts
+# to use mktemp.
+#
+# Copyright (c) Tushar Teredesai <tush@yahoo.com>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+
+# Usage info
+usage()
+{
+ echo "Usage: tempfile [OPTION]"
+ echo
+ echo "Create a temporary file in a safe manner."
+ echo "This version is a wrapper that invokes mktemp."
+ echo "NOTE: Do not use tempfile in your scripts."
+ echo " Use mktemp instead."
+ echo
+ echo "[-d|--directory] DIR -> place temporary file in DIR"
+ echo "[-p|--prefix] PREFIX -> ignored"
+ echo "[-s|--suffix] SUFFIX -> ignored"
+ echo "[-n|--name] NAME -> ignored"
+ echo "[-m|--mode] MODE -> ignored"
+ echo "--version -> output version information and exit"
+}
+
+# parse all arguments
+while [ $# != 0 ]
+do
+ case "$1" in
+ # -d for tempfile is equivalent to -p for mktemp
+ -d|--directory)
+ dir="$2"
+ shift 2
+ ;;
+ --directory=*)
+ dir="${1#--directory=}"
+ shift 1
+ ;;
+ -d*)
+ dir="${1#-d}"
+ shift 1
+ ;;
+ # The following switches are ignored.
+ -p|--prefix|-s|--suffix|-n|--name|-m|--mode)
+ shift 2
+ ;;
+ -p*|--prefix=*|-s*|--suffix=*|-n*|--name=*|-m*|--mode=*)
+ shift 1
+ ;;
+ # --version for tempfile is equivalent to -V for mktemp
+ --version)
+ echo "tempfile 1.0 (`mktemp -V 2>/dev/null`)"
+ exit 0
+ ;;
+ # Unknown switch
+ *)
+ usage
+ exit 1
+ ;;
+ esac
+done
+
+# Use the dir if $TMPDIR is not set.
+if [ -z "$TMPDIR" -a ! -z "$dir" ]
+then
+ export TMPDIR="$dir"
+fi
+# Execute mktemp with proper arguments
+# the -t behaviour of mktemp is the default for tempfile
+exec mktemp -t

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,225 @@
Submitted by: Alexander E. Patrakov
Date: 2005-12-07
Initial Package Version: 5.5
Upstream Status: Backport
Origin: Cherry-picked from ftp://invisible-island.net/ncurses/5.5/*.gz
Description: Fixes the following bugs:
* memory leak in keyname()
* mishandling of overlapped wide characters, http://bugs.debian.org/316663
* problems with line-drawing characters on cygwin, http://bugs.debian.org/338234
* mishandling of EINTR in tcgetattr/tcsetattr, http://bugs.debian.org/339518
* mishandling of single-column multibyte characters, http://bugs.debian.org/341661
--- ncurses-5.5-20051015+/ncurses/base/MKkeyname.awk 2005-04-30 19:26:25.000000000 +0000
+++ ncurses-5.5-20051022/ncurses/base/MKkeyname.awk 2005-10-22 19:01:23.000000000 +0000
@@ -97,6 +97,7 @@
print " break;"
print " }"
print " }"
+ print " free(bound);"
print " if (result != 0)"
print " break;"
print " }"
--- ncurses-5.5-20051022+/ncurses/base/lib_addch.c 2005-03-27 16:52:16.000000000 +0000
+++ ncurses-5.5-20051029/ncurses/base/lib_addch.c 2005-10-30 00:51:36.000000000 +0000
@@ -315,7 +315,7 @@
* setup though.
*/
for (i = 0; i < len; ++i) {
- if (isWidecBase(win->_line[y].text[i])) {
+ if (isWidecBase(win->_line[y].text[x + i])) {
break;
} else if (isWidecExt(win->_line[y].text[x + i])) {
for (j = i; x + j <= win->_maxx; ++j) {
@@ -334,7 +334,9 @@
for (i = 0; i < len; ++i) {
NCURSES_CH_T value = ch;
SetWidecExt(value, i);
- TR(TRACE_VIRTPUT, ("multicolumn %d:%d", i + 1, len));
+ TR(TRACE_VIRTPUT, ("multicolumn %d:%d (%d,%d)",
+ i + 1, len,
+ win->_begy + y, win->_begx + x));
line->text[x] = value;
CHANGED_CELL(line, x);
++x;
--- ncurses-5.5-20051022+/ncurses/base/lib_bkgd.c 2005-04-16 18:03:48.000000000 +0000
+++ ncurses-5.5-20051029/ncurses/base/lib_bkgd.c 2005-10-30 00:41:09.000000000 +0000
@@ -131,11 +131,11 @@
for (y = 0; y <= win->_maxy; y++) {
for (x = 0; x <= win->_maxx; x++) {
- if (CharEq(win->_line[y].text[x], old_bkgrnd))
+ if (CharEq(win->_line[y].text[x], old_bkgrnd)) {
win->_line[y].text[x] = win->_nc_bkgd;
- else {
+ } else {
NCURSES_CH_T wch = win->_line[y].text[x];
- RemAttr(wch, (~A_ALTCHARSET));
+ RemAttr(wch, (~(A_ALTCHARSET | A_CHARTEXT)));
win->_line[y].text[x] = _nc_render(win, wch);
}
}
--- ncurses-5.5-20051022+/ncurses/base/lib_erase.c 2001-12-19 01:06:13.000000000 +0000
+++ ncurses-5.5-20051029/ncurses/base/lib_erase.c 2005-10-30 00:36:36.000000000 +0000
@@ -58,6 +59,24 @@
start = win->_line[y].text;
end = &start[win->_maxx];
+ /*
+ * If this is a derived window, we have to handle the case where
+ * a multicolumn character extends into the window that we are
+ * erasing.
+ */
+ if_WIDEC({
+ if (isWidecExt(start[0])) {
+ int x = (win->_parent != 0) ? (win->_begx) : 0;
+ while (x-- > 0) {
+ if (isWidecBase(start[-1])) {
+ --start;
+ break;
+ }
+ --start;
+ }
+ }
+ });
+
for (sp = start; sp <= end; sp++)
*sp = blank;
--- ncurses-5.5-20051029+/misc/terminfo.src 2005-10-26 23:21:06.000000000 +0000
+++ ncurses-5.5-20051112/misc/terminfo.src 2005-11-12 23:01:03.000000000 +0000
@@ -4731,32 +4731,35 @@
# civis [make cursor invisible] causes everything to stackdump? \E[?25l\E[?1c
# ech [erase characters param] broken \E[%p1%dX
# kcbt [back-tab key] not implemented in cygwin? \E[Z
+#
+# 2005/11/12 -TD
+# Remove cbt since it does not work in current cygwin
+# Add 'mir' and 'in' flags based on tack
cygwin|ansi emulation for Cygwin,
- am, hs, in, msgr, xon,
+ am, hs, mir, msgr, xon,
colors#8, it#8, pairs#64,
acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
- bel=^G, bold=\E[1m, cbt=\E[Z, clear=\E[H\E[J, cr=^M,
- cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B,
- cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
- cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P,
- dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, fsl=^G,
- home=\E[H, hpa=\E[%i%p1%dG, ht=^I, ich=\E[%p1%d@,
- ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, invis=\E[8m,
- kb2=\E[G, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C,
- kcuu1=\E[A, kdch1=\E[3~, kend=\E[4~, kf1=\E[[A,
- kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~,
- kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~,
- kf18=\E[32~, kf19=\E[33~, kf2=\E[[B, kf20=\E[34~,
- kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, kf7=\E[18~,
- kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~,
- knp=\E[6~, kpp=\E[5~, kspd=^Z, nel=^M^J, op=\E[39;49m,
- rc=\E8, rev=\E[7m, ri=\EM, rmacs=\E[10m,
- rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmpch=\E[10m,
- rmso=\E[27m, rmul=\E[24m, rs1=\Ec\E]R, sc=\E7,
- setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
+ bel=^G, bold=\E[1m, clear=\E[H\E[J, cr=^M, cub=\E[%p1%dD,
+ cub1=^H, cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC,
+ cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA,
+ cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM,
+ dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, fsl=^G, home=\E[H,
+ hpa=\E[%i%p1%dG, ht=^I, ich=\E[%p1%d@, ich1=\E[@,
+ il=\E[%p1%dL, il1=\E[L, ind=^J, invis=\E[8m, kb2=\E[G,
+ kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
+ kdch1=\E[3~, kend=\E[4~, kf1=\E[[A, kf10=\E[21~,
+ kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~,
+ kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~,
+ kf19=\E[33~, kf2=\E[[B, kf20=\E[34~, kf3=\E[[C, kf4=\E[[D,
+ kf5=\E[[E, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
+ khome=\E[1~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~, kspd=^Z,
+ nel=^M^J, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM,
+ rmacs=\E[10m, rmcup=\E[2J\E[?47l\E8, rmir=\E[4l,
+ rmpch=\E[10m, rmso=\E[27m, rmul=\E[24m, rs1=\Ec\E]R,
+ sc=\E7, setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m,
- sgr0=\E[0;10m, smacs=\E11m, smcup=\E7\E[?47h, smir=\E[4h,
- smpch=\E[11m, smso=\E[7m, smul=\E[4m, tsl=\E];,
+ sgr0=\E[0;10m, smacs=\E[11m, smcup=\E7\E[?47h,
+ smir=\E[4h, smpch=\E[11m, smso=\E[7m, smul=\E[4m, tsl=\E];,
u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?6c, u9=\E[c,
vpa=\E[%i%p1%dd,
--- ncurses-5.5-20051112+/ncurses/tinfo/lib_ttyflags.c 2003-05-17 23:50:37.000000000 +0000
+++ ncurses-5.5-20051119/ncurses/tinfo/lib_ttyflags.c 2005-11-19 20:36:23.000000000 +0000
@@ -59,28 +59,51 @@
NCURSES_EXPORT(int)
_nc_get_tty_mode(TTY * buf)
{
- if (cur_term == 0
- || GET_TTY(cur_term->Filedes, buf) != 0) {
- memset(buf, 0, sizeof(*buf));
- return (ERR);
+ int result = OK;
+
+ if (cur_term == 0) {
+ result = ERR;
+ } else {
+ for (;;) {
+ if (GET_TTY(cur_term->Filedes, buf) != 0) {
+ if (errno == EINTR)
+ continue;
+ result = ERR;
+ }
+ break;
+ }
}
+
+ if (result == ERR)
+ memset(buf, 0, sizeof(*buf));
+
TR(TRACE_BITS, ("_nc_get_tty_mode(%d): %s",
cur_term->Filedes, _nc_trace_ttymode(buf)));
- return (OK);
+ return (result);
}
NCURSES_EXPORT(int)
_nc_set_tty_mode(TTY * buf)
{
- if (cur_term == 0
- || SET_TTY(cur_term->Filedes, buf) != 0) {
- if ((errno == ENOTTY) && (SP != 0))
- SP->_notty = TRUE;
- return (ERR);
+ int result = OK;
+
+ if (cur_term == 0) {
+ result = ERR;
+ } else {
+ for (;;) {
+ if (SET_TTY(cur_term->Filedes, buf) != 0) {
+ if (errno == EINTR)
+ continue;
+ if ((errno == ENOTTY) && (SP != 0))
+ SP->_notty = TRUE;
+ result = ERR;
+ }
+ break;
+ }
}
TR(TRACE_BITS, ("_nc_set_tty_mode(%d): %s",
cur_term->Filedes, _nc_trace_ttymode(buf)));
- return (OK);
+ return (result);
}
NCURSES_EXPORT(int)
--- ncurses-5.5-20051126+/ncurses/widechar/lib_ins_wch.c 2005-09-17 19:25:13.000000000 +0000
+++ ncurses-5.5-20051203/ncurses/widechar/lib_ins_wch.c 2005-12-03 20:24:19.000000000 +0000
@@ -117,7 +117,7 @@
for (cp = wstr; *cp && ((cp - wstr) < n); cp++) {
int len = wcwidth(*cp);
- if (len != 1) {
+ if (len != 1 || !is8bits(*cp)) {
cchar_t tmp_cchar;
wchar_t tmp_wchar = *cp;
memset(&tmp_cchar, 0, sizeof(tmp_cchar));

Binary file not shown.

View File

@@ -0,0 +1,86 @@
Originaly By: Zack Winkles <winkie AT linuxfromscratch DOT org>
Submitted By: Jim Gifford <jim AT linuxfromscratch DOT org>
Date: 2004-06-23
Initial Package Version: 1.60
Origin: N/A
Upstream Status: N/A
Description: Fix some occurrences of syntax that GCC 3.4 doesn't like.
diff -Naur net-tools-1.60.orig/hostname.c net-tools-1.60/hostname.c
--- net-tools-1.60.orig/hostname.c 2001-04-08 17:04:23.000000000 +0000
+++ net-tools-1.60/hostname.c 2004-06-24 06:22:16.913258663 +0000
@@ -78,6 +78,7 @@
fprintf(stderr, _("%s: name too long\n"), program_name);
break;
default:
+ ((void)0);
}
exit(1);
}
@@ -98,6 +99,7 @@
fprintf(stderr, _("%s: name too long\n"), program_name);
break;
default:
+ ((void)0);
}
exit(1);
};
@@ -117,6 +119,7 @@
fprintf(stderr, _("%s: name too long\n"), program_name);
break;
default:
+ ((void)0);
}
exit(1);
};
@@ -174,6 +177,7 @@
printf("%s\n", hp->h_name);
break;
default:
+ ((void)0);
}
}
diff -Naur net-tools-1.60.orig/lib/inet_sr.c net-tools-1.60/lib/inet_sr.c
--- net-tools-1.60.orig/lib/inet_sr.c 2000-02-20 21:46:45.000000000 +0000
+++ net-tools-1.60/lib/inet_sr.c 2004-06-24 06:22:01.967840446 +0000
@@ -105,6 +105,7 @@
case 2:
isnet = 0; break;
default:
+ ((void)0);
}
/* Fill in the other fields. */
diff -Naur net-tools-1.60.orig/mii-tool.c net-tools-1.60/mii-tool.c
--- net-tools-1.60.orig/mii-tool.c 2000-05-21 14:31:17.000000000 +0000
+++ net-tools-1.60/mii-tool.c 2004-06-24 06:22:01.971839755 +0000
@@ -379,17 +379,17 @@
/*--------------------------------------------------------------------*/
const char *usage =
-"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...]
- -V, --version display version information
- -v, --verbose more verbose output
- -R, --reset reset MII to poweron state
- -r, --restart restart autonegotiation
- -w, --watch monitor for link status changes
- -l, --log with -w, write events to syslog
- -A, --advertise=media,... advertise only specified media
- -F, --force=media force specified media technology
-media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,
- (to advertise both HD and FD) 100baseTx, 10baseT\n";
+"usage: %s [-VvRrwl] [-A media,... | -F media] [interface ...]\n"
+" -V, --version display version information\n"
+" -v, --verbose more verbose output\n"
+" -R, --reset reset MII to poweron state\n"
+" -r, --restart restart autonegotiation\n"
+" -w, --watch monitor for link status changes\n"
+" -l, --log with -w, write events to syslog\n"
+" -A, --advertise=media,... advertise only specified media\n"
+" -F, --force=media force specified media technology\n"
+"media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,\n"
+" (to advertise both HD and FD) 100baseTx, 10baseT\n";
int main(int argc, char **argv)
{

View File

@@ -0,0 +1,51 @@
Submitted By: Jim Gifford (jim at linuxfromscratch dot org)
Date: 2004-06-24
Initial Package Version: 2.6
Origin: Gentoo and Self
Upstream Status: N/A
Description: Fixes Compile Issues with the 2.6 Kernel
diff -Naur net-tools-1.60.orig/hostname.c net-tools-1.60/hostname.c
--- net-tools-1.60.orig/hostname.c 2001-04-08 17:04:23.000000000 +0000
+++ net-tools-1.60/hostname.c 2004-06-24 06:17:32.517305695 +0000
@@ -42,10 +42,16 @@
#include "config.h"
#include "version.h"
#include "../intl.h"
+#include <linux/version.h>
#if HAVE_AFDECnet
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
#include <netdnet/dn.h>
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
+#include <linux/dn.h>
+#endif
+#endif
char *Release = RELEASE, *Version = "hostname 1.100 (2001-04-14)";
diff -Naur net-tools-1.60.orig/lib/x25_sr.c net-tools-1.60/lib/x25_sr.c
--- net-tools-1.60.orig/lib/x25_sr.c 2000-05-20 13:38:10.000000000 +0000
+++ net-tools-1.60/lib/x25_sr.c 2004-06-24 06:15:45.163773724 +0000
@@ -22,6 +22,7 @@
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <linux/x25.h>
+#include <linux/version.h>
#include <ctype.h>
#include <errno.h>
#include <netdb.h>
@@ -77,7 +78,11 @@
rt.sigdigits=sigdigits;
/* x25_route_struct.address isn't type struct sockaddr_x25, Why? */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
memcpy(&rt.address, &sx25.sx25_addr, sizeof(x25_address));
+#else
+ memcpy(&rt.address, &sx25.sx25_addr, sizeof(struct x25_address));
+#endif
while (*args) {
if (!strcmp(*args,"device") || !strcmp(*args,"dev")) {

View File

@@ -0,0 +1,27 @@
Submitted By: Randy McMurchy <randy_at_linuxfromscratch_dot_org>
Date: 2004-08-27
Initial Package Version: 1.60
Upstream Status: N/A (package is unmaintained)
Origin: From Fedora Core (submitted to LFS-Hackers by Kevin White)
Description: Fixes mii-tool when compiled using Linux-2.6.x
$LastChangedBy: randy $
$Date: 2004-08-27 21:04:05 -0600 (Fri, 27 Aug 2004) $
--- net-tools-1.60/include/mii.h.bar Tue Jul 31 11:49:39 2001
+++ net-tools-1.60/include/mii.h Tue Jul 31 11:49:33 2001
@@ -11,11 +11,9 @@
/* network interface ioctl's for MII commands */
#ifndef SIOCGMIIPHY
-#define SIOCGMIIPHY (SIOCDEVPRIVATE) /* Read from current PHY */
-#define SIOCGMIIREG (SIOCDEVPRIVATE+1) /* Read any PHY register */
-#define SIOCSMIIREG (SIOCDEVPRIVATE+2) /* Write any PHY register */
-#define SIOCGPARAMS (SIOCDEVPRIVATE+3) /* Read operational parameters */
-#define SIOCSPARAMS (SIOCDEVPRIVATE+4) /* Set operational parameters */
+#define SIOCGMIIPHY 0x8947 /* Read from current PHY */
+#define SIOCGMIIREG 0x8948 /* Read any PHY register */
+#define SIOCSMIIREG 0x8949 /* Write any PHY register */
#endif
#include <linux/types.h>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,32 @@
Submitted By: Anderson Lizardo <andersonlizardo(at)yahoo(dot)com(dot)br>
Date: 2006-02-15
Initial Package Version: 5.8.8
Origin: based on current LFS-BOOK patch (perl-5.8.0-libc-2.patch)
Description: this patch adapts some hard-wired paths to the C library.
It uses the $prefix variable to locate the correct libc.
diff -Naur perl-5.8.8.orig/hints/linux.sh perl-5.8.8/hints/linux.sh
--- perl-5.8.8.orig/hints/linux.sh 2005-11-18 01:18:45.000000000 +0000
+++ perl-5.8.8/hints/linux.sh 2006-02-12 12:20:32.000000000 +0000
@@ -52,9 +52,9 @@
# We don't use __GLIBC__ and __GLIBC_MINOR__ because they
# are insufficiently precise to distinguish things like
# libc-2.0.6 and libc-2.0.7.
-if test -L /lib/libc.so.6; then
- libc=`ls -l /lib/libc.so.6 | awk '{print $NF}'`
- libc=/lib/$libc
+if test -L ${prefix}/lib/libc.so.6; then
+ libc=`ls -l ${prefix}/lib/libc.so.6 | awk '{print $NF}'`
+ libc=${prefix}/lib/$libc
fi
# Configure may fail to find lstat() since it's a static/inline
@@ -330,3 +330,8 @@
libswanted="$*"
;;
esac
+
+locincpth=""
+loclibpth=""
+glibpth="${prefix}/lib"
+usrinc="${prefix}/include"

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More