NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: toolchain/46827: Cannot build the kernel, even Generic.



The following reply was made to PR toolchain/46827; it has been noted by GNATS.

From: Rifat Mahmud <rftmhmd%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: toolchain/46827: Cannot build the kernel, even Generic.
Date: Fri, 24 Aug 2012 21:54:44 +0600

 --047d7b33daf4a9e6a304c804fe10
 Content-Type: text/plain; charset=ISO-8859-1
 
 In what folder should I apply the patch?
 
 On Fri, Aug 24, 2012 at 4:40 PM, Christos Zoulas 
<christos%zoulas.com@localhost>wrote:
 
 > The following reply was made to PR toolchain/46827; it has been noted by
 > GNATS.
 >
 > From: christos%zoulas.com@localhost (Christos Zoulas)
 > To: gnats-bugs%NetBSD.org@localhost, toolchain-manager%netbsd.org@localhost,
 >         gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost, 
 > rftmhmd%gmail.com@localhost
 > Cc:
 > Subject: Re: toolchain/46827: Cannot build the kernel, even Generic.
 > Date: Fri, 24 Aug 2012 06:37:06 -0400
 >
 >  On Aug 24,  7:20am, david%l8s.co.uk@localhost (David Laight) wrote:
 >  -- Subject: Re: toolchain/46827: Cannot build the kernel, even Generic.
 >
 >  Try this:
 >
 >  christos
 >
 >  --- archive.c  2009/11/07 17:58:17     1.9
 >  +++ archive.c  2012/08/24 10:36:04
 >  @@ -1325,7 +1325,7 @@
 >     struct ar_hdr *hdr;
 >     char *temp, *temp1;
 >     bfd_size_type amt;
 >  -  char tmpbuf[11];
 >  +  char tmpbuf[1024];
 >
 >     if (member && (member->flags & BFD_IN_MEMORY) != 0)
 >       {
 >  @@ -1365,7 +1365,8 @@
 >     strncpy (hdr->ar_fmag, ARFMAG, 2);
 >
 >     /* Goddamned sprintf doesn't permit MAXIMUM field lengths.  */
 >  -  sprintf ((hdr->ar_date), "%-12ld", (long) status.st_mtime);
 >  +  sprintf (tmpbuf, "%-12ld", (long) status.st_mtime);
 >  +  memcpy(hdr->ar_date, tmpbuf, sizeof(hdr->ar_date));
 >   #ifdef HPUX_LARGE_AR_IDS
 >     /* HP has a very "special" way to handle UID/GID's with numeric values
 >        > 99999.  */
 >  @@ -1373,7 +1374,10 @@
 >       hpux_uid_gid_encode (hdr->ar_gid, (long) status.st_uid);
 >     else
 >   #endif
 >  -    sprintf ((hdr->ar_uid), "%ld", (long) status.st_uid);
 >  +  {
 >  +  sprintf (tmpbuf, "%ld", (long) status.st_uid);
 >  +  memcpy(hdr->ar_uid, tmpbuf, sizeof(hdr->ar_uid));
 >  +  }
 >   #ifdef HPUX_LARGE_AR_IDS
 >     /* HP has a very "special" way to handle UID/GID's with numeric values
 >        > 99999.  */
 >  @@ -1381,8 +1385,12 @@
 >       hpux_uid_gid_encode (hdr->ar_uid, (long) status.st_gid);
 >     else
 >   #endif
 >  -  sprintf ((hdr->ar_gid), "%ld", (long) status.st_gid);
 >  -  sprintf ((hdr->ar_mode), "%-8o", (unsigned int) status.st_mode);
 >  +  {
 >  +  sprintf (tmpbuf, "%ld", (long) status.st_gid);
 >  +  memcpy(hdr->ar_gid, tmpbuf, sizeof(hdr->ar_gid));
 >  +  }
 >  +  sprintf (tmpbuf, "%-8o", (unsigned int) status.st_mode);
 >  +  memcpy(hdr->ar_mode, tmpbuf, sizeof(hdr->ar_mode));
 >     sprintf (tmpbuf, "%-10ld", (long) status.st_size);
 >     memcpy(hdr->ar_size, tmpbuf, sizeof(hdr->ar_size));
 >     /* Correct for a lossage in sprintf whereby it null-terminates.  I
 > cannot
 >
 >
 
 --047d7b33daf4a9e6a304c804fe10
 Content-Type: text/html; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable
 
 In what folder should I apply the patch?<br><br><div class=3D"gmail_quote">=
 On Fri, Aug 24, 2012 at 4:40 PM, Christos Zoulas <span dir=3D"ltr">&lt;<a h=
 ref=3D"mailto:christos%zoulas.com@localhost"; 
target=3D"_blank">christos%zoulas.com@localhost</a=
 >&gt;</span> wrote:<br>
 <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
 x #ccc solid;padding-left:1ex"><div class=3D"im">The following reply was ma=
 de to PR toolchain/46827; it has been noted by GNATS.<br>
 <br>
 </div><div class=3D"im">From: <a 
href=3D"mailto:christos%zoulas.com@localhost";>christ=
 os%zoulas.com@localhost</a> (Christos Zoulas)<br>
 To: gnats-bugs%NetBSD.org@localhost, <a 
href=3D"mailto:toolchain-manager%netbsd.org@localhost";>=
 toolchain-manager%netbsd.org@localhost</a>,<br>
 </div>=A0 =A0 =A0 =A0 <a 
href=3D"mailto:gnats-admin%netbsd.org@localhost";>gnats-admin=
 @netbsd.org</a>, <a 
href=3D"mailto:netbsd-bugs%netbsd.org@localhost";>netbsd-bugs@netb=
 sd.org</a>, <a 
href=3D"mailto:rftmhmd%gmail.com@localhost";>rftmhmd%gmail.com@localhost</a><br>
 Cc:<br>
 <div class=3D"im">Subject: Re: toolchain/46827: Cannot build the kernel, ev=
 en Generic.<br>
 </div>Date: Fri, 24 Aug 2012 06:37:06 -0400<br>
 <div class=3D"HOEnZb"><div class=3D"h5"><br>
 =A0On Aug 24, =A07:20am, <a 
href=3D"mailto:david%l8s.co.uk@localhost";>david%l8s.co.uk@localhost=
 </a> (David Laight) wrote:<br>
 =A0-- Subject: Re: toolchain/46827: Cannot build the kernel, even Generic.<=
 br>
 <br>
 =A0Try this:<br>
 <br>
 =A0christos<br>
 <br>
 =A0--- archive.c =A02009/11/07 17:58:17 =A0 =A0 1.9<br>
 =A0+++ archive.c =A02012/08/24 10:36:04<br>
 =A0@@ -1325,7 +1325,7 @@<br>
 =A0 =A0 struct ar_hdr *hdr;<br>
 =A0 =A0 char *temp, *temp1;<br>
 =A0 =A0 bfd_size_type amt;<br>
 =A0- =A0char tmpbuf[11];<br>
 =A0+ =A0char tmpbuf[1024];<br>
 <br>
 =A0 =A0 if (member &amp;&amp; (member-&gt;flags &amp; BFD_IN_MEMORY) !=3D 0=
 )<br>
 =A0 =A0 =A0 {<br>
 =A0@@ -1365,7 +1365,8 @@<br>
 =A0 =A0 strncpy (hdr-&gt;ar_fmag, ARFMAG, 2);<br>
 <br>
 =A0 =A0 /* Goddamned sprintf doesn&#39;t permit MAXIMUM field lengths. =A0*=
 /<br>
 =A0- =A0sprintf ((hdr-&gt;ar_date), &quot;%-12ld&quot;, (long) status.st_mt=
 ime);<br>
 =A0+ =A0sprintf (tmpbuf, &quot;%-12ld&quot;, (long) status.st_mtime);<br>
 =A0+ =A0memcpy(hdr-&gt;ar_date, tmpbuf, sizeof(hdr-&gt;ar_date));<br>
 =A0 #ifdef HPUX_LARGE_AR_IDS<br>
 =A0 =A0 /* HP has a very &quot;special&quot; way to handle UID/GID&#39;s wi=
 th numeric values<br>
 =A0 =A0 =A0 =A0&gt; 99999. =A0*/<br>
 =A0@@ -1373,7 +1374,10 @@<br>
 =A0 =A0 =A0 hpux_uid_gid_encode (hdr-&gt;ar_gid, (long) status.st_uid);<br>
 =A0 =A0 else<br>
 =A0 #endif<br>
 =A0- =A0 =A0sprintf ((hdr-&gt;ar_uid), &quot;%ld&quot;, (long) status.st_ui=
 d);<br>
 =A0+ =A0{<br>
 =A0+ =A0sprintf (tmpbuf, &quot;%ld&quot;, (long) status.st_uid);<br>
 =A0+ =A0memcpy(hdr-&gt;ar_uid, tmpbuf, sizeof(hdr-&gt;ar_uid));<br>
 =A0+ =A0}<br>
 =A0 #ifdef HPUX_LARGE_AR_IDS<br>
 =A0 =A0 /* HP has a very &quot;special&quot; way to handle UID/GID&#39;s wi=
 th numeric values<br>
 =A0 =A0 =A0 =A0&gt; 99999. =A0*/<br>
 =A0@@ -1381,8 +1385,12 @@<br>
 =A0 =A0 =A0 hpux_uid_gid_encode (hdr-&gt;ar_uid, (long) status.st_gid);<br>
 =A0 =A0 else<br>
 =A0 #endif<br>
 =A0- =A0sprintf ((hdr-&gt;ar_gid), &quot;%ld&quot;, (long) status.st_gid);<=
 br>
 =A0- =A0sprintf ((hdr-&gt;ar_mode), &quot;%-8o&quot;, (unsigned int) status=
 .st_mode);<br>
 =A0+ =A0{<br>
 =A0+ =A0sprintf (tmpbuf, &quot;%ld&quot;, (long) status.st_gid);<br>
 =A0+ =A0memcpy(hdr-&gt;ar_gid, tmpbuf, sizeof(hdr-&gt;ar_gid));<br>
 =A0+ =A0}<br>
 =A0+ =A0sprintf (tmpbuf, &quot;%-8o&quot;, (unsigned int) status.st_mode);<=
 br>
 =A0+ =A0memcpy(hdr-&gt;ar_mode, tmpbuf, sizeof(hdr-&gt;ar_mode));<br>
 =A0 =A0 sprintf (tmpbuf, &quot;%-10ld&quot;, (long) status.st_size);<br>
 =A0 =A0 memcpy(hdr-&gt;ar_size, tmpbuf, sizeof(hdr-&gt;ar_size));<br>
 =A0 =A0 /* Correct for a lossage in sprintf whereby it null-terminates. =A0=
 I cannot<br>
 <br>
 </div></div></blockquote></div><br>
 
 --047d7b33daf4a9e6a304c804fe10--
 


Home | Main Index | Thread Index | Old Index