aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS2
-rw-r--r--src/library_glfw.js3
-rw-r--r--system/include/net/netdb.h40
-rw-r--r--system/include/net/netinet/in.h2
-rw-r--r--system/include/netdb.h42
-rw-r--r--system/include/sys/socket.h3
-rwxr-xr-xtests/runner.py4
-rw-r--r--tools/js_optimizer.py2
8 files changed, 48 insertions, 50 deletions
diff --git a/AUTHORS b/AUTHORS
index 17878e11..55a7c057 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -59,3 +59,5 @@ a license to everyone to use it as detailed in LICENSE.)
* Felix H. Dahlke <fhd@ubercode.de>
* Éloi Rivard <azmeuk@gmail.com>
* Alexander Gladysh <ag@logiceditor.com>
+* Arlo Breault <arlolra@gmail.com>
+
diff --git a/src/library_glfw.js b/src/library_glfw.js
index 71552cd8..8bf3616f 100644
--- a/src/library_glfw.js
+++ b/src/library_glfw.js
@@ -32,7 +32,6 @@ var LibraryGLFW = {
resizeFunc: null,
closeFunc: null,
refreshFunc: null,
- mouseFunc: null,
params: null,
initTime: null,
wheelPos: 0,
@@ -470,7 +469,7 @@ var LibraryGLFW = {
},
glfwSetMousePosCallback: function(cbfun) {
- GLFW.mouseFunc = cbfun;
+ GLFW.mousePosFunc = cbfun;
},
glfwSetMouseWheelCallback: function(cbfun) {
diff --git a/system/include/net/netdb.h b/system/include/net/netdb.h
deleted file mode 100644
index 4151ccb5..00000000
--- a/system/include/net/netdb.h
+++ /dev/null
@@ -1,40 +0,0 @@
-
-#ifndef _NET_NETDB_H
-#define _NET_NETDB_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct addrinfo
-{
- int ai_flags;
- int ai_family;
- int ai_socktype;
- int ai_protocol;
- socklen_t ai_addrlen;
- struct sockaddr *ai_addr;
- char *ai_canonname;
- struct addrinfo *ai_next;
-};
-
-extern int getaddrinfo(const char *name, const char *service, const struct addrinfo *req, struct addrinfo **pai);
-extern void freeaddrinfo(struct addrinfo *ai);
-extern int getnameinfo (struct sockaddr *sa, socklen_t salen, char *host, socklen_t hostlen, char *serv, socklen_t servlen, unsigned int flags);
-const char *gai_strerror(int ecode);
-
-struct hostent
-{
- char *h_name;
- char **h_aliases;
- int h_addrtype;
- int h_length;
- char **h_addr_list;
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
diff --git a/system/include/net/netinet/in.h b/system/include/net/netinet/in.h
index e32bf3ee..569a56b0 100644
--- a/system/include/net/netinet/in.h
+++ b/system/include/net/netinet/in.h
@@ -6,6 +6,8 @@
extern "C" {
#endif
+#include <arpa/inet.h>
+
enum {
IPPROTO_IP = 0,
#define IPPROTO_IP IPPROTO_IP
diff --git a/system/include/netdb.h b/system/include/netdb.h
index 6e069448..147cdff4 100644
--- a/system/include/netdb.h
+++ b/system/include/netdb.h
@@ -11,6 +11,22 @@ extern "C" {
#define NO_DATA 4
#define NO_ADDRESS 5
+#define EAI_ADDRFAMILY 1
+#define EAI_AGAIN 2
+#define EAI_BADFLAGS 3
+#define EAI_FAIL 4
+#define EAI_FAMILY 5
+#define EAI_MEMORY 6
+#define EAI_NODATA 7
+#define EAI_NONAME 8
+#define EAI_SERVICE 9
+#define EAI_SOCKTYPE 10
+#define EAI_SYSTEM 11
+#define EAI_BADHINTS 12
+#define EAI_PROTOCOL 13
+#define EAI_OVERFLOW 14
+#define EAI_MAX 15
+
#define IP_TOS 1
#define IP_TTL 2
#define IP_HDRINCL 3
@@ -33,12 +49,30 @@ extern "C" {
typedef int socklen_t;
-struct hostent {
- char* h_name;
- char** h_aliases;
+struct addrinfo
+{
+ int ai_flags;
+ int ai_family;
+ int ai_socktype;
+ int ai_protocol;
+ socklen_t ai_addrlen;
+ struct sockaddr *ai_addr;
+ char *ai_canonname;
+ struct addrinfo *ai_next;
+};
+
+extern int getaddrinfo(const char *name, const char *service, const struct addrinfo *req, struct addrinfo **pai);
+extern void freeaddrinfo(struct addrinfo *ai);
+extern int getnameinfo (struct sockaddr *sa, socklen_t salen, char *host, socklen_t hostlen, char *serv, socklen_t servlen, unsigned int flags);
+const char *gai_strerror(int ecode);
+
+struct hostent
+{
+ char *h_name;
+ char **h_aliases;
int h_addrtype;
int h_length;
- char** h_addr_list;
+ char **h_addr_list;
};
#define h_addr h_addr_list[0]
diff --git a/system/include/sys/socket.h b/system/include/sys/socket.h
index e9b6c770..8ca6eccf 100644
--- a/system/include/sys/socket.h
+++ b/system/include/sys/socket.h
@@ -17,7 +17,7 @@ extern "C" {
#define SO_BROADCAST 6
#define AF_UNIX PF_UNIX
-#define AF_UNSPEC 100
+#define AF_UNSPEC 0
#define SOCK_STREAM 200
#define SOL_SOCKET 50
#define SO_ERROR 10
@@ -40,6 +40,7 @@ extern "C" {
typedef unsigned int sa_family_t;
#define AF_INET 1
#define AF_INET6 6
+#define PF_INET6 AF_INET6
struct sockaddr {
sa_family_t sa_family;
diff --git a/tests/runner.py b/tests/runner.py
index 4afdaa99..ba940310 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -6652,8 +6652,8 @@ localhost : 1 : 4
def test_799(self):
src = open(path_from_root('tests', '799.cpp'), 'r').read()
- self.do_run(src, '''Set PORT family: 100, port: 3979
-Get PORT family: 100
+ self.do_run(src, '''Set PORT family: 0, port: 3979
+Get PORT family: 0
PORT: 3979
''')
diff --git a/tools/js_optimizer.py b/tools/js_optimizer.py
index 4d37408c..b11d0449 100644
--- a/tools/js_optimizer.py
+++ b/tools/js_optimizer.py
@@ -100,7 +100,7 @@ def run_on_chunk(command):
f = open(filename, 'w')
f.write(output)
f.close()
- if DEBUG: print >> sys.stderr, '.'
+ if DEBUG and not shared.WINDOWS: print >> sys.stderr, '.' # Skip debug progress indicator on Windows, since it doesn't buffer well with multiple threads printing to console.
return filename
def run_on_js(filename, passes, js_engine, jcache):