diff --git a/ChangeLog b/ChangeLog index 69f4c72de0..d4f88650cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2017-12-28 Fred Kiefer + + * Printing/GSCUPS/GSCUPSPrinter.m, + * Printing/GSCUPS/GSCUPSPrintInfo.m, + * Printing/GSCUPS/GSCUPSPrintOperation.m: Undefine __BLOCKS__ + before the cups.h import as some versions of this header file + expect unconditional that libdispatch is present when that + variable is defined. + Remove duplicated -allocWithZone: methods. + 2017-12-27 Richard Frith-Macdonald * Source/NSGraphicsContext.m: When using clang and the gnustep diff --git a/Printing/GSCUPS/GSCUPSPrintInfo.m b/Printing/GSCUPS/GSCUPSPrintInfo.m index 416bb5e103..c2a4cbc5c2 100644 --- a/Printing/GSCUPS/GSCUPSPrintInfo.m +++ b/Printing/GSCUPS/GSCUPSPrintInfo.m @@ -32,6 +32,10 @@ #import "AppKit/NSPrinter.h" #import "GSCUPSPrintInfo.h" #import "GSCUPSPrinter.h" +// There are broken versions of cups.h where __BLOCKS__ requires +// libdispatch to be present. This has long been fixed in CUPS, +// but the file is still in CentOS 7. +#undef __BLOCKS__ #include @@ -45,18 +49,12 @@ + (void)initialize if (self == [GSCUPSPrintInfo class]) { // Initial version - [self setVersion:1]; + [self setVersion: 1]; } } -+ (id) allocWithZone: (NSZone*)zone -{ - return NSAllocateObject(self, 0, zone); -} - - -+(NSPrinter*) defaultPrinter ++ (NSPrinter*) defaultPrinter { NSString *defaultName; int numDests; diff --git a/Printing/GSCUPS/GSCUPSPrintOperation.m b/Printing/GSCUPS/GSCUPSPrintOperation.m index a4c6972d07..96c08af161 100644 --- a/Printing/GSCUPS/GSCUPSPrintOperation.m +++ b/Printing/GSCUPS/GSCUPSPrintOperation.m @@ -41,19 +41,12 @@ #import #import "GSGuiPrivate.h" #import "GSCUPSPrintOperation.h" +#undef __BLOCKS__ #include //A subclass of GSPrintOperation, NOT NSPrintOperation. @implementation GSCUPSPrintOperation -// -// Class methods -// -+ (id) allocWithZone: (NSZone*)zone -{ - return NSAllocateObject(self, 0, zone); -} - - (id)initWithView:(NSView *)aView printInfo:(NSPrintInfo *)aPrintInfo diff --git a/Printing/GSCUPS/GSCUPSPrinter.m b/Printing/GSCUPS/GSCUPSPrinter.m index ff0dbaf70b..6eeaef6f92 100644 --- a/Printing/GSCUPS/GSCUPSPrinter.m +++ b/Printing/GSCUPS/GSCUPSPrinter.m @@ -48,6 +48,7 @@ #import "GNUstepGUI/GSPrinting.h" #import "GSCUPSPrinter.h" +#undef __BLOCKS__ #include #include @@ -68,12 +69,6 @@ +(void) initialize } } - -+(id) allocWithZone: (NSZone*) zone -{ - return NSAllocateObject(self, 0, zone); -} - // // Finding an NSPrinter //