< $(srcdir)\compile.lsp.in > compile.lsp
bare.lsp: $(srcdir)/bare.lsp.in lsp/load.lsp clos/load.lsp cmp/load.lsp cmp/cmpdefs.lsp
c\cut "@true_srcdir@" "$(srcdir:\=/)" \
- "@true_builddir@" "$(MAKEDIR:\=/)" < $(srcdir)\bare.lsp.in > bare.lsp
+ "@true_builddir@" "$(MAKEDIR:\=/)"\
+ "@ECL_CMPDIR@" "cmp" < $(srcdir)\bare.lsp.in > bare.lsp
lsp/load.lsp: $(srcdir)/lsp/load.lsp.in
$(CP) $(srcdir)\lsp\load.lsp.in lsp\load.lsp
clos/load.lsp: $(srcdir)/clos/load.lsp.in
case t_lock:
case t_condition_variable:
#endif
-#ifdef ECL_SEMAPHORES:
+#ifdef ECL_SEMAPHORES
case t_semaphores:
#endif
case t_foreign:
#endif
#ifdef ECL_SEMAPHORES
case t_semaphore: {
+ const cl_env_ptr the_env = ecl_process_env();
ecl_disable_interrupts_env(the_env);
mp_semaphore_close(o);
ecl_enable_interrupts_env(the_env);
#ifdef ECL_THREADS
case t_symbol: {
cl_object cons = ecl_list1(MAKE_FIXNUM(o->symbol.binding));
+ const cl_env_ptr the_env = ecl_process_env();
ecl_disable_interrupts_env(the_env);
THREAD_OP_LOCK();
ECL_CONS_CDR(cons) = cl_core.reused_indices;
stderr, smm_output, 8, flags, external_format);
#else
standard_input = ecl_make_file_stream_from_fd(make_constant_base_string("stdin"),
- STDIN_FILENO, smm_input, 8, flags,
+ STDIN_FILENO, smm_input_file, 8, flags,
external_format);
standard_output = ecl_make_file_stream_from_fd(make_constant_base_string("stdout"),
- STDOUT_FILENO, smm_output, 8, flags,
+ STDOUT_FILENO, smm_output_file, 8, flags,
external_format);
error_output = ecl_make_file_stream_from_fd(make_constant_base_string("stderr"),
- STDERR_FILENO, smm_output, 8, flags,
+ STDERR_FILENO, smm_output_file, 8, flags,
external_format);
#endif
cl_core.standard_input = standard_input;
{EXT_ "EXTERNAL-PROCESS-WAIT", EXT_ORDINARY, si_external_process_wait, -1, OBJNULL},
#if defined(_MSC_VER) || defined(mingw32)
-{SI_ "CLOSE-WINDOWS-HANDLE", SI_ORDINARY, si_close_windows_handle, 1, OBJNULL},
+{SYS_ "CLOSE-WINDOWS-HANDLE", SI_ORDINARY, si_close_windows_handle, 1, OBJNULL},
#endif
/* Tag for end of list */
{EXT_ "EXTERNAL-PROCESS-WAIT","si_external_process_wait"},
#if defined(_MSC_VER) || defined(mingw32)
-{SI_ "CLOSE-WINDOWS-HANDLE","si_close_windows_handle"},
+{SYS_ "CLOSE-WINDOWS-HANDLE","si_close_windows_handle"},
#endif
/* Tag for end of list */
#include <ecl/ecl.h>
#include <stdlib.h>
-#include <strings.h>
+#include <string.h>
#include <stdio.h>
#include <fcntl.h>
#include <ecl/internal.h>
static cl_object
make_windows_handle(HANDLE h)
{
- cl_object h = ecl_allocate_foreign_data(@':pointer', sizeof(HANDLE*));
- HANDLE *ph = (HANDLE*)h->foreign.data;
+ cl_object foreign = ecl_allocate_foreign_data(@':pointer-void',
+ sizeof(HANDLE*));
+ HANDLE *ph = (HANDLE*)foreign->foreign.data;
*ph = h;
- si_set_finalizer(h, @'si::close-windows-handle');
- return h;
+ si_set_finalizer(foreign, @'si::close-windows-handle');
+ return foreign;
}
#endif
cl_object status, code;
@
{
- if (!FIXNUMP(process_or_pid)) {
+ if (type_of(process_or_pid) == T_STRUCTURE) {
cl_object pid = cl_funcall(2, @'ext::external-process-pid',
process_or_pid);
if (Null(pid)) {
status = @':error';
code = Cnil;
} else if (exitcode == STILL_ACTIVE) {
- status = @':runnning';
+ status = @':running';
code = Cnil;
} else {
status = @':exited';
process_or_pid->foreign.data = NULL;
CloseHandle(*hProcess);
}
- ecl_enable_interrupts(the_env);
+ ecl_enable_interrupts_env(the_env);
#else
- cl_index pid = fix(process_or_pid);
+ cl_index pid = fixint(process_or_pid);
int code_int;
int error = waitpid(pid, &code_int, Null(wait)? WNOHANG : 0);
if (error < 0) {
command = ecl_null_terminated_base_string(command);
if (!Null(environ)) {
- env_buffer = from_list_to_execve_arguments(environ, NULL);
+ env_buffer = from_list_to_execve_argument(environ, NULL);
env = env_buffer->base_string.self;
}
CloseHandle(pr_info.hThread);
pid = make_windows_handle(pr_info.hProcess);
} else {
- const char *message;
+ char *message;
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_ALLOCATE_BUFFER,
0, GetLastError(), 0, (void*)&message, 0, NULL);
extern ECL_API cl_object si_enable_interrupts(void);
extern ECL_API cl_object si_trap_fpe(cl_object condition, cl_object flag);
#if defined(_MSC_VER) || defined(mingw32)
-extern LONG WINAPI _ecl_w32_exception_filter(struct _EXCEPTION_POINTERS*);
+extern ECL_API LONG WINAPI _ecl_w32_exception_filter(struct _EXCEPTION_POINTERS*);
#endif
extern ECL_API void ecl_check_pending_interrupts(void);
ecl_frs_pop(__the_env); } while (0)
#if defined(_MSC_VER)
-extern ECL_API LONG WINAPI _ecl_w32_exception_filter(struct _EXCEPTION_POINTERS *);
# define CL_CATCH_ALL_BEGIN(the_env) do { \
const cl_env_ptr __the_env = (the_env); \
_try { \