MinGW Cross Compile on Ubuntu > Ruby Library > win32/win32.h

win32/win32.h


todo

ASR 1.8.7


ASR 1.8.7p330 の win32/win32.h で定義される関数一覧。 vc で定義されるもののみ。 Borland と MinGW は一部異なります。


定数マクロ

マクロ名
EADDRINUSEWSAEADDRINUSE
EADDRNOTAVAILWSAEADDRNOTAVAIL
EAFNOSUPPORTWSAEAFNOSUPPORT
EALREADYWSAEALREADY
ECONNABORTEDWSAECONNABORTED
ECONNREFUSEDWSAECONNREFUSED
ECONNRESETWSAECONNRESET
EDESTADDRREQWSAEDESTADDRREQ
EDQUOTWSAEDQUOT
EHOSTDOWNWSAEHOSTDOWN
EHOSTUNREACHWSAEHOSTUNREACH
EINPROGRESSWSAEINPROGRESS
EISCONNWSAEISCONN
ELOOPWSAELOOP
EMSGSIZEWSAEMSGSIZE
ENETDOWNWSAENETDOWN
ENETRESETWSAENETRESET
ENETUNREACHWSAENETUNREACH
ENOBUFSWSAENOBUFS
ENOPROTOOPTWSAENOPROTOOPT
ENOTCONNWSAENOTCONN
ENOTSOCKWSAENOTSOCK
EOPNOTSUPPWSAEOPNOTSUPP
EPFNOSUPPORTWSAEPFNOSUPPORT
EPROCLIMWSAEPROCLIM
EPROTONOSUPPORTWSAEPROTONOSUPPORT
EPROTOTYPEWSAEPROTOTYPE
EREMOTEWSAEREMOTE
ESHUTDOWNWSAESHUTDOWN
ESOCKTNOSUPPORTWSAESOCKTNOSUPPORT
ESTALEWSAESTALE
ETIMEDOUTWSAETIMEDOUT
ETOOMANYREFSWSAETOOMANYREFS
EUSERSWSAEUSERS
EWOULDBLOCKWSAEWOULDBLOCK
F_SETFL1
LOCK_EX2
LOCK_NB4
LOCK_SH1
LOCK_UN8
O_NONBLOCK1
PIPE_BUF1024
SIGINT2
SIGKILL9
SUFFIX
WNOHANG-1

構造体

名前
timezone
tms

undef される関数

関数名
try
except
finally
leave

通常の?関数

マクロ

