<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 14-03-25 07:56 AM, Hans de Goede
wrote:<br>
</div>
<blockquote
cite="mid:1395748596-21056-2-git-send-email-hdegoede@redhat.com"
type="cite">
<pre wrap="">startx.cpp contains things like #if defined(__SCO__), and
$RAWCPPFLAGS contains -undef causing these to not get set.
Signed-off-by: Hans de Goede <a class="moz-txt-link-rfc2396E" href="mailto:hdegoede@redhat.com"><hdegoede@redhat.com></a>
---
cpprules.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpprules.in b/cpprules.in
index 0931bee..781676a 100644
--- a/cpprules.in
+++ b/cpprules.in
@@ -15,4 +15,4 @@ CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \
SUFFIXES = .cpp
.cpp:
- $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@
+ $(AM_V_GEN)$(RAWCPP) $(CPP_FILES_FLAGS) $< | $(CPP_SED_MAGIC) > $@
</pre>
</blockquote>
<br>
<ol>
<li>It looks like it has been this way for a very long time. Have
you investigated why it isn't a problem today?<br>
<br>
</li>
<li>This is going to change the xinitrc for Apple. How confident
are you that the patch will not create a problem?<br>
I found on the net
(<a class="moz-txt-link-freetext" href="http://arstechnica.com/civis/viewtopic.php?f=19&t=371721">http://arstechnica.com/civis/viewtopic.php?f=19&t=371721</a>) a
user posting his copy of xinitrc for Apple.<br>
<pre class="ip-ubbcode-code-pre">if [ -f "$sysresources" ]; then
xrdb -merge "$sysresources"
fi
</pre>
When removing -undef, my guess is that the command will be "<tt>XRDB
-nocpp -merge $sysresources</tt>". Right or wrong, I don't
know.<br>
<br>
</li>
<li>As for SCO, this OS is no longer supported, so we will never
know. Take a look at app/xdm/config/Xsession.cpp.<br>
<br>
</li>
<li>Aside from "undef", there is the option "traditional" that the
patch also throws away. It has to do with the treatment of
whitespace. Any idea on what happens to other platforms and/or
other non-gnu compilers?</li>
</ol>
<br>
The -undef flag was added in Sept 2005. Are you running into a
problem? There is a mystery to be resolved...<br>
<a class="moz-txt-link-freetext" href="http://cgit.freedesktop.org/xorg/util/macros/commit/?id=d690e4a9febd07988d149a967791c5629c17b258">http://cgit.freedesktop.org/xorg/util/macros/commit/?id=d690e4a9febd07988d149a967791c5629c17b258</a><br>
<br>
If these defines have always been useless, a bigger cleanup could be
done.<br>
<br>
For reference, this is how RAWCPPFLAGS get populated from
util/macros:<br>
<br>
<blockquote><tt># Check for flag to avoid builtin definitions -
assumes unix is predefined,</tt><tt><br>
</tt><tt># which is not the best choice for supporting other
OS'es, but covers most</tt><tt><br>
</tt><tt># of the ones we need for now.</tt><tt><br>
</tt><tt>AC_MSG_CHECKING([if $RAWCPP requires -undef])</tt><tt><br>
</tt><tt>AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix
?]])])</tt><tt><br>
</tt><tt>if test `${RAWCPP} < conftest.$ac_ext | grep -c
'unix'` -eq 1 ; then</tt><tt><br>
</tt><tt> AC_MSG_RESULT([no])</tt><tt><br>
</tt><tt>else</tt><tt><br>
</tt><tt> if test `${RAWCPP} -undef < conftest.$ac_ext |
grep -c 'unix'` -eq 1 ; then</tt><tt><br>
</tt><tt> RAWCPPFLAGS=-undef</tt><tt><br>
</tt><tt> AC_MSG_RESULT([yes])</tt><tt><br>
</tt><tt> # under Cygwin unix is still defined even with -undef</tt><tt><br>
</tt><tt> elif test `${RAWCPP} -undef -ansi <
conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then</tt><tt><br>
</tt><tt> RAWCPPFLAGS="-undef -ansi"</tt><tt><br>
</tt><tt> AC_MSG_RESULT([yes, with -ansi])</tt><tt><br>
</tt><tt> else</tt><tt><br>
</tt><tt> AC_MSG_ERROR([${RAWCPP} defines unix with or
without -undef. I don't know what to do.])</tt><tt><br>
</tt><tt> fi</tt><tt><br>
</tt><tt>fi</tt><tt><br>
</tt><tt>rm -f conftest.$ac_ext</tt><tt><br>
</tt><tt><br>
</tt><tt>AC_MSG_CHECKING([if $RAWCPP requires -traditional])</tt><tt><br>
</tt><tt>AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve
"whitespace"?]])])</tt><tt><br>
</tt><tt>if test `${RAWCPP} < conftest.$ac_ext | grep -c
'preserve \"'` -eq 1 ; then</tt><tt><br>
</tt><tt> AC_MSG_RESULT([no])</tt><tt><br>
</tt><tt>else</tt><tt><br>
</tt><tt> if test `${RAWCPP} -traditional < conftest.$ac_ext
| grep -c 'preserve \"'` -eq 1 ; then</tt><tt><br>
</tt><tt> RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"</tt><tt><br>
</tt><tt> AC_MSG_RESULT([yes])</tt><tt><br>
</tt><tt> else</tt><tt><br>
</tt><tt> AC_MSG_ERROR([${RAWCPP} does not preserve
whitespace with or without -traditional. I don't know what to
do.])</tt><tt><br>
</tt><tt> fi</tt><tt><br>
</tt><tt>fi</tt><tt><br>
</tt><tt>rm -f conftest.$ac_ext</tt><tt><br>
</tt><tt>AC_SUBST(RAWCPPFLAGS)</tt><tt><br>
</tt><tt>]) # XORG_PROG_RAWCPP</tt><tt><br>
</tt><br>
</blockquote>
<br>
<br>
<br>
<br>
<br>
<br>
</body>
</html>