Tk Source Code

Check-in [4094492b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix 503c4c6f56: Compiled code fails to run on older macos. Remove unneeded include (since it's already in tkMacOSXPrivate.h)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-6-branch
Files: files | file ages | folders
SHA3-256: 4094492b015d8eb6147b9cca479c3c62f2e542fc8d78ac4478e2fc4478b64d94
User & Date: jan.nijtmans 2023-06-08 15:21:17
Context
2023-06-08
16:57
Add more type-casts, code cleanup (all backported from 8.7) check-in: 0ba4a8f7 user: jan.nijtmans tags: core-8-6-branch
15:21
Fix 503c4c6f56: Compiled code fails to run on older macos. Remove unneeded include (since it's already in tkMacOSXPrivate.h) check-in: 4094492b user: jan.nijtmans tags: core-8-6-branch
2023-06-06
20:22
Fix [a418aafa76]: Bogus @x,y indices are accepted for menu entries. check-in: ae928b76 user: fvogel tags: core-8-6-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to macosx/tkMacOSXFileTypes.c.

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
This module provides tools for working with file types which are meant to abstract
the many variants that Apple has used over the years, and which can be used
without generating deprecation warnings.
*/

#include "tkMacOSXPrivate.h"
#include "tkMacOSXFileTypes.h"
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 110000
#import <UniformTypeIdentifiers/UniformTypeIdentifiers.h>
#endif

#define CHARS_TO_OSTYPE(string) (OSType) string[0] << 24 | \
                                (OSType) string[1] << 16 | \
                                (OSType) string[2] <<  8 | \
                                (OSType) string[3]

static BOOL initialized = false;







<
<
<







21
22
23
24
25
26
27



28
29
30
31
32
33
34
This module provides tools for working with file types which are meant to abstract
the many variants that Apple has used over the years, and which can be used
without generating deprecation warnings.
*/

#include "tkMacOSXPrivate.h"
#include "tkMacOSXFileTypes.h"




#define CHARS_TO_OSTYPE(string) (OSType) string[0] << 24 | \
                                (OSType) string[1] << 16 | \
                                (OSType) string[2] <<  8 | \
                                (OSType) string[3]

static BOOL initialized = false;

Changes to unix/configure.

9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343

cat >>confdefs.h <<\_ACEOF
#define MAC_OSX_TK 1
_ACEOF

    LIBS="$LIBS -framework Cocoa -framework Carbon -framework IOKit -framework QuartzCore"
    if test -d "/System/Library/Frameworks/UniformTypeIdentifiers.framework"; then
        LIBS="$LIBS -framework UniformTypeIdentifiers"
    fi
    EXTRA_CC_SWITCHES='-std=gnu99 -x objective-c'
    TK_WINDOWINGSYSTEM=AQUA
    if test -n "${enable_symbols}" -a "${enable_symbols}" != no; then

cat >>confdefs.h <<\_ACEOF
#define TK_MAC_DEBUG 1







|







9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343

cat >>confdefs.h <<\_ACEOF
#define MAC_OSX_TK 1
_ACEOF

    LIBS="$LIBS -framework Cocoa -framework Carbon -framework IOKit -framework QuartzCore"
    if test -d "/System/Library/Frameworks/UniformTypeIdentifiers.framework"; then
        LIBS="$LIBS -weak_framework UniformTypeIdentifiers"
    fi
    EXTRA_CC_SWITCHES='-std=gnu99 -x objective-c'
    TK_WINDOWINGSYSTEM=AQUA
    if test -n "${enable_symbols}" -a "${enable_symbols}" != no; then

cat >>confdefs.h <<\_ACEOF
#define TK_MAC_DEBUG 1

Changes to unix/configure.in.

349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
    tk_aqua=no
fi

if test $tk_aqua = yes; then
    AC_DEFINE(MAC_OSX_TK, 1, [Are we building TkAqua?])
    LIBS="$LIBS -framework Cocoa -framework Carbon -framework IOKit -framework QuartzCore"
    if test -d "/System/Library/Frameworks/UniformTypeIdentifiers.framework"; then
        LIBS="$LIBS -framework UniformTypeIdentifiers"
    fi
    EXTRA_CC_SWITCHES='-std=gnu99 -x objective-c'
    TK_WINDOWINGSYSTEM=AQUA
    if test -n "${enable_symbols}" -a "${enable_symbols}" != no; then
        AC_DEFINE(TK_MAC_DEBUG, 1, [Are TkAqua debug messages enabled?])
    fi
else







|







349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
    tk_aqua=no
fi

if test $tk_aqua = yes; then
    AC_DEFINE(MAC_OSX_TK, 1, [Are we building TkAqua?])
    LIBS="$LIBS -framework Cocoa -framework Carbon -framework IOKit -framework QuartzCore"
    if test -d "/System/Library/Frameworks/UniformTypeIdentifiers.framework"; then
        LIBS="$LIBS -weak_framework UniformTypeIdentifiers"
    fi
    EXTRA_CC_SWITCHES='-std=gnu99 -x objective-c'
    TK_WINDOWINGSYSTEM=AQUA
    if test -n "${enable_symbols}" -a "${enable_symbols}" != no; then
        AC_DEFINE(TK_MAC_DEBUG, 1, [Are TkAqua debug messages enabled?])
    fi
else