include/ruby/win32.h File Reference

#include <winsock2.h>
#include <ws2tcpip.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <direct.h>
#include <process.h>
#include <time.h>
#include <math.h>
#include <signal.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <utime.h>
#include <io.h>
#include <malloc.h>
#include <float.h>
#include <errno.h>

Go to the source code of this file.

Data Structures

struct  iovec
struct  msghdr
struct  tms

Defines

#define RUBY_WIN32_H   1
#define WIN32
#define NT   1
#define _INTPTR_T_DEFINED
#define _UINTPTR_T_DEFINED
#define mode_t   int
#define rb_w32_iswinnt()   TRUE
#define rb_w32_iswin95()   FALSE
#define WNOHANG   -1
#define getc(_stream)   rb_w32_getc(_stream)
#define getchar()   rb_w32_getc(stdin)
#define putc(_c, _stream)   rb_w32_putc(_c, _stream)
#define putchar(_c)   rb_w32_putc(_c, stdout)
#define stat(path, st)   rb_w32_stat(path,st)
#define fstat(fd, st)   rb_w32_fstat(fd,st)
#define access(path, mode)   rb_w32_access(path,mode)
#define strcasecmp   _stricmp
#define strncasecmp   _strnicmp
#define fsync   _commit
#define NtInitialize   ruby_sysinit
#define isnan(x)   _isnan(x)
#define copysign(a, b)   _copysign(a, b)
#define S_IRUSR   0400
#define S_IRGRP   0040
#define S_IROTH   0004
#define S_IWUSR   0200
#define S_IWGRP   0020
#define S_IXUSR   0100
#define S_IXGRP   0010
#define S_IXOTH   0001
#define SUFFIX
#define HAVE_FTRUNCATE   1
#define ftruncate   rb_w32_ftruncate
#define HAVE_TRUNCATE   1
#define truncate   rb_w32_truncate
#define HAVE_FSEEKO   1
#define fseeko   rb_w32_fseeko
#define HAVE_FTELLO   1
#define ftello   rb_w32_ftello
#define PIPE_BUF   1024
#define LOCK_SH   1
#define LOCK_EX   2
#define LOCK_NB   4
#define LOCK_UN   8
#define SIGINT   2
#define SIGKILL   9
#define EINPROGRESS   WSAEINPROGRESS
#define EALREADY   WSAEALREADY
#define ENOTSOCK   WSAENOTSOCK
#define EDESTADDRREQ   WSAEDESTADDRREQ
#define EMSGSIZE   WSAEMSGSIZE
#define EPROTOTYPE   WSAEPROTOTYPE
#define ENOPROTOOPT   WSAENOPROTOOPT
#define EPROTONOSUPPORT   WSAEPROTONOSUPPORT
#define ESOCKTNOSUPPORT   WSAESOCKTNOSUPPORT
#define EOPNOTSUPP   WSAEOPNOTSUPP
#define EPFNOSUPPORT   WSAEPFNOSUPPORT
#define EAFNOSUPPORT   WSAEAFNOSUPPORT
#define EADDRINUSE   WSAEADDRINUSE
#define EADDRNOTAVAIL   WSAEADDRNOTAVAIL
#define ENETDOWN   WSAENETDOWN
#define ENETUNREACH   WSAENETUNREACH
#define ENETRESET   WSAENETRESET
#define ECONNABORTED   WSAECONNABORTED
#define ECONNRESET   WSAECONNRESET
#define ENOBUFS   WSAENOBUFS
#define EISCONN   WSAEISCONN
#define ENOTCONN   WSAENOTCONN
#define ESHUTDOWN   WSAESHUTDOWN
#define ETOOMANYREFS   WSAETOOMANYREFS
#define ETIMEDOUT   WSAETIMEDOUT
#define ECONNREFUSED   WSAECONNREFUSED
#define ELOOP   WSAELOOP
#define EHOSTDOWN   WSAEHOSTDOWN
#define EHOSTUNREACH   WSAEHOSTUNREACH
#define EPROCLIM   WSAEPROCLIM
#define EUSERS   WSAEUSERS
#define EDQUOT   WSAEDQUOT
#define ESTALE   WSAESTALE
#define EREMOTE   WSAEREMOTE
#define F_SETFL   1
#define O_NONBLOCK   1
#define FD_SET(f, s)   rb_w32_fdset(f, s)
#define FD_CLR(f, s)   rb_w32_fdclr(f, s)
#define FD_ISSET(f, s)   rb_w32_fdisset(f, s)

Typedefs