fopen, fdopen, fsopen は Borland では定義されるが VC では定義されない。にも拘わらず fclose, fgetc, fputc, が定義されている...
置換される( undef )マクロ名定義
xFD_CLR(f, s)rb_w32_fdclr(f, s)
xFD_ISSET(f, s)rb_w32_fdisset(f, s)
xFD_SET(f, s)rb_w32_fdset(f, s)
-Sleep(msec)(void)rb_w32_sleep(msec)
xaccept(s, a, l)rb_w32_accept(s, a, l)
xbind(s, a, l)rb_w32_bind(s, a, l)
-close(h)rb_w32_close(h)
xconnect(s, a, l)rb_w32_connect(s, a, l)
-copysign(a, b)_copysign(a, b)
xexecv(path,argv)do_aspawn(P_OVERLAY,path,argv)
-fclose(f)rb_w32_fclose(f)
xfgetc(_stream)getc(_stream)
xfgetchar()getchar()
-finite(x)_finite(x)
xfputc(_c, _stream)putc(_c, _stream)
xfputchar(_c)putchar(_c)
-fsync(h)_commit(h)
xget_osfhandle(h)rb_w32_get_osfhandle(h)
xgetc(_stream)rb_w32_getc(_stream)
xgetchar()rb_w32_getc(stdin)
xgetcwd(b, s)rb_w32_getcwd(b, s)
xgetenv(n)rb_w32_getenv(n)
xgethostbyaddr(a, l, t)rb_w32_gethostbyaddr(a, l, t)
xgethostbyname(n)rb_w32_gethostbyname(n)
xgethostname(n, l)rb_w32_gethostname(n, l)
xgetpeername(s, a, l)rb_w32_getpeername(s, a, l)
-getpid()rb_w32_getpid()
xgetprotobyname(n)rb_w32_getprotobyname(n)
xgetprotobynumber(n)rb_w32_getprotobynumber(n)
xgetservbyname(n, p)rb_w32_getservbyname(n, p)
xgetservbyport(p, pr)rb_w32_getservbyport(p, pr)
xgetsockname(s, a, l)rb_w32_getsockname(s, a, l)
xgetsockopt(s, v, n, o, l)rb_w32_getsockopt(s, v, n, o, l)
xioctlsocket(s, c, a)rb_w32_ioctlsocket(s, c, a)
xisatty(h)rb_w32_isatty(h)
-isnan(x)_isnan(x)
xlisten(s, b)rb_w32_listen(s, b)
xmkdir(p, m)rb_w32_mkdir(p, m)
xputc(_c, _stream)rb_w32_putc(_c, _stream)
xputchar(_c)rb_w32_putc(_c, stdout)
-read(f, b, s)rb_w32_read(f, b, s)
xrecv(s, b, l, f)rb_w32_recv(s, b, l, f)
xrecvfrom(s, b, l, f, fr, frl)rb_w32_recvfrom(s, b, l, f, fr, frl)
xrename(o, n)rb_w32_rename(o, n)
xrmdir(p)rb_w32_rmdir(p)
-scalb(a, b)_scalb(a, b)
xselect(n, r, w, e, t)rb_w32_select(n, r, w, e, t)
xsend(s, b, l, f)rb_w32_send(s, b, l, f)
xsendto(s, b, l, f, t, tl)rb_w32_sendto(s, b, l, f, t, tl)
xsetsockopt(s, v, n, o, l)rb_w32_setsockopt(s, v, n, o, l)
xshutdown(s, h)rb_w32_shutdown(s, h)
-sleep(x)rb_w32_sleep((x)*1000)
-snprintfrb_w32_snprintf
xsocket(s, t, p)rb_w32_socket(s, t, p)
xstat(path,st)rb_w32_stat(path,st)
-strcasecmp(s1, s2)stricmp(s1, s2)
-strerror(e)rb_w32_strerror(e)
-strncasecmp(s1, s2, n)strnicmp(s1, s2, n)
xtimes(t)rb_w32_times(t)
xunlink(p)rb_w32_unlink(p)
xutime(_p, _t)rb_w32_utime(_p, _t)
-vsnprintf(s,n,f,l)rb_w32_vsnprintf(s,n,f,l)
-write(f, b, s)rb_w32_write(f, b, s)

※ 記号 x は undef 、 記号 - は undef されないことを表す。
extern された関数
戻り値の型関数名と仮引数
rb_pid_tpipe_exec(const char *, int, FILE **, FILE **)
intflock(int fd, int oper)
intchown(const char *, int, int)
intlink(char *, char *)
intgettimeofday(struct timeval *, struct timezone *)
rb_pid_twaitpid (rb_pid_t, int *, int)
intdo_spawn(int, const char *)
intdo_aspawn(int, const char *, char **)
intkill(int, int)
intfcntl(int, int, ...)
intioctl (int, unsigned int, long)
rb_uid_tgetuid (void)
rb_uid_tgeteuid (void)
rb_gid_tgetgid (void)
rb_gid_tgetegid (void)
intsetuid (rb_uid_t)
intsetgid (rb_gid_t)
extern されてない関数
戻り値の型関数名と仮引数
HANDLEGetCurrentThreadHandle(void)~

rb_w32_* 関数

extern された関数
戻り値の型関数名と仮引数
intrb_w32_accept(int, struct sockaddr *, int *)
intrb_w32_bind(int, struct sockaddr *, int)
intrb_w32_cmdvector(const char *, char ***)
intrb_w32_connect(int, struct sockaddr *, int)
voidrb_w32_fdclr(int, fd_set*)
intrb_w32_fdisset(int, fd_set*)
voidrb_w32_fdset(int, fd_set*)
voidrb_w32_free_environ(char **)
char **rb_w32_get_environ(void)
SOCKETrb_w32_get_osfhandle(int)
char *rb_w32_getcwd(char *, int)
char *rb_w32_getenv(const char *)
struct hostent *rb_w32_gethostbyaddr(char *, int, int)
struct hostent *rb_w32_gethostbyname(char *)
intrb_w32_gethostname(char *, int)
intrb_w32_getpeername(int, struct sockaddr *, int *)
rb_pid_trb_w32_getpid(void)
struct protoent *rb_w32_getprotobyname(char *)
struct protoent *rb_w32_getprotobynumber(int)
struct servent *rb_w32_getservbyname(char *, char *)
struct servent *rb_w32_getservbyport(int, char *)
intrb_w32_getsockname(int, struct sockaddr *, int *)
intrb_w32_getsockopt(int, int, int, char *, int *)
intrb_w32_ioctlsocket(int, long, u_long *)
intrb_w32_isatty(int)
intrb_w32_listen(int, int)
intrb_w32_map_errno(DWORD)
intrb_w32_mkdir(const char *, int)
intrb_w32_recv(int, char *, int, int)
intrb_w32_recvfrom(int, char *, int, int, struct sockaddr *, int *)
intrb_w32_rename(const char *, const char *)
intrb_w32_rmdir(const char *)
longrb_w32_select(int, fd_set *, fd_set *, fd_set *, struct timeval *)
intrb_w32_send(int, const char *, int, int)
intrb_w32_sendto(int, const char *, int, int, struct sockaddr *, int)
intrb_w32_setsockopt(int, int, int, char *, int)
intrb_w32_shutdown(int, int)
intrb_w32_snprintf(char *, size_t, const char *, ...)
intrb_w32_socket(int, int, int)
intrb_w32_stat(const char *, struct stat *)
char *rb_w32_strerror(int)
intrb_w32_unlink(const char*)
intrb_w32_vsnprintf(char *, size_t, const char *, va_list)
extern されてない関数
戻り値の型関数名と仮引数
intrb_w32_close(int)
voidrb_w32_enter_critical(void)
intrb_w32_fclose(FILE*)
intrb_w32_getc(FILE*)
voidrb_w32_interrupted(void)
voidrb_w32_leave_critical(void)
intrb_w32_main_context(int arg, void (*handler)(int))
intrb_w32_putc(int, FILE*)
size_trb_w32_read(int, void *, size_t)
intrb_w32_sleep(unsigned long msec)
intrb_w32_times(struct tms *)
intrb_w32_utime(const char *, struct utimbuf *)
size_trb_w32_write(int, const void *, size_t)
define された関数
戻り値関数名
TRUErb_w32_iswinnt()
FALSErb_w32_iswin95()

ASR 1.9.2


ASR 1.9.2p136 の ruby/win32.h で定義される関数一覧。 vc で定義されるもののみ。 Borland と MinGW は一部異なります。

定数マクロ

マクロ名
F_SETFL1
LOCK_EX2
LOCK_NB4
LOCK_SH1
LOCK_UN8
O_NONBLOCK1
PIPE_BUF1024
SIGINT2
SIGKILL9
SUFFIX
WNOHANG-1

未定義の場合に定義される定数マクロ
マクロ名
EADDRINUSEWSAEADDRINUSE
EADDRNOTAVAILWSAEADDRNOTAVAIL
EAFNOSUPPORTWSAEAFNOSUPPORT
EALREADYWSAEALREADY
ECONNABORTEDWSAECONNABORTED
ECONNREFUSEDWSAECONNREFUSED
ECONNRESETWSAECONNRESET
EDESTADDRREQWSAEDESTADDRREQ
EDQUOTWSAEDQUOT
EHOSTDOWNWSAEHOSTDOWN
EHOSTUNREACHWSAEHOSTUNREACH
EINPROGRESSWSAEINPROGRESS
EISCONNWSAEISCONN
ELOOPWSAELOOP
EMSGSIZEWSAEMSGSIZE
ENETDOWNWSAENETDOWN
ENETRESETWSAENETRESET
ENETUNREACHWSAENETUNREACH
ENOBUFSWSAENOBUFS
ENOPROTOOPTWSAENOPROTOOPT
ENOTCONNWSAENOTCONN
ENOTSOCKWSAENOTSOCK
EOPNOTSUPPWSAEOPNOTSUPP
EPFNOSUPPORTWSAEPFNOSUPPORT
EPROCLIMWSAEPROCLIM
EPROTONOSUPPORTWSAEPROTONOSUPPORT
EPROTOTYPEWSAEPROTOTYPE
EREMOTEWSAEREMOTE
ESHUTDOWNWSAESHUTDOWN
ESOCKTNOSUPPORTWSAESOCKTNOSUPPORT
ESTALEWSAESTALE
ETIMEDOUTWSAETIMEDOUT
ETOOMANYREFSWSAETOOMANYREFS
EUSERSWSAEUSERS
EWOULDBLOCKWSAEWOULDBLOCK

