This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author JosephArmbruster
Recipients JosephArmbruster, christian.heimes
Date 2007-11-28.14:14:06
SpamBayes Score 0.21124934
Marked as misclassified No
Message-id <1196259247.47.0.175425290011.issue1512@psf.upfronthosting.co.za>
In-reply-to
Content
Question:  Is there any harm in removing this block from pyconfig.h?

#ifndef PY_LONG_LONG
#	define PY_LONG_LONG __int64
#	define PY_LLONG_MAX _I64_MAX
#	define PY_LLONG_MIN _I64_MIN
#	define PY_ULLONG_MAX _UI64_MAX
#endif

pyconfig.h contains this small snippet:

/* 64 bit ints are usually spelt __int64 unless compiler has overridden */
#define HAVE_LONG_LONG 1
#ifndef PY_LONG_LONG
#	define PY_LONG_LONG __int64
#	define PY_LLONG_MAX _I64_MAX
#	define PY_LLONG_MIN _I64_MIN
#	define PY_ULLONG_MAX _UI64_MAX
#endif


However, in pyport.h, I can see that PY_LONG_LONG may also be defined
here, except the tokens are slightly different:


#ifdef HAVE_LONG_LONG

	#ifndef PY_LONG_LONG
		#define PY_LONG_LONG long long
		
		#if defined(LLONG_MAX)
			/* If LLONG_MAX is defined in limits.h, use that. */
			#define PY_LLONG_MIN LLONG_MIN
			#define PY_LLONG_MAX LLONG_MAX
			#define PY_ULLONG_MAX ULLONG_MAX
		#elif defined(__LONG_LONG_MAX__)
			/* Otherwise, if GCC has a builtin define, use that. */
			#define PY_LLONG_MAX __LONG_LONG_MAX__
			#define PY_LLONG_MIN (-PY_LLONG_MAX-1)
			#define PY_ULLONG_MAX (__LONG_LONG_MAX__*2ULL + 1ULL)
		#else
			/* Otherwise, rely on two's complement. */
			#define PY_ULLONG_MAX (~0ULL)
			#define PY_LLONG_MAX  ((long long)(PY_ULLONG_MAX>>1))
			#define PY_LLONG_MIN (-PY_LLONG_MAX-1)
		#endif /* LLONG_MAX */
	#endif
#endif /* HAVE_LONG_LONG */
History
Date User Action Args
2007-11-28 14:14:07JosephArmbrustersetspambayes_score: 0.211249 -> 0.21124934
recipients: + JosephArmbruster, christian.heimes
2007-11-28 14:14:07JosephArmbrustersetspambayes_score: 0.211249 -> 0.211249
messageid: <1196259247.47.0.175425290011.issue1512@psf.upfronthosting.co.za>
2007-11-28 14:14:07JosephArmbrusterlinkissue1512 messages
2007-11-28 14:14:06JosephArmbrustercreate