typedef int intptr_t
typedef unsigned int uintptr_t
typedef uintptr_t(* asynchronous_func_t )(uintptr_t self, int argc, uintptr_t *argv)

Functions

int rb_w32_stat (const char *, struct stat *)
int rb_w32_fstat (int, struct stat *)
int rb_w32_cmdvector (const char *, char ***)
rb_pid_t rb_w32_pipe_exec (const char *, const char *, int, int *, int *)
int flock (int fd, int oper)
int rb_w32_has_cancel_io (void)
int rb_w32_is_socket (int)
int WSAAPI rb_w32_accept (int, struct sockaddr *, int *)
int WSAAPI rb_w32_bind (int, const struct sockaddr *, int)
int WSAAPI rb_w32_connect (int, const struct sockaddr *, int)
void rb_w32_fdset (int, fd_set *)
void rb_w32_fdclr (int, fd_set *)
int rb_w32_fdisset (int, fd_set *)
int WSAAPI rb_w32_select (int, fd_set *, fd_set *, fd_set *, struct timeval *)
int WSAAPI rb_w32_getpeername (int, struct sockaddr *, int *)
int WSAAPI rb_w32_getsockname (int, struct sockaddr *, int *)
int WSAAPI rb_w32_getsockopt (int, int, int, char *, int *)
int WSAAPI rb_w32_ioctlsocket (int, long, u_long *)
int WSAAPI rb_w32_listen (int, int)
int WSAAPI rb_w32_recv (int, char *, int, int)
int WSAAPI rb_w32_recvfrom (int, char *, int, int, struct sockaddr *, int *)
int WSAAPI rb_w32_send (int, const char *, int, int)
int WSAAPI rb_w32_sendto (int, const char *, int, int, const struct sockaddr *, int)
int recvmsg (int, struct msghdr *, int)
int sendmsg (int, const struct msghdr *, int)
int WSAAPI rb_w32_setsockopt (int, int, int, const char *, int)
int WSAAPI rb_w32_shutdown (int, int)
int WSAAPI rb_w32_socket (int, int, int)
SOCKET rb_w32_get_osfhandle (int)
struct hostent *WSAAPI rb_w32_gethostbyaddr (const char *, int, int)
struct hostent *WSAAPI rb_w32_gethostbyname (const char *)
int WSAAPI rb_w32_gethostname (char *, int)
struct protoent *WSAAPI rb_w32_getprotobyname (const char *)
struct protoent *WSAAPI rb_w32_getprotobynumber (int)
struct servent *WSAAPI rb_w32_getservbyname (const char *, const char *)
struct servent *WSAAPI rb_w32_getservbyport (int, const char *)
int rb_w32_socketpair (int, int, int, int *)
char * rb_w32_getcwd (char *, int)
char * rb_w32_getenv (const char *)
int rb_w32_rename (const char *, const char *)
int rb_w32_urename (const char *, const char *)
char ** rb_w32_get_environ (void)
void rb_w32_free_environ (char **)
int rb_w32_map_errno (DWORD)
char *WSAAPI rb_w32_inet_ntop (int, void *, char *, size_t)
DWORD rb_w32_osver (void)
int chown (const char *, int, int)
int rb_w32_uchown (const char *, int, int)
int link (const char *, const char *)
int rb_w32_ulink (const char *, const char *)
int gettimeofday (struct timeval *, struct timezone *)
rb_pid_t waitpid (rb_pid_t, int *, int)
rb_pid_t rb_w32_spawn (int, const char *, const char *)
rb_pid_t rb_w32_aspawn (int, const char *, char *const *)
rb_pid_t rb_w32_aspawn_flags (int, const char *, char *const *, DWORD)
int kill (int, int)
int fcntl (int, int,...)
rb_pid_t rb_w32_getpid (void)
rb_pid_t rb_w32_getppid (void)
int rb_w32_isatty (int)
int rb_w32_uchdir (const char *)
int rb_w32_mkdir (const char *, int)
int rb_w32_umkdir (const char *, int)
int rb_w32_rmdir (const char *)
int rb_w32_urmdir (const char *)
int rb_w32_unlink (const char *)
int rb_w32_uunlink (const char *)
int rb_w32_uchmod (const char *, int)
int rb_w32_stati64 (const char *, struct stati64 *)
int rb_w32_ustati64 (const char *, struct stati64 *)
int rb_w32_access (const char *, int)
int rb_w32_uaccess (const char *, int)
char rb_w32_fd_is_text (int)
static int finite (double x)
static double scalb (double a, long b)
int rb_w32_ftruncate (int fd, off_t length)
int rb_w32_truncate (const char *path, off_t length)
off_t rb_w32_ftello (FILE *stream)
int rb_w32_fseeko (FILE *stream, off_t offset, int whence)
int ioctl (int, int,...)
rb_uid_t getuid (void)
rb_uid_t geteuid (void)
rb_gid_t getgid (void)
rb_gid_t getegid (void)
int setuid (rb_uid_t)
int setgid (rb_gid_t)
char * rb_w32_strerror (int)
int rb_w32_times (struct tms *)
HANDLE GetCurrentThreadHandle (void)
int rb_w32_sleep (unsigned long msec)
int rb_w32_putc (int, FILE *)
int rb_w32_getc (FILE *)
int rb_w32_open (const char *, int,...)
int rb_w32_uopen (const char *, int,...)
int rb_w32_wopen (const WCHAR *, int,...)
int rb_w32_close (int)
int rb_w32_fclose (FILE *)
int rb_w32_pipe (int[2])
ssize_t rb_w32_read (int, void *, size_t)
ssize_t rb_w32_write (int, const void *, size_t)
int rb_w32_utime (const char *, const struct utimbuf *)
int rb_w32_uutime (const char *, const struct utimbuf *)
long rb_w32_write_console (uintptr_t, int)
int WINAPI rb_w32_Sleep (unsigned long msec)
int rb_w32_wait_events_blocking (HANDLE *events, int num, DWORD timeout)
int rb_w32_time_subtract (struct timeval *rest, const struct timeval *wait)
uintptr_t rb_w32_asynchronize (asynchronous_func_t func, uintptr_t self, int argc, uintptr_t *argv, uintptr_t intrval)

Define Documentation

#define _INTPTR_T_DEFINED

Definition at line 90 of file win32.h.

#define _UINTPTR_T_DEFINED

Definition at line 98 of file win32.h.

#define access ( path,
mode   )     rb_w32_access(path,mode)

Definition at line 206 of file win32.h.

#define copysign ( a,
 )     _copysign(a, b)

Definition at line 328 of file win32.h.

#define EADDRINUSE   WSAEADDRINUSE

Definition at line 506 of file win32.h.

Referenced by rb_w32_strerror().

#define EADDRNOTAVAIL   WSAEADDRNOTAVAIL

Definition at line 509 of file win32.h.

#define EAFNOSUPPORT   WSAEAFNOSUPPORT

Definition at line 503 of file win32.h.

Referenced by socketpair_internal().

#define EALREADY   WSAEALREADY

Definition at line 473 of file win32.h.

Referenced by rsock_connect().

#define ECONNABORTED   WSAECONNABORTED

Definition at line 521 of file win32.h.

Referenced by rsock_s_accept_nonblock().

#define ECONNREFUSED   WSAECONNREFUSED

Definition at line 545 of file win32.h.

#define ECONNRESET   WSAECONNRESET

Definition at line 524 of file win32.h.

Referenced by ruby_close(), ruby_getpeername(), ruby_getsockname(), and ruby_shutdown().

#define EDESTADDRREQ   WSAEDESTADDRREQ

Definition at line 479 of file win32.h.

#define EDQUOT   WSAEDQUOT

Definition at line 565 of file win32.h.

#define EHOSTDOWN   WSAEHOSTDOWN

Definition at line 552 of file win32.h.

#define EHOSTUNREACH   WSAEHOSTUNREACH

Definition at line 555 of file win32.h.

#define EINPROGRESS   WSAEINPROGRESS

Definition at line 470 of file win32.h.

Referenced by rb_w32_connect(), rsock_connect(), and sock_connect_nonblock().

#define EISCONN   WSAEISCONN

Definition at line 530 of file win32.h.

Referenced by rsock_connect().

#define ELOOP   WSAELOOP

Definition at line 548 of file win32.h.

Referenced by realpath_rec().

#define EMSGSIZE   WSAEMSGSIZE

Definition at line 482 of file win32.h.

#define ENETDOWN   WSAENETDOWN

Definition at line 512 of file win32.h.

#define ENETRESET   WSAENETRESET

Definition at line 518 of file win32.h.

#define ENETUNREACH   WSAENETUNREACH

Definition at line 515 of file win32.h.

#define ENOBUFS   WSAENOBUFS

Definition at line 527 of file win32.h.

#define ENOPROTOOPT   WSAENOPROTOOPT

Definition at line 488 of file win32.h.

#define ENOTCONN   WSAENOTCONN

Definition at line 533 of file win32.h.

#define ENOTSOCK   WSAENOTSOCK

Definition at line 476 of file win32.h.

