Bug 8902 - xserver/include/dix-config.h:415:1: warning: "X_BYTE_ORDER" redefined
Summary: xserver/include/dix-config.h:415:1: warning: "X_BYTE_ORDER" redefined
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: 7.1 (2006.05)
Hardware: PowerPC Mac OS X (All)
: high normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-05 13:50 UTC by Peter Dyballa
Modified: 2007-03-11 13:55 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Peter Dyballa 2006-11-05 13:50:03 UTC
Line #414 of xserver/include/dix-config.h.in is:

	#undef X_BYTE_ORDER

which gets erroneously transformed to line #415 in xserver/include/dix-config.h:

	#define X_BYTE_ORDER X_BIG_ENDIAN

which leads to the error above, because /usr/X11R7/include/X11/Xarch.h has already in line #120:

	#define X_BYTE_ORDER BYTE_ORDER

GCC 4.0.1
Mac OS X 10.4.8
Release 7.1.99.2
Comment 1 Daniel Stone 2006-11-05 15:46:25 UTC
the transformation is not at all erroneous, it's entirely intentional.  Xarch.h
safeguards by checking if X_BYTE_ORDER is already defined, and doesn't redefine
if so.  dix-config.h should always be included by any other header, so which
file is it that includes dix-config.h after Xarch.h?
Comment 2 Peter Dyballa 2006-11-05 16:07:51 UTC
This is the sequence of warnings when compiling miext/rootless/safeAlpha/safeAlphaWindow.c:

In file included from ./../rootlessCommon.h:32,
                 from safeAlphaWindow.c:37:
../../../include/dix-config.h:415:1: warning: "X_BYTE_ORDER" redefined
In file included from ../../../include/pixmapstr.h:51,
                 from ../../../fb/fb.h:31,
                 from safeAlphaWindow.c:35:
/usr/X11R7/include/X11/Xarch.h:120:1: warning: this is the location of the previous definition


The original C file produces two other errors:

In file included from safeAlphaWindow.c:37:
./../rootlessCommon.h:99: error: parse error before 'SetShapeProcPtr'
./../rootlessCommon.h:99: warning: no semicolon at end of struct or union
./../rootlessCommon.h:111: error: parse error before ':' token
./../rootlessCommon.h:112: error: parse error before ':' token
./../rootlessCommon.h:113: error: parse error before ':' token
./../rootlessCommon.h:114: warning: type defaults to 'int' in declaration of 'RootlessScreenRec'
./../rootlessCommon.h:114: warning: type defaults to 'int' in declaration of 'RootlessScreenPtr'
./../rootlessCommon.h:114: warning: data definition has no type or storage class

When I add a patch from another Mac OS X user

34a35,38
> 
> #ifdef HAVE_DIX_CONFIG_H
> #include <dix-config.h>
> #endif

it seems to compile fine ... He recommends some more of these simple patches to files in the miext tree.

Comment 3 Daniel Stone 2007-02-27 01:34:25 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 4 Peter Dyballa 2007-03-11 13:55:36 UTC
Does not appear again.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.