Subject: Re: undef WIN32_FILENAMES with cygwin-1.7
From: Vin Shelton <[email-masked]>
To: Reini Urban <[email-masked]>
Cc: [email-masked], The Cygwin Mailing List <[email-masked]>
Date: Thu, 25 Jun 2009 14:13:18 -0400
List-Id: <cygwin.cygwin.com>

Hi, Reini -

On Wed, Jun 24, 2009 at 6:43 AM, Reini Urban wrote:
> cygwin-1.7 removed support for accepting win32 style pathnames.
> xemacs should follow.
>
> The particular problem was file-truename returning a fabricated windows path,
> instead of the POSIX path, which for example failed the mule testsuite for me.
>
>
> diff -u xemacs-21.5.28/src/fileio.c.orig xemacs-21.5.28/src/fileio.c
> --- xemacs-21.5.28/src/fileio.c.orig    2007-02-22 17:19:43.000000000 +0100
> +++ xemacs-21.5.28/src/fileio.c 2009-06-24 12:35:05.703125000 +0200
> @@ -59,7 +59,11 @@
>  #endif /* HPUX */
>
>  #ifdef WIN32_ANY
> +#if (CYGWIN_VERSION_API_MINOR >= 181)
> +#undef WIN32_FILENAMES
> +#else
>  #define WIN32_FILENAMES
> +#endif
>  #include "syswindows.h"
>  #define IS_DRIVE(x) isalpha (x)
>  /* Need to lower-case the drive letter, or else expanded

Interesting.  With or without this patch, I cannot get XEmacs to pass
the mule-tests on a cygwin > cygwin-1.7.047 .  Ever since the 1.7.048
release, the mule-tests have hung. Here's what I did:

I started an XEmacs 21.5 with the -vanilla option to suppress my
start-up files and my system start-up files.

I evaluated the following in the *scratch* buffer:

(setq debug-on-quit t)
(cd "/usr/local/build/xemacs-21.5-test-2009-06-25-mule")
(load-file "tests/automated/test-harness.el")
(test-emacs-test-file "tests/automated/mule-tests.el")

That last call runs forever.  When I interrupt the test with ^G,
here's the backtrace I get:

Debugger entered--Lisp error: (quit)
  make-temp-name("/tmp/s360339.aoa/ĐĐĐĐ")
  (let* ((dstroke ...) (latin2-string ...) (prefix ...)
(file-name-coding-system ...) (name1 ...) (name2 ...) (name3 ...)
working-symlinks) (Assert (not ...)) (Assert (not ...))
(Silence-Message (write-region ... ... name1)) (Assert (file-exists-p
name1)) (Silence-Message (write-region ... ... name3)) (Assert
(file-exists-p name3)) (condition-case nil (make-symbolic-link name1
name3) (file-already-exists ...)) (when working-symlinks
(make-symbolic-link name1 name2) (Assert ...) (Assert ...) (Assert
...)) (ignore-file-errors (delete-file name1)) (ignore-file-errors
(delete-file name2)) (ignore-file-errors (delete-file name3)))
  (progn (macrolet (...) (fillarray-test ascii latin-iso8859-1)
(fillarray-test ascii latin-iso8859-2) (fillarray-test latin-iso8859-1
ascii) (fillarray-test latin-iso8859-2 ascii)) (let (...) (aset string
0 ...) (Assert ...)) (Assert (coding-system-p ...)) (Assert
(coding-system-canonical-name-p ...)) (Assert (not ...)) (Assert (not
...)) (Assert (not ...)) (Check-Error-Message error "Symbol is the
canonical name of a coding system and cannot be redefined"
(define-coding-system-alias ... ...)) (Check-Error-Message error
"Symbol is not a coding system alias" (coding-system-aliasee ...))
(define-coding-system-alias (quote mule-tests-alias) (quote binary))
(Assert (coding-system-alias-p ...)) (Assert (not ...)) (Assert (eq
... ...)) (Assert (eq ... ...)) (Assert (not ...)) (Assert (not ...))
(Assert (not ...)) (define-coding-system-alias (quote
mule-tests-alias) (get-coding-system ...)) (Assert
(coding-system-alias-p ...)) (Assert (not ...)) (Assert (eq ... ...))
(Assert (eq ... ...)) (Assert (not ...)) (Assert (not ...)) (Assert
(not ...)) (define-coding-system-alias (quote nested-mule-tests-alias)
(quote mule-tests-alias)) (Assert (coding-system-alias-p ...)) (Assert
(not ...)) (Assert (eq ... ...)) (Assert (eq ... ...)) (Assert (eq ...
...)) (Assert (not ...)) (Assert (not ...)) (Assert (not ...))
(Check-Error-Message error "Attempt to create a coding system alias
loop" (define-coding-system-alias ... ...)) (Check-Error-Message error
"No such coding system" (define-coding-system-alias ... ...))
(Check-Error-Message error "Attempt to create a coding system alias
loop" (define-coding-system-alias ... ...))
(define-coding-system-alias (quote nested-mule-tests-alias) nil)
(define-coding-system-alias (quote mule-tests-alias) nil) (Assert
(coding-system-p ...)) (Assert (coding-system-canonical-name-p ...))
(Assert (not ...)) (Assert (not ...)) (Assert (not ...))
(Check-Error-Message error "Symbol is the canonical name of a coding
system and cannot be redefined" (define-coding-system-alias ... ...))
(Check-Error-Message error "Symbol is not a coding system alias"
(coding-system-aliasee ...)) (define-coding-system-alias (quote
nested-mule-tests-alias) nil) (define-coding-system-alias (quote
mule-tests-alias) nil) (define-coding-system-alias (quote
mule-tests-alias) (quote iso-8859-7)) (Assert (coding-system-alias-p
...)) ...)
  (if (featurep (quote mule)) (progn (macrolet ... ... ... ... ...)
(let ... ... ...) (Assert ...) (Assert ...) (Assert ...) (Assert ...)
(Assert ...) (Check-Error-Message error "Symbol is the canonical name
of a coding system and cannot be redefined" ...) (Check-Error-Message
error "Symbol is not a coding system alias" ...)
(define-coding-system-alias ... ...) (Assert ...) (Assert ...) (Assert
...) (Assert ...) (Assert ...) (Assert ...) (Assert ...)
(define-coding-system-alias ... ...) (Assert ...) (Assert ...) (Assert
...) (Assert ...) (Assert ...) (Assert ...) (Assert ...)
(define-coding-system-alias ... ...) (Assert ...) (Assert ...) (Assert
...) (Assert ...) (Assert ...) (Assert ...) (Assert ...) (Assert ...)
(Check-Error-Message error "Attempt to create a coding system alias
loop" ...) (Check-Error-Message error "No such coding system" ...)
(Check-Error-Message error "Attempt to create a coding system alias
loop" ...) (define-coding-system-alias ... nil)
(define-coding-system-alias ... nil) (Assert ...) (Assert ...) (Assert
...) (Assert ...) (Assert ...) (Check-Error-Message error "Symbol is
the canonical name of a coding system and cannot be redefined" ...)
(Check-Error-Message error "Symbol is not a coding system alias" ...)
(define-coding-system-alias ... nil) (define-coding-system-alias ...
nil) (define-coding-system-alias ... ...) (Assert ...) ...))
  (when (featurep (quote mule)) (macrolet (...) (fillarray-test ascii
latin-iso8859-1) (fillarray-test ascii latin-iso8859-2)
(fillarray-test latin-iso8859-1 ascii) (fillarray-test latin-iso8859-2
ascii)) (let (...) (aset string 0 ...) (Assert ...)) (Assert
(coding-system-p ...)) (Assert (coding-system-canonical-name-p ...))
(Assert (not ...)) (Assert (not ...)) (Assert (not ...))
(Check-Error-Message error "Symbol is the canonical name of a coding
system and cannot be redefined" (define-coding-system-alias ... ...))
(Check-Error-Message error "Symbol is not a coding system alias"
(coding-system-aliasee ...)) (define-coding-system-alias (quote
mule-tests-alias) (quote binary)) (Assert (coding-system-alias-p ...))
(Assert (not ...)) (Assert (eq ... ...)) (Assert (eq ... ...)) (Assert
(not ...)) (Assert (not ...)) (Assert (not ...))
(define-coding-system-alias (quote mule-tests-alias)
(get-coding-system ...)) (Assert (coding-system-alias-p ...)) (Assert
(not ...)) (Assert (eq ... ...)) (Assert (eq ... ...)) (Assert (not
...)) (Assert (not ...)) (Assert (not ...))
(define-coding-system-alias (quote nested-mule-tests-alias) (quote
mule-tests-alias)) (Assert (coding-system-alias-p ...)) (Assert (not
...)) (Assert (eq ... ...)) (Assert (eq ... ...)) (Assert (eq ...
...)) (Assert (not ...)) (Assert (not ...)) (Assert (not ...))
(Check-Error-Message error "Attempt to create a coding system alias
loop" (define-coding-system-alias ... ...)) (Check-Error-Message error
"No such coding system" (define-coding-system-alias ... ...))
(Check-Error-Message error "Attempt to create a coding system alias
loop" (define-coding-system-alias ... ...))
(define-coding-system-alias (quote nested-mule-tests-alias) nil)
(define-coding-system-alias (quote mule-tests-alias) nil) (Assert
(coding-system-p ...)) (Assert (coding-system-canonical-name-p ...))
(Assert (not ...)) (Assert (not ...)) (Assert (not ...))
(Check-Error-Message error "Symbol is the canonical name of a coding
system and cannot be redefined" (define-coding-system-alias ... ...))
(Check-Error-Message error "Symbol is not a coding system alias"
(coding-system-aliasee ...)) (define-coding-system-alias (quote
nested-mule-tests-alias) nil) (define-coding-system-alias (quote
mule-tests-alias) nil) (define-coding-system-alias (quote
mule-tests-alias) (quote iso-8859-7)) ...)
  (lambda nil (defvar passes) (defvar assertion-failures) (defvar
no-error-failures) (defvar wrong-error-failures) (defvar
missing-message-failures) (defvar other-failures) (defvar
trick-optimizer) (require (quote bytecomp)) (defun test-chars
(&optional for-test-harness) "Insert all characters in a buffer, to
see if XEmacs will crash.\nThis is done by creating a string with all
the legal characters\nin [0, 2^21) range, inserting it into the
buffer, and checking\nthat the buffer's contents are equivalent to the
string.\n\nIf FOR-TEST-HARNESS is specified, a temporary buffer is
used, and\nthe Assert macro checks for correctness." (let ... ...
...)) (test-chars t) (defun unicode-code-point-to-utf-8-string
(code-point) "Convert a Unicode code point to the equivalent UTF-8
string. \nThis is a naive implementation in Lisp.  "
(check-argument-type ... code-point) (check-argument-range code-point
0 2097151) (if ... ... ...)) (let (... revert-buffer-function
kill-buffer-hook) (find-file test-file-name) (erase-buffer) (insert "a
string\n") (Silence-Message ...) (insert "more text\n") (revert-buffer
t t) (Assert ...) (kill-buffer nil) (when ... ... ... ... ... ...)
(delete-file test-file-name)) (when (featurep ...) (macrolet ... ...
... ... ...) (let ... ... ...) (Assert ...) (Assert ...) (Assert ...)
(Assert ...) (Assert ...) (Check-Error-Message error "Symbol is the
canonical name of a coding system and cannot be redefined" ...)
(Check-Error-Message error "Symbol is not a coding system alias" ...)
(define-coding-system-alias ... ...) (Assert ...) (Assert ...) (Assert
...) (Assert ...) (Assert ...) (Assert ...) (Assert ...)
(define-coding-system-alias ... ...) (Assert ...) (Assert ...) (Assert
...) (Assert ...) (Assert ...) (Assert ...) (Assert ...)
(define-coding-system-alias ... ...) (Assert ...) (Assert ...) (Assert
...) (Assert ...) (Assert ...) (Assert ...) (Assert ...) (Assert ...)
(Check-Error-Message error "Attempt to create a coding system alias
loop" ...) (Check-Error-Message error "No such coding system" ...)
(Check-Error-Message error "Attempt to create a coding system alias
loop" ...) (define-coding-system-alias ... nil)
(define-coding-system-alias ... nil) (Assert ...) (Assert ...) (Assert
...) (Assert ...) (Assert ...) (Check-Error-Message error "Symbol is
the canonical name of a coding system and cannot be redefined" ...)
(Check-Error-Message error "Symbol is not a coding system alias" ...)
(define-coding-system-alias ... nil) (define-coding-system-alias ...
nil) (define-coding-system-alias ... ...) ...))()
  funcall((lambda nil (defvar passes) (defvar assertion-failures)
(defvar no-error-failures) (defvar wrong-error-failures) (defvar
missing-message-failures) (defvar other-failures) (defvar
trick-optimizer) (require (quote bytecomp)) (defun test-chars
(&optional for-test-harness) "Insert all characters in a buffer, to
see if XEmacs will crash.\nThis is done by creating a string with all
the legal characters\nin [0, 2^21) range, inserting it into the
buffer, and checking\nthat the buffer's contents are equivalent to the
string.\n\nIf FOR-TEST-HARNESS is specified, a temporary buffer is
used, and\nthe Assert macro checks for correctness." (let ... ...
...)) (test-chars t) (defun unicode-code-point-to-utf-8-string
(code-point) "Convert a Unicode code point to the equivalent UTF-8
string. \nThis is a naive implementation in Lisp.  "
(check-argument-type ... code-point) (check-argument-range code-point
0 2097151) (if ... ... ...)) (let (... revert-buffer-function
kill-buffer-hook) (find-file test-file-name) (erase-buffer) (insert "a
string\n") (Silence-Message ...) (insert "more text\n") (revert-buffer
t t) (Assert ...) (kill-buffer nil) (when ... ... ... ... ... ...)
(delete-file test-file-name)) (when (featurep ...) (macrolet ... ...
... ... ...) (let ... ... ...) (Assert ...) (Assert ...) (Assert ...)
(Assert ...) (Assert ...) (Check-Error-Message error "Symbol is the
canonical name of a coding system and cannot be redefined" ...)
(Check-Error-Message error "Symbol is not a coding system alias" ...)
(define-coding-system-alias ... ...) (Assert ...) (Assert ...) (Assert
...) (Assert ...) (Assert ...) (Assert ...) (Assert ...)
(define-coding-system-alias ... ...) (Assert ...) (Assert ...) (Assert
...) (Assert ...) (Assert ...) (Assert ...) (Assert ...)
(define-coding-system-alias ... ...) (Assert ...) (Assert ...) (Assert
...) (Assert ...) (Assert ...) (Assert ...) (Assert ...) (Assert ...)
(Check-Error-Message error "Attempt to create a coding system alias
loop" ...) (Check-Error-Message error "No such coding system" ...)
(Check-Error-Message error "Attempt to create a coding system alias
loop" ...) (define-coding-system-alias ... nil)
(define-coding-system-alias ... nil) (Assert ...) (Assert ...) (Assert
...) (Assert ...) (Assert ...) (Check-Error-Message error "Symbol is
the canonical name of a coding system and cannot be redefined" ...)
(Check-Error-Message error "Symbol is not a coding system alias" ...)
(define-coding-system-alias ... nil) (define-coding-system-alias ...
nil) (define-coding-system-alias ... ...) ...)))
  (condition-case error-info (funcall (test-harness-read-from-buffer
inbuffer)) (error (incf unexpected-test-file-failures) (princ ...)
(message "Unexpected error %S while executing interpreted code."
error-info) (message "Test suite execution aborted." error-info)))
  (with-output-to-temp-buffer "*Test-Log*" (princ (format "Testing
%s...\n\n" filename)) (defconst test-harness-failure-tag "FAIL")
(defconst test-harness-success-tag "PASS") (defmacro
Known-Bug-Expect-Failure (&rest body) (backquote ...)) (defmacro
Known-Bug-Expect-Error (expected-error &rest body) (let ... ...))
(defmacro Implementation-Incomplete-Expect-Failure (&rest body)
(backquote ...)) (defun Print-Failure (fmt &rest args) (setq fmt ...)
(if ... ...) (princ ...)) (defun Print-Pass (fmt &rest args) (setq fmt
...) (and test-harness-verbose ...)) (defun Print-Skip (test reason
&optional fmt &rest args) (setq fmt ...) (princ ...)) (defmacro
Skip-Test-Unless (condition reason description &rest body) "Unless
CONDITION is satisfied, skip test BODY.\nREASON is a description of
the condition failure, and must be unique (it\nis used as a hash key).
 DESCRIPTION describes the tests that were skipped.\nBODY is a
sequence of expressions and may contain several tests." (backquote
...)) (defmacro Assert (assertion &optional failing-case) (backquote
...)) (defmacro Check-Error (expected-error &rest body) (let ... ...))
(defmacro Check-Error-Message (expected-error expected-error-regexp
&rest body) (let ... ...)) (defmacro Check-Message
(expected-message-regexp &rest body) (Skip-Test-Unless ... "can't
defadvice" expected-message-regexp ...)) (defmacro Silence-Message
(&rest body) (backquote ...)) (defmacro Ignore-Ebola (&rest body)
(backquote ...)) (defun Int-to-Marker (pos) (save-excursion ... ...))
(princ "Testing Interpreted Lisp\n\n") (condition-case error-info
(funcall ...) (error ... ... ... ...)) (princ "\nTesting Compiled
Lisp\n\n") (let (code ...) (condition-case error-info ... ...)
(condition-case error-info ... ...)) (princ (format "\nSUMMARY for
%s:\n" filename)) (princ (format "	%5d passes\n" passes)) (princ
(format "	%5d assertion failures\n" assertion-failures)) (princ
(format "	%5d errors that should have been generated, but weren't\n"
no-error-failures)) (princ (format "	%5d wrong-error failures\n"
wrong-error-failures)) (princ (format "	%5d missing-message
failures\n" missing-message-failures)) (princ (format "	%5d other
failures\n" other-failures)) (let* (... ... ... ...) (maphash ...
skipped-test-reasons) (when ... ...) (setq
test-harness-file-results-alist ...) (message "%s" summary-msg)) (when
(> unexpected-test-file-failures 0) (setq
unexpected-test-suite-failure-files ...) (setq
unexpected-test-suite-failures ...) (message "Test suite execution
failed unexpectedly.")) (fmakunbound (quote Assert)) (fmakunbound
(quote Check-Error)) (fmakunbound (quote Check-Message)) (fmakunbound
(quote Check-Error-Message)) (fmakunbound (quote Ignore-Ebola))
(fmakunbound (quote Int-to-Marker)) (and noninteractive (message "%s"
...)))
  (let ((passes 0) (assertion-failures 0) (no-error-failures 0)
(wrong-error-failures 0) (missing-message-failures 0) (other-failures
0) (unexpected-test-file-failures 0) (skipped-test-reasons ...)
(trick-optimizer nil) (debug-on-error t) (pass-stream nil))
(with-output-to-temp-buffer "*Test-Log*" (princ ...) (defconst
test-harness-failure-tag "FAIL") (defconst test-harness-success-tag
"PASS") (defmacro Known-Bug-Expect-Failure ... ...) (defmacro
Known-Bug-Expect-Error ... ...) (defmacro
Implementation-Incomplete-Expect-Failure ... ...) (defun Print-Failure
... ... ... ...) (defun Print-Pass ... ... ...) (defun Print-Skip ...
... ...) (defmacro Skip-Test-Unless ... "Unless CONDITION is
satisfied, skip test BODY.\nREASON is a description of the condition
failure, and must be unique (it\nis used as a hash key).  DESCRIPTION
describes the tests that were skipped.\nBODY is a sequence of
expressions and may contain several tests." ...) (defmacro Assert ...
...) (defmacro Check-Error ... ...) (defmacro Check-Error-Message ...
...) (defmacro Check-Message ... ...) (defmacro Silence-Message ...
...) (defmacro Ignore-Ebola ... ...) (defun Int-to-Marker ... ...)
(princ "Testing Interpreted Lisp\n\n") (condition-case error-info ...
...) (princ "\nTesting Compiled Lisp\n\n") (let ... ... ...) (princ
...) (princ ...) (princ ...) (princ ...) (princ ...) (princ ...)
(princ ...) (let* ... ... ... ... ...) (when ... ... ... ...)
(fmakunbound ...) (fmakunbound ...) (fmakunbound ...) (fmakunbound
...) (fmakunbound ...) (fmakunbound ...) (and noninteractive ...)))
  test-harness-from-buffer(#<buffer " *Test Input*">
"/usr/local/build/xemacs-21.5-test-2009-06-25-mule/tests/automated/mule-tests.el")
  (let ((test-harness-current-file filename) input-buffer)
(save-excursion (setq input-buffer ...) (set-buffer input-buffer)
(erase-buffer) (insert-file-contents filename) (let ... ... ...))
(test-harness-from-buffer input-buffer filename) (kill-buffer
input-buffer))
  test-emacs-test-file("tests/automated/mule-tests.el")
  eval-buffer(#<buffer "*scratch*"> nil)
  ;;; Reading at buffer position 575
  #<compiled-function (&optional printflag) "...(5)" [printflag
eval-buffer] 3 1049867 nil>()
  call-interactively(eval-current-buffer)
  command-execute(eval-current-buffer t)
  execute-extended-command(nil)
  call-interactively(execute-extended-command)
  (dispatch-event "[internal]")

What locale are you running in?  I tried using LANG=en_US.UTF-8, but
that had no effect.

Any insights would be appreciated.

Regards,
  Vin

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple