bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stdint vs cycle-check.h


From: Mark D. Baushke
Subject: Re: stdint vs cycle-check.h
Date: Tue, 20 Jun 2006 15:43:15 -0700

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Paul Eggert <address@hidden> writes:

> "Mark D. Baushke" <address@hidden> writes:
> 
> > The HAVE_STDINT_H is defined, even though it is useless and there is an
> > stdint.h which is generated and includes the useless SGI version and
> > generates warnings for everything because of the include of <inttypes.h>
> 
> Ah, OK, so the problem is in the combination of the stdint module and
> the cycle-check module.

Yes. Another way to handle this would be to introduce a
HAVE_GENERATED_STDINT_H macro produced by the stdint.m4 module and let
cycle-check and others use something like this:

#if defined(HAVE_STDINT_H) || defined (HAVE_GENERATED_STDINT_H)
# include <stdint.h>
#endif

> One possible workaround is to not use the stdint module until it is
> more stable.  Would that do?

Actually, the stdint module as it exists fixes a number of problems on
the other platforms... I have an ugly hack right now wherein I have
mangled the Makefile.am for the windows-NT platform to ignore the
$(HAVE_STDINT_H) substitution and instead always substitute a 0. Of
course, this is fragile and easily broken.

I suspect that something as simple as altering the stdint.m4 existing
code:

  other_includes='
/* Get those types that are already defined in other system include files.  */
#if defined(__FreeBSD__) && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)
# include <sys/inttypes.h>
#endif
#if defined(__OpenBSD__)
# include <sys/types.h>
# if HAVE_INTTYPES_H
#  include FULL_PATH_INTTYPES_H
# endif
#endif
#if defined(__linux__) && HAVE_SYS_BITYPES_H
# include <sys/bitypes.h>
#endif
#if defined(__sun) && HAVE_SYS_INTTYPES_H
# include <sys/inttypes.h>
#endif
#if (defined(__hpux) || defined(_AIX)) && HAVE_INTTYPES_H
# include FULL_PATH_INTTYPES_H
#endif
#if HAVE_STDINT_H
# include FULL_PATH_STDINT_H
#endif
'
to use this in the stdint.m4 as an alternative:

  other_includes='
/* Get those types that are already defined in other system include files.  */
# include <sys/types.h>
#if HAVE_SYS_INTTYPES_H
# include <sys/inttypes.h>
#endif

#if HAVE_INTTYPES_H
# ifdef FULL_PATH_INTTYPES_H
#  include FULL_PATH_INTTYPES_H
# endif
#endif

#if HAVE_SYS_BITYPES_H
# include <sys/bitypes.h>
#endif

#if HAVE_INTTYPES_H
# ifdef FULL_PATH_INTTYPES_H
#  include FULL_PATH_INTTYPES_H
# endif
#endif

#if HAVE_STDINT_H
# ifdef FULL_PATH_STDINT_H
#  include FULL_PATH_STDINT_H
# endif
#endif
'

and similar code in the generated stdint.h file, would be sufficient to
make things work... in other words, leave out all of the hacks as to
which OS may or may not define those files and just test for them.

This would allow the typedefs and macros that stdint.h needs to be
properly picked up and NOT duplicated in the generated file.

> Another possibility is to use CVS Autoconf; it should try to put the
> SGI compiler into C99 mode.  Would that suffice?

Right now the SGI CVS is building, just throwing a LARGE number of
warnings that will be concerning to the users. I suppose having the SGI
box use CC=c99 might fix things too, but I don't have access to such a
box directly (Larry does).

        -- Mark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (FreeBSD)

iD8DBQFEmHoCCg7APGsDnFERAlUvAKDG4GtbxlwAIYUNd2A31XH2/Bh5JgCfTjqv
gZRwABorkgFYKnzQhMlqc8E=
=8U53
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]