[PATCH] was Re: include file problem (with patch)

From: S. Baker (sbaker@erols.com)
Date: Mon Jun 05 2000 - 08:00:14 EST


Your post is still a little off topic. I posted a patch to a problem
with a kernel include file that is broken when there
is no optimization. All I have gotten so far is replies about how user
code isn't supposed to include kernel include files. This sounds
like a religious argument that you should start a new thread for,
and take it to some of the programmers that have released utilities
that include kernel include files (there are several).

This thread is about a bug in a kernel include file. Here is a
recap (with a little extra info to help you feel better, and maybe
we can get over the user code issue and talk about what is important,
ie fixing a bug):
 - I have a driver that can't be compiled without optimization. I
    tracked the problem down, and provided not only a fix, but sample
    code to demonstrate the problem.
 - I now have two replies that 'appear' to be from authoratative
    sources that don't address the problem at all, just tell me that
    it isn't a problem, due to a completely irrelevant issue.
 
I reiterate my question: Can someone tell me who is responsible
for putting this patch in, so I can get some authoritative feedback
as towhether or not it will be put in, and if not, why not?

S. Baker
bakers@erols.com

diff -rc linux/include/linux/byteorder/swab.h
patch/include/linux/byteorder/swab
.h
*** linux/include/linux/byteorder/swab.h Mon May 15 17:06:32 2000
--- patch/include/linux/byteorder/swab.h Sun May 28 20:49:34 2000
***************
*** 90,98 ****
   ___swab64((x)) : \
   __fswab64((x)))
  #else
! # define __swab16(x) __fswab16(x)
! # define __swab32(x) __fswab32(x)
! # define __swab64(x) __fswab64(x)
  #endif /* OPTIMIZE */
  
  
--- 90,98 ----
   ___swab64((x)) : \
   __fswab64((x)))
  #else
! # define __swab16(x) ___swab16(x)
! # define __swab32(x) ___swab32(x)
! # define __swab64(x) ___swab64(x)
  #endif /* OPTIMIZE */

In article <fa.eqtrf1v.e5449n@ifi.uio.no>,
  Andries Brouwer <aeb@veritas.com> wrote:
> > S. Baker (sbaker@erols.com) wrote:
>
> > > > While trying to compile the following sample program using
> > > > 'gcc -o testbo testbo.c' I encountered a problem in
> > > > include/linux/byteorder/swab.h that causes testbo not to
> > > > compile.
>
> > "Khimenko Victor" <khim@sch57.msk.ru> wrote:
>
> > > It's not bug. It's feature. In fact even two features:
> > > 1. Any program with kernel header usage is broken by
definition. If
> > > it does not compile - it's program bug, not kernel one.
> > > 2. extern inline will be inlined ONLY when optimization is enabled
-
> > > do not even try to compile them without optimization (it's even
> > > in some man pages).
> > >
>
> On Sun, Jun 04, 2000 at 10:30:02PM -0400, S. Baker wrote:
>
> > Claiming that a bug is a feature is an interesting position, but
> > this is still a bug. You should look closer at the problem, for a
> > better understanding of what is going on. I fully understand
> > that inline functions don't get compiled without optimization.
> > What I also understand, and I think you missed, is that when
> > optimization is NOT turned on, ...
>
> Victor gave a perfect answer.
> You forgot to read his part 1. Your program is broken already
> because it includes kernel headers.
>
> Andries
>
> -
> To unsubscribe from this list: send the line "unsubscribe
linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jun 07 2000 - 21:00:21 EST