This is the mail archive of the gcc-prs@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]

other/10390: conflicting declarations in stdio.h


>Number:         10390
>Category:       other
>Synopsis:       conflicting declarations in stdio.h
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 12 23:46:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Jens Rehsack
>Release:        gcc-3.2.2
>Organization:
>Environment:
AIX aix 3 4 00FFFFFF4C00 (AIX 4.3.3)
>Description:
When I tried to build gnu sed on AIX 4.3.3, the configure script detects _LARGE_FILES=1 and _LARGE_FILE_API=1 had to be set to use large files.

stdio.h installed by gcc-3.2.2 into /usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.3.0/3.2.2/include checks both defines separately and declares both functions groups which are using fpos_t/fpos64_t: fgetpos and fgetpos64 in a manner which causes gcc invoked with
/usr/local/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.. \
-I../lib -I../intl -I.. \
-DLOCALEDIR=\"/usr/local/share/locale\" \
-g -pipe -O2 -mcpu=603e -MT fmt.o -MD -MP -MF \
".deps/fmt.Tpo" -c -o regex.o \
`test -f 'regex.c' || echo './'`regex.c

to fail with:
/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.3.0/3.2.2/include/stdio.h:448: conflicting types for `fgetpos64'
/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.3.0/3.2.2/include/stdio.h:288: previous declaration of `fgetpos64'
/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.3.0/3.2.2/include/stdio.h:451: conflicting types for `fseeko64'
/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.3.0/3.2.2/include/stdio.h:394: previous declaration of `fseeko64'
/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.3.0/3.2.2/include/stdio.h:452: conflicting types for `fsetpos64'
/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.3.0/3.2.2/include/stdio.h:290: previous declaration of `fsetpos64'
/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.3.0/3.2.2/include/stdio.h:453: conflicting types for `ftello64'
/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.3.0/3.2.2/include/stdio.h:395: previous declaration of `ftello64'

I created a patch which corrects the issue, but maybe not the problem, because I don't know why the author wants both _LARGE_FILES and _LARGE_FILE_API existing in concurrent manner.
>How-To-Repeat:

>Fix:
*** stdio.h.orig	Sat Apr 12 23:19:47 2003
--- stdio.h	Sat Apr 12 23:21:07 2003
***************
*** 90,96 ****
  #ifndef _FPOS_T
  #define	_FPOS_T
  
! #ifdef _LARGE_FILES
  typedef long long fpos_t;
  #else
  typedef long	fpos_t;
--- 90,96 ----
  #ifndef _FPOS_T
  #define	_FPOS_T
  
! #if defined(_LARGE_FILES) && !defined(_LARGE_FILE_API)
  typedef long long fpos_t;
  #else
  typedef long	fpos_t;
***************
*** 102,108 ****
  
  #endif /* _FPOS_T */
  
! #ifdef _LARGE_FILES
  #define fseeko fseeko64
  #define ftello ftello64
  #define fgetpos fgetpos64
--- 102,108 ----
  
  #endif /* _FPOS_T */
  
! #if defined(_LARGE_FILES) && !defined(_LARGE_FILE_API)
  #define fseeko fseeko64
  #define ftello ftello64
  #define fgetpos fgetpos64
>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]