#define EOPNOTSUPP   WSAEOPNOTSUPP

Definition at line 497 of file win32.h.

#define EPFNOSUPPORT   WSAEPFNOSUPPORT

Definition at line 500 of file win32.h.

#define EPROCLIM   WSAEPROCLIM

Definition at line 559 of file win32.h.

#define EPROTONOSUPPORT   WSAEPROTONOSUPPORT

Definition at line 491 of file win32.h.

#define EPROTOTYPE   WSAEPROTOTYPE

Definition at line 485 of file win32.h.

Referenced by socketpair_internal().

#define EREMOTE   WSAEREMOTE

Definition at line 571 of file win32.h.

#define ESHUTDOWN   WSAESHUTDOWN

Definition at line 536 of file win32.h.

#define ESOCKTNOSUPPORT   WSAESOCKTNOSUPPORT

Definition at line 494 of file win32.h.

#define ESTALE   WSAESTALE

Definition at line 568 of file win32.h.

#define ETIMEDOUT   WSAETIMEDOUT

Definition at line 542 of file win32.h.

Referenced by __cond_timedwait(), lock_func(), and native_cond_timedwait().

#define ETOOMANYREFS   WSAETOOMANYREFS

Definition at line 539 of file win32.h.

#define EUSERS   WSAEUSERS

Definition at line 562 of file win32.h.

#define F_SETFL   1
#define FD_CLR ( f,
 )     rb_w32_fdclr(f, s)

Definition at line 581 of file win32.h.

#define FD_ISSET ( f,
 )     rb_w32_fdisset(f, s)

Definition at line 584 of file win32.h.

Referenced by fdset2array().

#define FD_SET ( f,
 )     rb_w32_fdset(f, s)

Definition at line 578 of file win32.h.

Referenced by array2fdset(), and thread_timer().

#define fseeko   rb_w32_fseeko

Definition at line 416 of file win32.h.

#define fstat ( fd,
st   )     rb_w32_fstat(fd,st)
#define fsync   _commit

Definition at line 210 of file win32.h.

Referenced by rb_io_flush(), and rb_io_rewind().

#define ftello   rb_w32_ftello

Definition at line 424 of file win32.h.

#define ftruncate   rb_w32_ftruncate

Definition at line 400 of file win32.h.

#define getc ( _stream   )     rb_w32_getc(_stream)

Definition at line 130 of file win32.h.

 
#define getchar (  )     rb_w32_getc(stdin)

Definition at line 131 of file win32.h.

Referenced by VpFree().

#define HAVE_FSEEKO   1

Definition at line 412 of file win32.h.

#define HAVE_FTELLO   1

Definition at line 420 of file win32.h.

#define HAVE_FTRUNCATE   1

Definition at line 396 of file win32.h.

#define HAVE_TRUNCATE   1

Definition at line 404 of file win32.h.

#define isnan (  )     _isnan(x)
#define LOCK_EX   2

Definition at line 447 of file win32.h.

#define LOCK_NB   4

Definition at line 448 of file win32.h.

#define LOCK_SH   1

Definition at line 446 of file win32.h.

#define LOCK_UN   8

Definition at line 449 of file win32.h.

#define mode_t   int
#define NT   1

Definition at line 47 of file win32.h.

#define NtInitialize   ruby_sysinit

Definition at line 233 of file win32.h.

#define O_NONBLOCK   1
#define PIPE_BUF   1024

Definition at line 444 of file win32.h.

Referenced by io_writable_length().

#define putc ( _c,
_stream   )     rb_w32_putc(_c, _stream)

Definition at line 132 of file win32.h.

#define putchar ( _c   )     rb_w32_putc(_c, stdout)

Definition at line 133 of file win32.h.

 
#define rb_w32_iswin95 (  )     FALSE

Definition at line 114 of file win32.h.

Referenced by rb_file_identical_p(), and w32_io_info().

 
#define rb_w32_iswinnt (  )     TRUE

Definition at line 113 of file win32.h.

#define RUBY_WIN32_H   1

Definition at line 2 of file win32.h.

#define S_IRGRP   0040

Definition at line 358 of file win32.h.

Referenced by rb_stat_R(), and rb_stat_r().

#define S_IROTH   0004

Definition at line 361 of file win32.h.

Referenced by rb_file_world_readable_p(), rb_stat_R(), rb_stat_r(), and rb_stat_wr().

#define S_IRUSR   0400

Definition at line 355 of file win32.h.

Referenced by rb_stat_R(), and rb_stat_r().

#define S_IWGRP   0020

Definition at line 368 of file win32.h.

