This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libf2c/4826: Build error for 3.0.2 on Tru64 Unix 5.1A



>Number:         4826
>Category:       libf2c
>Synopsis:       Build error for 3.0.2 on Tru64 Unix 5.1A
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 07 10:46:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        3.0.2
>Organization:
University of Washington
>Environment:
System: OSF1 sunny.atmos.washington.edu V5.1 1885 alpha
Architecture: alpha
Machine: alpha
	
host: alphaev6-dec-osf5.1
build: alphaev6-dec-osf5.1
target: alphaev6-dec-osf5.1
configured with: /home/disk/damp_local/src/gcc-3.0.2/configure 
>Description:
When building gcc with:

make CFLAGS='-O' LIBCFLAGS='-g -O2' LIBCXXFLAGS='-g -O2 -fno-implicit-templates' bootstrap

I get the following error when compiling libf2c


/usr/local/src/gcc-3.0.2-alpha/gcc/xgcc -B/usr/local/src/gcc-3.0.2-alpha/gcc/ -B/usr/local/alphaev6-dec-osf5.1/bin/ -B/usr/local/alphaev6-dec-osf5.1/lib/ -isystem /usr/local/alphaev6-dec-osf5.1/include -c -DSkip_f2c_Undefs -DAllow_TYQUAD -I. -I/home/disk/damp_local/src/gcc-3.0.2/libf2c/libI77 -I.. -I/home/disk/damp_local/src/gcc-3.0.2/libf2c/libI77/..  -DHAVE_CONFIG_H -O -mieee /home/disk/damp_local/src/gcc-3.0.2/libf2c/libI77/backspace.c
In file included from /home/disk/damp_local/src/gcc-3.0.2/libf2c/libI77/fio.h:1,
                 from /home/disk/damp_local/src/gcc-3.0.2/libf2c/libI77/backspace.c:4:
/usr/local/src/gcc-3.0.2-alpha/gcc/include/stdio.h:241: parse error before "__va_list"
/usr/local/src/gcc-3.0.2-alpha/gcc/include/stdio.h:242: parse error before "__va_list"
/usr/local/src/gcc-3.0.2-alpha/gcc/include/stdio.h:243: parse error before "__va_list"
gmake[3]: *** [backspace.o] Error 1
gmake[3]: Leaving directory `/usr/local/src/gcc-3.0.2-alpha/alphaev6-dec-osf5.1/libf2c/libI77'
gmake[2]: *** [i77] Error 2
gmake[2]: Leaving directory `/usr/local/src/gcc-3.0.2-alpha/alphaev6-dec-osf5.1/libf2c'
gmake[1]: *** [all-target-libf2c] Error 2
gmake[1]: Leaving directory `/usr/local/src/gcc-3.0.2-alpha'
gmake: *** [bootstrap] Error 2

Here is /usr/local/src/gcc-3.0.2-alpha/gcc/include/stdio.h:

/*  DO NOT EDIT THIS FILE.

    It has been auto-edited by fixincludes from:

	"/usr/include/stdio.h"

    This had to be done to correct non-standard usages in the
    original, manufacturer supplied header file.  */

#ifndef FIXINC_STDIO_STDARG_H_CHECK
#define FIXINC_STDIO_STDARG_H_CHECK 1

#define __need___va_list
#include <stdarg.h>
/*
 * *****************************************************************
 * *                                                               *
 * *    Copyright Compaq Computer Corporation, 2001                *
 * *                                                               *
 * *   The software contained on this media  is  proprietary  to   *
 * *   and  embodies  the  confidential  technology  of  Compaq    *
 * *   Computer Corporation.  Possession, use,  duplication  or    *
 * *   dissemination of the software and media is authorized only  *
 * *   pursuant to a valid written license from Compaq Computer    *
 * *   Corporation.                                                *
 * *                                                               *
 * *   RESTRICTED RIGHTS LEGEND   Use, duplication, or disclosure  *
 * *   by the U.S. Government is subject to restrictions  as  set  *
 * *   forth in Subparagraph (c)(1)(ii)  of  DFARS  252.227-7013,  *
 * *   or  in  FAR 52.227-19, as applicable.                       *
 * *                                                               *
 * *****************************************************************
 */
/*
 * HISTORY
 */
/*	
 *	@(#)$RCSfile: stdio.h,v $ $Revision: 4.2.36.1 $ (DEC) $Date: 2000/11/30 22:06:20 $
 */ 
/*
 * (c) Copyright 1990, OPEN SOFTWARE FOUNDATION, INC.
 * ALL RIGHTS RESERVED
 */
/*
 * OSF/1 Release 1.0
 */
/*
 * COMPONENT_NAME: stdio.h
 *                                                                    
 * ORIGIN: IBM
 *
 * Copyright International Business Machines Corp. 1985, 1988
 * All Rights Reserved
 * Licensed Material - Property of IBM
 *
 * stdio.h  1.40  com/inc,3.1,9021 5/12/90 06:54:44
 */                                                                   

#ifndef _STDIO_H_
#define _STDIO_H_

#include <standards.h>

#ifdef __cplusplus
extern "C" {
#endif

/*
 *
 *      The ANSI and POSIX standards require that certain values be in stdio.h.
 *      It also requires that if _ANSI_C_SOURCE is defined or if 
 *      _POSIX_C_SOURCE is defined >= 1, then ONLY those values are present. 
 *      This header includes all the ANSI and POSIX required entries.
 *
 */

#ifdef _ANSI_C_SOURCE

/*
 *      The following definitions are included in <sys/types.h>.  They
 *      are also included here to comply with ANSI standards.
 */

#ifndef NULL
#define NULL    0L
#endif

#ifndef _SIZE_T
#define _SIZE_T
typedef unsigned long   size_t;
#endif


#ifndef _FPOS_T
#define _FPOS_T
#if (_XOPEN_SOURCE >= 500)

typedef struct {

  void *_mbstate;
  long _fpos;
} fpos_t;

#else

typedef long fpos_t;

#endif
#endif


/*
 *      The definition of TMP_MAX is included in <sys/limits.h>.  It is
 *      also defined here to comply with ANSI standards.
 */

#ifndef TMP_MAX
#define TMP_MAX         16384
#endif

/*
 * Maximum fopens per process - OBSOLETE, sysconf() interface should be
 * used.
 */
#define FOPEN_MAX 	64

#define FILENAME_MAX 	255
#define BUFSIZ		8192
#define _P_tmpdir       "/tmp/"
#define L_tmpnam	(sizeof(_P_tmpdir) + 15)

/*
 * _IOLBF means that a file's output will be buffered line by line
 * In addition to being flags, _IONBF, _IOLBF and _IOFBF are possible
 * values for "type" in setvbuf.
 */
#define _IOFBF		0000
#define _IOLBF		0200
#define _IONBF		0004


#ifndef EOF
#define EOF		(-1)
#endif

#include <sys/seek.h>

typedef struct {
	int	_cnt;
	unsigned int	_flag2;
 unsigned char	*_ptr;
	unsigned char	*_base;
	int	_bufsiz;
	short	_flag;
	short	_file;

#ifndef	__alpha
	void	*_unused;
#endif	/* __alpha */
	char	*__newbase;
	void	*_lock;			/* lock for thread safe library (or unused2) */
	unsigned char	*_bufendp;
} FILE;

extern FILE     _iob[];

#define _IOEOF		0020
#define _IOERR		0040

#define stdin           (&_iob[0])
#define stdout          (&_iob[1])
#define stderr          (&_iob[2])

#ifdef _NONSTD_TYPES
extern int     fread();
extern int     fwrite();
#else
extern size_t	fread __((void *, size_t, size_t, FILE *));
extern size_t	fwrite __((const void *, size_t, size_t, FILE *));
#endif  /* _NONSTD_TYPES */

extern int	_flsbuf __((int, FILE *));
extern int	_filbuf __((FILE *));
extern int 	ferror __((FILE *));
extern int 	feof __((FILE *));
extern void 	clearerr __((FILE *));
extern int 	putchar __((int));
extern int 	getchar __((void));
extern int 	putc __((int, FILE *));
extern int 	getc __((FILE *));
extern int	remove __((const char *));
extern int	rename __((const char *, const char *));
extern FILE 	*tmpfile __((void));
extern char 	*tmpnam __((char *));
extern int 	fclose __((FILE *));
extern int 	fflush __((FILE *));
extern FILE	*fopen __((const char *, const char *));
extern FILE 	*freopen __((const char *, const char *, FILE *));
extern void 	setbuf __((FILE *, char *));
extern int 	setvbuf __((FILE *, char *, int, size_t));
extern int	fprintf __I((FILE *, const char *, ...));
extern int	fscanf __((FILE *, const char *, ...));
extern int	printf __I((const char *, ...));
extern int	scanf __((const char *, ...));
extern int	sprintf __I((char *, const char *, ...));
extern int	sscanf __((const char *, const char *, ...));

#if defined(_OSF_SOURCE)||_XOPEN_SOURCE>=500 || (_ANSI_C_SOURCE>=19990L)
# if (_ANSI_C_SOURCE>=19990L) && !defined(_LIBC_POLLUTION_H_)
#  ifdef __DECC
#   pragma extern_prefix "_C"
#  else
/* These definitions are required for GNU or acc compiler use */
#   define snprintf(__a, __b, __c, __d) _Csnprintf(__a, __b, __c, __d)
#  endif
# endif  /* _ANSI_C_SOURCE */

extern int	__C99(snprintf) __((char *, size_t, const char*, ...));

# if (_ANSI_C_SOURCE>=19990L) && !defined(_LIBC_POLLUTION_H_) && defined(__DECC)
#  pragma extern_prefix ""
# endif  /* _ANSI_C_SOURCE */
#endif	/* _OSF_SOURCE||XSH5||_ANSI_C_SOURCE */

/*
 * Conditionalize __gnuc_va_list definition (see __not_va_list__.h)
 */
#ifdef _DUMMY_VA_LIST
# define __DUMMY_VA_LIST__	va_list
#else
# ifdef _XOPEN_SOURCE
#  include <va_list.h>
#  define __DUMMY_VA_LIST__	va_list
# else
#  define _HIDDEN_DUMMY_VA_LIST
#  include <va_list.h>
#  define __DUMMY_VA_LIST__	__va_list
# endif /* _XOPEN_SOURCE */
#endif /* _DUMMY_VA_LIST */

extern int  vfprintf __((FILE *, const char *, __DUMMY_VA_LIST__));
extern int  vprintf __((const char *, __DUMMY_VA_LIST__));
extern int  vsprintf __((char *, const char *, __DUMMY_VA_LIST__));
#if defined(_OSF_SOURCE)||_XOPEN_SOURCE>=500 || (_ANSI_C_SOURCE>=19990L)
# if (_ANSI_C_SOURCE>=19990L) && !defined(_LIBC_POLLUTION_H_)
#  ifdef __DECC
#   pragma extern_prefix "_C"
#  else
/* These definitions are required for GNU or acc compiler use */
#   define vsnprintf(__a, __b, __c, __d) _Cvsnprintf(__a, __b, __c, __d)
#  endif
# endif  /* _ANSI_C_SOURCE */

extern int	__C99(vsnprintf) __((char *, size_t, const char*, __DUMMY_VA_LIST__));

# if (_ANSI_C_SOURCE>=19990L) && !defined(_LIBC_POLLUTION_H_) && defined(__DECC)
#  pragma extern_prefix ""
# endif  /* _ANSI_C_SOURCE */
#endif	/* _OSF_SOURCE||XSH5||_ANSI_C_SOURCE */

extern int 	fgetc __((FILE *));
extern char 	*fgets __((char *, int, FILE *));
extern int 	fputc __((int, FILE *));
extern int 	fputs __((const char *, FILE *));
extern char 	*gets __((char *));
extern int 	puts __((const char *));
extern int	ungetc __((int, FILE *));
extern int 	fseek __((FILE *, long, int));

#if _XOPEN_SOURCE>=500
#include <sys/types.h>
extern int	fseeko __((FILE *, off_t, int));
extern off_t	ftello __((FILE *));

extern	int	ftrylockfile(FILE *);
extern	int	getc_unlocked(FILE *);
extern	int	getchar_unlocked(void);
extern	int	putc_unlocked(int, FILE *);
extern	int	putchar_unlocked(int);
#endif	 /* XSH5 */

#if (_XOPEN_SOURCE >=500) && !defined( _LIBC_POLLUTION_H_)
#ifdef __DECC
#pragma extern_prefix "_E"
#else
/* These definitions are required for GNU or acc compiler use */
#define fgetpos(__a, __b) _Efgetpos(__a, __b)
#define fsetpos(__a, __b) _Efsetpos(__a, __b)
#endif
#endif /* _XOPEN_SOURCE >=500 && !_LIBC_POLLUTION_H_ */

extern int	__R(fsetpos)	__((FILE *, const fpos_t *));
extern int	__R(fgetpos)	__((FILE *, fpos_t *));

#if defined(_XOPEN_SOURCE_EXTENDED) && !defined( _LIBC_POLLUTION_H_) && defined(__DECC)
#pragma extern_prefix ""
#endif /* _XOPEN_SOURCE_EXTENDED && !_LIBC_POLLUTION_H_ */

extern long	ftell __((FILE *));
extern void	rewind __((FILE *));
extern void 	perror __((const char *));
#if defined(_REENTRANT) || defined(_THREAD_SAFE) || (_XOPEN_SOURCE>=500)
extern void	flockfile __((FILE *));
extern void	funlockfile __((FILE *));
#ifdef	_OSF_SOURCE
extern int	fclose_unlocked __((FILE *));
extern int	fflush_unlocked __((FILE *));
extern size_t	fread_unlocked __((void *, size_t, size_t, FILE *));
extern int 	fseek_unlocked __((FILE *, long int, int));
extern size_t	fwrite_unlocked __((const void *, size_t, size_t, FILE *));
#endif	/* _OSF_SOURCE */
#endif	/* _REENTRANT || _THREAD_SAFE || XSH5 */


/* Define commonly used macros here.
 */
#define _GETC_UNLOCKED(p) \
		(--(p)->_cnt < 0 ? _filbuf(p) : (int) *(p)->_ptr++)

#define _PUTC_UNLOCKED(x, p) \
		(--(p)->_cnt < 0 ? \
			_flsbuf((unsigned char) (x), (p)) : \
			(int) (*(p)->_ptr++ = (unsigned char) (x)))

#define _CLEARERR_UNLOCKED(p)	((void) ((p)->_flag &= ~(_IOERR | _IOEOF)))
#define _FEOF_UNLOCKED(p)	((p)->_flag & _IOEOF)
#define _FERROR_UNLOCKED(p)	((p)->_flag & _IOERR)
#define _FILENO_UNLOCKED(p)	((p)->_file)

#ifdef _INLINE_INTRINSICS
#pragma __nostandard
#undef _GETC_UNLOCKED
#define _GETC_UNLOCKED(p) __CFE_getc(p)
static __inline int __CFE_getc( FILE *__f )
{
    int cnt = __f->_cnt - 1;
    unsigned char * ptr = __f->_ptr;
    int c;

    __f->_cnt = cnt;

    if (cnt >= 0) {
        c = *ptr;
        __f->_ptr = ptr + 1;
        return c;
    }
    else {
        return _filbuf(__f);
    }
}

#undef _PUTC_UNLOCKED
#define _PUTC_UNLOCKED(x, p) __CFE_putc(x, p)
static __inline int __CFE_putc( int __c, FILE *__f )
{
    int cnt = __f->_cnt - 1;
    unsigned char * ptr = __f->_ptr;

    __f->_cnt = cnt;

    if (cnt >= 0) {
        *ptr = __c;
        __f->_ptr = ptr + 1;
    } else {
        __c = _flsbuf((unsigned char) (__c),__f);
    }

    return __c;
}
#pragma __standard
#endif

#if defined(_REENTRANT) || defined(_THREAD_SAFE)

#ifdef _LIBC_POLLUTION_H_
#undef getc_unlocked
#undef getchar_unlocked
#undef getc_locked
#undef getchar_locked
#undef putc_unlocked
#undef putchar_unlocked
#undef putc_locked
#undef putchar_locked
#endif
#define getc_unlocked(p)	_GETC_UNLOCKED(p)
#define getchar_unlocked()	getc_unlocked(stdin)
#define getc_locked(p)		fgetc(p)
#define getchar_locked()	getc_locked(stdin)
#define putc_unlocked(x, p)	_PUTC_UNLOCKED(x, p)
#define putchar_unlocked(x)	putc_unlocked(x,stdout)
#define putc_locked(x, p)	fputc(x, p)
#define putchar_locked(x)	putc_locked(x,stdout)

/*
 * At this point, we know that either _REENTRANT or _THREAD_SAFE
 * have been set and we need to check to see if the user has
 * explicitly requested unlocked I/O.
 *
 * The default for getc and putc are locked for compatibility with 
 * POSIX P1003.4a
 * By defining _STDIO_UNLOCK_CHAR_IO before including this
 * file, the default action is changed to unlocked putc and getc.
 * A file lock can still be placed around a block of putc's or getc's
 * regardless of the locking mode, and invoking the locked or
 * unlocked version directly always overrides the default action.
 */

#if defined(_STDIO_UNLOCK_CHAR_IO) 
#define getc(p)			getc_unlocked(p)
#define putc(x, p)		putc_unlocked(x, p)
/*
 * if _STDIO_UNLOCK_CHAR_IO is not defined, these macros will not be defined
 * and become functions.
 */
#define clearerr(p)		clearerr_unlocked(p)
#define feof(p)			feof_unlocked(p)
#define ferror(p)		ferror_unlocked(p)

#else
#define getc(p)			getc_locked(p)
#define putc(x, p)		putc_locked(x, p)
#endif /* _STDIO_UNLOCK_CHAR_IO */

#define clearerr_unlocked(p)	_CLEARERR_UNLOCKED(p)
#define feof_unlocked(p)	_FEOF_UNLOCKED(p)
#define ferror_unlocked(p)	_FERROR_UNLOCKED(p)
#define fileno_unlocked(p)	_FILENO_UNLOCKED(p)

#else /* _REENTRANT || _THREAD_SAFE */

#define getc(p)			_GETC_UNLOCKED(p)
#define putc(x, p)		_PUTC_UNLOCKED(x, p)
#define clearerr(p)		_CLEARERR_UNLOCKED(p)
#define feof(p)			_FEOF_UNLOCKED(p)
#define ferror(p)		_FERROR_UNLOCKED(p)

#endif /* _REENTRANT || _THREAD_SAFE */

#define getchar()		getc(stdin)
#define putchar(x)		putc((x), stdout)
#endif /*_ANSI_C_SOURCE */


/*
 *	The following are values that have historically been in stdio.h.
 *
 *	They are a part of the POSIX defined stdio.h and therefore are
 *	included when _XOPEN_SOURCE is defined and when _POSIX_C_SOURCE
 *      is defined >= 1.
 *
 */

#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 1)
#include <sys/types.h>

#define L_ctermid	9

/* 
 * Value to determine the maximum number of bytes allowed in a username. 
 * This support is versioned to allow applications using the previous 
 * value to continue working without fear of overwriting buffer space.
 * The _O_L_cuserid is the value of L_cuserid prior to V5.0 to help
 * applications distinguish between the old and new value.
 */
#define _O_L_cuserid	9	
#if !defined(__V40_OBJ_COMPAT)
#define L_cuserid	64
#else
#define L_cuserid	9
#endif

extern int 	fileno __((FILE *));
extern FILE 	*fdopen __((int, const char *));

#ifndef _XOPEN_SOURCE
extern char *ctermid __((char *));
#endif

/* 
 * All this to define cuserid with prior object support
 */
#ifndef _LIBC_POLLUTION_H_
#if !defined(__V40_OBJ_COMPAT)
#ifdef __DECC
#pragma extern_prefix "_E"
#else
/* These definitions are required for GNU or acc compiler use */
#define cuserid(__a) _Ecuserid(__a)
#endif /* __DECC */
#endif /* __V40_OBJ_COMPAT */
#endif /* _LIBC_POLLUTION_H_ */

extern char *__V40_OC(cuserid) __((char *));

#if !defined(_LIBC_POLLUTION_H_) && !defined(__V40_OBJ_COMPAT) && defined(__DECC)
#pragma extern_prefix ""
#endif

#if !(defined(_REENTRANT) || defined(_THREAD_SAFE)) || defined(_STDIO_UNLOCK_CHAR_IO)
#ifdef _LIBC_POLLUTION_H_
#undef fileno
#endif
#define fileno(p)	_FILENO_UNLOCKED(p)
#endif	/* !(_REENTRANT || _THREAD_SAFE) || _STDIO_UNLOCK_CHAR_IO */

#endif /* _POSIX_C_SOURCE */


#ifdef _XOPEN_SOURCE

/*** To be withdrawn ***/
#include <getopt.h>			/* Also in unistd.h */
/***/

#define P_tmpdir	_P_tmpdir

extern char	*ctermid __((char *));
extern int 	getw __((FILE *));
extern int 	pclose __((FILE *));
extern int 	putw __((int, FILE*));
extern FILE 	*popen __((const char *, const char *));
extern char 	*tempnam __((const char*, const char*));

#endif /* _XOPEN_SOURCE */


#ifdef _OSF_SOURCE

#include <sys/limits.h>	/* limits.h not allowed by POSIX.1a.  Must be here */

/*
 * Maximum open files per process - OBSOLETE, sysconf() interface should 
 * be used
 */
#ifdef OPEN_MAX
#define _NFILE		OPEN_MAX
#else
#define _NFILE		64	/* should be a multiple of _NIOBRW */
#endif

/* buffer size for multi-character output to unbuffered files */
#define _SBFSIZ 8

#define _IOREAD		0001
#define _IOWRT		0002
#define _IOMYBUF	0010
#define _IOSTRG		0100
#define _IONOFD		_IOSTRG		/* strange or no file descriptor */
#define _IORW		0400
#define _IOUNGETC	01000
#define _IOINUSE	02000		/* new flag for _THREAD_SAFE */
#define _IONONSTD	04000
#define _IOCLOSE	010000
#define _IOWINIT	020000
#define _IOWSET		040000

#define _bufend(p)	((p)->_bufendp)
#define _bufsiz(p)	(_bufend(p) - (p)->_base)

extern void 	setbuffer __((FILE *, char*, int));
extern void 	setlinebuf __((FILE *));

#endif /* _OSF_SOURCE */

#ifndef	_LIBC_POLLUTION_H_
#ifdef _INTRINSICS
#pragma intrinsic(printf, fprintf,sprintf)

#ifdef _INLINE_INTRINSICS
#pragma __nostandard
static __inline int __CFE_print_puts( char *x )
{
 return( fputs( x, stdout  ));
}

static __inline int __CFE_print_putc( int x )
{
 putc( x, stdout );
 return( 1 );
}

static __inline int __CFE_print_putc_nl( int x )
{
 putc(x, stdout ); putc( '\n',stdout );
 return( 2 );
}

static __inline int __CFE_fprint_puts_nl( char *x, FILE *f )
{ 
 register int i;
 i = fputs( x, f ); 
 putc( '\n', f  ); 
 return( i+1 );
}

static __inline int __CFE_fprint_putc( int x, FILE *f )
{
 putc( x, f );
 return( 1 );
}

static __inline int __CFE_fprint_putc_nl( int x, FILE *f )
{
 putc( x,f ); putc( '\n', f );
 return(2);
}
#pragma __standard
#endif
#endif
#endif

#ifdef __cplusplus
}
#endif

#endif /* _STDIO_H_ */


#endif  /* FIXINC_STDIO_STDARG_H_CHECK */


>How-To-Repeat:
	Build gcc
>Fix:
	None known

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]