構造体

名前
iovec
msghdr
timezone
tms

undef される関数

関数名
try
except
finally
leave

通常の?関数

マクロ
置換される( undef )マクロ名定義
xFD_CLR(f, s)rb_w32_fdclr(f, s)
xFD_ISSET(f, s)rb_w32_fdisset(f, s)
xFD_SET(f, s)rb_w32_fdset(f, s)
-access(path,mode)rb_w32_access(path,mode)
xfstat(fd,st)rb_w32_fstat(fd,st)
-fsync_commit
-ftruncaterb_w32_ftruncate
xgetc(_stream)rb_w32_getc(_stream)
xgetchar()rb_w32_getc(stdin)
xputc(_c, _stream)rb_w32_putc(_c, _stream)
xputchar(_c)rb_w32_putc(_c, stdout)
-stat(path,st)rb_w32_stat(path,st)
-strcasecmp_stricmp
-strncasecmp_strnicmp

※ 記号 x は undef 、 記号 - は undef されないことを表す。

RUBY_EXPORT が定義されていた場合に定義されるマクロ。
置換される( undef )マクロ名定義
-Sleep(msec)(void)rb_w32_Sleep(msec)
xaccept(s, a, l)rb_w32_accept(s, a, l)
xbind(s, a, l)rb_w32_bind(s, a, l)
-close(h)rb_w32_close(h)
xconnect(s, a, l)rb_w32_connect(s, a, l)
xexecv(path,argv)rb_w32_aspawn(P_OVERLAY,path,argv)
-fclose(f)rb_w32_fclose(f)
-fgetc(_stream)getc(_stream)
-fgetchar()getchar()
-fputc(_c, _stream)putc(_c, _stream)
-fputchar(_c)putchar(_c)
xget_osfhandle(h)rb_w32_get_osfhandle(h)
xgetcwd(b, s)rb_w32_getcwd(b, s)
xgetenv(n)rb_w32_getenv(n)
xgethostbyaddr(a, l, t)rb_w32_gethostbyaddr(a, l, t)
xgethostbyname(n)rb_w32_gethostbyname(n)
xgethostname(n, l)rb_w32_gethostname(n, l)
xgetpeername(s, a, l)rb_w32_getpeername(s, a, l)
-getpid()rb_w32_getpid()
-getppid()rb_w32_getppid()
xgetprotobyname(n)rb_w32_getprotobyname(n)
xgetprotobynumber(n)rb_w32_getprotobynumber(n)
xgetservbyname(n, p)rb_w32_getservbyname(n, p)
xgetservbyport(p, pr)rb_w32_getservbyport(p, pr)
xgetsockname(s, a, l)rb_w32_getsockname(s, a, l)
xgetsockopt(s, v, n, o, l)rb_w32_getsockopt(s, v, n, o, l)
xioctlsocket(s, c, a)rb_w32_ioctlsocket(s, c, a)
xlisten(s, b)rb_w32_listen(s, b)
-lseek(_f, _o, _w)_lseeki64(_f, _o, _w)
xmkdir(p, m)rb_w32_mkdir(p, m)
-openrb_w32_open
-pipe(p)rb_w32_pipe(p)
-read(f, b, s)rb_w32_read(f, b, s)
xrecv(s, b, l, f)rb_w32_recv(s, b, l, f)
xrecvfrom(s, b, l, f, fr, frl)rb_w32_recvfrom(s, b, l, f, fr, frl)
xrename(o, n)rb_w32_rename(o, n)
xrmdir(p)rb_w32_rmdir(p)
xselect(n, r, w, e, t)rb_w32_select(n, r, w, e, t)
xsend(s, b, l, f)rb_w32_send(s, b, l, f)
xsendto(s, b, l, f, t, tl)rb_w32_sendto(s, b, l, f, t, tl)
xsetsockopt(s, v, n, o, l)rb_w32_setsockopt(s, v, n, o, l)
xshutdown(s, h)rb_w32_shutdown(s, h)
-sleep(x)rb_w32_Sleep((x)*1000)
xsocket(s, t, p)rb_w32_socket(s, t, p)
xsocketpair(a, t, p, s)rb_w32_socketpair(a, t, p, s)
-strerror(e)rb_w32_strerror(e)
xtimes(t)rb_w32_times(t)
xunlink(p)rb_w32_unlink(p)
-utime(_p, _t)rb_w32_utime(_p, _t)
-write(f, b, s)rb_w32_write(f, b, s)

