@@ -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 ) {
372+ return caml_io_buffer_size ;
373+ }
374+
375+ //Provides: caml_sys_temp_dir_name
376+ //Requires: os_type
377+ //Requires: caml_string_of_jsstring
378+ //Version: >= 5.4
379+ function caml_sys_temp_dir_name ( _unit ) {
380+ if ( os_type === "Win32" && require ( "node:os" ) . tmpdir ) {
381+ return caml_string_of_jsstring ( globalThis . os . tmpdir ( ) ) ;
382+ } else {
383+ return caml_string_of_jsstring ( "" ) ;
384+ }
385+ }
386+
387+ //Provides: caml_sys_convert_signal_number
388+ //Version: >= 5.4
389+ function caml_sys_convert_signal_number ( signo ) {
390+ return signo ;
391+ }
392+
393+ //Provides: caml_sys_rev_convert_signal_number
394+ //Version: >= 5.4
395+ function caml_sys_rev_convert_signal_number ( signo ) {
396+ return signo ;
397+ }
398+
353399//Always
354400//Requires: caml_fatal_uncaught_exception
355401//If: !wasm
0 commit comments