Thanks for clarifying the issue.

As you implicitly point out, GCC knows the type of INT64 and defines
the macro __INT64_TYPE__ .  The revised code can use that directly,
such as:

#if defined(_GLIBCXX_HAVE_INT64_T_LONG) \
    || defined(_GLIBCXX_HAVE_INT64_T_LONG_LONG)
   typedef __INT64_TYPE__   streamoff;
 #elif defined(_GLIBCXX_HAVE_INT64_T)
   typedef int64_t                     streamoff;
 #else
   typedef long long                 streamoff;
 #endif

Are there any additional issues not addressed by that approach, other
than possible further simplification?

Thanks, David

On Wed, Jan 6, 2021 at 6:45 PM Jakub Jelinek <ja...@redhat.com> wrote:
>
> On Thu, Jan 07, 2021 at 12:39:39AM +0100, Jakub Jelinek wrote:
> > We are talking past each other.
> >
> > Consider an OS that has in stdint.h
> > typedef long long int64_t;
>
> And, from grepping INT64_TYPE in config/* config/*/*
> it isn't just theoretic, Darwin and OpenBSD behave that way.
>
>         Jakub
>

Reply via email to