In message <_A4457@delegate-en.ML_> on 05/20/09(23:52:25)
you Master NoSFeRaTU <email@example.com> wrote:
|2009/5/20, Yutaka Sato <firstname.lastname@example.org>:
|> |Of cource I cannot run this file, because it was compiled for
|> |different architecture. When I try to play with Makefile for
|> |compilling such files which require execution with normal gcc then I
|> |stopped here:
|> I'm doing several cross-compilation for testing and distribution of
|> binaries for ARM CPU (ARM-Linux/gcc and WindowsCE/VC++).
|> The following is an example of shell script to do cross-compilation
|> targetting to Zaurus.
|Thanks but with that script I have same error with readycc.c:
|mipsel-linux-gcc -O2 -x c++ -DQS -Dm64 -I../gen -I../include -c
|readycc.c -o readycc.o
|readycc.c: In function `int ready_cc(FILE*)':
|readycc.c:13: error: 'struct __STDIO_FILE_STRUCT' has no member named '_egptr'
|readycc.c:13: error: 'struct __STDIO_FILE_STRUCT' has no member named '_gptr'
|make: *** [readycc.o] Error 1
The error simply means that the member _egptr in the "FILE" structure
which usually available on Linux does not exist on the environment.
I found lines like follows in libc/stdio/_stdio.h of uClibc:
>/* Valid when reading... */
>#define __STDIO_STREAM_BUFFER_RAVAIL(S) ((S)->__bufread - (S)->__bufpos)
So you will be able to solve the problem by defining READYCC() as
bellow in include/fpoll.h:
#define READYCC(fp) ((S)->__bufread - (S)->__bufpos)
It could be like the enclosed patch.
But I doubt that if DeleGate works on MIPS(EL) with uClibc even if
you can get the binary solving this problem.
9 9 Yutaka Sato <email@example.com> http://delegate.org/y.sato/
( ~ ) National Institute of Advanced Industrial Science and Technology
_< >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
Do the more with the less -- B. Fuller
*** dist/src/delegate9.9.3/include/fpoll.h Thu Jan 17 21:02:23 2008
--- ./include/fpoll.h Thu May 21 02:07:38 2009
*** 6,16 ****
--- 6,20 ----
* Get the count of bufferd characters.
+ #if defined(__STDIO_STREAM_BUFFER_RAVAIL)
+ #define READYCC(fp) __STDIO_STREAM_BUFFER_RAVAIL(fp)
#if defined(_LIBIO_H) || defined(_IO_STDIO_H)
#define READYCC(fp) (fp->_IO_read_end - fp->_IO_read_ptr)
#define READYCC(fp) (fp->_egptr - fp->_gptr)
#if defined(__bsdi__) \
|| defined(__FreeBSD__) \