~ubuntu-branches/ubuntu/intrepid/ruby1.9/intrepid-updates

« back to all changes in this revision

Viewing changes to win32/win32.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-09-04 16:01:17 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20070904160117-i15zckg2nhxe9fyw
Tags: 1.9.0+20070830-2ubuntu1
* Sync from Debian; remaining changes:
  - Add -g to CFLAGS.
* Fixes build failure on ia64.
* Fixes build failure with gcc-4.2 on lpia.
* Robustify check for target_os, fixing build failure on lpia.
* Set Ubuntu maintainer address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef RUBY_WIN32_H
2
 
#define RUBY_WIN32_H
3
 
 
4
 
/*
5
 
 *  Copyright (c) 1993, Intergraph Corporation
6
 
 *
7
 
 *  You may distribute under the terms of either the GNU General Public
8
 
 *  License or the Artistic License, as specified in the perl README file.
9
 
 *
10
 
 */
11
 
 
12
 
//
13
 
// Definitions for NT port of Perl
14
 
//
15
 
 
16
 
 
17
 
//
18
 
// Ok now we can include the normal include files.
19
 
//
20
 
 
21
 
// #include <stdarg.h> conflict with varargs.h?
22
 
#if !defined(WSAAPI)
23
 
#include <winsock2.h>
24
 
#endif
25
 
 
26
 
#define NT 1                    /* deprecated */
27
 
 
28
 
#ifdef _WIN32_WCE
29
 
#undef CharNext
30
 
#define CharNext CharNextA
31
 
#endif
32
 
 
33
 
//
34
 
// We're not using Microsoft's "extensions" to C for
35
 
// Structured Exception Handling (SEH) so we can nuke these
36
 
//
37
 
#undef try
38
 
#undef except
39
 
#undef finally
40
 
#undef leave
41
 
 
42
 
#if defined(__cplusplus)
43
 
extern "C++" {
44
 
#endif
45
 
 
46
 
#include <stdio.h>
47
 
#include <stdlib.h>
48
 
#include <string.h>
49
 
#include <direct.h>
50
 
#include <process.h>
51
 
#include <time.h>
52
 
#include <math.h>
53
 
#include <signal.h>
54
 
#include <sys/stat.h>
55
 
#include <sys/types.h>
56
 
#ifdef HAVE_SYS_UTIME_H
57
 
# include <sys/utime.h>
58
 
#else
59
 
# include <utime.h>
60
 
#endif
61
 
#include <io.h>
62
 
#include <malloc.h>
63
 
 
64
 
#if defined(__cplusplus)
65
 
}
66
 
#endif
67
 
 
68
 
#ifdef _M_IX86
69
 
# define WIN95 1
70
 
#else
71
 
# undef  WIN95
72
 
#endif
73
 
 
74
 
#ifdef WIN95
75
 
extern DWORD rb_w32_osid(void);
76
 
#define rb_w32_iswinnt()  (rb_w32_osid() == VER_PLATFORM_WIN32_NT)
77
 
#define rb_w32_iswin95()  (rb_w32_osid() == VER_PLATFORM_WIN32_WINDOWS)
78
 
#else
79
 
#define rb_w32_iswinnt()  TRUE
80
 
#define rb_w32_iswin95()  FALSE
81
 
#endif
82
 
 
83
 
#define WNOHANG -1
84
 
 
85
 
#undef getc
86
 
#undef putc
87
 
#undef fgetc
88
 
#undef fputc
89
 
#undef getchar
90
 
#undef putchar
91
 
#undef fgetchar
92
 
#undef fputchar
93
 
#undef utime
94
 
#undef lseek
95
 
#undef fstat
96
 
#define getc(_stream)           rb_w32_getc(_stream)
97
 
#define getchar()               rb_w32_getc(stdin)
98
 
#define putc(_c, _stream)       rb_w32_putc(_c, _stream)
99
 
#define putchar(_c)             rb_w32_putc(_c, stdout)
100
 
#ifdef RUBY_EXPORT
101
 
#define fgetc(_stream)          getc(_stream)
102
 
#define fputc(_c, _stream)      putc(_c, _stream)
103
 
#define fgetchar()              getchar()
104
 
#define fputchar(_c)            putchar(_c)
105
 
#define utime(_p, _t)           rb_w32_utime(_p, _t)
106
 
