diff options
| author | Paul Eggert | 2011-03-20 09:55:33 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-03-20 09:55:33 -0700 |
| commit | c184bbfdfd547bbf61e719be92460dcebaed85a3 (patch) | |
| tree | b2f9baa65e77cbbc7dfc6ef92d34e60b0ce140d2 /src/process.c | |
| parent | c939f91b4d9d7830daf4e17cacbab1709ce9949d (diff) | |
| parent | 6a90a4f1982c25213ec70637b52462674c2564bd (diff) | |
| download | emacs-c184bbfdfd547bbf61e719be92460dcebaed85a3.tar.gz emacs-c184bbfdfd547bbf61e719be92460dcebaed85a3.zip | |
Merge: Use socklen_t, not int, for socket lengths.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/process.c b/src/process.c index 5ee731a5bd3..4a7202388bf 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -3461,7 +3461,7 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3461 | if (EQ (service, Qt)) | 3461 | if (EQ (service, Qt)) |
| 3462 | { | 3462 | { |
| 3463 | struct sockaddr_in sa1; | 3463 | struct sockaddr_in sa1; |
| 3464 | int len1 = sizeof (sa1); | 3464 | socklen_t len1 = sizeof (sa1); |
| 3465 | if (getsockname (s, (struct sockaddr *)&sa1, &len1) == 0) | 3465 | if (getsockname (s, (struct sockaddr *)&sa1, &len1) == 0) |
| 3466 | { | 3466 | { |
| 3467 | ((struct sockaddr_in *)(lres->ai_addr))->sin_port = sa1.sin_port; | 3467 | ((struct sockaddr_in *)(lres->ai_addr))->sin_port = sa1.sin_port; |
| @@ -3508,7 +3508,8 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3508 | /* Unlike most other syscalls connect() cannot be called | 3508 | /* Unlike most other syscalls connect() cannot be called |
| 3509 | again. (That would return EALREADY.) The proper way to | 3509 | again. (That would return EALREADY.) The proper way to |
| 3510 | wait for completion is select(). */ | 3510 | wait for completion is select(). */ |
| 3511 | int sc, len; | 3511 | int sc; |
| 3512 | socklen_t len; | ||
| 3512 | SELECT_TYPE fdset; | 3513 | SELECT_TYPE fdset; |
| 3513 | retry_select: | 3514 | retry_select: |
| 3514 | FD_ZERO (&fdset); | 3515 | FD_ZERO (&fdset); |
| @@ -3581,7 +3582,7 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3581 | if (!is_server) | 3582 | if (!is_server) |
| 3582 | { | 3583 | { |
| 3583 | struct sockaddr_in sa1; | 3584 | struct sockaddr_in sa1; |
| 3584 | int len1 = sizeof (sa1); | 3585 | socklen_t len1 = sizeof (sa1); |
| 3585 | if (getsockname (s, (struct sockaddr *)&sa1, &len1) == 0) | 3586 | if (getsockname (s, (struct sockaddr *)&sa1, &len1) == 0) |
| 3586 | contact = Fplist_put (contact, QClocal, | 3587 | contact = Fplist_put (contact, QClocal, |
| 3587 | conv_sockaddr_to_lisp ((struct sockaddr *)&sa1, len1)); | 3588 | conv_sockaddr_to_lisp ((struct sockaddr *)&sa1, len1)); |
| @@ -4186,7 +4187,7 @@ server_accept_connection (Lisp_Object server, int channel) | |||
| 4186 | struct sockaddr_un un; | 4187 | struct sockaddr_un un; |
| 4187 | #endif | 4188 | #endif |
| 4188 | } saddr; | 4189 | } saddr; |
| 4189 | int len = sizeof saddr; | 4190 | socklen_t len = sizeof saddr; |
| 4190 | 4191 | ||
| 4191 | s = accept (channel, &saddr.sa, &len); | 4192 | s = accept (channel, &saddr.sa, &len); |
| 4192 | 4193 | ||
| @@ -5051,7 +5052,7 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd, | |||
| 5051 | /* getsockopt(,,SO_ERROR,,) is said to hang on some systems. | 5052 | /* getsockopt(,,SO_ERROR,,) is said to hang on some systems. |
| 5052 | So only use it on systems where it is known to work. */ | 5053 | So only use it on systems where it is known to work. */ |
| 5053 | { | 5054 | { |
| 5054 | int xlen = sizeof (xerrno); | 5055 | socklen_t xlen = sizeof (xerrno); |
| 5055 | if (getsockopt (channel, SOL_SOCKET, SO_ERROR, &xerrno, &xlen)) | 5056 | if (getsockopt (channel, SOL_SOCKET, SO_ERROR, &xerrno, &xlen)) |
| 5056 | xerrno = errno; | 5057 | xerrno = errno; |
| 5057 | } | 5058 | } |
| @@ -5163,7 +5164,7 @@ read_process_output (Lisp_Object proc, register int channel) | |||
| 5163 | /* We have a working select, so proc_buffered_char is always -1. */ | 5164 | /* We have a working select, so proc_buffered_char is always -1. */ |
| 5164 | if (DATAGRAM_CHAN_P (channel)) | 5165 | if (DATAGRAM_CHAN_P (channel)) |
| 5165 | { | 5166 | { |
| 5166 | int len = datagram_address[channel].len; | 5167 | socklen_t len = datagram_address[channel].len; |
| 5167 | nbytes = recvfrom (channel, chars + carryover, readmax, | 5168 | nbytes = recvfrom (channel, chars + carryover, readmax, |
| 5168 | 0, datagram_address[channel].sa, &len); | 5169 | 0, datagram_address[channel].sa, &len); |
| 5169 | } | 5170 | } |