mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
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.
This commit is contained in:
parent
ec19a2de9a
commit
441af148b2
4 changed files with 18 additions and 22 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2017-12-28 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* 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 <rfm@gnu.org>
|
||||
|
||||
* Source/NSGraphicsContext.m: When using clang and the gnustep
|
||||
|
|
|
@ -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 <cups/cups.h>
|
||||
|
||||
|
||||
|
@ -45,18 +49,12 @@
|
|||
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;
|
||||
|
|
|
@ -41,19 +41,12 @@
|
|||
#import <AppKit/NSPrintOperation.h>
|
||||
#import "GSGuiPrivate.h"
|
||||
#import "GSCUPSPrintOperation.h"
|
||||
#undef __BLOCKS__
|
||||
#include <cups/cups.h>
|
||||
|
||||
|
||||
//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
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
#import "GNUstepGUI/GSPrinting.h"
|
||||
#import "GSCUPSPrinter.h"
|
||||
|
||||
#undef __BLOCKS__
|
||||
#include <cups/cups.h>
|
||||
#include <cups/ppd.h>
|
||||
|
||||
|
@ -68,12 +69,6 @@ NSString *GSCUPSDummyPrinterName = @"GSCUPSDummyPrinter";
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
+(id) allocWithZone: (NSZone*) zone
|
||||
{
|
||||
return NSAllocateObject(self, 0, zone);
|
||||
}
|
||||
|
||||
//
|
||||
// Finding an NSPrinter
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue