Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 51 lines (38 sloc) 0.695 kB
e41e81e @brixen More header file portability for Windows.
brixen authored
1 #include "config.h"
2
6e77e74 @brixen Some OpenBSD fixes from Jeremy Evans.
brixen authored
3 #include <stdint.h>
f71b97b @dgtized converted everything to cpp files to fix -Wno-deprecated error on gcc…
dgtized authored
4 #include <stdlib.h>
5 #include <sys/types.h>
e41e81e @brixen More header file portability for Windows.
brixen authored
6 #ifdef RBX_WINDOWS
7 #include <winsock2.h>
8 #else
f71b97b @dgtized converted everything to cpp files to fix -Wno-deprecated error on gcc…
dgtized authored
9 #include <sys/socket.h>
10 #include <sys/un.h>
11 #include <netinet/in.h>
12 #include <netdb.h>
e41e81e @brixen More header file portability for Windows.
brixen authored
13 #endif
14 #include <sys/stat.h>
f71b97b @dgtized converted everything to cpp files to fix -Wno-deprecated error on gcc…
dgtized authored
15 #include <errno.h>
16 #include <time.h>
0cec846 @jfirebaugh Attach signbit via FFI
jfirebaugh authored
17 #include <math.h>
f71b97b @dgtized converted everything to cpp files to fix -Wno-deprecated error on gcc…
dgtized authored
18
fb9d925 @brixen Fixes to compile ffi_util.cpp.
brixen authored
19 #include "windows_compat.h"
f71b97b @dgtized converted everything to cpp files to fix -Wno-deprecated error on gcc…
dgtized authored
20 #include "ffi_util.hpp"
21
a80299b @rue Make ffi_util functions extern "C" to avoid dlsym name mangling problem.
rue authored
22 extern "C" {
23
f71b97b @dgtized converted everything to cpp files to fix -Wno-deprecated error on gcc…
dgtized authored
24 extern char** environ;
25
26 int ffi_errno() { return errno; }
27
28 char** ffi_environ() { return environ; }
29
30 void ffi_set_errno(int n) {
31 errno = n;
32 }
33
19ec01c @leavengood Haiku specific fix: add major and minor defines if they aren't there.
leavengood authored
34 #ifndef major
35 #define major(x) x
36 #endif
37
38 #ifndef minor
39 #define minor(x) 0
40 #endif
41
f71b97b @dgtized converted everything to cpp files to fix -Wno-deprecated error on gcc…
dgtized authored
42 long ffi_major(dev_t n) {
43 return major(n);
44 }
45
46 long ffi_minor(dev_t n) {
47 return minor(n);
48 }
49
a80299b @rue Make ffi_util functions extern "C" to avoid dlsym name mangling problem.
rue authored
50 }
Something went wrong with that request. Please try again.