From aeca7656f499d7f4595319858f242276920e31bb Mon Sep 17 00:00:00 2001 From: Louis Gesbert Date: Sat, 2 Dec 2017 12:51:01 +0100 Subject: [PATCH] Fix for ocaml 4.06 --- common/criteria_lexer.mll | 8 ++++---- common/util.ml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/criteria_lexer.mll b/common/criteria_lexer.mll index 71f9178..fc4eae3 100644 --- a/common/criteria_lexer.mll +++ b/common/criteria_lexer.mll @@ -18,7 +18,7 @@ let c = Lexing.lexeme_char lexbuf 2 in (* the delimiter can be any character *) (* find the terminating delimiter *) let endpos = - try String.index_from lexbuf.lex_buffer (lexbuf.lex_start_pos + 3) c with + try Bytes.index_from lexbuf.lex_buffer (lexbuf.lex_start_pos + 3) c with |Invalid_argument _ -> raise (Format822.Syntax_error ( Format822.error lexbuf "String too short")) @@ -27,9 +27,9 @@ Format822.error lexbuf (Printf.sprintf "cannot find: %c" c))) in let len = endpos - (lexbuf.lex_start_pos + 3) in - let s = String.sub lexbuf.lex_buffer (lexbuf.lex_start_pos + 3) len in - lexbuf.Lexing.lex_curr_pos <- lexbuf.Lexing.lex_start_pos + ((String.length s)+4); - s + let s = Bytes.sub lexbuf.lex_buffer (lexbuf.lex_start_pos + 3) len in + lexbuf.Lexing.lex_curr_pos <- lexbuf.Lexing.lex_start_pos + ((Bytes.length s)+4); + Bytes.to_string s } diff --git a/common/util.ml b/common/util.ml index 598f266..36ca3d1 100644 --- a/common/util.ml +++ b/common/util.ml @@ -87,7 +87,7 @@ module MakeMessages(X : sig val label : string end) = struct let clean label = try let s = Filename.chop_extension (Filename.basename label) in - String.capitalize s + String.capitalize_ascii s with Invalid_argument _ -> label let create ?(enabled=false) label = -- 2.11.0 thor'>author
path: root/gnu/system/file-systems.scm
AgeCommit message (Collapse)Author
2019-11-04file-systems: Mount /var/run/nscd read-write in containers.Ludovic Courtès
Fixes <https://bugs.gnu.org/37967>. Reported by Ivan Vilata i Balaguer <ivan@selidor.net>. * gnu/system/file-systems.scm (%network-file-mappings): Set 'writable?' to #true for /var/run/nscd.
2019-09-12file-systems: Add /var/run/nscd to '%network-file-mappings'.Ludovic Courtès
This allows containers created by "guix environment -CN" or by "guix system container -N" to talk to the host nscd. * gnu/system/file-systems.scm (%network-file-mappings): Add "/var/run/nscd". * gnu/build/shepherd.scm (default-mounts)[nscd-socket]: Remove. * gnu/system/linux-container.scm (container-script)[nscd-run-directory] [nscd-mapping, nscd-os, nscd-specs]: Remove. [script]: Filter out from SPECS bind-mounts where the device does not exist. * guix/scripts/environment.scm (launch-environment/container) [optional-mapping->fs]: New procedure. [mappings]: Remove %NETWORK-FILE-MAPPINGS. [file-systems]: Add %NETWORK-FILE-MAPPINGS here, filtered through 'optional-mapping->fs'.
2019-07-19file-systems: Use 'no-atime' for %IMMUTABLE-STORE.Ludovic Courtès
* gnu/system/file-systems.scm (%immutable-store): Add 'no-atime'.