Dotfiles icon indicating copy to clipboard operation
Dotfiles copied to clipboard

X resources preprocessor directives only work with GCC

Open Tina-otoge opened this issue 6 years ago • 0 comments

On some distributions if Matsui CPP is installed alongside GCC, the default behaviour for xrdb will be to prefer mcpp over GNU's cpp. However, GCC supports more preprocessor directives than Matsui CPP, for example:

#if __has_include("path/to/file")

There are also differences in the implementation of some of the preprocessor directives, in GCC, #include does not follow symlinks, while in Matsui CPP it does.

Example

This X resources file:

#include "path/relative/to/symlink.Xresources"

#if __has_include("some_file")
    #include "some_file"
#endif

works fine with GCC but not with Matsui CPP.

Solution

Force xrdb to use GCC and makes GCC a dependency for the X resources configuration files.

Tina-otoge avatar Aug 19 '18 00:08 Tina-otoge