can't you just #ifndef around the defn in config.h?
Martin Buchholz wrote:
>>>>> "Vin" == Vin Shelton
<acs(a)xemacs.org> writes:
Vin> I recently installed XFree86-4.01 (from a contributed Mandrake RPM),
Vin> and I found I could not configure 21.2 from the CVS sources, because
Vin> configure detects that:
Vin> #define _XOPEN_SOURCE 500
Vin> should be defined in confdefs.h, and xmkmf has the following defines:
Vin> -D_POSIX_SOURCE -D_XOPEN_SOURCE
Vin> this causes confdefs.h to have both:
Vin> #define _XOPEN_SOURCE 500
Vin> ...
Vin> #define _XOPEN_SOURCE 1
Vin> This, in turn, causes the search for X11/Intrinsic.h to fail because
Vin> gcc emits the following errors:
Vin> confdefs.h:67: warning: `_XOPEN_SOURCE' redefined
Vin> confdefs.h:25: warning: this is the location of the previous definition
Those just look like warnings to me. Shouldn't everything just work
albeit with warnings every compile?
Vin> I have worked around the problem for the moment by changing the
Vin> definition in xmkmf to -D_XOPEN_SOURCE=500, but this problem probably
Vin> needs to be fixed. Martin, what's the best way to fix this?
I'm not sure. The easiest fix is to explicitly exclude XOPEN_SOURCE
from the list of symbols controlled by xmkmf. Or change any
#define-ition of _XOPEN_SOURCE to #define _XOPEN_SOURCE 500 (this
value was chosen by me because X/Open recommends it!). Unfortunately,
we can't explicitly #undef _XOPEN_SOURCE in config.h before defining it.
It has long been my opinion that xmkmf has no business defining
symbols like _XOPEN_SOURCE and _BSD, etc... Those symbols are
assertions about the APPLICATION's source code.
I will get xfree86 4.0.1 and try to build XEmacs with it.
Martin
--
Ben
In order to save my hands, I am cutting back on my mail. I also write
as succinctly as possible -- please don't be offended. If you send me
mail, you _will_ get a response, but please be patient, especially for
XEmacs-related mail. If you need an immediate response and it is not
apparent in your message, please say so. Thanks for your understanding.
See also
http://www.666.com/ben/chronic-pain/