[GRASS5] Error in trying to compile for SGI
Justin Hickey
jhickey at impact1.hpcc.nectec.or.th
Thu Jul 27 13:12:07 EDT 2000
Hello all
I am trying to compile a set of binaries for SGI and have found the following
error:
#################################################################
/usr/people/jhickey/grassCVS/grass/src/mapdev/v.rmdup/cmd
mkdir OBJ.mips-sgi-irix6.5
make -f OBJ.mips-sgi-irix6.5/make.rules
"rmdup.c", line 194: error(1565): struct "__file_s" has no field "_shortbuf"
while (match == 0 && Closet->dig_fp->_shortbuf[1]) /* try to upgrade in
5/2000 */
The actual code snippet is as follows:
/* commented following "while line" 5/2000:
* dig_fp->_cnt was once defined in _IO_FILE_ /usr/include/libio.h
* int _cnt; "number of characters in the buffer"
*
* -> but today?
*/
/* while (match == 0 && Closet->dig_fp->_cnt) */
#ifndef __CYGWIN__
while (match == 0 && Closet->dig_fp->_shortbuf[1]) /* try to upgrade in
5/2000 */
#else
while (match == 0 && Closet->dig_fp->_bf._size)
#endif
The comment says that dig_fp->_cnt is no longer defined. That may be true for
Linux, but not for Irix. It is still defined and worse, _shortbuf is not
defined.
The appropriate FILE struct on Irix is as follows
typedef struct /* needs to be binary-compatible with old versions */
#if (_SGIAPI && _NO_ANSIMODE) || defined(_LANGUAGE_C_PLUS_PLUS)
/*
* The __file_s struct tag is for backwards compat ONLY - it shouldn't be
* used in any new headers. We would have liked to not use it in C++ since
* it will change the name mangling of FILE *, but since it has already
* gone out that way, we must stick to it. The safest thing is to *always*
* define it for C++ (since a function that takes a FILE * as an argument
* will have this tag in its mangled name).
*/
__file_s
#endif
{
#if (_MIPS_SZLONG == 32)
int _cnt; /* number of available characters in buffer */
#endif
#if (_MIPS_SZLONG == 64)
long _cnt; /* number of available characters in buffer */
#endif
unsigned char *_ptr; /* next character from/to here in buffer */
unsigned char *_base; /* the buffer */
#if _MIPS_SIM == _ABI64
unsigned char _reserved[2]; /* MIPS ABI */
unsigned short _flag; /* the state of the stream */
unsigned int _file; /* UNIX System file descriptor */
#elif _MIPS_SIM == _ABIN32
unsigned char _flag; /* the state of the stream */
unsigned char _o_file; /* not used */
unsigned short _file; /* UNIX System file descriptor */
#else /* _MIPS_SIM == _ABIO32 */
unsigned char _flag; /* the state of the stream */
unsigned char _file; /* UNIX System file descriptor */
#endif
} FILE;
Anyone have any suggestions how to fix this? I have no idea at all.
--
Sincerely,
Jazzman (a.k.a. Justin Hickey) e-mail: jhickey at hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand
==================================================================
People who think they know everything are very irritating to those
of us who do. ---Anonymous
Jazz and Trek Rule!!!
==================================================================
----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'
More information about the grass-dev
mailing list