Referenced by rb_stat_W(), rb_stat_w(), and wstati64().

#define S_IWUSR   0200

Definition at line 365 of file win32.h.

Referenced by fileattr_to_unixmode(), rb_stat_W(), and rb_stat_w().

#define S_IXGRP   0010

Definition at line 378 of file win32.h.

Referenced by rb_stat_X(), and rb_stat_x().

#define S_IXOTH   0001

Definition at line 381 of file win32.h.

Referenced by rb_stat_X(), and rb_stat_x().

#define S_IXUSR   0100

Definition at line 375 of file win32.h.

Referenced by rb_stat_X(), and rb_stat_x().

#define SIGINT   2
#define SIGKILL   9

Definition at line 456 of file win32.h.

Referenced by kill().

#define stat ( path,
st   )     rb_w32_stat(path,st)
#define strcasecmp   _stricmp

Definition at line 208 of file win32.h.

Referenced by is_batch(), is_command_com(), and ole_method_sub().

#define strncasecmp   _strnicmp

Definition at line 209 of file win32.h.

Referenced by date__strptime_internal(), day_num(), file_expand_path(), mon_num(), and rb_w32_getenv().

#define SUFFIX

Definition at line 388 of file win32.h.

#define truncate   rb_w32_truncate

Definition at line 408 of file win32.h.

#define WIN32

Definition at line 38 of file win32.h.

#define WNOHANG   -1

Definition at line 117 of file win32.h.

Referenced by Init_process(), pty_check(), and waitpid().


Typedef Documentation

Definition at line 714 of file win32.h.

typedef int intptr_t

Definition at line 88 of file win32.h.

typedef unsigned int uintptr_t

Definition at line 96 of file win32.h.


Function Documentation

int chown ( const char *  ,
int  ,
int   
)

Definition at line 3800 of file win32.c.

int fcntl ( int  ,
int  ,
  ... 
)
static int finite ( double  x  )  [inline, static]

Definition at line 323 of file win32.h.

int flock ( int  fd,
int  oper 
)

Definition at line 371 of file win32.c.

References flock_winnt(), IsWinNT, NULL, and rb_w32_asynchronize().

HANDLE GetCurrentThreadHandle ( void   ) 

Definition at line 270 of file win32.c.

References FALSE, and NULL.

rb_gid_t getegid ( void   ) 
rb_uid_t geteuid ( void   ) 
rb_gid_t getgid ( void   ) 
int gettimeofday ( struct timeval *  ,
struct timezone  
)
rb_uid_t getuid ( void   ) 
int ioctl ( int  ,
int  ,
  ... 
)
int kill ( int  ,
int   
)

Definition at line 3812 of file win32.c.

References EPERM, err, FALSE, FindChildSlot(), ChildRecord::hProcess, IfWin95, map_errno, NULL, RUBY_CRITICAL, SIGINT, and SIGKILL.

Referenced by raise_from_check(), and rb_f_kill().

int link ( const char *  ,
const char *   
)

Definition at line 3966 of file win32.c.

References filecp_to_wstr, free, NULL, and wlink().

int WSAAPI rb_w32_accept ( int  ,
struct sockaddr *  ,
int *   
)
int rb_w32_access ( const char *  ,
int   
)

Definition at line 4376 of file win32.c.

References rb_w32_stati64().

rb_pid_t rb_w32_aspawn ( int  ,
const char *  ,
char *const *   
)

Definition at line 1284 of file win32.c.

References rb_w32_aspawn_flags().

Referenced by pipe_open().

rb_pid_t rb_w32_aspawn_flags ( int  ,
const char *  ,
char *const *  ,
DWORD   
)
uintptr_t rb_w32_asynchronize ( asynchronous_func_t  func,
uintptr_t  self,
int  argc,
uintptr_t argv,
uintptr_t  intrval 
)
int WSAAPI rb_w32_bind ( int  ,
const struct sockaddr *  ,
int   
)

Definition at line 2809 of file win32.c.

References map_errno, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.

int rb_w32_close ( int   ) 

Definition at line 5125 of file win32.c.

References _set_osfhnd, is_socket, LK_LEN, map_errno, NULL, st_delete(), and TO_SOCKET.

Referenced by rb_w32_pipe(), and rb_w32_socketpair().

int rb_w32_cmdvector ( const char *  ,
char ***   
)
int WSAAPI rb_w32_connect ( int  ,
const struct sockaddr *  ,
int   
)

Definition at line 2827 of file win32.c.

References EINPROGRESS, err, map_errno, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.

int rb_w32_fclose ( FILE  ) 

Definition at line 5011 of file win32.c.

References _set_osfhnd, fileno, is_socket, LK_LEN, map_errno, and TO_SOCKET.

char rb_w32_fd_is_text ( int   ) 

Definition at line 5831 of file win32.c.

References _osfile, and FTEXT.

Referenced by io_unread(), and set_binary_mode_with_seek_cur().

void rb_w32_fdclr ( int  ,
fd_set *   
)

Definition at line 2343 of file win32.c.

References memmove(), and TO_SOCKET.

int rb_w32_fdisset ( int  ,
fd_set *   
)

Definition at line 2360 of file win32.c.

References RUBY_CRITICAL, and TO_SOCKET.

void rb_w32_fdset ( int  ,
fd_set *   
)

Definition at line 2322 of file win32.c.

References TO_SOCKET.

void rb_w32_free_environ ( char **   ) 

Definition at line 4751 of file win32.c.

References free.

int rb_w32_fseeko ( FILE stream,
off_t  offset,
int  whence 
)
int rb_w32_fstat ( int  ,
struct stat *   
)
off_t rb_w32_ftello ( FILE stream  ) 

Definition at line 4534 of file win32.c.

References off_t.

int rb_w32_ftruncate ( int  fd,
off_t  length 
)

Definition at line 4461 of file win32.c.

References IsWin95, and rb_chsize().

char** rb_w32_get_environ ( void   ) 

Definition at line 4716 of file win32.c.

References env, malloc, NULL, strdup, and strlen().

SOCKET rb_w32_get_osfhandle ( int   ) 
int rb_w32_getc ( FILE  ) 

Definition at line 4598 of file win32.c.

References catch_interrupt(), clearerr, enough_to_get, and EOF.

char* rb_w32_getcwd ( char *  ,
int   
)

Definition at line 3761 of file win32.c.

References free, len, malloc, map_errno, NULL, and translate_char().

char* rb_w32_getenv ( const char *   ) 

Definition at line 3991 of file win32.c.

References env, len, map_errno, NULL, strlen(), and strncasecmp.

Referenced by init_env().

struct hostent* WSAAPI rb_w32_gethostbyaddr ( const char *  ,
int  ,
int   
) [read]

Definition at line 3324 of file win32.c.

References map_errno, NULL, RUBY_CRITICAL, and StartSockets().

struct hostent* WSAAPI rb_w32_gethostbyname ( const char *   )  [read]

Definition at line 3341 of file win32.c.

References map_errno, NULL, RUBY_CRITICAL, and StartSockets().

int WSAAPI rb_w32_gethostname ( char *  ,
int   
)

Definition at line 3358 of file win32.c.

References map_errno, RUBY_CRITICAL, and StartSockets().

int WSAAPI rb_w32_getpeername ( int  ,
struct sockaddr *  ,
int *   
)

Definition at line 2850 of file win32.c.

References map_errno, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.

rb_pid_t rb_w32_getpid ( void   ) 

Definition at line 4760 of file win32.c.

References IfWin95.

Referenced by rb_w32_pipe().

rb_pid_t rb_w32_getppid ( void   ) 

Definition at line 4773 of file win32.c.

References get_proc_address(), IsWin95, len, long, NULL, rb_w32_osver(), and ULONG().

struct protoent* WSAAPI rb_w32_getprotobyname ( const char *   )  [read]

Definition at line 3375 of file win32.c.

References map_errno, NULL, RUBY_CRITICAL, and StartSockets().

struct protoent* WSAAPI rb_w32_getprotobynumber ( int   )  [read]

Definition at line 3392 of file win32.c.

References map_errno, NULL, RUBY_CRITICAL, and StartSockets().

struct servent* WSAAPI rb_w32_getservbyname ( const char *  ,
const char *   
) [read]

Definition at line 3409 of file win32.c.

References map_errno, NULL, RUBY_CRITICAL, and StartSockets().

struct servent* WSAAPI rb_w32_getservbyport ( int  ,
const char *   
) [read]

Definition at line 3426 of file win32.c.

References map_errno, NULL, RUBY_CRITICAL, and StartSockets().

int WSAAPI rb_w32_getsockname ( int  ,
struct sockaddr *  ,
int *   
)

Definition at line 2867 of file win32.c.

References map_errno, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.

int WSAAPI rb_w32_getsockopt ( int  ,
int  ,
int  ,
char *  ,
int *   
)

Definition at line 2882 of file win32.c.

References map_errno, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.

int rb_w32_has_cancel_io ( void   ) 

Definition at line 582 of file win32.c.

References NULL.

