aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-04-10 08:49:40 -0700
committerPaul Eggert2011-04-10 08:49:40 -0700
commit4073e537492ac700f926d1ed0f27d6160a142ae4 (patch)
treedfaca3760efeffcb9fc41bbbb7265e85240a533d /src
parentda0e53381fb37a43706634ada4b3e04ba4e5e366 (diff)
parent37f1c9309eb0e6b3bc3dda1ffa7f99410c22355d (diff)
downloademacs-4073e537492ac700f926d1ed0f27d6160a142ae4.tar.gz
emacs-4073e537492ac700f926d1ed0f27d6160a142ae4.zip
Merge from mainline.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog12
-rw-r--r--src/gnutls.c15
-rw-r--r--src/gnutls.h12
-rw-r--r--src/process.c4
4 files changed, 27 insertions, 16 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5ed6826d429..d3a387d1e63 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,4 +1,4 @@
12011-04-09 Paul Eggert <eggert@cs.ucla.edu> 12011-04-10 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 * xdisp.c (vmessage): Use a better test for character truncation. 3 * xdisp.c (vmessage): Use a better test for character truncation.
4 4
@@ -78,6 +78,16 @@
78 78
79 * xdisp.c, lisp.h (message_nolog): Remove; unused. 79 * xdisp.c, lisp.h (message_nolog): Remove; unused.
80 80
812011-04-10 Jim Meyering <meyering@redhat.com>
82
83 use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
84 * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
85 return ssize_t not "int", and use size_t as the buffer length.
86 (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
87 * gnutls.h: Update declarations.
88 * process.c (read_process_output): Use ssize_t, to match.
89 (send_process): Likewise.
90
812011-04-09 Chong Yidong <cyd@stupidchicken.com> 912011-04-09 Chong Yidong <cyd@stupidchicken.com>
82 92
83 * image.c (Fimagemagick_types): Doc fix, and comment cleanup. 93 * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
diff --git a/src/gnutls.c b/src/gnutls.c
index 3a461891e2e..d9e4dcec15a 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -70,11 +70,12 @@ emacs_gnutls_handshake (struct Lisp_Process *proc)
70 } 70 }
71} 71}
72 72
73int 73ssize_t
74emacs_gnutls_write (int fildes, struct Lisp_Process *proc, char *buf, 74emacs_gnutls_write (int fildes, struct Lisp_Process *proc, const char *buf,
75 unsigned int nbyte) 75 size_t nbyte)
76{ 76{
77 register int rtnval, bytes_written; 77 ssize_t rtnval;
78 size_t bytes_written;
78 gnutls_session_t state = proc->gnutls_state; 79 gnutls_session_t state = proc->gnutls_state;
79 80
80 if (proc->gnutls_initstage != GNUTLS_STAGE_READY) { 81 if (proc->gnutls_initstage != GNUTLS_STAGE_READY) {
@@ -109,11 +110,11 @@ emacs_gnutls_write (int fildes, struct Lisp_Process *proc, char *buf,
109 return (bytes_written); 110 return (bytes_written);
110} 111}
111 112
112int 113ssize_t
113emacs_gnutls_read (int fildes, struct Lisp_Process *proc, char *buf, 114emacs_gnutls_read (int fildes, struct Lisp_Process *proc, char *buf,
114 unsigned int nbyte) 115 size_t nbyte)
115{ 116{
116 register int rtnval; 117 ssize_t rtnval;
117 gnutls_session_t state = proc->gnutls_state; 118 gnutls_session_t state = proc->gnutls_state;
118 119
119 if (proc->gnutls_initstage != GNUTLS_STAGE_READY) 120 if (proc->gnutls_initstage != GNUTLS_STAGE_READY)
diff --git a/src/gnutls.h b/src/gnutls.h
index 43a9eefce1b..b39131b6236 100644
--- a/src/gnutls.h
+++ b/src/gnutls.h
@@ -50,15 +50,15 @@ typedef enum
50 50
51#define GNUTLS_LOG2(level, max, string, extra) if (level <= max) { gnutls_log_function2 (level, "(Emacs) " string, extra); } 51#define GNUTLS_LOG2(level, max, string, extra) if (level <= max) { gnutls_log_function2 (level, "(Emacs) " string, extra); }
52 52
53int 53ssize_t
54emacs_gnutls_write (int fildes, struct Lisp_Process *proc, char *buf, 54emacs_gnutls_write (int fildes, struct Lisp_Process *proc, const char *buf,
55 unsigned int nbyte); 55 size_t nbyte);
56int 56ssize_t
57emacs_gnutls_read (int fildes, struct Lisp_Process *proc, char *buf, 57emacs_gnutls_read (int fildes, struct Lisp_Process *proc, char *buf,
58 unsigned int nbyte); 58 size_t nbyte);
59 59
60extern void syms_of_gnutls (void); 60extern void syms_of_gnutls (void);
61 61
62#endif 62#endif
63 63
64#endif 64#endif
diff --git a/src/process.c b/src/process.c
index 6cddbf6d1a9..624610069d8 100644
--- a/src/process.c
+++ b/src/process.c
@@ -4898,7 +4898,7 @@ read_process_output_error_handler (Lisp_Object error_val)
4898static int 4898static int
4899read_process_output (Lisp_Object proc, register int channel) 4899read_process_output (Lisp_Object proc, register int channel)
4900{ 4900{
4901 register int nbytes; 4901 register ssize_t nbytes;
4902 char *chars; 4902 char *chars;
4903 register Lisp_Object outstream; 4903 register Lisp_Object outstream;
4904 register struct Lisp_Process *p = XPROCESS (proc); 4904 register struct Lisp_Process *p = XPROCESS (proc);
@@ -5243,7 +5243,7 @@ send_process (volatile Lisp_Object proc, const char *volatile buf,
5243{ 5243{
5244 /* Use volatile to protect variables from being clobbered by longjmp. */ 5244 /* Use volatile to protect variables from being clobbered by longjmp. */
5245 struct Lisp_Process *p = XPROCESS (proc); 5245 struct Lisp_Process *p = XPROCESS (proc);
5246 EMACS_INT rv; 5246 ssize_t rv;
5247 struct coding_system *coding; 5247 struct coding_system *coding;
5248 struct gcpro gcpro1; 5248 struct gcpro gcpro1;
5249 void (*volatile old_sigpipe) (int); 5249 void (*volatile old_sigpipe) (int);