aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEhsan Akhgari <ehsan.akhgari@gmail.com>2012-01-28 14:28:51 -0500
committerEhsan Akhgari <ehsan.akhgari@gmail.com>2012-01-28 14:28:51 -0500
commit426294bb1248945846a3265248484930dbded189 (patch)
treefb2679ed6fc2447a50531f9133b1b04cbd6f67b5 /src
parent1bbe851768ded820f7538fee5a8454a77c725517 (diff)
parentdc84a84b531b3d2b79709dbe89ee3e1d34b19d6d (diff)
Merge branch 'master' into glgears
Diffstat (limited to 'src')
-rw-r--r--src/library.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/library.js b/src/library.js
index 89e52243..45c64bc7 100644
--- a/src/library.js
+++ b/src/library.js
@@ -5743,6 +5743,20 @@ LibraryManager.library = {
},
// ==========================================================================
+ // arpa/inet.h
+ // ==========================================================================
+
+ htonl: function(value) {
+ return ((value & 0xff) << 24) + ((value & 0xff00) << 8) +
+ ((value & 0xff0000) >> 8) + ((value & 0xff000000) >> 24);
+ },
+ htons: function(value) {
+ return ((value & 0xff) << 8) + ((value & 0xff00) >> 8);
+ },
+ ntohl: 'htonl',
+ ntohs: 'htons',
+
+ // ==========================================================================
// emscripten.h
// ==========================================================================