Better, simpler, removal of unix type aliases
parent
6e0557f6d7
commit
0e2a4a6ea7
|
@ -28,7 +28,7 @@
|
|||
|
||||
(** Interface to the Unix system.
|
||||
|
||||
To use the labeled version of this module, add [module Unix = UnixLabels]
|
||||
To use the labeled version of this module, add [module Unix][ = ][UnixLabels]
|
||||
in your implementation.
|
||||
|
||||
Note: all the functions of this module (except {!error_message} and
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
(** Interface to the Unix system.
|
||||
|
||||
To use the labeled version of this module, add [module Unix = UnixLabels]
|
||||
To use the labeled version of this module, add [module Unix][ = ][UnixLabels]
|
||||
in your implementation.
|
||||
|
||||
Note: all the functions of this module (except {!error_message} and
|
||||
|
|
|
@ -115,61 +115,13 @@ perl -p -e "$TILDEREGEX" \
|
|||
otherlibs/unix/unix.temp.mli > otherlibs/unix/unix.2temp.mli
|
||||
#Since
|
||||
perl -p -e "$SINCEREGEX" \
|
||||
otherlibs/unix/unix.2temp.mli > otherlibs/unix/unix.mli
|
||||
otherlibs/unix/unix.2temp.mli > otherlibs/unix/unix.3temp.mli
|
||||
|
||||
#Remove type equivalences from unix.mli
|
||||
|
||||
#If one name is a prefix of another, must be after it in this list.
|
||||
#e.g interval_timer_status and interval_timer
|
||||
declare -a arr=("error"
|
||||
"process_status"
|
||||
"wait_flag"
|
||||
"file_descr"
|
||||
"open_flag"
|
||||
"seek_command"
|
||||
"file_kind"
|
||||
"stats"
|
||||
"LargeFile.stats"
|
||||
"access_permission"
|
||||
"dir_handle"
|
||||
"lock_command"
|
||||
"sigprocmask_command"
|
||||
"process_times"
|
||||
"tm"
|
||||
"interval_timer_status"
|
||||
"interval_timer"
|
||||
"passwd_entry"
|
||||
"group_entry"
|
||||
"inet_addr"
|
||||
"socket_domain"
|
||||
"socket_type"
|
||||
"sockaddr"
|
||||
"shutdown_command"
|
||||
"msg_flag"
|
||||
"host_entry"
|
||||
"protocol_entry"
|
||||
"service_entry"
|
||||
"terminal_io"
|
||||
"setattr_when"
|
||||
"flush_queue"
|
||||
"flow_action"
|
||||
"socket_bool_option"
|
||||
"socket_int_option"
|
||||
"socket_optint_option"
|
||||
"socket_float_option"
|
||||
"addr_info"
|
||||
"getaddrinfo_option"
|
||||
"name_info"
|
||||
"getnameinfo_option")
|
||||
|
||||
for typ in "${arr[@]}"
|
||||
do
|
||||
export typ
|
||||
tmpfile=$(mktemp)
|
||||
perl -p -e 's/ = Unix.$ENV{'typ'}//' otherlibs/unix/unix.mli > ${tmpfile}
|
||||
cat ${tmpfile} > otherlibs/unix/unix.mli
|
||||
rm -f ${tmpfile}
|
||||
done
|
||||
perl -p -e 's/ = Unix.[a-z_]+//' \
|
||||
otherlibs/unix/unix.3temp.mli > otherlibs/unix/unix.4temp.mli
|
||||
perl -p -e 's/ = Unix.LargeFile.stats//' \
|
||||
otherlibs/unix/unix.4temp.mli > otherlibs/unix/unix.mli
|
||||
|
||||
#Clean up
|
||||
rm -f stdlib/*temp.mli
|
||||
|
|
Loading…
Reference in New Issue