use __extension__ for long long on gcc >= 2.8 and egcs, and provide a

* configure.in: use __extension__ for long long on gcc >= 2.8 and
egcs, and provide a G_GINT64_CONSTANT wrapper so -ansi -pedantic
compiles clean.

* glib.h: make the endian x86 asm __const__ so the compiler can do
better optimizations. Also remove the cc clobber, these shouldn't
be changing condition codes. Ditch some redundant casts. Add an
optimization for 64-bit endian conversions in x86. Use constant
wrapper for the generic method.

* testglib.c: use constant wrappers for 64-bit constants

-Yosh
This commit is contained in:
Manish Singh
1998-11-11 01:26:10 +00:00
parent 59f6876ded
commit 11376df686
13 changed files with 271 additions and 78 deletions

View File

@@ -324,7 +324,8 @@ main (int argc,
guint16 gu16t1 = 0x44afU, gu16t2 = 0xaf44U;
guint32 gu32t1 = 0x02a7f109U, gu32t2 = 0x09f1a702U;
#ifdef G_HAVE_GINT64
guint64 gu64t1 = 0x1d636b02300a7aa7U, gu64t2 = 0xa77a0a30026b631dU;
guint64 gu64t1 = G_GINT64_CONSTANT(0x1d636b02300a7aa7U),
gu64t2 = G_GINT64_CONSTANT(0xa77a0a30026b631dU);
#endif
g_print ("TestGLib v%u.%u.%u (i:%u b:%u)\n",