[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cvs: hppa64-hp-hpux11.00: ld install failure
From: |
Markus Werle |
Subject: |
Re: cvs: hppa64-hp-hpux11.00: ld install failure |
Date: |
Mon, 27 Aug 2001 10:31:02 +0200 |
Hi!
I did it by Hand (patch is not my favorite prog)
What if You would choose to have a clean code
where macros are upper case and local variables are not?
The #define is ugly (yes I am a C++-programmer ;-) )
Please tell me why You did not use the static keyword
here. Is there a difference between C and C++ in this case?
IMHO this magic number set in the subroutine should be
marked as such.
This code snippet works fine for me:
(well, at least it compiles)
diff -p ld/ldmain.c ld/ldmain.c.orig
*** ld/ldmain.c Mon Aug 27 10:19:55 2001
--- ld/ldmain.c.orig Thu Aug 23 17:14:18 2001
*************** main (argc, argv)
*** 325,336 ****
if (saved_script_handle)
{
! static const int blocksize = 8192;
size_t n;
! char *buf = xmalloc (blocksize);
rewind (saved_script_handle);
! while ((n = fread (buf, 1, blocksize - 1, saved_script_handle)) > 0)
{
buf [n] = 0;
info_msg (buf);
--- 325,336 ----
if (saved_script_handle)
{
! const int BSIZE = 8192;
size_t n;
! char *buf = xmalloc (BSIZE);
rewind (saved_script_handle);
! while ((n = fread (buf, 1, BSIZE - 1, saved_script_handle)) > 0)
{
buf [n] = 0;
info_msg (buf);