patches for proto, libs and apps on BSD systems

Alan Coopersmith Alan.Coopersmith at Sun.COM
Tue Jul 26 09:46:43 EST 2005


Matthieu Herrb wrote:
> For other systems (Linux, SVR4) there are also quite a lot of #ifdef in 
> the source. The only difference is that those macros are cpp builtins on 
> those systems. Iirc, the CSRG_BASED macro was invented by X.Org for 
> X11R6 to replace 'defined(__bsdi__) || defined(__FreeBSD__) || 
> defined(__NetBSD__)' constructs in XFree86 2.1.1.

Actually, SVR4 is also an Imake creation (at least on Solaris) - cpp
defines __SVR4 only, so I added code a while ago to Xosdefs.h to set it
(before modularization actually, since this also broke non-Imake
  configured programs, like Mozilla).   Not sure if this is global enough
for your needs, but it may be worth trying.

#ifdef sun
/* Imake configs define SVR4 on Solaris, but cc & gcc only define __SVR4
  * This check allows non-Imake configured programs to build correctly.
  */
#if defined(__SVR4) && !defined(SVR4)
#define SVR4
#endif


-- 
	-Alan Coopersmith-           alan.coopersmith at sun.com
	 Sun Microsystems, Inc. - X Window System Engineering


More information about the xorg-modular mailing list