Skip to content

Commit 5572e24

Browse files
Carbonize more includes
1 parent e2027f4 commit 5572e24

File tree

6 files changed

+32
-4
lines changed

6 files changed

+32
-4
lines changed

platforms/Mac_OS/plugins/DropPlugin/sqMacDragDrop.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Some of this code comes from
2828
Some techniques borrowed from Pete Gontier's original FinderDragPro.
2929
3030
31-
Copyright: Copyright: © 1999 by Apple Computer, Inc.
31+
Copyright: Copyright: 1999 by Apple Computer, Inc.
3232
all rights reserved.
3333
3434
Disclaimer: You may incorporate this sample code into your applications without
@@ -55,11 +55,14 @@ Some of this code comes from
5555

5656
#include "sq.h"
5757

58+
#if TARGET_API_MAC_CARBON
59+
#include <Carbon/Carbon.h>
60+
#else
5861
#include <Drag.h>
5962
#include <MacWindows.h>
6063
#include <Gestalt.h>
6164
#include <Quickdraw.h>
62-
65+
#endif
6366

6467
#include "sqVirtualMachine.h"
6568
#include "sqMacUnixFileInterface.h"

platforms/Mac_OS/plugins/SecurityPlugin/sqMacSecurity.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@
1111
#include "sqMacUIConstants.h"
1212
#include "FilePlugin.h"
1313

14-
#include <Files.h>
14+
#if TARGET_API_MAC_CARBON
15+
#include <Carbon/Carbon.h>
16+
#else
17+
#include <Files.h>
18+
#endif
1519

1620
#if !defined(PATH_MAX)
1721
# include <sys/syslimits.h>

platforms/Mac_OS/plugins/UUIDPlugin/sqMacUUID.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@
1717

1818
extern struct VirtualMachine *interpreterProxy;
1919

20+
#if TARGET_API_MAC_CARBON
21+
#include <Carbon/Carbon.h>
22+
#else
2023
#include <CFUUID.h>
24+
#endif
25+
2126
int sqUUIDInit(void);
2227
int sqUUIDShutdown(void);
2328

platforms/Mac_OS/vm/sqMacMain.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,12 @@
9999

100100
#include <unistd.h>
101101
#include <pthread.h>
102+
103+
#if TARGET_API_MAC_CARBON
104+
#include <Carbon/Carbon.h>
105+
#else
102106
#include <Processes.h>
107+
#endif
103108

104109
#if !defined(PATH_MAX)
105110
# include <sys/syslimits.h>

platforms/Mac_OS/vm/sqMacNSPluginUILogic2.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@
99
*
1010
*/
1111

12-
#include <Debugging.h>
12+
#if TARGET_API_MAC_CARBON
1313
#include <Carbon/Carbon.h>
14+
#else
15+
#include <Debugging.h>
16+
#endif
17+
1418
#include <fcntl.h>
1519
#include <unistd.h>
1620
#include <stdio.h>

platforms/Mac_OS/vm/sqMacUIEventsUniversal.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,13 @@
5555

5656
#include <pthread.h>
5757
#include "sqaio.h"
58+
59+
#if TARGET_API_MAC_CARBON
60+
#include <Carbon/Carbon.h>
61+
#else
5862
#include <Quickdraw.h>
63+
#endif
64+
5965
#include <unistd.h>
6066

6167
enum { KeyMapSize= 32 };
@@ -264,6 +270,7 @@ ioGetNextEvent(sqInputEvent *evt)
264270
if (postMessageHook)
265271
postMessageHook((EventRecord *) evt->unused1);
266272
free((void *) evt->unused1);
273+
evt->unused1 = NULL;
267274
return ioGetNextEvent(evt);
268275
}
269276
return true;

0 commit comments

Comments
 (0)