char* WSAAPI rb_w32_inet_ntop ( int  ,
void *  ,
char *  ,
size_t   
)

Definition at line 5815 of file win32.c.

References get_proc_address(), NULL, and snprintf.

int WSAAPI rb_w32_ioctlsocket ( int  ,
long  ,
u_long *   
)

Definition at line 2899 of file win32.c.

References map_errno, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.

int rb_w32_is_socket ( int   ) 

Definition at line 2192 of file win32.c.

References is_socket, and TO_SOCKET.

Referenced by rsock_init_sock().

int rb_w32_isatty ( int   ) 

Definition at line 5723 of file win32.c.

References _osfhnd.

int WSAAPI rb_w32_listen ( int  ,
int   
)

Definition at line 2916 of file win32.c.

References map_errno, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.

int rb_w32_map_errno ( DWORD   ) 

Definition at line 213 of file win32.c.

References errmap.

Referenced by socket_s_ip_address_list(), and w32_dlclose().

int rb_w32_mkdir ( const char *  ,
int   
)

Definition at line 5604 of file win32.c.

References filecp_to_wstr, free, NULL, and wmkdir().

int rb_w32_open ( const char *  ,
int  ,
  ... 
)

Definition at line 4822 of file win32.c.

References filecp_to_wstr, free, NULL, O_BINARY, and rb_w32_wopen().

DWORD rb_w32_osver ( void   ) 

Definition at line 256 of file win32.c.

References osver.

Referenced by getenvblocksize(), and rb_w32_getppid().

int rb_w32_pipe ( int  [2]  ) 
rb_pid_t rb_w32_pipe_exec ( const char *  ,
const char *  ,
int  ,
int *  ,
int *   
)
int rb_w32_putc ( int  ,
FILE  
)

Definition at line 4618 of file win32.c.

References catch_interrupt(), and enough_to_put.

ssize_t rb_w32_read ( int  ,
void *  ,
size_t   
)
int WSAAPI rb_w32_recv ( int  ,
char *  ,
int  ,
int   
)

Definition at line 3043 of file win32.c.

References NULL, overlapped_socket_io(), and TRUE.

Referenced by rb_w32_read().

int WSAAPI rb_w32_recvfrom ( int  ,
char *  ,
int  ,
int  ,
struct sockaddr *  ,
int *   
)

Definition at line 3049 of file win32.c.

References overlapped_socket_io(), and TRUE.

int rb_w32_rename ( const char *  ,
const char *   
)

Definition at line 4081 of file win32.c.

References filecp_to_wstr, free, NULL, and wrename().

int rb_w32_rmdir ( const char *   ) 

Definition at line 5637 of file win32.c.

References filecp_to_wstr, free, NULL, and wrmdir().

int WSAAPI rb_w32_select ( int  ,
fd_set *  ,
fd_set *  ,
fd_set *  ,
struct timeval *   
)

Definition at line 2752 of file win32.c.

References rb_w32_select_with_thread().

int WSAAPI rb_w32_send ( int  ,
const char *  ,
int  ,
int   
)

Definition at line 3056 of file win32.c.

References FALSE, NULL, and overlapped_socket_io().

Referenced by rb_w32_write().

int WSAAPI rb_w32_sendto ( int  ,
const char *  ,
int  ,
int  ,
const struct sockaddr *  ,
int   
)

Definition at line 3062 of file win32.c.

References FALSE, and overlapped_socket_io().

int WSAAPI rb_w32_setsockopt ( int  ,
int  ,
int  ,
const char *  ,
int   
)

Definition at line 3215 of file win32.c.

References map_errno, RUBY_CRITICAL, StartSockets(), and TO_SOCKET.

int WSAAPI rb_w32_shutdown ( int  ,
int   
)

Definition at line 3232 of file win32.c.

References map_errno, RUBY_CRITICAL, shutdown, StartSockets(), and TO_SOCKET.

int WINAPI rb_w32_Sleep ( unsigned long  msec  ) 

Definition at line 292 of file thread_win32.c.

References BLOCKING_REGION, GET_THREAD, rb_w32_sleep(), and ubf_handle().

int rb_w32_sleep ( unsigned long  msec  ) 

Definition at line 286 of file thread_win32.c.

References GET_THREAD, and w32_wait_events().

Referenced by do_select(), and rb_w32_Sleep().

int WSAAPI rb_w32_socket ( int  ,
int  ,
int   
)
int rb_w32_socketpair ( int  ,
int  ,
int  ,
int *   
)
rb_pid_t rb_w32_spawn ( int  ,
const char *  ,
const char *   
)
int rb_w32_stat ( const char *  ,
struct stat *   
)

