Mercurial > hg > xemacs-beta
changeset 4031:0cc7794d231e
[xemacs-hg @ 2007-06-22 17:50:36 by stephent]
More 64-bit fiddling (suppress warnings). <87r6o350q9.fsf@uwakimon.sk.tsukuba.ac.jp>
author | stephent |
---|---|
date | Fri, 22 Jun 2007 17:50:42 +0000 |
parents | 5bc9d592760f |
children | cf59c4f5e9bc |
files | src/ChangeLog src/event-unixoid.c src/process-unix.c |
diffstat | 3 files changed, 14 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Fri Jun 22 17:39:07 2007 +0000 +++ b/src/ChangeLog Fri Jun 22 17:50:42 2007 +0000 @@ -1,3 +1,9 @@ +2007-06-23 Stephen J. Turnbull <stephen@xemacs.org> + + * event-unixoid.c (event_stream_unixoid_create_io_streams): + * process-unix.c (unix_init_process_io_handles): + Cast out bogus warnings about 64-bit value truncation. + 2007-06-23 Stephen J. Turnbull <stephen@xemacs.org> * linuxplay.c (linux_play_data_or_file): More 64-bit tweaking, and
--- a/src/event-unixoid.c Fri Jun 22 17:39:07 2007 +0000 +++ b/src/event-unixoid.c Fri Jun 22 17:50:42 2007 +0000 @@ -360,10 +360,11 @@ int infd, outfd, errfd; /* Decode inhandle and outhandle. Their meaning depends on the process implementation being used. */ - /* We are passed plain old file descs */ - infd = (int) inhandle; - outfd = (int) outhandle; - errfd = (int) errhandle; + /* We are passed plain old file descs, which are ints, so */ + /* if sizeof(EMACS_INT) > sizeof(int) it's OK. */ + infd = (EMACS_INT) inhandle; + outfd = (EMACS_INT) outhandle; + errfd = (EMACS_INT) errhandle; *instream = (infd >= 0 ? make_filedesc_input_stream (infd, 0, -1, 0)
--- a/src/process-unix.c Fri Jun 22 17:39:07 2007 +0000 +++ b/src/process-unix.c Fri Jun 22 17:50:42 2007 +0000 @@ -846,8 +846,9 @@ unix_init_process_io_handles (Lisp_Process *p, void *in, void *UNUSED (out), void *err, int UNUSED (flags)) { - UNIX_DATA(p)->infd = (int) in; - UNIX_DATA(p)->errfd = (int) err; + /* if sizeof(EMACS_INT) > sizeof(int) this truncates the value */ + UNIX_DATA(p)->infd = (EMACS_INT) in; + UNIX_DATA(p)->errfd = (EMACS_INT) err; } /* Move the file descriptor FD so that its number is not less than MIN. *