Re: Compiling STk with gcc 2.7.0/ELF

From: Jin S. Choi <jsc_at_tabitha.atype.com>
Date: Wed, 5 Jul 1995 16:25:00 -0400

>>>>> "Carles" == Carles Perello <carlesp_at_cnm.es> writes:
In article <9507051905.AA06246_at_cnm.es> Carles Perello <carlesp_at_cnm.es> writes:


   Carles> Hi, I'm trying to compile STk 2.1.7 using gcc 2.7.0 to
   Carles> produce an ELF image. I do so because I had problems
   Carles> dynamically loading my own extensions using aout format +
   Carles> dld.

   Carles> When I do so the following problem arise compiling Src/port.c

   Carles> port.c: In function `STk_char_readyp': port.c:452: structure
   Carles> has no member named `_egptr' port.c:452: structure has no
   Carles> member named `_gptr' port.c:452: structure has no member
   Carles> named `_egptr' port.c:452: structure has no member named
   Carles> `_gptr'

   Carles> Seems nobody had this problem before. Could it be because of
   Carles> the new libc.so.5.0.9?

In the section of port.c that defines READ_DATA_PENDING, you need to add
the "defined (linux)" as below:

#ifdef _STDIO_USES_IOSTREAM /* GNU libc */
# if defined (_IO_STDIO_H) || defined (linux)
# define READ_DATA_PENDING(fp) (max(0,(fp)->_IO_read_end - (fp)->_IO_read_ptr))
# else
# define READ_DATA_PENDING(fp) (max(0,(fp)->_egptr - (fp)->_gptr))
# endif
#endif
#if (!defined (READ_DATA_PENDING)) && defined __SLBF
# define READ_DATA_PENDING(fp) (max(0,fp->_r))
#endif
#if !defined (READ_DATA_PENDING)
# define READ_DATA_PENDING(fp) (fp->_cnt)
#endif
Received on Wed Jul 05 1995 - 22:26:30 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST