# HG changeset patch # User YAMAMOTO Mitsuharu # Date 1219997887 0 # Node ID 99dee4fe249c6cd5f7510e337370bd768877ec82 # Parent 5b546e629ab2d220b708b217dfc7903650798af3 (mac_system_script_code): Use EMACS_INT for DEFVAR_INT variable. [MAC_OSX] (mac_try_close_socket, sys_select) [SELECT_USE_CFSOCKET]: Cast to pointer-size integer before casting to pointer. diff -r 5b546e629ab2 -r 99dee4fe249c src/mac.c --- a/src/mac.c Fri Aug 29 05:14:17 2008 +0000 +++ b/src/mac.c Fri Aug 29 08:18:07 2008 +0000 @@ -69,7 +69,7 @@ #endif /* The system script code. */ -static int mac_system_script_code; +static EMACS_INT mac_system_script_code; /* The system locale identifier string. */ static Lisp_Object Vmac_system_locale; @@ -5047,7 +5047,7 @@ #if SELECT_USE_CFSOCKET if (getpid () == mac_emacs_pid && cfsockets_for_select) { - void *key = (void *) fd; + void *key = (void *) (long) fd; CFSocketRef socket = (CFSocketRef) CFDictionaryGetValue (cfsockets_for_select, key); @@ -5160,7 +5160,7 @@ for (fd = minfd; fd < nfds; fd++) if (FD_ISSET (fd, rfds) || (wfds && FD_ISSET (fd, wfds))) { - void *key = (void *) fd; + void *key = (void *) (long) fd; CFRunLoopSourceRef source = (CFRunLoopSourceRef) CFDictionaryGetValue (sources, key); @@ -5190,7 +5190,7 @@ for (fd = minfd; fd < nfds; fd++) if (FD_ISSET (fd, rfds) || (wfds && FD_ISSET (fd, wfds))) { - void *key = (void *) fd; + void *key = (void *) (long) fd; CFRunLoopSourceRef source = (CFRunLoopSourceRef) CFDictionaryGetValue (sources, key);