x64 support

This commit is contained in:
arpruss 2015-09-28 19:20:22 -05:00
parent e87888b7c5
commit 84342e99e5
6 changed files with 26 additions and 7 deletions

View File

@ -2,9 +2,9 @@ The MIT License (MIT)
RaspberryJamMod Copyright (c) 2015 Alexander R. Pruss
Lua Copyright (c) 19942015 Lua.org, PUC-Rio.
luasocket Copyright (c) Diego Nehab
tools.lua adapted from lua-websockets Copyright (c) 2012 Gerhard Lipp
base64.lua Copyright (c) 2014 Mark Rogaski and (C) 2012 Paul Moore (changed to MIME encoding)
luasocket Copyright (c) Diego Nehab (with socket.lua changed by ARP to load x64/x86 as needed)
tools.lua adapted from lua-websockets Copyright (c) 2012 Gerhard Lipp (with base64 inactivated)
base64.lua Copyright (c) 2014 Mark Rogaski and (C) 2012 Paul Moore (changed by ARP to MIME encoding)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -10,7 +10,12 @@
local base = _G
local string = require("string")
local math = require("math")
local socket = require("socket.core")
local socket
local status,err = pcall(function() socket = require("socket.core") end)
if not status then
socket = require("socket.cx64")
end
module("socket")
-----------------------------------------------------------------------------

Binary file not shown.

BIN
raspberryjammod/socket/cx64.dll Executable file

Binary file not shown.

View File

@ -0,0 +1,14 @@
--
-- core-x64.dll is compiled with msvc 12, without any changes to the luasockets
-- source. Unfortunately, this forces it to be named core.dll, which doesn't work
-- well with what I did to socket.lua to make it load the x64 version as needed.
-- So we patch it.
--
local f = assert(io.open("core-x64.dll", "rb"))
local data = f:read("*all")
f:close()
data = data:gsub("luaopen_socket_core", "luaopen_socket_cx64")
local f = assert(io.open("cx64.dll", "wb"))
f:write(data)
f:close()

View File

@ -189,9 +189,9 @@ end
return {
sha1 = sha1_crypto or sha1_wiki,
base64 = {
encode = base64_encode
},
-- base64 = {
-- encode = base64_encode
-- },
parse_url = parse_url,
generate_key = generate_key,
read_int8 = read_int8,