emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/gnus/pop3.el


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/gnus/pop3.el
Date: Thu, 02 Jun 2005 07:34:03 -0400

Index: emacs/lisp/gnus/pop3.el
diff -c emacs/lisp/gnus/pop3.el:1.28 emacs/lisp/gnus/pop3.el:1.29
*** emacs/lisp/gnus/pop3.el:1.28        Mon May 30 17:13:58 2005
--- emacs/lisp/gnus/pop3.el     Thu Jun  2 11:33:59 2005
***************
*** 1,6 ****
  ;;; pop3.el --- Post Office Protocol (RFC 1460) interface
  
! ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
  ;;        Free Software Foundation, Inc.
  
  ;; Author: Richard L. Pieri <address@hidden>
--- 1,7 ----
  ;;; pop3.el --- Post Office Protocol (RFC 1460) interface
  
! ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
! ;; 2005
  ;;        Free Software Foundation, Inc.
  
  ;; Author: Richard L. Pieri <address@hidden>
***************
*** 348,368 ****
  
  ;; AUTHORIZATION STATE
  
  (eval-and-compile
!   (if (fboundp 'md5)
!       (defalias 'pop3-md5 'md5)
      (defvar pop3-md5-program "md5"
!       "*Program to encode its input in MD5.")
! 
      (defun pop3-md5 (string)
!       (with-temp-buffer
!       (insert string)
!       (call-process-region (point-min) (point-max)
!                            pop3-md5-program
!                            t (current-buffer) nil)
!       ;; The meaningful output is the first 32 characters.
!       ;; Don't return the newline that follows them!
!       (buffer-substring (point-min) (+ 32 (point-min)))))))
  
  (defun pop3-user (process user)
    "Send USER information to POP3 server."
--- 349,384 ----
  
  ;; AUTHORIZATION STATE
  
+ (eval-when-compile
+   (if (not (fboundp 'md5)) ;; Emacs 20
+       (defalias 'md5 'ignore)))
+ 
  (eval-and-compile
!   (if (and (fboundp 'md5)
!          ;; There might be an incompatible implementation.
!          (condition-case nil
!              (md5 "Check whether the 4th argument is allowed"
!                   nil nil 'binary)
!            (error nil)))
!       (defun pop3-md5 (string)
!       (md5 string nil nil 'binary))
      (defvar pop3-md5-program "md5"
!       "*Program to encode its input in MD5.
! \"openssl\" is a popular alternative; set `pop3-md5-program-args' to
! '(\"md5\") if you use it.")
!     (defvar pop3-md5-program-args nil
!       "*List of arguments passed to `pop3-md5-program'.")
      (defun pop3-md5 (string)
!       (let ((default-enable-multibyte-characters t)
!           (coding-system-for-write 'binary))
!       (with-temp-buffer
!         (insert string)
!         (apply 'call-process-region (point-min) (point-max)
!                pop3-md5-program t (current-buffer) nil
!                pop3-md5-program-args)
!         ;; The meaningful output is the first 32 characters.
!         ;; Don't return the newline that follows them!
!         (buffer-substring (point-min) (+ 32 (point-min))))))))
  
  (defun pop3-user (process user)
    "Send USER information to POP3 server."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]