diff --git a/gfx/thebes/src/gfxQuartzPDFSurface.cpp b/gfx/thebes/src/gfxQuartzPDFSurface.cpp index 317bb5367705..97dae0c395f5 100644 --- a/gfx/thebes/src/gfxQuartzPDFSurface.cpp +++ b/gfx/thebes/src/gfxQuartzPDFSurface.cpp @@ -39,7 +39,37 @@ #include "cairo-nquartz.h" + +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 #include +#else +/* stupid apple doesn't bother to include cups.h in anything lower than + * the 10.4 SDK yet they've shipped libcups since 10.2! wtf! + * Apple is as bad as Linux! come on! + */ +extern "C" { +typedef struct +{ + char *name; + char *value; +} cups_option_t; +typedef struct +{ + char *name, + *instance; + int is_default; + int num_options; + cups_option_t *options; +} cups_dest_t; +extern int cupsPrintFile(const char *printer, const char *filename, + const char *title, int num_options, + cups_option_t *options); +extern void cupsFreeDests(int num_dests, cups_dest_t *dests); +extern cups_dest_t *cupsGetDest(const char *name, const char *instance, + int num_dests, cups_dest_t *dests); +extern int cupsGetDests(cups_dest_t **dests); +} +#endif gfxQuartzPDFSurface::gfxQuartzPDFSurface(const char *filename, gfxSize aSizeInPoints) : mFilename(strdup(filename)), mAborted(PR_FALSE)