cmake work

This commit is contained in:
Vítor Santos Costa
2015-04-21 16:12:39 -06:00
parent 3b4226bda1
commit db6074f839
7 changed files with 46 additions and 82 deletions

View File

@@ -296,7 +296,6 @@ instead.
sum_list/3,
sumlist/2
]).
:- use_module(library(error),
[must_be/2]).

View File

@@ -51,7 +51,7 @@ X = datime(2001,5,28,15,29,46) ?
Given an environment variable _E_ this predicate unifies the second argument _S_ with its value.
Given an environment variable _E_ this predicate unifies the second argument _S_ with its value.
*/
@@ -384,9 +384,10 @@ also `absolute_file_name/2` and chdir/1.
file_exists/2,
file_property/2,
host_id/1,
host_name/1,
host_name/1,
kill/1,
pid/1,
mktemp/2,
mktemp/2,
make_directory/1,
popen/3,
rename_file/2,
@@ -400,17 +401,13 @@ also `absolute_file_name/2` and chdir/1.
mktime/2,
tmpnam/1,
tmp_file/2,
tmpdir/1,
tmpdir/1,
wait/2,
working_directory/2
]).
:- use_module(library(lists), [append/3]).
:- if(current_prolog_flag(windows, false)).
:- reexport(library(unix), [wait/2,
kill/2]).
:- endif.
:- load_foreign_files([sys], [], init_sys).
:- dynamic tmp_file_sequence_counter/1.
@@ -749,13 +746,13 @@ system(Command, Status) :-
Status = 0,
handle_system_error(Error, off, G).
%% wait(PID,STATUS) :- var(PID), !,
%% throw(error(instantiation_error,wait(PID,STATUS))).
%% wait(PID,STATUS) :- integer(PID), !,
%% wait(PID, STATUS, Error),
%% handle_system_error(Error, off, wait(PID,STATUS)).
%% wait(PID,STATUS) :-
%% throw(error(type_error(integer,PID),wait(PID,STATUS))).
wait(PID,STATUS) :- var(PID), !,
throw(error(instantiation_error,wait(PID,STATUS))).
wait(PID,STATUS) :- integer(PID), !,
wait(PID, STATUS, Error),
handle_system_error(Error, off, wait(PID,STATUS)).
wait(PID,STATUS) :-
throw(error(type_error(integer,PID),wait(PID,STATUS))).
%
% host info
@@ -774,16 +771,16 @@ pid(X) :-
pid(X, Error),
handle_system_error(Error, off, pid(X)).
%% kill(X,Y) :-
%% integer(X), integer(Y), !,
%% kill(X, Y, Error),
%% handle_system_error(Error, off, kill(X,Y)).
%% kill(X,Y) :- (var(X) ; var(Y)), !,
%% throw(error(instantiation_error,kill(X,Y))).
%% kill(X,Y) :- integer(X), !,
%% throw(error(type_error(integer,Y),kill(X,Y))).
%% kill(X,Y) :-
%% throw(error(type_error(integer,X),kill(X,Y))).
kill(X,Y) :-
integer(X), integer(Y), !,
kill(X, Y, Error),
handle_system_error(Error, off, kill(X,Y)).
kill(X,Y) :- (var(X) ; var(Y)), !,
throw(error(instantiation_error,kill(X,Y))).
kill(X,Y) :- integer(X), !,
throw(error(type_error(integer,Y),kill(X,Y))).
kill(X,Y) :-
throw(error(type_error(integer,X),kill(X,Y))).
mktemp(X,Y) :- var(X), !,
throw(error(instantiation_error,mktemp(X,Y))).