From: Marco Roeland <marco.roeland@xs4all.nl>
To: Linux Kernel Development <linux-kernel@vger.kernel.org>
Cc: Norman Diamond <ndiamond@wta.att.ne.jp>
Subject: Re: [PATCH] RH7.3 can't compile 2.6.0-test8 (fs/proc/array.c)
Date: Tue, 21 Oct 2003 16:37:41 +0200 [thread overview]
Message-ID: <20031021143741.GB22633@localhost> (raw)
In-Reply-To: <20031021135221.GA22633@localhost>
On Tuesday October 21st 2003 at 15:52 uur Marco Roeland wrote:
> > http://marc.theaimsgroup.com/?l=linux-kernel&m=106651554401143&w=2
> >
> > It's supposed to fix test8 compile with gcc-2.96 for RedHat 7.x.
>
> Perhaps if the huge sprintf with 40+ arguments (fs/proc/array.c, line 346)
> amongst which several trinary operators, were to be split up into several
> parts, might that not solve the problem more elegantly?
Does this compile (and work) for any of you friendly RedHat 7.[23] users?
In 2.6.0-test8 yet another argument was added to the monstrous sprintf.
Perhaps this was just the droplet to overflow gcc-2.96's buckets? Here we
split it into 3 distinct parts.
--- linux-2.6.0-test8/fs/proc/array.c.orig 2003-10-21 16:18:40.000000000 +0200
+++ linux-2.6.0-test8/fs/proc/array.c 2003-10-21 16:24:42.000000000 +0200
@@ -343,9 +343,7 @@
read_lock(&tasklist_lock);
ppid = task->pid ? task->real_parent->pid : 0;
read_unlock(&tasklist_lock);
- res = sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu \
-%lu %lu %lu %lu %lu %ld %ld %ld %ld %d %ld %llu %lu %ld %lu %lu %lu %lu %lu \
-%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu\n",
+ res = sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu ",
task->pid,
task->comm,
state,
@@ -355,7 +353,8 @@
tty_nr,
tty_pgrp,
task->flags,
- task->min_flt,
+ task->min_flt);
+ res += sprintf(buffer + res,"%lu %lu %lu %lu %lu %ld %ld %ld %ld %d %ld %llu %lu %ld %lu %lu %lu %lu %lu ",
task->cmin_flt,
task->maj_flt,
task->cmaj_flt,
@@ -375,7 +374,8 @@
mm ? mm->start_code : 0,
mm ? mm->end_code : 0,
mm ? mm->start_stack : 0,
- esp,
+ esp);
+ res += sprintf(buffer + res,"%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu\n",
eip,
/* The signal information here is obsolete.
* It must be decimal for Linux 2.0 compatibility.
next prev parent reply other threads:[~2003-10-21 14:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-21 13:19 RH7.3 can't compile 2.6.0-test8 rwhron
2003-10-21 13:52 ` Marco Roeland
2003-10-21 14:37 ` Marco Roeland [this message]
2003-10-21 20:12 ` [PATCH] RH7.3 can't compile 2.6.0-test8 (fs/proc/array.c) Paul Larson
2003-10-21 20:46 ` bill davidsen
2003-10-22 10:36 ` Norman Diamond
-- strict thread matches above, loose matches on Subject: below --
2003-10-23 1:16 ndiamond
2003-10-23 7:48 ` Marco Roeland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20031021143741.GB22633@localhost \
--to=marco.roeland@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=ndiamond@wta.att.ne.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox