[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Sendfile error on Red Hat 5.5 64 Bit
From: |
David Krentzlin |
Subject: |
Re: [Chicken-users] Sendfile error on Red Hat 5.5 64 Bit |
Date: |
Thu, 01 Dec 2011 19:23:58 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111124 Thunderbird/8.0 |
Good evening Vok,
On 01.12.2011 18:36, Vok Vojwo wrote:
But I found a difference between my 32 Bit and 64 Bit system. On the
32 Bit system I have two definitions:
$ find /usr/include/ -type f | xargs grep POSIX_FADV_SEQUENTIAL
/usr/include/linux/fadvise.h:#define POSIX_FADV_SEQUENTIAL 2 /*
Expect sequential page references. */
/usr/include/bits/fcntl.h:# define POSIX_FADV_SEQUENTIAL 2 /*
Expect sequential page references. */
And on the 64 Bit system I have only one:
# find /usr/include/ -type f | xargs grep POSIX_FADV_SEQUENTIAL
/usr/include/bits/fcntl.h:# define POSIX_FADV_SEQUENTIAL 2 /*
Expect sequential page references. */
The file is part of the kernel headers:
$ rpm -qf /usr/include/linux/fadvise.h
kernel-headers-2.6.18-194.8.1.el5
The definition resides in /usr/include/bit/fcntl.h which is present on
both systems. This file is referenced by fcntl.h. And from what you
wrote, it also includes the POSIX_FADV_SEQUENTIAL constant.
The question is, why isn't it visible to the sendfile code?
I have found that the probing code adds a _XOPEN_SOURCE definition
whereas the actual implementation did not.
I'm still quite confident that this is the culprit, but i don't know yet
how to tackle it correctly. My current guess is that the definition is
too late in the code to actually have an effect, as the header file has
already been loaded.
But the main problem seems to me that the probe works and the
compilation does not. So the probe includes something different than
the compilation. I did not try if the installation of the kernel
headers fixes the problem, because right now I do not know if I am
allowed to do it on the production system. But the difference between
the probe and the compilation is still a bug I think.
Yes, that is a bug in the setup-code.
I moved the definition to the very top of the source-file so that the
only header that comes before that definition is chicken.h.
This is the only difference between the probing code and the actual
implementation.
Could you please try again the current tip and tell me if it changed?
Also if it didn't change, could you please include your chicken.h in the
probing code and see if it still gets selected?
Thanks
David