rktio: fix MinGW compilation
This commit is contained in:
parent
c02eacd5d2
commit
46908c377c
45
racket/src/configure
vendored
45
racket/src/configure
vendored
|
@ -4701,51 +4701,6 @@ $as_echo "#define HAVE_STDINT_H 1" >>confdefs.h
|
|||
DLLTOOL="${host}-dlltool"
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lwinpthread" >&5
|
||||
$as_echo_n "checking for pthread_create in -lwinpthread... " >&6; }
|
||||
if ${ac_cv_lib_winpthread_pthread_create+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lwinpthread $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char pthread_create ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return pthread_create ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_winpthread_pthread_create=yes
|
||||
else
|
||||
ac_cv_lib_winpthread_pthread_create=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_winpthread_pthread_create" >&5
|
||||
$as_echo "$ac_cv_lib_winpthread_pthread_create" >&6; }
|
||||
if test "x$ac_cv_lib_winpthread_pthread_create" = xyes; then :
|
||||
has_winpthread=yes
|
||||
else
|
||||
has_winpthread=no
|
||||
fi
|
||||
|
||||
if test "${has_winpthread}" = "yes" ; then
|
||||
LIBS="${LIBS} -Wl,-Bstatic -lwinpthread"
|
||||
fi
|
||||
case "$build_os" in
|
||||
*cygwin*)
|
||||
PWD="cygpath -m \\\`pwd\\\`"
|
||||
|
|
|
@ -805,10 +805,6 @@ case "$host_os" in
|
|||
DLLTOOL="${host}-dlltool"
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB(winpthread, pthread_create, has_winpthread=yes, has_winpthread=no)
|
||||
if test "${has_winpthread}" = "yes" ; then
|
||||
LIBS="${LIBS} -Wl,-Bstatic -lwinpthread"
|
||||
fi
|
||||
case "$build_os" in
|
||||
*cygwin*)
|
||||
PWD="cygpath -m \\\`pwd\\\`"
|
||||
|
|
|
@ -6195,19 +6195,7 @@ static Scheme_Object *sch_shell_execute(int c, Scheme_Object *argv[])
|
|||
and the problem was intermittent (e.g., worked for opening a URL
|
||||
with IE as the default browser, but failed with Netscape). */
|
||||
if (ShellExecuteW(se.hwnd, se.lpVerb, se.lpFile, se.lpParameters, se.lpDirectory, se.nShow)) {
|
||||
if (se.hProcess) {
|
||||
Scheme_Subprocess *subproc;
|
||||
|
||||
subproc = MALLOC_ONE_TAGGED(Scheme_Subprocess);
|
||||
|
||||
subproc->so.type = scheme_subprocess_type;
|
||||
subproc->handle = (void *)se.hProcess;
|
||||
subproc->pid = 0;
|
||||
scheme_add_finalizer(subproc, close_subprocess_handle, NULL);
|
||||
|
||||
return (Scheme_Object *)subproc;
|
||||
} else
|
||||
return scheme_false;
|
||||
return scheme_false;
|
||||
} else {
|
||||
scheme_signal_error("shell-execute: execute failed\n"
|
||||
" command: %V\n"
|
||||
|
@ -6292,8 +6280,8 @@ typedef struct ITimer_Data {
|
|||
int done;
|
||||
HANDLE itimer;
|
||||
intptr_t delay;
|
||||
OS_SEMAPHORE_TYPE semaphore;
|
||||
OS_SEMAPHORE_TYPE done_semaphore;
|
||||
HANDLE semaphore;
|
||||
HANDLE done_semaphore;
|
||||
int volatile *fuel_counter_ptr;
|
||||
uintptr_t volatile *jit_stack_boundary_ptr;
|
||||
} ITimer_Data;
|
||||
|
|
48
racket/src/rktio/configure
vendored
48
racket/src/rktio/configure
vendored
|
@ -3315,55 +3315,7 @@ case "$host_os" in
|
|||
hpux*)
|
||||
;;
|
||||
*mingw*)
|
||||
enable_pthread_by_default=yes
|
||||
use_flag_pthread=no
|
||||
skip_iconv_check=yes
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lwinpthread" >&5
|
||||
$as_echo_n "checking for pthread_create in -lwinpthread... " >&6; }
|
||||
if ${ac_cv_lib_winpthread_pthread_create+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lwinpthread $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char pthread_create ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return pthread_create ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_winpthread_pthread_create=yes
|
||||
else
|
||||
ac_cv_lib_winpthread_pthread_create=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_winpthread_pthread_create" >&5
|
||||
$as_echo "$ac_cv_lib_winpthread_pthread_create" >&6; }
|
||||
if test "x$ac_cv_lib_winpthread_pthread_create" = xyes; then :
|
||||
has_winpthread=yes
|
||||
else
|
||||
has_winpthread=no
|
||||
fi
|
||||
|
||||
if test "${has_winpthread}" = "yes" ; then
|
||||
LIBS="${LIBS} -Wl,-Bstatic -lwinpthread"
|
||||
fi
|
||||
;;
|
||||
cygwin*)
|
||||
;;
|
||||
|
|
|
@ -78,14 +78,7 @@ case "$host_os" in
|
|||
hpux*)
|
||||
;;
|
||||
*mingw*)
|
||||
enable_pthread_by_default=yes
|
||||
use_flag_pthread=no
|
||||
skip_iconv_check=yes
|
||||
|
||||
AC_CHECK_LIB(winpthread, pthread_create, has_winpthread=yes, has_winpthread=no)
|
||||
if test "${has_winpthread}" = "yes" ; then
|
||||
LIBS="${LIBS} -Wl,-Bstatic -lwinpthread"
|
||||
fi
|
||||
;;
|
||||
cygwin*)
|
||||
;;
|
||||
|
|
|
@ -241,7 +241,7 @@ RKTIO_EXTERN rktio_ok_t rktio_file_unlock(rktio_t *rktio, rktio_fd_t *rfd);
|
|||
typedef rktio_int64_t rktio_filesize_t;
|
||||
|
||||
rktio_ok_t rktio_set_file_position(rktio_t *rktio, rktio_fd_t *rfd, rktio_filesize_t pos, int whence);
|
||||
/* Can report `RKTIO_ERROR_CANNOT_SET_FILE_POSITION` on Windows. */
|
||||
/* Can report `RKTIO_ERROR_CANNOT_FILE_POSITION` on Windows. */
|
||||
/* For `whence`: */
|
||||
enum {
|
||||
RKTIO_POSITION_FROM_START,
|
||||
|
@ -251,11 +251,11 @@ enum {
|
|||
rktio_filesize_t *rktio_get_file_position(rktio_t *rktio, rktio_fd_t *rfd);
|
||||
/* Returns the file position, not taking into account rare input
|
||||
buffering (see `rktio_read`). On Windows, can report
|
||||
`RKTIO_ERROR_CANNOT_SET_FILE_POSITION`, which doesn't have a
|
||||
`RKTIO_ERROR_CANNOT_FILE_POSITION`, which doesn't have a
|
||||
corresponding Windows error code. */
|
||||
|
||||
rktio_ok_t rktio_set_file_size(rktio_t *rktio, rktio_fd_t *rfd, rktio_filesize_t sz);
|
||||
/* Can report `RKTIO_ERROR_CANNOT_SET_FILE_POSITION` on Windows. */
|
||||
/* Can report `RKTIO_ERROR_CANNOT_FILE_POSITION` on Windows. */
|
||||
|
||||
/*************************************************/
|
||||
/* Pipes */
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#endif
|
||||
#ifdef RKTIO_SYSTEM_WINDOWS
|
||||
# include <windows.h>
|
||||
# include <string.h>
|
||||
#endif
|
||||
#ifdef HAVE_POLL_SYSCALL
|
||||
# include <poll.h>
|
||||
|
@ -114,8 +115,8 @@ static CSI_proc get_csi(void)
|
|||
}
|
||||
|
||||
static intptr_t rktio_adjust_input_text(rktio_fd_t *rfd, char *buffer, char *is_cnoverted, intptr_t got);
|
||||
static char *rktio_adjust_output_text(char *buffer, intptr_t *towrite);
|
||||
static intptr_t rktio_recount_output_text(char *orig_buffer, char *buffer, intptr_t wrote);
|
||||
static const char *rktio_adjust_output_text(const char *buffer, intptr_t *towrite);
|
||||
static intptr_t rktio_recount_output_text(const char *orig_buffer, const char *buffer, intptr_t wrote);
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -206,7 +207,8 @@ rktio_fd_t *rktio_system_fd(rktio_t *rktio, intptr_t system_fd, int modes)
|
|||
if ((GetFileType(rfd->fd) == FILE_TYPE_DISK))
|
||||
rfd->modes |= RKTIO_OPEN_REGFILE;
|
||||
if (!(modes & (RKTIO_OPEN_DIR | RKTIO_OPEN_NOT_DIR))) {
|
||||
if (GetFileInformationByHandle(fd, &info)) {
|
||||
BY_HANDLE_FILE_INFORMATION info;
|
||||
if (GetFileInformationByHandle(rfd->fd, &info)) {
|
||||
if (info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
|
||||
rfd->modes |= RKTIO_OPEN_DIR;
|
||||
}
|
||||
|
@ -397,7 +399,7 @@ static rktio_ok_t do_close(rktio_t *rktio, rktio_fd_t *rfd, int set_error)
|
|||
#endif
|
||||
#ifdef RKTIO_SYSTEM_WINDOWS
|
||||
if (rfd->modes & RKTIO_OPEN_SOCKET)
|
||||
return rktio_socket_close(rktio, rfd);
|
||||
return rktio_socket_close(rktio, rfd, set_error);
|
||||
|
||||
if (rfd->th) {
|
||||
CSI_proc csi;
|
||||
|
@ -749,7 +751,7 @@ void rktio_poll_add(rktio_t *rktio, rktio_fd_t *rfd, rktio_poll_set_t *fds, int
|
|||
}
|
||||
|
||||
if (modes & RKTIO_POLL_FLUSH) {
|
||||
if (rfd->oth && !rktio_poll_flush_ready(rktio, rfd))
|
||||
if (rfd->oth && !rktio_poll_write_flushed(rktio, rfd))
|
||||
rktio_poll_set_add_handle(rktio, (intptr_t)rfd->oth->ready_sema, fds, 1);
|
||||
else
|
||||
rktio_poll_set_add_nosleep(rktio, fds);
|
||||
|
@ -888,7 +890,7 @@ RKTIO_EXTERN intptr_t rktio_buffered_byte_count(rktio_t *rktio, rktio_fd_t *fd)
|
|||
# endif
|
||||
#endif
|
||||
#ifdef RKTIO_SYSTEM_WINDOWS
|
||||
return (fd-?pending_cr : 1 : 0);
|
||||
return (fd->pending_cr ? 1 : 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -899,7 +901,7 @@ static intptr_t rktio_adjust_input_text(rktio_fd_t *rfd, char *buffer, char *is_
|
|||
int i, j;
|
||||
|
||||
if (rfd->pending_cr) {
|
||||
MSC_IZE(memmove)(buffer+1, buffer, got);
|
||||
memmove(buffer+1, buffer, got);
|
||||
buffer[0] = '\r';
|
||||
rfd->pending_cr = 0;
|
||||
got++;
|
||||
|
@ -1053,7 +1055,7 @@ intptr_t rktio_write(rktio_t *rktio, rktio_fd_t *rfd, const char *buffer, intptr
|
|||
is ERROR_NOT_ENOUGH_MEMORY (as opposed to a partial write). */
|
||||
int ok;
|
||||
intptr_t towrite = len;
|
||||
char *orig_buffer = buffer;
|
||||
const char *orig_buffer = buffer;
|
||||
int err;
|
||||
|
||||
if (rfd->modes & RKTIO_OPEN_TEXT)
|
||||
|
@ -1085,6 +1087,7 @@ intptr_t rktio_write(rktio_t *rktio, rktio_fd_t *rfd, const char *buffer, intptr
|
|||
if (buffer != orig_buffer) {
|
||||
/* Convert converted count back to original count: */
|
||||
winwrote = rktio_recount_output_text(orig_buffer, buffer, winwrote);
|
||||
free((char *)buffer);
|
||||
}
|
||||
|
||||
return winwrote;
|
||||
|
@ -1323,7 +1326,7 @@ intptr_t rktio_write(rktio_t *rktio, rktio_fd_t *rfd, const char *buffer, intptr
|
|||
|
||||
#ifdef RKTIO_SYSTEM_WINDOWS
|
||||
|
||||
static char *rktio_adjust_output_text(char *buffer, intptr_t *towrite)
|
||||
static const char *rktio_adjust_output_text(const char *buffer, intptr_t *towrite)
|
||||
{
|
||||
intptr_t len = *towrite, i, j, newlines = 0;
|
||||
char *new_buffer;
|
||||
|
@ -1356,14 +1359,14 @@ static char *rktio_adjust_output_text(char *buffer, intptr_t *towrite)
|
|||
return new_buffer;
|
||||
}
|
||||
|
||||
static intptr_t rktio_recount_output_text(char *orig_buffer, char *buffer, intptr_t wrote)
|
||||
static intptr_t rktio_recount_output_text(const char *orig_buffer, const char *buffer, intptr_t wrote)
|
||||
{
|
||||
intptr_t i = 0, j = 0;
|
||||
|
||||
while (j < wrote) {
|
||||
if (buffer[i] == '\n')
|
||||
j += 2;
|
||||
or
|
||||
else
|
||||
j++;
|
||||
i++;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
/* Opening a file */
|
||||
/*========================================================================*/
|
||||
|
||||
static rktio_fd_t *open_read(rktio_t *rktio, const char *filename)
|
||||
static rktio_fd_t *open_read(rktio_t *rktio, const char *filename, int modes)
|
||||
{
|
||||
#ifdef RKTIO_SYSTEM_UNIX
|
||||
int fd;
|
||||
|
@ -83,9 +83,9 @@ static rktio_fd_t *open_read(rktio_t *rktio, const char *filename)
|
|||
|
||||
rfd = rktio_system_fd(rktio, (intptr_t)fd, RKTIO_OPEN_READ);
|
||||
|
||||
if (modes & RKTIO_MODE_TEXT) {
|
||||
if (!rktio_fd_is_regular_file(rfd)) {
|
||||
rktio_fd_forget(rfd);
|
||||
if (modes & RKTIO_OPEN_TEXT) {
|
||||
if (!rktio_fd_is_regular_file(rktio, rfd)) {
|
||||
rktio_forget(rktio, rfd);
|
||||
set_racket_error(RKTIO_ERROR_UNSUPPORTED_TEXT_MODE);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -176,7 +176,6 @@ static rktio_fd_t *open_write(rktio_t *rktio, const char *filename, int modes)
|
|||
#ifdef RKTIO_SYSTEM_WINDOWS
|
||||
HANDLE fd;
|
||||
int hmode;
|
||||
BY_HANDLE_FILE_INFORMATION info;
|
||||
rktio_fd_t *rfd;
|
||||
|
||||
if (modes & RKTIO_OPEN_MUST_EXIST) {
|
||||
|
@ -237,9 +236,9 @@ static rktio_fd_t *open_write(rktio_t *rktio, const char *filename, int modes)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (modes & RKTIO_MODE_TEXT) {
|
||||
if (!rktio_fd_is_regular_file(rfd)) {
|
||||
rktio_fd_forget(rfd);
|
||||
if (modes & RKTIO_OPEN_TEXT) {
|
||||
if (!rktio_fd_is_regular_file(rktio, rfd)) {
|
||||
rktio_forget(rktio, rfd);
|
||||
set_racket_error(RKTIO_ERROR_UNSUPPORTED_TEXT_MODE);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -258,17 +257,17 @@ rktio_fd_t *rktio_open(rktio_t *rktio, const char *filename, int modes)
|
|||
if (modes & RKTIO_OPEN_WRITE)
|
||||
return open_write(rktio, filename, modes);
|
||||
else
|
||||
return open_read(rktio, filename);
|
||||
return open_read(rktio, filename, modes);
|
||||
}
|
||||
|
||||
/*========================================================================*/
|
||||
/* File positions */
|
||||
/*========================================================================*/
|
||||
|
||||
#ifdef WINDOWS_FILE_HANDLES
|
||||
#ifdef RKTIO_SYSTEM_WINDOWS
|
||||
static int win_seekable(intptr_t fd)
|
||||
{
|
||||
/* SetFilePointer() requires " a file stored on a seeking device".
|
||||
/* SetFilePointer() requires "a file stored on a seeking device".
|
||||
I'm not sure how to test that, so we approximate as "regular
|
||||
file". */
|
||||
return GetFileType((HANDLE)fd) == FILE_TYPE_DISK;
|
||||
|
@ -305,7 +304,7 @@ rktio_ok_t rktio_set_file_position(rktio_t *rktio, rktio_fd_t *rfd, rktio_filesi
|
|||
} else
|
||||
return 1;
|
||||
} else {
|
||||
set_racket_error(RKTIO_ERROR_CANNOT_SET_FILE_POSITION);
|
||||
set_racket_error(RKTIO_ERROR_CANNOT_FILE_POSITION);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
@ -325,7 +324,8 @@ rktio_filesize_t *rktio_get_file_position(rktio_t *rktio, rktio_fd_t *rfd)
|
|||
#endif
|
||||
#ifdef RKTIO_SYSTEM_WINDOWS
|
||||
if (win_seekable(fd)) {
|
||||
DWORD lo_w, hi_w;
|
||||
DWORD lo_w;
|
||||
LONG hi_w;
|
||||
hi_w = 0;
|
||||
lo_w = SetFilePointer((HANDLE)fd, 0, &hi_w, FILE_CURRENT);
|
||||
if ((lo_w == INVALID_SET_FILE_POINTER)
|
||||
|
@ -333,9 +333,9 @@ rktio_filesize_t *rktio_get_file_position(rktio_t *rktio, rktio_fd_t *rfd)
|
|||
get_windows_error();
|
||||
return NULL;
|
||||
} else
|
||||
pll = ((mzlonglong)hi_w << 32) | lo_w;
|
||||
pll = ((rktio_int64_t)hi_w << 32) | lo_w;
|
||||
} else {
|
||||
set_racket_error(RKTIO_ERROR_CANNOT_SET_FILE_POSITION);
|
||||
set_racket_error(RKTIO_ERROR_CANNOT_FILE_POSITION);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
@ -384,7 +384,7 @@ rktio_ok_t rktio_set_file_size(rktio_t *rktio, rktio_fd_t *rfd, rktio_filesize_t
|
|||
}
|
||||
}
|
||||
} else {
|
||||
set_racket_error(RKTIO_ERROR_CANNOT_SET_FILE_POSITION);
|
||||
set_racket_error(RKTIO_ERROR_CANNOT_FILE_POSITION);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -235,7 +235,7 @@ rktio_ok_t rktio_file_unlock(rktio_t *rktio, rktio_fd_t *rfd)
|
|||
set_racket_error(RKTIO_ERROR_UNSUPPORTED);
|
||||
# endif
|
||||
#endif
|
||||
#ifdef WINDOWS_FILE_HANDLES
|
||||
#ifdef RKTIO_SYSTEM_WINDOWS
|
||||
ok = UnlockFile((HANDLE)fd, 0, 0, LOCK_ALL_FILE_LO, LOCK_ALL_FILE_HI);
|
||||
if (!ok)
|
||||
get_windows_error();
|
||||
|
|
|
@ -1272,9 +1272,9 @@ rktio_filesize_t *rktio_file_size(rktio_t *rktio, const char *filename)
|
|||
rktio_filesize_t *sz = NULL;
|
||||
#ifdef RKTIO_SYSTEM_WINDOWS
|
||||
{
|
||||
rktio_size_t sz_v;
|
||||
rktio_filesize_t sz_v;
|
||||
if (UNC_stat(rktio, filename, NULL, NULL, NULL, NULL, &sz_v, NULL, -1)) {
|
||||
sz = malloc(sizeof(rktio_size_t));
|
||||
sz = malloc(sizeof(rktio_filesize_t));
|
||||
*sz = sz_v;
|
||||
return sz;
|
||||
}
|
||||
|
|
|
@ -23,6 +23,9 @@
|
|||
# define WAS_WSAEMSGSIZE(e) 0
|
||||
# define RKTIO_AFNOSUPPORT EAFNOSUPPORT
|
||||
|
||||
#define RKTIO_SHUT_RD SHUT_RD
|
||||
#define RKTIO_SHUT_WR SHUT_WR
|
||||
|
||||
typedef intptr_t rktio_socket_t;
|
||||
typedef unsigned int rktio_sockopt_len_t;
|
||||
|
||||
|
@ -72,6 +75,9 @@ struct SOCKADDR_IN {
|
|||
# define WAS_EBADADDRESS(e) 0
|
||||
# define RKTIO_AFNOSUPPORT WSAEAFNOSUPPORT
|
||||
|
||||
#define RKTIO_SHUT_RD SD_RECEIVE
|
||||
#define RKTIO_SHUT_WR SD_SEND
|
||||
|
||||
typedef SOCKET rktio_socket_t;
|
||||
typedef int rktio_sockopt_len_t;
|
||||
|
||||
|
@ -927,7 +933,7 @@ int rktio_socket_shutdown(rktio_t *rktio, rktio_fd_t *rfd, int mode)
|
|||
{
|
||||
rktio_socket_t s = rktio_fd_system_fd(rktio, rfd);
|
||||
|
||||
if (shutdown(s, ((mode == RKTIO_SHUTDOWN_READ) ? SHUT_RD : SHUT_WR))) {
|
||||
if (shutdown(s, ((mode == RKTIO_SHUTDOWN_READ) ? RKTIO_SHUT_RD : RKTIO_SHUT_WR))) {
|
||||
get_socket_error();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ static int MyPipe(intptr_t *ph, int flags, rktio_t *rktio)
|
|||
|
||||
if (CreatePipe(&r, &w, &saAttr, 0)) {
|
||||
HANDLE a[2], naya;
|
||||
int near_index;
|
||||
|
||||
a[0] = r;
|
||||
a[1] = w;
|
||||
|
@ -73,7 +74,7 @@ int rktio_make_os_pipe(rktio_t *rktio, intptr_t *a, int flags)
|
|||
{
|
||||
PIPE_HANDLE_t la[2];
|
||||
|
||||
if (PIPE_FUNC(la, nearh _EXTRA_PIPE_ARGS)) {
|
||||
if (PIPE_FUNC(la, flags _EXTRA_PIPE_ARGS)) {
|
||||
GET_PIPE_ERROR();
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -672,6 +672,10 @@ void rktio_reap_processes(rktio_t *rktio)
|
|||
|
||||
#endif
|
||||
|
||||
#ifdef RKTIO_SYSTEM_WINDOWS
|
||||
void rktio_reap_processes(rktio_t *rktio) { }
|
||||
#endif
|
||||
|
||||
/*========================================================================*/
|
||||
/* Windows process times */
|
||||
/*========================================================================*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user