@@ -180,17 +180,16 @@ static pthread_cond_t notifierCV = PTHREAD_COND_INITIALIZER;
180180
181181/*
182182 * The pollState bits:
183- *
184- * POLL_WANT is set by each thread before it waits on its condition variable.
185- * It is checked by the notifier before it does select.
186- *
187- * POLL_DONE is set by the notifier if it goes into select after seeing
188- * POLL_WANT. The idea is to ensure it tries a select with the same bits
189- * the initial thread had set.
190183 */
191-
192- #define POLL_WANT 0x1
193- #define POLL_DONE 0x2
184+ enum SelectPollStateFlags {
185+ POLL_WANT = 0x1 , /* Set by each thread before it waits on its
186+ * condition variable. Checked by the notifier
187+ * before it does select(). */
188+ POLL_DONE = 0x2 /* Set by the notifier if it goes into select()
189+ * after seeing POLL_WANT. The idea is to
190+ * ensure it tries a select() with the same
191+ * bits the initial thread had set. */
192+ };
194193
195194/*
196195 * This is the thread ID of the notifier thread that does select.
@@ -254,33 +253,33 @@ typedef struct {
254253 const void * lpszClassName ;
255254} WNDCLASSW ;
256255
257- extern void CloseHandle (void * );
258- extern void * CreateEventW (void * , unsigned char , unsigned char ,
256+ extern void CloseHandle (void * );
257+ extern void * CreateEventW (void * , unsigned char , unsigned char ,
259258 void * );
260- extern void * CreateWindowExW (void * , const void * , const void * ,
259+ extern void * CreateWindowExW (void * , const void * , const void * ,
261260 unsigned int , int , int , int , int , void * , void * ,
262261 void * , void * );
263- extern unsigned int DefWindowProcW (void * , int , void * , void * );
264- extern unsigned char DestroyWindow (void * );
265- extern int DispatchMessageW (const MSG * );
266- extern unsigned char GetMessageW (MSG * , void * , int , int );
267- extern void MsgWaitForMultipleObjects (unsigned int , void * ,
262+ extern unsigned int DefWindowProcW (void * , int , void * , void * );
263+ extern unsigned char DestroyWindow (void * );
264+ extern int DispatchMessageW (const MSG * );
265+ extern unsigned char GetMessageW (MSG * , void * , int , int );
266+ extern void MsgWaitForMultipleObjects (unsigned int , void * ,
268267 unsigned char , unsigned int , unsigned int );
269- extern unsigned char PeekMessageW (MSG * , void * , int , int , int );
270- extern unsigned char PostMessageW (void * , unsigned int , void * ,
268+ extern unsigned char PeekMessageW (MSG * , void * , int , int , int );
269+ extern unsigned char PostMessageW (void * , unsigned int , void * ,
271270 void * );
272- extern void PostQuitMessage (int );
273- extern void * RegisterClassW (const WNDCLASSW * );
274- extern unsigned char ResetEvent (void * );
275- extern unsigned char TranslateMessage (const MSG * );
271+ extern void PostQuitMessage (int );
272+ extern void * RegisterClassW (const WNDCLASSW * );
273+ extern unsigned char ResetEvent (void * );
274+ extern unsigned char TranslateMessage (const MSG * );
276275
277276/*
278277 * Threaded-cygwin specific constants and functions in this file:
279278 */
280279
281280#if TCL_THREADS && defined(__CYGWIN__ )
282- static const WCHAR className [] = L"TclNotifier" ;
283- static unsigned int NotifierProc (void * hwnd , unsigned int message ,
281+ static const WCHAR className [] = { 'T' , 'c' , 'l' , 'N' , 'o' , 't' , 'i' , 'f' , 'i' , 'e' , 'r' , '\0' } ;
282+ static unsigned int NotifierProc (void * hwnd , unsigned int message ,
284283 void * wParam , void * lParam );
285284#endif /* TCL_THREADS && defined(__CYGWIN__) */
286285#ifdef __cplusplus
921920TclAsyncNotifier (
922921 int sigNumber , /* Signal number. */
923922 TCL_UNUSED (Tcl_ThreadId ), /* Target thread. */
924- TCL_UNUSED (void * ), /* Notifier data. */
923+ TCL_UNUSED (void * ), /* Notifier data. */
925924 int * flagPtr , /* Flag to mark. */
926925 int value ) /* Value of mark. */
927926{
0 commit comments