#define lseek(_f, _o, _w)       _lseeki64(_f, _o, _w)
107
 
 
108
 
#define pipe(p)                 _pipe(p, 2048L, O_BINARY)
109
 
#define close(h)                rb_w32_close(h)
110
 
#define fclose(f)               rb_w32_fclose(f)
111
 
#define read(f, b, s)           rb_w32_read(f, b, s)
112
 
#define write(f, b, s)          rb_w32_write(f, b, s)
113
 
#define getpid()                rb_w32_getpid()
114
 
#define sleep(x)                rb_w32_Sleep((x)*1000)
115
 
#define Sleep(msec)             (void)rb_w32_Sleep(msec)
116
 
#define fstat(fd,st)            _fstati64(fd,st)
117
 
#ifdef __BORLANDC__
118
 
#define creat(p, m)             _creat(p, m)
119
 
#define eof()                   _eof()
120
 
#define filelength(h)           _filelength(h)
121
 
#define mktemp(t)               _mktemp(t)
122
 
#define tell(h)                 _tell(h)
123
 
#define _open                   _sopen
124
 
#define sopen                   _sopen
125
 
#define _fstati64(fd,st)        rb_w32_fstati64(fd,st)
126
 
#undef fopen
127
 
#define fopen(p, m)             rb_w32_fopen(p, m)
128
 
#undef fdopen
129
 
#define fdopen(h, m)            rb_w32_fdopen(h, m)
130
 
#undef fsopen
131
 
#define fsopen(p, m, sh)        rb_w32_fsopen(p, m, sh)
132
 
#endif
133
 
 
134
 
#undef execv
135
 
#define execv(path,argv)        rb_w32_aspawn(P_OVERLAY,path,argv)
136
 
#if !defined(__BORLANDC__) && !defined(_WIN32_WCE)
137
 
#undef isatty
138
 
#define isatty(h)               rb_w32_isatty(h)
139
 
#endif
140
 
 
141
 
#undef mkdir
142
 
#define mkdir(p, m)             rb_w32_mkdir(p, m)
143
 
#undef rmdir
144
 
#define rmdir(p)                rb_w32_rmdir(p)
145
 
#undef unlink
146
 
#define unlink(p)               rb_w32_unlink(p)
147
 
#endif
148
 
 
149
 
#if SIZEOF_OFF_T == 8
150
 
#define off_t __int64
151
 
#define stat stati64
152
 
#if defined(__BORLANDC__)
153
 
#define stati64(path, st) rb_w32_stati64(path, st)
154
 
#elif !defined(_MSC_VER) || _MSC_VER < 1400
155
 
#define stati64 _stati64
156
 
#define _stati64(path, st) rb_w32_stati64(path, st)
157
 
#else
158
 
#define stati64 _stat64
159
 
#define _stat64(path, st) rb_w32_stati64(path, st)
160
 
#endif
161
 
#else
162
 
#define stat(path,st)           rb_w32_stat(path,st)
163
 
#define fstat(fd,st)            rb_w32_fstat(fd,st)
164
 
extern int rb_w32_stat(const char *, struct stat *);
165
 
extern int rb_w32_fstat(int, struct stat *);
166
 
#endif
167
 
 
168
 
#define strcasecmp(s1, s2)      stricmp(s1, s2)
169
 
#define strncasecmp(s1, s2, n)  strnicmp(s1, s2, n)
170
 
#define fsync(h)                _commit(h)
171
 
 
172
 
#ifdef __MINGW32__
173
 
struct timezone {
174
 
  int tz_minuteswest;
175
 
  int tz_dsttime;
176
 
};
177
 
#undef isascii
178
 
#define isascii __isascii
179
 
#endif
180
 
extern void   NtInitialize(int *, char ***);
181
 
extern int    rb_w32_cmdvector(const char *, char ***);
182
 
extern rb_pid_t  rb_w32_pipe_exec(const char *, const char *, int, int *);
183
 
extern int    flock(int fd, int oper);
184
 
extern int    rb_w32_is_socket(int);
185
 
extern int    WSAAPI rb_w32_accept(int, struct sockaddr *, int *);
186
 
extern int    WSAAPI rb_w32_bind(int, const struct sockaddr *, int);
187
 
extern int    WSAAPI rb_w32_connect(int, const struct sockaddr *, int);
188
 
extern void   rb_w32_fdset(int, fd_set*);
189
 
extern void   rb_w32_fdclr(int, fd_set*);
190
 
extern int    rb_w32_fdisset(int, fd_set*);
191
 
extern int    WSAAPI rb_w32_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
192
 
extern int    WSAAPI rb_w32_getpeername(int, struct sockaddr *, int *);
193
 
extern int    WSAAPI rb_w32_getsockname(int, struct sockaddr *, int *);
194
 
extern int    WSAAPI rb_w32_getsockopt(int, int, int, char *, int *);
195
 
extern int    WSAAPI rb_w32_ioctlsocket(int, long, u_long *);
196
 
extern int    WSAAPI rb_w32_listen(int, int);
197
 
extern int    WSAAPI rb_w32_recv(int, char *, int, int);
198
 
extern int    WSAAPI rb_w32_recvfrom(int, char *, int, int, struct sockaddr *, int *);
199
 
extern int    WSAAPI rb_w32_send(int, const char *, int, int);
200
 
extern int    WSAAPI rb_w32_sendto(int, const char *, int, int, const struct sockaddr *, int);
201
 
extern int    WSAAPI rb_w32_setsockopt(int, int, int, const char *, int);
202
 
extern int    WSAAPI rb_w32_shutdown(int, int);
203
 
extern int    WSAAPI rb_w32_socket(int, int, int);
204
 
extern SOCKET rb_w32_get_osfhandle(int);
205
 
extern struct hostent *WSAAPI rb_w32_gethostbyaddr(const char *, int, int);
206
 
extern struct hostent *WSAAPI rb_w32_gethostbyname(const char *);
207
 
extern int    WSAAPI rb_w32_gethostname(char *, int);
208
 
extern struct protoent *WSAAPI rb_w32_getprotobyname(const char *);
209
 
extern struct protoent *WSAAPI rb_w32_getprotobynumber(int);
210
 
extern struct servent  *WSAAPI rb_w32_getservbyname(const char *, const char *);
211
 
extern struct servent  *WSAAPI rb_w32_getservbyport(int, const char *);
212
 
extern int    rb_w32_socketpair(int, int, int, int *);
213
 
extern char * rb_w32_getenv(const char *);
214
 
extern int    rb_w32_rename(const char *, const char *);
215
 
extern char **rb_w32_get_environ(void);
216
 
extern void   rb_w32_free_environ(char **);
217
 
 
218
 
#define vsnprintf(s,n,f,l) rb_w32_vsnprintf(s,n,f,l)
219
 
#define snprintf   rb_w32_snprintf
220
 
extern int rb_w32_vsnprintf(char *, size_t, const char *, va_list);
221
 
extern int rb_w32_snprintf(char *, size_t, const char *, ...);
222
 
 
223
 
extern int chown(const char *, int, int);
224
 
extern int link(const char *, const char *);
225
 
extern int gettimeofday(struct timeval *, struct timezone *);
226
 
extern rb_pid_t waitpid (rb_pid_t, int *, int);
227
 
extern int rb_w32_argv_size(char *const *);
228
 
extern char *rb_w32_join_argv(char *, char *const *);
229
 
extern rb_pid_t rb_w32_spawn(int, const char *, const char*);
230
 
extern rb_pid_t rb_w32_aspawn(int, const char *, char *const *);
231
 
extern int kill(int, int);
232
 
extern int fcntl(int, int, ...);
233
 
extern rb_pid_t rb_w32_getpid(void);
234
 
#if !defined(__BORLANDC__) && !defined(_WIN32_WCE)
235
 
extern int rb_w32_isatty(int);
236
 
#endif
237
 
extern int rb_w32_mkdir(const char *, int);
238
 
extern int rb_w32_rmdir(const char *);
239
 
extern int rb_w32_unlink(const char *);
240
 
extern int rb_w32_stati64(const char *, struct stati64 *);
241
 
 
242
 
#ifdef __BORLANDC__
243
 
extern int rb_w32_fstati64(int, struct stati64 *);
244
 
extern off_t _lseeki64(int, off_t, int);
245
 
extern FILE *rb_w32_fopen(const char *, const char *);
246
 
extern FILE *rb_w32_fdopen(int, const char *);
247
 
extern FILE *rb_w32_fsopen(const char *, const char *, int);
248
 
#endif
249
 
 
250
 
#include <float.h>
251
 
#if !defined __MINGW32__ || defined __NO_ISOCEXT
252
 
#ifndef isnan
253
 
#define isnan(x) _isnan(x)
254
 
#endif
255
 
#ifndef finite
256
 
#define finite(x) _finite(x)
257
 
#endif
258
 
#ifndef copysign
259
 
#define copysign(a, b) _copysign(a, b)
260
 
#endif
261
 
#ifndef scalb
262
 
#define scalb(a, b) _scalb(a, b)
263
 
#endif
264
 
#endif
265
 
 
266
 
#if !defined S_IFIFO && defined _S_IFIFO
267
 
#define S_IFIFO _S_IFIFO
268
 
#endif
269
 
 
270
 
#if 0 && defined __BORLANDC__
271
 
#undef S_ISDIR
272
 
#undef S_ISFIFO
273
 
#undef S_ISBLK
274
 
#undef S_ISCHR
275
 
#undef S_ISREG
276
 
#define S_ISDIR(m)  (((unsigned short)(m) & S_IFMT) == S_IFDIR)
277
 
#define S_ISFIFO(m) (((unsigned short)(m) & S_IFMT) == S_IFIFO)
278
 
#define S_ISBLK(m)  (((unsigned short)(m) & S_IFMT) == S_IFBLK)
279
 
#define S_ISCHR(m)  (((unsigned short)(m) & S_IFMT) == S_IFCHR)
280
 
#define S_ISREG(m)  (((unsigned short)(m) & S_IFMT) == S_IFREG)
281
 
#endif
282
 
 
283
 
#if !defined S_IRUSR && !defined __MINGW32__
284
 
#define S_IRUSR 0400
285
 
#endif
286
 
#ifndef S_IRGRP
287
 
#define S_IRGRP 0040
288
 
#endif
289
 
#ifndef S_IROTH
290
 
#define S_IROTH 0004
291
 
#endif
292
 
 
293
 
#if !defined S_IWUSR && !defined __MINGW32__
294
 
#define S_IWUSR 0200
295
 
#endif
296
 
#ifndef S_IWGRP
297
 
#define S_IWGRP 0020
298
 
#endif
299
 
#ifndef S_IWOTH
300
 
#define S_IWOTH 0002
301
 
#endif
302
 
 
303
 
#if !defined S_IXUSR && !defined __MINGW32__
304
 
#define S_IXUSR 0100
305
 
#endif
306
 
#ifndef S_IXGRP
307
 
#define S_IXGRP 0010
308
 
#endif
309
 
#ifndef S_IXOTH
310
 
#define S_IXOTH 0001
311
 
#endif
312
 
 
313
 
//
314
 
// define this so we can do inplace editing
315
 
//
316
 
 
317
 
#define SUFFIX
318
 
extern int       truncate(const char *path, off_t length);
319
 
extern int       ftruncate(int fd, off_t length);
320
 
extern int       fseeko(FILE *stream, off_t offset, int whence);
321
 
extern off_t     ftello(FILE *stream);
322
 
 
323
 
//
324
 
// stubs
325
 
//
326
 
extern int       ioctl (int, int, ...);
327
 
extern rb_uid_t  getuid (void);
328
 
extern rb_uid_t  geteuid (void);
329
 
extern rb_gid_t  getgid (void);
330
 
extern rb_gid_t  getegid (void);
331
 
extern int       setuid (rb_uid_t);
332
 
extern int       setgid (rb_gid_t);
333
 
 
334
 
extern char *rb_w32_strerror(int);
335
 
 
336
 
#ifdef RUBY_EXPORT
337
 
#define strerror(e) rb_w32_strerror(e)
338
 
#endif
339
 
 
340
 
#define PIPE_BUF 1024
341
 
 
342
 
#define LOCK_SH 1
343
 
#define LOCK_EX 2
344
 
#define LOCK_NB 4
345
 
#define LOCK_UN 8
346
 
 
347
 
 
348
 
#ifndef SIGINT
349
 
#define SIGINT 2
350
 
#endif
351
 
#ifndef SIGKILL
352
 
#define SIGKILL 9
353
 
#endif
354
 
 
355
 
 
356
 
