[cairo] Better error messages for missing backends

Carl Worth cworth at cworth.org
Thu May 12 22:55:04 PDT 2005


On Thu, 12 May 2005 22:28:21 -0700, Carl Worth wrote:
> I've attached a patch that implements this and I will commit it unless
> I hear of a better suggestion or improvements.

In testing this patch, I found that it's not entirely
effective. Platform-specific header files for backends which are not
compiled into cairo are no longer installed. So, unless one has older
headers installed from an earlier compilation of cairo which happened
to include more backends than the current installed version, (which
happens to be the case on my machine at the moment), then this problem
doesn't show up.

I guess if this patch had been in place originally, then it would
have achieved its desired effect. So if we apply this, then trying to
compile code using a not-currently-available backend will result in:

1) A failed include of cairo-foo.h with a file not found message from
   the preprocessor, (if the backend was never installed).

or

2) The #error from cairo-foo.h, (if the backend had been installed
   before, but is not now for some reason).

We would change things to get consistent behavior. We could get (2)
always (which has a slightly more helpful message) by unconditionally
installing all headers. But installing cairo-win32.h and
cairo-quartz.h on Unix-like systems (for example) would be less than
elegant. And we could get (1) always by removing all old headers as
part of "make install".

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050512/b679b0c8/attachment.pgp


More information about the cairo mailing list