public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: rehsack@liwing.de
To: gcc-gnats@gcc.gnu.org
Subject: other/10390: conflicting declarations in stdio.h
Date: Sat, 12 Apr 2003 23:46:00 -0000	[thread overview]
Message-ID: <20030412233638.30186.qmail@sources.redhat.com> (raw)


>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:


                 reply	other threads:[~2003-04-12 23:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030412233638.30186.qmail@sources.redhat.com \
    --to=rehsack@liwing.de \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).