/* #undef va_start */
357
 
/* #undef va_end */
358
 
 
359
 
/* winsock error map */
360
 
#define EWOULDBLOCK     WSAEWOULDBLOCK
361
 
#define EINPROGRESS     WSAEINPROGRESS
362
 
#define EALREADY        WSAEALREADY
363
 
#define ENOTSOCK        WSAENOTSOCK
364
 
#define EDESTADDRREQ    WSAEDESTADDRREQ
365
 
#define EMSGSIZE        WSAEMSGSIZE
366
 
#define EPROTOTYPE      WSAEPROTOTYPE
367
 
#define ENOPROTOOPT     WSAENOPROTOOPT
368
 
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
369
 
#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
370
 
#define EOPNOTSUPP      WSAEOPNOTSUPP
371
 
#define EPFNOSUPPORT    WSAEPFNOSUPPORT
372
 
#define EAFNOSUPPORT    WSAEAFNOSUPPORT
373
 
#define EADDRINUSE      WSAEADDRINUSE
374
 
#define EADDRNOTAVAIL   WSAEADDRNOTAVAIL
375
 
#define ENETDOWN        WSAENETDOWN
376
 
#define ENETUNREACH     WSAENETUNREACH
377
 
#define ENETRESET       WSAENETRESET
378
 
#define ECONNABORTED    WSAECONNABORTED
379
 
#define ECONNRESET      WSAECONNRESET
380
 
#define ENOBUFS         WSAENOBUFS
381
 
#define EISCONN         WSAEISCONN
382
 
#define ENOTCONN        WSAENOTCONN
383
 
#define ESHUTDOWN       WSAESHUTDOWN
384
 
#define ETOOMANYREFS    WSAETOOMANYREFS
385
 
#define ETIMEDOUT       WSAETIMEDOUT
386
 
#define ECONNREFUSED    WSAECONNREFUSED
387
 
#define ELOOP           WSAELOOP
388
 
/*#define ENAMETOOLONG  WSAENAMETOOLONG*/
389
 
#define EHOSTDOWN       WSAEHOSTDOWN
390
 
#define EHOSTUNREACH    WSAEHOSTUNREACH
391
 
/*#define ENOTEMPTY     WSAENOTEMPTY*/
392
 
#define EPROCLIM        WSAEPROCLIM
393
 
#define EUSERS          WSAEUSERS
394
 
#define EDQUOT          WSAEDQUOT
395
 
#define ESTALE          WSAESTALE
396
 
#define EREMOTE         WSAEREMOTE
397
 
 
398
 
#define F_SETFL 1
399
 
#define O_NONBLOCK 1
400
 
 
401
 
#undef FD_SET
402
 
#define FD_SET(f, s)            rb_w32_fdset(f, s)
403
 
 
404
 
#undef FD_CLR
405
 
#define FD_CLR(f, s)            rb_w32_fdclr(f, s)
406
 
 
407
 
#undef FD_ISSET
408
 
#define FD_ISSET(f, s)          rb_w32_fdisset(f, s)
409
 
 
410
 
#ifdef RUBY_EXPORT
411
 
#undef accept
412
 
#define accept(s, a, l)         rb_w32_accept(s, a, l)
413
 
 
414
 
#undef bind
415
 
#define bind(s, a, l)           rb_w32_bind(s, a, l)
416
 
 
417
 
#undef connect
418
 
#define connect(s, a, l)        rb_w32_connect(s, a, l)
419
 
 
420
 
#undef select
421
 
#define select(n, r, w, e, t)   rb_w32_select(n, r, w, e, t)
422
 
 
423
 
#undef getpeername
424
 
#define getpeername(s, a, l)    rb_w32_getpeername(s, a, l)
425
 
 
426
 
#undef getsockname
427
 
#define getsockname(s, a, l)    rb_w32_getsockname(s, a, l)
428
 
 
429
 
#undef getsockopt
430
 
#define getsockopt(s, v, n, o, l) rb_w32_getsockopt(s, v, n, o, l)
431
 
 
432
 
#undef ioctlsocket
433
 
#define ioctlsocket(s, c, a)    rb_w32_ioctlsocket(s, c, a)
434
 
 
435
 
#undef listen
436
 
#define listen(s, b)            rb_w32_listen(s, b)
437
 
 
438
 
