diff options
author | Mike Buland <eichlan@xagasoft.com> | 2009-01-16 23:55:53 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2009-01-16 23:55:53 +0000 |
commit | 8c1f4d7bace6ff2c99d546cedaba890b349e88f8 (patch) | |
tree | e5c6e29deaaa7db42fbc75d0fdef32457bb0c8f2 /src/linux_compatibility.h | |
parent | 0a43e790cf9798948ab989abe88f890813c935df (diff) | |
download | libbu++-8c1f4d7bace6ff2c99d546cedaba890b349e88f8.tar.gz libbu++-8c1f4d7bace6ff2c99d546cedaba890b349e88f8.tar.bz2 libbu++-8c1f4d7bace6ff2c99d546cedaba890b349e88f8.tar.xz libbu++-8c1f4d7bace6ff2c99d546cedaba890b349e88f8.zip |
I...think that's a little better. Wow, function pointers in windows have a
lot of problems. This may require a little more research, but basically, you
can't just call them inline wherever you'd like. I managed to get it to work
by providing simple one line wrapper functions for each function we acquired as
a pointer. Crazy mess. Anyway, it should load the library just once now, and
Bu::Socket looks a little bit cleaner, but not a heck of a lot.
I also added some more docs and removed the author references.
Diffstat (limited to 'src/linux_compatibility.h')
-rw-r--r-- | src/linux_compatibility.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/linux_compatibility.h b/src/linux_compatibility.h new file mode 100644 index 0000000..67016a7 --- /dev/null +++ b/src/linux_compatibility.h | |||
@@ -0,0 +1,21 @@ | |||
1 | #ifdef __linux__ | ||
2 | |||
3 | #define bu_inet_ntoa inet_ntoa | ||
4 | #define bu_inet_addr inet_addr | ||
5 | #define bu_select select | ||
6 | #define bu_socket socket | ||
7 | #define bu_htons htons | ||
8 | #define bu_htonl htonl | ||
9 | #define bu_gethostbyname gethostbyname | ||
10 | #define bu_freeaddrinfo freeaddrinfo | ||
11 | #define bu_getaddrinfo getaddrinfo | ||
12 | #define bu_connect connect | ||
13 | #define bu_getpeername getpeername | ||
14 | #define bu_setsockopt setsockopt | ||
15 | #define bu_bind bind | ||
16 | #define bu_listen listen | ||
17 | #define bu_accept accept | ||
18 | |||
19 | #define bu_gai_strerror gai_strerror | ||
20 | |||
21 | #endif | ||