-int
-emacs_gnutls_write (int fildes, struct Lisp_Process *proc, char *buf,
- unsigned int nbyte);
-int
-emacs_gnutls_read (int fildes, struct Lisp_Process *proc, char *buf,
- unsigned int nbyte);
+extern ptrdiff_t
+emacs_gnutls_write (struct Lisp_Process *proc, const char *buf, ptrdiff_t nbyte);
+extern ptrdiff_t
+emacs_gnutls_read (struct Lisp_Process *proc, char *buf, ptrdiff_t nbyte);
+
+extern int emacs_gnutls_record_check_pending (gnutls_session_t state);
+extern void emacs_gnutls_transport_set_errno (gnutls_session_t state, int err);