Definition at line 4292 of file win32.c.

References COPY_STAT, and rb_w32_stati64().

int rb_w32_stati64 ( const char *  ,
struct stati64 *   
)

Definition at line 4363 of file win32.c.

References filecp_to_wstr, free, NULL, and wstati64().

Referenced by rb_w32_access(), and rb_w32_stat().

char* rb_w32_strerror ( int   ) 

Definition at line 2206 of file win32.c.

References EADDRINUSE, err, errmap, EWOULDBLOCK, memmove(), NULL, strerror(), strlcpy(), strlen(), sys_nerr, and winerr.

int rb_w32_time_subtract ( struct timeval *  rest,
const struct timeval *  wait 
)

Definition at line 2578 of file win32.c.

Referenced by abs_timespec_to_timeout_ms(), and rb_w32_select_with_thread().

int rb_w32_times ( struct tms  ) 
int rb_w32_truncate ( const char *  path,
off_t  length 
)

Definition at line 4435 of file win32.c.

References IsWin95, map_errno, open, and rb_chsize().

int rb_w32_uaccess ( const char *  ,
int   
)

Definition at line 4390 of file win32.c.

References rb_w32_ustati64().

int rb_w32_uchdir ( const char *   ) 

Definition at line 5559 of file win32.c.

References free, NULL, and utf8_to_wstr.

int rb_w32_uchmod ( const char *  ,
int   
)

Definition at line 5709 of file win32.c.

References free, NULL, and utf8_to_wstr.

int rb_w32_uchown ( const char *  ,
int  ,
int   
)

Definition at line 3806 of file win32.c.

int rb_w32_ulink ( const char *  ,
const char *   
)

Definition at line 3947 of file win32.c.

References free, NULL, utf8_to_wstr, and wlink().

int rb_w32_umkdir ( const char *  ,
int   
)

Definition at line 5591 of file win32.c.

References free, NULL, utf8_to_wstr, and wmkdir().

int rb_w32_unlink ( const char *   ) 

Definition at line 5696 of file win32.c.

References filecp_to_wstr, free, NULL, and wunlink().

int rb_w32_uopen ( const char *  ,
int  ,
  ... 
)

Definition at line 4803 of file win32.c.

References free, NULL, rb_w32_wopen(), and utf8_to_wstr.

int rb_w32_urename ( const char *  ,
const char *   
)

Definition at line 4063 of file win32.c.

References free, NULL, utf8_to_wstr, and wrename().

int rb_w32_urmdir ( const char *   ) 

Definition at line 5650 of file win32.c.

References free, NULL, utf8_to_wstr, and wrmdir().

int rb_w32_ustati64 ( const char *  ,
struct stati64 *   
)

Definition at line 4350 of file win32.c.

References free, NULL, utf8_to_wstr, and wstati64().

Referenced by rb_w32_uaccess().

int rb_w32_utime ( const char *  ,
const struct utimbuf  
)

Definition at line 5546 of file win32.c.

References filecp_to_wstr, free, NULL, and wutime().

int rb_w32_uunlink ( const char *   ) 

Definition at line 5683 of file win32.c.

References free, NULL, utf8_to_wstr, and wunlink().

int rb_w32_uutime ( const char *  ,
const struct utimbuf  
)

Definition at line 5533 of file win32.c.

References free, NULL, utf8_to_wstr, and wutime().

int rb_w32_wait_events_blocking ( HANDLE *  events,
int  num,
DWORD  timeout 
)
int rb_w32_wopen ( const WCHAR *  ,
int  ,
  ... 
)
ssize_t rb_w32_write ( int  ,
const void *  ,
size_t   
)
long rb_w32_write_console ( uintptr_t  ,
int   
)
int recvmsg ( int  ,
struct msghdr ,
int   
)
static double scalb ( double  a,
long  b 
) [inline, static]

Definition at line 331 of file win32.h.

int sendmsg ( int  ,
const struct msghdr ,
int   
)
int setgid ( rb_gid_t   ) 

Definition at line 2303 of file win32.c.

References ROOT_GID.

Referenced by p_gid_change_privilege(), and rb_setegid_core().

int setuid ( rb_uid_t   ) 

Definition at line 2297 of file win32.c.

References ROOT_UID.

Referenced by p_uid_change_privilege(), proc_seteuid(), proc_setuid(), and rb_seteuid_core().

rb_pid_t waitpid ( rb_pid_t  ,
int *  ,
int   
)

Generated on 1 Aug 2012 for Ruby by  doxygen 1.6.1