Raymond Toy pushed to branch master at cmucl / cmucl

Commits:

5 changed files:

Changes:

  • src/code/extfmts.lisp
    ... ... @@ -373,7 +373,7 @@
    373 373
       ;; Set filename encoding to NIL to bypass any encoding; it's not
    
    374 374
       ;; needed to open the aliases file.  NIL means the pathname string is passed as is where only the low 8 bits of the 
    
    375 375
       (let ((*package* (find-package "KEYWORD"))
    
    376
    -	(unix::*filename-encoding* nil))
    
    376
    +	(unix::*filename-encoding* :null))
    
    377 377
         (with-open-file (stm "ext-formats:aliases" :if-does-not-exist nil
    
    378 378
     			 :external-format :iso8859-1)
    
    379 379
           (when stm
    
    ... ... @@ -493,7 +493,7 @@
    493 493
     	     ;; encoding to NIL because we don't need any special
    
    494 494
     	     ;; encoding to open the format files.
    
    495 495
     	     (let* ((*print-readably* nil)
    
    496
    -		    (unix::*filename-encoding* nil)
    
    496
    +		    (unix::*filename-encoding* :null)
    
    497 497
     		    (*package* (find-package "STREAM"))
    
    498 498
     		    (lisp::*enable-package-locked-errors* nil)
    
    499 499
     		    (s (open (format nil "ext-formats:~(~A~).lisp" name)
    
    ... ... @@ -1157,7 +1157,7 @@ character and illegal outputs are replaced by a question mark.")
    1157 1157
         (unless (find-external-format filenames)
    
    1158 1158
           (error (intl:gettext "Can't find external-format ~S.") filenames))
    
    1159 1159
         (setq filenames (ef-name (find-external-format filenames)))
    
    1160
    -    (when (and unix::*filename-encoding*
    
    1160
    +    (when (and (not (eq unix::*filename-encoding* :null))
    
    1161 1161
     	       (not (eq unix::*filename-encoding* filenames)))
    
    1162 1162
           (cerror (intl:gettext "Change it anyway.")
    
    1163 1163
     	      (intl:gettext "The external-format for encoding filenames is already set.")))
    

  • src/code/lispinit.lisp
    ... ... @@ -343,7 +343,7 @@
    343 343
       #-gengc (setf unix::*interrupt-pending* nil)
    
    344 344
       (setf *type-system-initialized* nil)
    
    345 345
       (setf *break-on-signals* nil)
    
    346
    -  (setf unix::*filename-encoding* nil)
    
    346
    +  (setf unix::*filename-encoding* :null)
    
    347 347
       #+gengc (setf conditions::*handler-clusters* nil)
    
    348 348
       (setq intl::*default-domain* "cmucl")
    
    349 349
       (setq intl::*locale* "C")
    

  • src/code/unix.lisp
    ... ... @@ -25,22 +25,22 @@
    25 25
     ;; it must be set to :iso8859-1 (or left as NIL), making files with
    
    26 26
     ;; non-Latin-1 characters "mojibake", but otherwise they'll be inaccessible.
    
    27 27
     ;; Must be set to NIL initially to enable building Lisp!
    
    28
    -(defvar *filename-encoding* nil
    
    28
    +(defvar *filename-encoding* :null
    
    29 29
       "The encoding to use for converting a namestring to a string that can
    
    30 30
       be used by the operations system.  It must be a valid
    
    31
    -  external-format name or NIL.  NIL means the string is passed as is
    
    32
    -  to the operating system.  The operating system will get the low 8
    
    33
    -  bits of each UTF-16 code unit of the string.")
    
    31
    +  external-format name or :NULL.  :NULL means the string
    
    32
    +  is passed as is to the operating system.  The operating system will
    
    33
    +  get the low 8 bits of each UTF-16 code unit of the string.")
    
    34 34
     
    
    35 35
     (eval-when (:compile-toplevel :load-toplevel :execute)
    
    36 36
       (defmacro %name->file (string)
    
    37
    -    `(if *filename-encoding*
    
    38
    -	 (string-encode ,string *filename-encoding*)
    
    39
    -	 ,string))
    
    37
    +    `(if (eql *filename-encoding* :null)
    
    38
    +	 ,string
    
    39
    +	 (string-encode ,string *filename-encoding*)))
    
    40 40
       (defmacro %file->name (string)
    
    41
    -    `(if *filename-encoding*
    
    42
    -	 (string-decode ,string *filename-encoding*)
    
    43
    -	 ,string)))
    
    41
    +    `(if (eql *filename-encoding* :null)
    
    42
    +	 ,string
    
    43
    +	 (string-decode ,string *filename-encoding*))))
    
    44 44
     
    
    45 45
     
    
    46 46
     ;;;; Common machine independent structures.
    

  • src/i18n/locale/cmucl-unix.pot
    ... ... @@ -15,6 +15,15 @@ msgstr ""
    15 15
     "Content-Type: text/plain; charset=UTF-8\n"
    
    16 16
     "Content-Transfer-Encoding: 8bit\n"
    
    17 17
     
    
    18
    +#: src/code/unix.lisp
    
    19
    +msgid ""
    
    20
    +"The encoding to use for converting a namestring to a string that can\n"
    
    21
    +"  be used by the operations system.  It must be a valid\n"
    
    22
    +"  external-format name or :NULL.  :NULL means the string\n"
    
    23
    +"  is passed as is to the operating system.  The operating system will\n"
    
    24
    +"  get the low 8 bits of each UTF-16 code unit of the string."
    
    25
    +msgstr ""
    
    26
    +
    
    18 27
     #: src/code/unix.lisp
    
    19 28
     msgid "Syscall ~A failed: ~A"
    
    20 29
     msgstr ""
    

  • tests/issues.lisp
    ... ... @@ -416,9 +416,12 @@
    416 416
     ;; running a pipeline with linux, but otherwise enable it.  The
    
    417 417
     ;; pipeline defines the envvar GITLAB_CI so check for that.
    
    418 418
     ;;
    
    419
    +;; This also fails on Darwin CI now.  Let's just disable the test if
    
    420
    +;; running on CI.
    
    421
    +;;
    
    419 422
     ;; It would be better if lisp-unit had a way of marking tests as known
    
    420 423
     ;; failures, but it doesn't.
    
    421
    -#+#.(cl:if (cl:and (ext:featurep :linux) (unix:unix-getenv "GITLAB_CI")) '(or) '(and))
    
    424
    +#+#.(cl:if (cl:and (unix:unix-getenv "GITLAB_CI")) '(or) '(and))
    
    422 425
     (define-test issue.41.1
    
    423 426
         (:tag :issues)
    
    424 427
       (issue-41-tester unix:sigstop))