linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.4.9 "rrunner.c" wont compile
@ 2001-08-21 11:45 gonzales
  2001-08-21 12:17 ` Richard B. Johnson
  0 siblings, 1 reply; 2+ messages in thread
From: gonzales @ 2001-08-21 11:45 UTC (permalink / raw)
  To: linux-kernel


hello list,

recently I tried to compile 2.4.9. however, allthough being a so-called
"stable production release", it fails being compiled.

  :  gonzales:/usr/src/linux # make modules
  :  [...]
  :  make -C  kernel CFLAGS="-D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i586 -DMODULE" MAKING_MODULES=1 modules
  :  make[1]: Entering directory `/usr/src/linux/kernel'
  :
  :  gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i586 -DMODULE   -c -o rrunner.o rrunner.c
  :  rrunner.c:1241: macro `min' used with only 2 args
  :  rrunner.c:1252: macro `min' used with only 2 args
  :  rrunner.c: In function `rr_dump':
  :  rrunner.c:1241: parse error before `__x'
  :  rrunner.c:1241: `__x' undeclared (first use in this function)
  :  rrunner.c:1241: (Each undeclared identifier is reported only once
  :  rrunner.c:1241: for each function it appears in.)
  :  rrunner.c:1241: `__y' undeclared (first use in this function)
  :  rrunner.c:1252: parse error before `__x'
  :  rrunner.c:1221: warning: `len' might be used uninitialized in this function
  :  make[2]: *** [rrunner.o] Error 1
  :  make[2]: Leaving directory `/usr/src/linux/drivers/net'
  :  make[1]: *** [_modsubdir_net] Error 2
  :  make[1]: Leaving directory `/usr/src/linux/drivers'
  :  make: *** [_mod_drivers] Error 2

I understand this not. what does "min used with only 2 args" mean?
why would a comparison need more than 2 arguments?

sincerly,
gonazeles

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 2.4.9 "rrunner.c" wont compile
  2001-08-21 11:45 2.4.9 "rrunner.c" wont compile gonzales
@ 2001-08-21 12:17 ` Richard B. Johnson
  0 siblings, 0 replies; 2+ messages in thread
From: Richard B. Johnson @ 2001-08-21 12:17 UTC (permalink / raw)
  To: gonzales; +Cc: linux-kernel

On Tue, 21 Aug 2001 gonzales@dns1.austriaone.at wrote:

> 
> hello list,
> 
> recently I tried to compile 2.4.9. however, allthough being a so-called
> "stable production release", it fails being compiled.
> 
>   :  gonzales:/usr/src/linux # make modules
>   :  [...]
>   :  make -C  kernel CFLAGS="-D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i586 -DMODULE" MAKING_MODULES=1 modules
>   :  make[1]: Entering directory `/usr/src/linux/kernel'
>   :
>   :  gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i586 -DMODULE   -c -o rrunner.o rrunner.c
>   :  rrunner.c:1241: macro `min' used with only 2 args
>   :  rrunner.c:1252: macro `min' used with only 2 args
>   :  rrunner.c: In function `rr_dump':
>   :  rrunner.c:1241: parse error before `__x'
>   :  rrunner.c:1241: `__x' undeclared (first use in this function)
>   :  rrunner.c:1241: (Each undeclared identifier is reported only once
>   :  rrunner.c:1241: for each function it appears in.)
>   :  rrunner.c:1241: `__y' undeclared (first use in this function)
>   :  rrunner.c:1252: parse error before `__x'
>   :  rrunner.c:1221: warning: `len' might be used uninitialized in this function
>   :  make[2]: *** [rrunner.o] Error 1
>   :  make[2]: Leaving directory `/usr/src/linux/drivers/net'
>   :  make[1]: *** [_modsubdir_net] Error 2
>   :  make[1]: Leaving directory `/usr/src/linux/drivers'
>   :  make: *** [_mod_drivers] Error 2
> 
> I understand this not. what does "min used with only 2 args" mean?
> why would a comparison need more than 2 arguments?
> 
> sincerly,
> gonazeles

The min() macro got changed. You might want to #undef it and make
your own because this will be a political thing that won't go
away until Linus rules.

'min' is most often used to select a value that is the smaller
of a request length and a buffer length. A lot of software that
uses this function (macro) doesn't respect signed-ness or size.

This can cause problems. A universal solution doesn't exist because
an unsigned compare, which is most often what you want, isn't
mathematically correct and the comparison between an 'int' and
a 'long' is okay for some architectures and bogus for others.

Adding another parameter to a macro, which will ultimately be
used for a cast, is ugly. The casts, if necessary, should be
in the code.

So, I suggest you just define your own, which is correct for your
code.


Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).

    I was going to compile a list of innovations that could be
    attributed to Microsoft. Once I realized that Ctrl-Alt-Del
    was handled in the BIOS, I found that there aren't any.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-08-21 12:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-21 11:45 2.4.9 "rrunner.c" wont compile gonzales
2001-08-21 12:17 ` Richard B. Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).