diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-07-11 16:06:44 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-07-11 16:06:44 (GMT) |
commit | b8bffd00e36251f0126d02b73f1e84c24b912ab9 (patch) | |
tree | 877b12f08f4266c9a01b6068d7e0e3a0fb80d520 /macosx/tclMacOSXNotify.c | |
parent | a0457efe80223c1380e9e0fc6a50c755fc7bbeda (diff) | |
parent | 2ead5632823207539bb83b296fb903b63ec595ff (diff) | |
download | tcl-b8bffd00e36251f0126d02b73f1e84c24b912ab9.zip tcl-b8bffd00e36251f0126d02b73f1e84c24b912ab9.tar.gz tcl-b8bffd00e36251f0126d02b73f1e84c24b912ab9.tar.bz2 |
Merge 8.6
Diffstat (limited to 'macosx/tclMacOSXNotify.c')
-rw-r--r-- | macosx/tclMacOSXNotify.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/macosx/tclMacOSXNotify.c b/macosx/tclMacOSXNotify.c index 1f9d0ea..bbbac65 100644 --- a/macosx/tclMacOSXNotify.c +++ b/macosx/tclMacOSXNotify.c @@ -45,6 +45,9 @@ */ #if defined(HAVE_LIBKERN_OSATOMIC_H) && defined(HAVE_OSSPINLOCKLOCK) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#pragma GCC diagnostic ignored "-Wunused-function" /* * Use OSSpinLock API where available (Tiger or later). */ @@ -56,14 +59,17 @@ * Support for weakly importing spinlock API. */ #define WEAK_IMPORT_SPINLOCKLOCK + #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050 #define VOLATILE volatile #else #define VOLATILE #endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1050 */ + #ifndef bool #define bool int #endif + extern void OSSpinLockLock(VOLATILE OSSpinLock *lock) WEAK_IMPORT_ATTRIBUTE; extern void OSSpinLockUnlock(VOLATILE OSSpinLock *lock) @@ -115,6 +121,7 @@ extern int _spin_lock_try(OSSpinLock *lock); #define SpinLockTry(p) _spin_lock_try(p) #define SPINLOCK_INIT 0 +#pragma GCC diagnostic pop #endif /* HAVE_LIBKERN_OSATOMIC_H && HAVE_OSSPINLOCKLOCK */ #endif /* not using os_unfair_lock */ @@ -250,7 +257,7 @@ typedef struct FileHandler { * handlers are ready to fire. */ -typedef struct FileHandlerEvent { +typedef struct { Tcl_Event header; /* Information that is standard for all * events. */ int fd; /* File descriptor that is ready. Used to find @@ -265,7 +272,7 @@ typedef struct FileHandlerEvent { * writable, and exceptional conditions. */ -typedef struct SelectMasks { +typedef struct { fd_set readable; fd_set writable; fd_set exceptional; @@ -724,7 +731,7 @@ StartNotifierThread(void) void Tcl_FinalizeNotifier( - ClientData clientData) /* Not used. */ + ClientData clientData) { ThreadSpecificData *tsdPtr; @@ -827,7 +834,7 @@ void Tcl_AlertNotifier( ClientData clientData) { - ThreadSpecificData *tsdPtr = clientData; + ThreadSpecificData *tsdPtr = (ThreadSpecificData *)clientData; if (tclNotifierHooks.alertNotifierProc) { tclNotifierHooks.alertNotifierProc(clientData); @@ -1005,7 +1012,7 @@ Tcl_CreateFileHandler( } } if (filePtr == NULL) { - filePtr = ckalloc(sizeof(FileHandler)); + filePtr = (FileHandler *)ckalloc(sizeof(FileHandler)); filePtr->fd = fd; filePtr->readyMask = 0; filePtr->nextPtr = tsdPtr->firstFileHandlerPtr; @@ -1362,7 +1369,7 @@ QueueFileEvents( { SelectMasks readyMasks; FileHandler *filePtr; - ThreadSpecificData *tsdPtr = info; + ThreadSpecificData *tsdPtr = (ThreadSpecificData *)info; /* * Queue all detected file events. @@ -1401,7 +1408,7 @@ QueueFileEvents( */ if (filePtr->readyMask == 0) { - FileHandlerEvent *fileEvPtr = ckalloc(sizeof(FileHandlerEvent)); + FileHandlerEvent *fileEvPtr = (FileHandlerEvent *)ckalloc(sizeof(FileHandlerEvent)); fileEvPtr->header.proc = FileHandlerEventProc; fileEvPtr->fd = filePtr->fd; @@ -1434,7 +1441,7 @@ UpdateWaitingListAndServiceEvents( CFRunLoopActivity activity, void *info) { - ThreadSpecificData *tsdPtr = info; + ThreadSpecificData *tsdPtr = (ThreadSpecificData *)info; if (tsdPtr->sleeping) { return; } |