On Tue, Sep 04, 2007 at 11:39:06AM +0200, Jean-Marc Lasgouttes wrote: > Enrico Forestieri <[EMAIL PROTECTED]> writes: > > > On Tue, Sep 04, 2007 at 01:54:54AM +0200, Enrico Forestieri wrote: > > > >> 1) Use FcConfigAppFontAddDir or FcConfigAppFontAddFile to add specific > >> application fonts. This is what is done in the amended > >> fontconfig-2.diff patch. > > [...] > >> #ifdef __APPLE__ > >> -#include "debug.h" > >> #include <Carbon/Carbon.h> > >> #include <ApplicationServices/ApplicationServices.h> > >> -using std::endl; > >> +#else > > > > Of course, the line above should read > > #elif HAVE_FONTCONFIG_FONTCONFIG_H > > Or > #elif defined(HAVE_FONTCONFIG_FONTCONFIG_H) > ?
$ gcc test1.c $ gcc test2.c $ gcc test3.c test3.c:6:2: warning: #warning have Y So, no, that is correct, because you could #define HAVE_FONTCONFIG_FONTCONFIG_H 0 and we would be in trouble with the defined() version. -- Enrico
#ifdef HAVE_X #warning have X #elif HAVE_Y #warning have Y #endif int main() {}
#define HAVE_Y 0 #ifdef HAVE_X #warning have X #elif HAVE_Y #warning have Y #endif int main() {}
#define HAVE_Y 1 #ifdef HAVE_X #warning have X #elif HAVE_Y #warning have Y #endif int main() {}