#undef recv
439
 
#define recv(s, b, l, f)        rb_w32_recv(s, b, l, f)
440
 
 
441
 
#undef recvfrom
442
 
#define recvfrom(s, b, l, f, fr, frl) rb_w32_recvfrom(s, b, l, f, fr, frl)
443
 
 
444
 
#undef send
445
 
#define send(s, b, l, f)        rb_w32_send(s, b, l, f)
446
 
 
447
 
#undef sendto
448
 
#define sendto(s, b, l, f, t, tl) rb_w32_sendto(s, b, l, f, t, tl)
449
 
 
450
 
#undef setsockopt
451
 
#define setsockopt(s, v, n, o, l) rb_w32_setsockopt(s, v, n, o, l)
452
 
 
453
 
#undef shutdown
454
 
#define shutdown(s, h)          rb_w32_shutdown(s, h)
455
 
 
456
 
#undef socket
457
 
#define socket(s, t, p)         rb_w32_socket(s, t, p)
458
 
 
459
 
#undef gethostbyaddr
460
 
#define gethostbyaddr(a, l, t)  rb_w32_gethostbyaddr(a, l, t)
461
 
 
462
 
#undef gethostbyname
463
 
#define gethostbyname(n)        rb_w32_gethostbyname(n)
464
 
 
465
 
#undef gethostname
466
 
#define gethostname(n, l)       rb_w32_gethostname(n, l)
467
 
 
468
 
#undef getprotobyname
469
 
#define getprotobyname(n)       rb_w32_getprotobyname(n)
470
 
 
471
 
#undef getprotobynumber
472
 
#define getprotobynumber(n)     rb_w32_getprotobynumber(n)
473
 
 
474
 
#undef getservbyname
475
 
#define getservbyname(n, p)     rb_w32_getservbyname(n, p)
476
 
 
477
 
#undef getservbyport
478
 
#define getservbyport(p, pr)    rb_w32_getservbyport(p, pr)
479
 
 
480
 
#undef socketpair
481
 
#define socketpair(a, t, p, s)  rb_w32_socketpair(a, t, p, s)
482
 
 
483
 
#undef get_osfhandle
484
 
#define get_osfhandle(h)        rb_w32_get_osfhandle(h)
485
 
 
486
 
#undef getcwd
487
 
#define getcwd(b, s)            rb_w32_getcwd(b, s)
488
 
 
489
 
#undef getenv
490
 
#define getenv(n)               rb_w32_getenv(n)
491
 
 
492
 
#undef rename
493
 
#define rename(o, n)            rb_w32_rename(o, n)
494
 
 
495
 
#undef times
496
 
#define times(t)                rb_w32_times(t)
497
 
#endif
498
 
 
499
 
struct tms {
500
 
        long    tms_utime;
501
 
        long    tms_stime;
502
 
        long    tms_cutime;
503
 
        long    tms_cstime;
504
 
};
505
 
 
506
 
int rb_w32_times(struct tms *);
507
 
 
508
 
/* thread stuff */
509
 
HANDLE GetCurrentThreadHandle(void);
510
 
int  rb_w32_sleep(unsigned long msec);
511
 
int  rb_w32_putc(int, FILE*);
512
 
int  rb_w32_getc(FILE*);
513
 
int  rb_w32_close(int);
514
 
int  rb_w32_fclose(FILE*);
515
 
size_t rb_w32_read(int, void *, size_t);
516
 
size_t rb_w32_write(int, const void *, size_t);
517
 
int  rb_w32_utime(const char *, const struct utimbuf *);
518
 
int  WINAPI rb_w32_Sleep(unsigned long msec);
519
 
 
520
 
/*
521
 
== ***CAUTION***
522
 
Since this function is very dangerous, ((*NEVER*))
523
 
* lock any HANDLEs(i.e. Mutex, Semaphore, CriticalSection and so on) or,
524
 
* use anything like TRAP_BEG...TRAP_END block structure,
525
 
in asynchronous_func_t.
526
 
*/
527
 
typedef DWORD (*asynchronous_func_t)(DWORD self, int argc, DWORD* argv);
528
 
DWORD rb_w32_asynchronize(asynchronous_func_t func, DWORD self, int argc, DWORD* argv, DWORD intrval);
529
 
 
530
 
#endif