Processed: Re: Bug#164917: xlibs-dev: moving away from Xmd.h arch dependencies
Processing commands for [EMAIL PROTECTED]: tags 164917 + wontfix Bug#164917: xlibs-dev: moving away from Xmd.h arch dependencies Tags were: moreinfo patch upstream Tags added: wontfix thanks Stopping processing here. Please contact me if you need assistance. Debian bug tracking system administrator (administrator, Debian Bugs database) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#164917: xlibs-dev: moving away from Xmd.h arch dependencies
Here is a patch that includes the move toward arch independence and includes a major cleanup of the preprocessor directives in Xmd.h. It converts all #ifdef to #if defined(symbol) and #ifndef to #if !defined(symbol) except for the header test at the top. Warren --- /usr/include/X11/Xmd.h 2002-10-08 01:05:41.0 -0500 +++ Xmd2.h 2002-10-15 23:28:16.0 -0500 @@ -55,20 +55,24 @@ /* * Special per-machine configuration flags. */ -#ifdef CRAY -#define WORD64 /* 64-bit architecture */ +#if !defined(WORD64) defined(CRAY) +# define WORD64/* 64-bit architecture */ #endif -#if defined(__alpha) || defined(__alpha__) || \ + +#if !defined(LONG64) +# if defined(__alpha) || defined(__alpha__) || \ defined(__ia64__) || defined(ia64) || \ defined(__sparc64__) || \ defined(__s390x__) || \ (defined(__hppa__) defined(__LP64__)) -#define LONG64 /* 32/64-bit architecture */ -#endif -#ifdef __sgi -#if (_MIPS_SZLONG == 64) -#define LONG64 +# define LONG64 /* 32/64-bit architecture */ +# endif #endif + +#if !defined(LONG64) defined(__sgi) +# if (_MIPS_SZLONG == 64) +# define LONG64 +# endif #endif /* @@ -76,7 +80,7 @@ * on a 32-bit machine and must coorespond to the protocol. */ #ifdef WORD64 -#define MUSTCOPY +# define MUSTCOPY #endif /* WORD64 */ @@ -95,10 +99,10 @@ * expand correctly before the concatenation, rather than afterward. */ #if ((defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)) !defined(UNIXCPP)) || defined(ANSICPP) -#define _SIZEOF(x) sz_##x -#define SIZEOF(x) _SIZEOF(x) +# define _SIZEOF(x) sz_##x +# define SIZEOF(x) _SIZEOF(x) #else -#define SIZEOF(x) sz_/**/x +# define SIZEOF(x) sz_/**/x #endif /* if ANSI C compiler else not */ /* @@ -106,32 +110,32 @@ * need them. Note that bitfields are not guarranteed to be signed * (or even unsigned) according to ANSI C. */ -#ifdef WORD64 +#if defined(WORD64) typedef long INT64; typedef unsigned long CARD64; -#define B32 :32 -#define B16 :16 -#ifdef UNSIGNEDBITFIELDS +# define B32 :32 +# define B16 :16 +# if defined(UNSIGNEDBITFIELDS) typedef unsigned int INT32; typedef unsigned int INT16; -#else -#ifdef __STDC__ +# else +# if defined(__STDC__) typedef signed int INT32; typedef signed int INT16; -#else +# else typedef int INT32; typedef int INT16; -#endif -#endif +# endif +# endif #else -#define B32 -#define B16 -#ifdef LONG64 +# define B32 +# define B16 +# if defined(LONG64) typedef long INT64; typedef int INT32; -#else +# else typedef long INT32; -#endif +# endif typedef short INT16; #endif @@ -141,7 +145,7 @@ typedef char INT8; #endif -#ifdef LONG64 +#if defined(LONG64) typedef unsigned long CARD64; typedef unsigned int CARD32; #else @@ -153,7 +157,7 @@ typedef CARD32 BITS32; typedef CARD16 BITS16; -#ifndef __EMX__ +#if !defined(__EMX__) typedef CARD8 BYTE; typedef CARD8 BOOL; #else /* __EMX__ */ @@ -161,33 +165,33 @@ * This is bad style, but the central include file os2.h declares them * as well */ -#define BYTE CARD8 -#define BOOL CARD8 +# define BYTE CARD8 +# define BOOL CARD8 #endif /* __EMX__ */ /* * definitions for sign-extending bitfields on 64-bit architectures */ #if defined(WORD64) defined(UNSIGNEDBITFIELDS) -#define cvtINT8toInt(val) (((val) 0x0080) ? ((val) | 0xff00) : (val)) -#define cvtINT16toInt(val) (((val) 0x8000) ? ((val) | 0x) : (val)) -#define cvtINT32toInt(val) (((val) 0x8000) ? ((val) | 0x) : (val)) -#define cvtINT8toShort(val) cvtINT8toInt(val) -#define cvtINT16toShort(val) cvtINT16toInt(val) -#define cvtINT32toShort(val) cvtINT32toInt(val) -#define cvtINT8toLong(val) cvtINT8toInt(val) -#define cvtINT16toLong(val) cvtINT16toInt(val) -#define cvtINT32toLong(val) cvtINT32toInt(val) -#else -#define cvtINT8toInt(val) (val) -#define cvtINT16toInt(val) (val) -#define cvtINT32toInt(val) (val) -#define cvtINT8toShort(val) (val) -#define cvtINT16toShort(val) (val) -#define cvtINT32toShort(val) (val) -#define cvtINT8toLong(val) (val) -#define cvtINT16toLong(val) (val) -#define cvtINT32toLong(val) (val) +# define cvtINT8toInt(val) (((val) 0x0080) ? ((val) | 0xff00) : (val)) +# define cvtINT16toInt(val) (((val) 0x8000) ? ((val) | 0x) : (val)) +# define cvtINT32toInt(val) (((val) 0x8000) ? ((val) | 0x) : (val)) +# define cvtINT8toShort(val) cvtINT8toInt(val) +# define cvtINT16toShort(val) cvtINT16toInt(val) +# define cvtINT32toShort(val) cvtINT32toInt(val) +# define cvtINT8toLong(val) cvtINT8toInt(val) +# define cvtINT16toLong(val) cvtINT16toInt(val) +# define cvtINT32toLong(val) cvtINT32toInt(val) +#else +# define cvtINT8toInt(val) (val) +# define cvtINT16toInt(val) (val) +# define
Bug#164917: xlibs-dev: moving away from Xmd.h arch dependencies
Package: xlibs-dev Version: 4.2.1-2 Severity: wishlist Tags: upstream patch This patch is an effort to start moving X into a more architecture agnostic source code. I am going to join the xpert list and see if why they don't use exact integer types. This may kill the need for most or all of the architecture dependencies in Xmd.h --- /usr/include/X11/Xmd.h 2002-10-08 01:05:41.0 -0500 +++ includes/Xmd.h 2002-10-13 22:54:46.0 -0500 @@ -55,9 +55,11 @@ /* * Special per-machine configuration flags. */ -#ifdef CRAY +#if !defined(WORD64) defined(CRAY) #define WORD64 /* 64-bit architecture */ #endif + +#if !defined(LONG64) #if defined(__alpha) || defined(__alpha__) || \ defined(__ia64__) || defined(ia64) || \ defined(__sparc64__) || \ @@ -65,7 +67,9 @@ (defined(__hppa__) defined(__LP64__)) #define LONG64 /* 32/64-bit architecture */ #endif -#ifdef __sgi +#endif + +#if !defined(LONG64) defined(__sgi) #if (_MIPS_SZLONG == 64) #define LONG64 #endif -- System Information: Debian Release: testing/unstable Architecture: i386 Kernel: Linux braindead 2.5.42acpidebug #1 SMP Mon Oct 14 20:29:43 CDT 2002 i686 Locale: LANG=C, LC_CTYPE=C Versions of packages xlibs-dev depends on: ii libc6-dev 2.2.5-15 GNU C Library: Development Librari ii xlibs 4.2.1-2X Window System client libraries -- no debconf information
Processed: Re: Bug#164917: xlibs-dev: moving away from Xmd.h arch dependencies
Processing commands for [EMAIL PROTECTED]: tag 164917 + moreinfo Bug#164917: xlibs-dev: moving away from Xmd.h arch dependencies Tags added: moreinfo thanks Stopping processing here. Please contact me if you need assistance. Debian bug tracking system administrator (administrator, Debian Bugs database)
Bug#164917: xlibs-dev: moving away from Xmd.h arch dependencies
tag 164917 + moreinfo thanks On Tue, Oct 15, 2002 at 07:41:43PM -0500, Warren Turkal wrote: This patch is an effort to start moving X into a more architecture agnostic source code. I am going to join the xpert list and see if why they don't use exact integer types. This may kill the need for most or all of the architecture dependencies in Xmd.h I'm going to hold off on appyling this until I know whether or not upstream thinks it's a good idea. -- G. Branden Robinson|It was a typical net.exercise -- a Debian GNU/Linux |screaming mob pounding on a greasy [EMAIL PROTECTED] |spot on the pavement, where used to http://people.debian.org/~branden/ |lie the carcass of a dead horse. pgpnKUxDvAJ9A.pgp Description: PGP signature
Bug#164917: xlibs-dev: moving away from Xmd.h arch dependencies
Package: xlibs-dev Version: 4.2.1-2 Severity: wishlist Tags: upstream patch This patch is an effort to start moving X into a more architecture agnostic source code. I am going to join the xpert list and see if why they don't use exact integer types. This may kill the need for most or all of the architecture dependencies in Xmd.h --- /usr/include/X11/Xmd.h 2002-10-08 01:05:41.0 -0500 +++ includes/Xmd.h 2002-10-13 22:54:46.0 -0500 @@ -55,9 +55,11 @@ /* * Special per-machine configuration flags. */ -#ifdef CRAY +#if !defined(WORD64) defined(CRAY) #define WORD64 /* 64-bit architecture */ #endif + +#if !defined(LONG64) #if defined(__alpha) || defined(__alpha__) || \ defined(__ia64__) || defined(ia64) || \ defined(__sparc64__) || \ @@ -65,7 +67,9 @@ (defined(__hppa__) defined(__LP64__)) #define LONG64 /* 32/64-bit architecture */ #endif -#ifdef __sgi +#endif + +#if !defined(LONG64) defined(__sgi) #if (_MIPS_SZLONG == 64) #define LONG64 #endif -- System Information: Debian Release: testing/unstable Architecture: i386 Kernel: Linux braindead 2.5.42acpidebug #1 SMP Mon Oct 14 20:29:43 CDT 2002 i686 Locale: LANG=C, LC_CTYPE=C Versions of packages xlibs-dev depends on: ii libc6-dev 2.2.5-15 GNU C Library: Development Librari ii xlibs 4.2.1-2X Window System client libraries -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Processed: Re: Bug#164917: xlibs-dev: moving away from Xmd.h arch dependencies
Processing commands for [EMAIL PROTECTED]: tag 164917 + moreinfo Bug#164917: xlibs-dev: moving away from Xmd.h arch dependencies Tags added: moreinfo thanks Stopping processing here. Please contact me if you need assistance. Debian bug tracking system administrator (administrator, Debian Bugs database) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#164917: xlibs-dev: moving away from Xmd.h arch dependencies
tag 164917 + moreinfo thanks On Tue, Oct 15, 2002 at 07:41:43PM -0500, Warren Turkal wrote: This patch is an effort to start moving X into a more architecture agnostic source code. I am going to join the xpert list and see if why they don't use exact integer types. This may kill the need for most or all of the architecture dependencies in Xmd.h I'm going to hold off on appyling this until I know whether or not upstream thinks it's a good idea. -- G. Branden Robinson|It was a typical net.exercise -- a Debian GNU/Linux |screaming mob pounding on a greasy [EMAIL PROTECTED] |spot on the pavement, where used to http://people.debian.org/~branden/ |lie the carcass of a dead horse. msg04190/pgp0.pgp Description: PGP signature