ekg2
GIT master
Strona główna
Dodatkowe strony
Moduły
Struktury Danych
Pliki
Lista plików
Globalne
All
Struktury Danych
Pliki
Funkcje
Zmienne
Definicje typów
Wyliczenia
Wartości wyliczeń
Definicje
Grupay
Strony
ekg
win32.h
Idź do dokumentacji tego pliku.
1
#ifdef __MINGW32__
2
# define NO_POSIX_SYSTEM "mingw"
3
#else
4
# define EKG2_WIN32_H
5
# undef NO_POSIX_SYSTEM
6
#endif
7
8
#ifndef EKG2_WIN32_H
9
#define EKG2_WIN32_H
10
11
#include "ekg2-config.h"
12
13
#if 0
14
typedef
unsigned
long
guint32;
15
typedef
unsigned
short
guint16;
16
typedef
unsigned
char
guint8;
17
#endif
18
19
#include <windef.h>
20
#include <stdint.h>
21
#include <stdlib.h>
22
#include <winsock2.h>
23
#include <ws2tcpip.h>
24
25
#include <sys/types.h>
26
#include <sys/stat.h>
27
#include <unistd.h>
28
29
#ifdef __cplusplus
30
extern
"C"
{
31
#endif
32
33
#undef pipe
34
typedef
unsigned
__int64 u_int64_t;
35
36
struct
utsname {
37
/* XXX, len */
38
char
sysname[30];
39
char
nodename[30];
40
char
release[30];
41
char
version[30];
42
char
machine[30];
43
};
44
45
#define THREAD(x) DWORD x(void *data)
46
typedef
THREAD(thread_func_t);
47
48
# ifndef EKG2_WIN32_NOFUNCTION
49
pid_t fork(
void
);
/* unimpl */
50
HANDLE win32_fork(thread_func_t *addr,
void
*data);
51
52
/* fcntl.h */
53
#define F_SETFL 4
54
#define O_NONBLOCK 04000
55
int
fcntl(
int
fd,
int
cmd,
long
arg);
56
/* ... */
57
58
int
fchmod(
int
fildes, mode_t mode);
/* unimpl */
59
int
pipe(
int
*filedes);
60
61
int
ioctl(
int
fd,
int
request,
void
*flags);
/* BAD PROTOTYPE. I KNOW. XXX, emulate some things */
62
int
uname(
struct
utsname *buf);
/* emulated ? */
63
64
#endif
65
66
#define EINPROGRESS WSAEINPROGRESS
67
68
#define fileno(__F) ((__F)->_file)
69
#define sleep(x) Sleep(x * 1000)
70
71
#ifdef __cplusplus
72
}
73
#endif
74
75
#endif
76
Wygenerowano Wt, 5 sie 2014 17:21:00 dla ekg2 programem
1.8.7