Commits

Anonymous committed dcd1768

changes to compile under Windows and changes to make building and installing easier and more automated

Comments (0)

Files changed (2)

+2000-07-12  Ben Wing  <ben@xemacs.org>
+
+	* efs.el:
+	* efs.el (efs-null-device): New.
+	* efs.el (efs-tmp-name-template): Fix up problems with Cygwin
+	FTP client and Windows native XEmacs.
+	* efs.el (efs-expand-tilde): Use efs-null-device.
+	* efs.el (efs-guess-host-type): ditto.
+
 2000-10-15  Martin Buchholz <martin@xemacs.org>
 
 	* *: spelling fixes.
 ;; List of gateway types for which we need to do explicit file handling on
 ;; the gateway machine.
 
+(defconst efs-null-device (cond ((boundp 'null-device) null-device)
+				((boundp 'grep-null-device) grep-null-device)
+				((eq system-type 'windows-nt) "nul")
+				(t "/dev/null"))
+  "Filename corresponding to the null device.")
+
 ;;;; ------------------------------------------------------------------
 ;;;; User customization variables. Please read through these carefully.
 ;;;; ------------------------------------------------------------------
 ;;; End of gateway config variables.
 
 (defcustom efs-tmp-name-template
-  (concat (if (fboundp 'temp-directory) (temp-directory) "/tmp") "/efs")
+  (concat (if (fboundp 'temp-directory)
+	      ;; we may be calling the cygwin ftp client, regardless of
+	      ;; whether we're running a cygwin version of xemacs, and it
+	      ;; doesn't accept \'s in filenames.  the windows ftp client
+	      ;; accepts /'s, so use them.
+	      (if (eq system-type 'windows-nt)
+		  (replace-in-string (temp-directory) "\\\\" "/")
+		(temp-directory))
+	    "/tmp") "/efs")
   "Template used to create temporary files.
 If you are worried about security, make this a directory in some
 bomb-proof cave somewhere. efs does clean up its temp files, but
 		  (memq host-type efs-unix-host-types)
 		  (let ((line (nth 1 (efs-send-cmd
 				      host user
-				      (list 'get tilde "/dev/null")
+				      (list 'get tilde efs-null-device)
 				      (format "expanding %s" tilde)))))
 		    (setq res
 			  (and (string-match efs-expand-dir-msgs line)
 	     ;; Try to get tilde.
 	     ((null dir)
 	      (let ((tilde (nth 1 (efs-send-cmd
-				   host user (list 'get "~" "/dev/null")))))
+				   host user (list 'get "~"
+						   efs-null-device)))))
 		(cond
 		 ;; super dumb unix
 		 ((string-match efs-super-dumb-unix-tilde-regexp tilde)