※ 記号 x は undef 、 記号 - は undef されないことを表す。

extern された関数
戻り値の型関数名と仮引数
intflock(int fd, int oper)
intrecvmsg(int, struct msghdr *, int)
intsendmsg(int, const struct msghdr *, int)
intchown(const char *, int, int)
intlink(const char *, const char *)
intgettimeofday(struct timeval *, struct timezone *)
rb_pid_twaitpid (rb_pid_t, int *, int)
intkill(int, int)
intfcntl(int, int, ...)
inttruncate(const char *path, off_t length)
intftruncate(int fd, off_t length)
intfseeko(FILE *stream, off_t offset, int whence)
off_tftello(FILE *stream)
intioctl (int, int, ...)
rb_uid_tgetuid (void)
rb_uid_tgeteuid (void)
rb_gid_tgetgid (void)
rb_gid_tgetegid (void)
intsetuid (rb_uid_t)
intsetgid (rb_gid_t)
extern されてない関数
戻り値の型関数名と仮引数
HANDLEGetCurrentThreadHandle(void)~

rb_w32_* 関数

extern された関数
戻り値の型関数名と仮引数
int WINAPIrb_w32_Sleep(unsigned long msec)
int WSAAPIrb_w32_accept(int, struct sockaddr *, int *)
intrb_w32_access(const char *, int)
rb_pid_trb_w32_aspawn(int, const char *, char *const *)
int WSAAPIrb_w32_bind(int, const struct sockaddr *, int)
intrb_w32_close(int)
intrb_w32_cmdvector(const char *, char ***)
int WSAAPIrb_w32_connect(int, const struct sockaddr *, int)
intrb_w32_fclose(FILE*)
voidrb_w32_fdclr(int, fd_set*)
intrb_w32_fdisset(int, fd_set*)
voidrb_w32_fdset(int, fd_set*)
voidrb_w32_free_environ(char **)
intrb_w32_fstat(int, struct stat *)
char **rb_w32_get_environ(void)
SOCKETrb_w32_get_osfhandle(int)
intrb_w32_getc(FILE*)
char *rb_w32_getcwd(char *, int)
char *rb_w32_getenv(const char *)
struct hostent *WSAAPIrb_w32_gethostbyaddr(const char *, int, int)
struct hostent *WSAAPIrb_w32_gethostbyname(const char *)
int WSAAPIrb_w32_gethostname(char *, int)
int WSAAPIrb_w32_getpeername(int, struct sockaddr *, int *)
rb_pid_trb_w32_getpid(void)
rb_pid_trb_w32_getppid(void)
struct protoent *WSAAPIrb_w32_getprotobyname(const char *)
struct protoent *WSAAPIrb_w32_getprotobynumber(int)
struct servent *WSAAPIrb_w32_getservbyname(const char *, const char *)
struct servent *WSAAPIrb_w32_getservbyport(int, const char *)
int WSAAPIrb_w32_getsockname(int, struct sockaddr *, int *)
int WSAAPIrb_w32_getsockopt(int, int, int, char *, int *)
intrb_w32_has_cancel_io(void)
int WSAAPIrb_w32_ioctlsocket(int, long, u_long *)
intrb_w32_is_socket(int)
intrb_w32_isatty(int)
int WSAAPIrb_w32_listen(int, int)
intrb_w32_map_errno(DWORD)
intrb_w32_mkdir(const char *, int)
intrb_w32_open(const char *, int, ...)
intrb_w32_pipe(int[2])
rb_pid_trb_w32_pipe_exec(const char *, const char *, int, int *, int *)
intrb_w32_putc(int, FILE*)
size_trb_w32_read(int, void *, size_t)
int WSAAPIrb_w32_recv(int, char *, int, int)
int WSAAPIrb_w32_recvfrom(int, char *, int, int, struct sockaddr *, int *)
intrb_w32_rename(const char *, const char *)
intrb_w32_rmdir(const char *)
int WSAAPIrb_w32_select(int, fd_set *, fd_set *, fd_set *, struct timeval *)
int WSAAPIrb_w32_send(int, const char *, int, int)
int WSAAPIrb_w32_sendto(int, const char *, int, int, const struct sockaddr *, int)
int WSAAPIrb_w32_setsockopt(int, int, int, const char *, int)
int WSAAPIrb_w32_shutdown(int, int)
intrb_w32_sleep(unsigned long msec)
int WSAAPIrb_w32_socket(int, int, int)
intrb_w32_socketpair(int, int, int, int *)
rb_pid_trb_w32_spawn(int, const char *, const char*)
intrb_w32_stat(const char *, struct stat *)
intrb_w32_stati64(const char *, struct stati64 *)
char *rb_w32_strerror(int)
intrb_w32_times(struct tms *)
intrb_w32_uaccess(const char *, int)
intrb_w32_uchdir(const char *)
intrb_w32_uchmod(const char *, int)
intrb_w32_uchown(const char *, int, int)
intrb_w32_ulink(const char *, const char *)
intrb_w32_umkdir(const char *, int)
intrb_w32_unlink(const char *)
intrb_w32_uopen(const char *, int, ...)
intrb_w32_urename(const char *, const char *)
intrb_w32_urmdir(const char *)
intrb_w32_ustati64(const char *, struct stati64 *)
intrb_w32_utime(const char *, const struct utimbuf *)
intrb_w32_uunlink(const char *)
intrb_w32_uutime(const char *, const struct utimbuf *)
intrb_w32_wait_events_blocking(HANDLE *events, int num, DWORD timeout)
intrb_w32_wopen(const WCHAR *, int, ...)
size_trb_w32_write(int, const void *, size_t)
longrb_w32_write_console(unsigned long, int)
define された関数
戻り値関数名
TRUErb_w32_iswinnt()
FALSErb_w32_iswin95()

undef


問題を惹き起こすと思われるマクロ一覧。やや強めに選んでます。次のコマンドで変換して使ってください。

sed -e "s|^[^/].*$|#ifdef \0\n#undef \0\n#endif|" list.txt

/* winsock2 */
FD_CLR
FD_ISSET
FD_SET
accept
bind
connect
gethostbyaddr
gethostbyname
gethostname
getpeername
getprotobyname
getprotobynumber
getservbyname
getservbyport
getsockname
getsockopt
ioctlsocket
listen
recv
recvfrom
select
send
sendto
setsockopt
shutdown
socket

/* io */
fclose
fgetc
fgetchar
fopen
fputc
fputchar
getc
getchar
putc
putchar
snprintf
vsnprintf

/*  */
access
close
open
pipe
read
rename
stat
unlink
write

/*
accept
bind
connect
listen
recv
select
send
sendto
*/

todo

  • asr1.8.7 の見直し。

更新履歴



2011/6/10fri undef を追記。
2011/3/6sun ページ作成。
タグ

コメントをかく


「http://」を含む投稿は禁止されています。

利用規約をご確認のうえご記入下さい

×

この広告は60日間更新がないwikiに表示されております。

Wiki内検索

編集にはIDが必要です