header files state
Like the problem with sigaction definitions described in another thread, the problem with "SOCK_STREAM" seems
to come from the fact that we're not on the same level of glibc as the rest of the Linux community. The "correct" definition of SOCK_STREAM is in asm/socket.h, but it is
#ifdef __KERNEL__, and no alternate definition is available. On a PC, one can find it in /usr/include/bits/socket.h, but no equivalent exists in the MIPS glibc 2.0 universe. I have suppressed the #ifdef on my build system in order to bulid kaffe, etc. as it seems intuitively reasonable to have the same values used by user code as by the kernel, but I don't know it that's really what needs to be done.
And I note with some concernt that, while in the PC Linux universe, asm/socket.h, linux/socket.h, and bits/socket.h all have the same definitions for the socket types (SOCK_STREAM = 1, for example), in the MIPS/LINUX
kernel, SOCK_STREAM = 2, though there is still the definition, conditional on
#if !defined(__KERNEL__) && (!defined(__GLIBC__) || (__GLIBC__ < 2)) that defines SOCK_STREAM to be 1. Fortunately, the probability of someone using non-glibc or glibc < 2 in
a MIPS/Linux universe seems to be essentially zero.
-----Original Message-----
From: Florian Lohoff <[email protected]>
To: [email protected] <[email protected]>
Date: Sunday, March 19, 2000 10:17 PM
Subject: header files state
Quoted 8 lines
Hi,
I am currently trying to waste some cpu cycles with blindly compiling packages instead of leaving the machine idle.Most of the packages (~1/3) fail because of the already discussed problems with the headers.
gcc -c -g -O2 -Wall -MD -DHAVE_SYS_SELECT_H -DFLICK_VERSION=\"2.1\" -I. -I..
/
Quoted 1 line
../../../runtime/libraries/link/iiop -I- -I../../../../runtime/headers -I../../
.
Quoted 1 line
./../runtime/headers -I../../../../runtime/libraries/link -I../../../.. -I../..
/
Quoted 8 lines
../..
communication.ccommunication.c: In function `flick_client_send_request':
communication.c:390: `SOCK_STREAM' undeclared (first use this function) communication.c:390: (Each undeclared identifier is reported only once communication.c:390: for each function it appears in.)gcc -O2 -g -I. -DHAVE_CONFIG_H -DPREFIX=\"/usr\" -c -o additional.o
additional.
Quoted 5 lines
c
In file included from/usr/include/sys/resource.h:27,
from additional.c:14:/usr/include/resourcebits.h:103: warning: `RLIM_INFINITY' redefined/usr/include/asm/resource.h:32: warning: this is the location of the previous
de
Quoted 17 lines
finition
In file included from/usr/include/sys/resource.h:27,
from additional.c:14:/usr/include/resourcebits.h:102: parse error before `0x7fffffffUL'I am unsure where the problem is located exactly and how to fix it correctly - So probably somebody else more knowledged and timely equipped might fix this in the CVS (probably it is alread fixed ? - My CVS kernel is 3-5 days old)
Flo
--
Florian Lohoff [email protected] +49-5241-470566
"Technology is a constant battle between manufacturers producing bigger and more idiot-proof systems and nature producing bigger and better idiots."
Kevin D. Kissell writes:
...
Quoted 10 lines
And I note with some concernt that, while in the PC Linux universe,
asm/socket.h,linux/socket.h, andbits/socket.hall have the same definitions for the socket types (SOCK_STREAM= 1, for example), in the MIPS/LINUX
kernel,SOCK_STREAM= 2, though there is still the definition, conditional on
#if !defined(__KERNEL__) && (!defined(__GLIBC__) || (__GLIBC__< 2)) that definesSOCK_STREAMto be 1. Fortunately, the probability of someone using non-glibc or glibc < 2 in
a MIPS/Linux universe seems to be essentially zero.
...
SOCK_STREAM == 2 is correct for the MIPS ABI (which has to do with
some unfortunate choices made by AT&T in SVR4, and consequent binary-compatibility issues for various of the MIPS ABI participants).