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

Re: Is this a bug with glibc (ntohl, ntohs, ...)?



On Sun, Mar 18, 2001 at 03:18:38PM -0600, Steve Langasek wrote:
> What happens if you change the order of the include files to move
> <linux/cdrom.h> below <netinet/in.h>?
> 
> It's difficult to call this a glibc bug; the issue is that both the kernel
> (which uses the headers form /usr/include/linux) and userspace programs need
> to know about ntohs/ntohl, so it must be declared in both places.  By
> including <linux/cdrom.h>, you introduce both Linux and glibc headers into the
> mix, which isn't necessarily guaranteed to work.

I find it somewhat strange that nobody noticed how wrong yuo are.

$ dpkg -S /usr/include/linux/cdrom.h 
libc6-dev: /usr/include/linux/cdrom.h

So, the files in /usr/include/linux are actually glibc-provided files, not
Linux files.

Which means everyone is free to call it a glibc bug.

Thanks,
joostje



Reply to: