@@ -133,6 +133,17 @@ function caml_sys_getenv(name) {
133133 return caml_string_of_jsstring ( r ) ;
134134}
135135
136+ //Provides: caml_sys_getenv_opt (const)
137+ //Requires: caml_string_of_jsstring
138+ //Requires: caml_jsstring_of_string
139+ //Requires: jsoo_sys_getenv
140+ //Version: >= 5.4
141+ function caml_sys_getenv_opt ( name ) {
142+ var r = jsoo_sys_getenv ( caml_jsstring_of_string ( name ) ) ;
143+ if ( r === undefined ) return 0 ;
144+ return [ 0 , caml_string_of_jsstring ( r ) ] ;
145+ }
146+
136147//Provides: caml_sys_unsafe_getenv
137148//Requires: caml_sys_getenv
138149function caml_sys_unsafe_getenv ( name ) {
@@ -350,6 +361,41 @@ function caml_sys_is_regular_file(name) {
350361 var root = resolve_fs_device ( name ) ;
351362 return root . device . isFile ( root . rest ) ;
352363}
364+
365+ //Provides: caml_io_buffer_size
366+ var caml_io_buffer_size = 65536
367+
368+ //Provides: caml_sys_io_buffer_size
369+ //Requires: caml_io_buffer_size
370+ //Version: >= 5.4
371+ function caml_sys_io_buffer_size ( _unit ) { return caml_io_buffer_size ; }
372+
373+ //Provides: caml_sys_temp_dir_name
374+ //Requires: os_type
375+ //Requires: caml_string_of_jsstring
376+ //Version: >= 5.4
377+ function caml_sys_temp_dir_name ( _unit ) {
378+ if ( os_type === "Win32" && globalThis . os . tmpdir ) {
379+ return caml_string_of_jsstring ( globalThis . os . tmpdir ( ) )
380+ }
381+ else {
382+ return caml_string_of_jsstring ( "" )
383+ }
384+ }
385+
386+ //Provides: caml_sys_convert_signal_number
387+ //Version: >= 5.4
388+ function caml_sys_convert_signal_number ( signo ) {
389+ return signo ;
390+ }
391+
392+ //Provides: caml_sys_rev_convert_signal_number
393+ //Version: >= 5.4
394+ function caml_sys_rev_convert_signal_number ( signo )
395+ {
396+ return signo
397+ }
398+
353399//Always
354400//Requires: caml_fatal_uncaught_exception
355401//If: !wasm
0 commit comments