diff options
| author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2006-04-20 04:16:23 +0000 |
|---|---|---|
| committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2006-04-20 04:16:23 +0000 |
| commit | 75f51d5bc7367af6a52700db989499162e8525e8 (patch) | |
| tree | c8b0c1b7c60130b6732ab3d5cabfb89d8566c7f9 | |
| parent | 316e205cd4dea804b68ed6ca14cf8b41acf6712f (diff) | |
| download | luasocket-75f51d5bc7367af6a52700db989499162e8525e8.tar.gz luasocket-75f51d5bc7367af6a52700db989499162e8525e8.tar.bz2 luasocket-75f51d5bc7367af6a52700db989499162e8525e8.zip | |
Almost ready to release 2.0.1
| -rw-r--r-- | config | 20 | ||||
| -rw-r--r-- | doc/index.html | 30 | ||||
| -rw-r--r-- | doc/installation.html | 32 | ||||
| -rw-r--r-- | etc/README | 6 | ||||
| -rw-r--r-- | src/makefile | 7 |
5 files changed, 59 insertions, 36 deletions
| @@ -15,8 +15,8 @@ UNIX_SO=unix.$(EXT) | |||
| 15 | #------ | 15 | #------ |
| 16 | # Lua includes and libraries | 16 | # Lua includes and libraries |
| 17 | # | 17 | # |
| 18 | LUAINC=-Ilua-5.0.2/include | 18 | LUAINC=-I/usr/local/include/lua50 |
| 19 | LUALIB=-Llua-5.0.2/lib | 19 | #LUAINC=-I/usr/local/include/lua5.1 |
| 20 | 20 | ||
| 21 | #------ | 21 | #------ |
| 22 | # Compat-5.1 directory | 22 | # Compat-5.1 directory |
| @@ -27,8 +27,10 @@ COMPAT=compat-5.1r5 | |||
| 27 | # Top of your Lua installation | 27 | # Top of your Lua installation |
| 28 | # Relative paths will be inside the src tree | 28 | # Relative paths will be inside the src tree |
| 29 | # | 29 | # |
| 30 | INSTALL_TOP_SHARE=share | 30 | INSTALL_TOP_SHARE=/usr/local/share/lua/5.0 |
| 31 | INSTALL_TOP_LIB=lib | 31 | INSTALL_TOP_LIB=/usr/local/lib/lua/5.0 |
| 32 | #INSTALL_TOP_SHARE=/usr/local/share/lua/5.1 | ||
| 33 | #INSTALL_TOP_LIB=/usr/local/lib/lua/5.1 | ||
| 32 | 34 | ||
| 33 | INSTALL_DATA=cp | 35 | INSTALL_DATA=cp |
| 34 | INSTALL_EXEC=cp | 36 | INSTALL_EXEC=cp |
| @@ -46,11 +48,11 @@ INSTALL_EXEC=cp | |||
| 46 | #------ | 48 | #------ |
| 47 | # Compiler and linker settings | 49 | # Compiler and linker settings |
| 48 | # for Linux | 50 | # for Linux |
| 49 | CC=gcc | 51 | #CC=gcc |
| 50 | DEF=-DLUASOCKET_DEBUG | 52 | #DEF=-DLUASOCKET_DEBUG |
| 51 | CFLAGS= $(LUAINC) -I$(COMPAT) $(DEF) -pedantic -Wall -O2 -fpic | 53 | #CFLAGS= $(LUAINC) -I$(COMPAT) $(DEF) -pedantic -Wall -O2 -fpic |
| 52 | LDFLAGS=-O -shared -fpic | 54 | #LDFLAGS=-O -shared -fpic |
| 53 | LD=gcc | 55 | #LD=gcc |
| 54 | 56 | ||
| 55 | #------ | 57 | #------ |
| 56 | # End of makefile configuration | 58 | # End of makefile configuration |
diff --git a/doc/index.html b/doc/index.html index 3c0bbce..387b874 100644 --- a/doc/index.html +++ b/doc/index.html | |||
| @@ -88,8 +88,9 @@ Author: <A href="http://www.cs.princeton.edu/~diego">Diego Nehab</a> | |||
| 88 | 88 | ||
| 89 | <p> | 89 | <p> |
| 90 | LuaSocket version 2.0.1 is now available for download! It is | 90 | LuaSocket version 2.0.1 is now available for download! It is |
| 91 | compatible with Lua 5.0 and has been tested on | 91 | compatible with Lua 5.0 and Lua 5.1, and has |
| 92 | Windows XP, Linux, and Mac OS X. | 92 | been tested on Windows XP, Linux, and Mac OS X. Chances |
| 93 | are it works well on most UNIX systems. | ||
| 93 | </p> | 94 | </p> |
| 94 | 95 | ||
| 95 | <p> | 96 | <p> |
| @@ -103,13 +104,13 @@ contains several examples, this user's manual and basic test procedures. | |||
| 103 | <p> | 104 | <p> |
| 104 | Danilo Tuler is maintaining Win32 binaries for LuaSocket, which are also | 105 | Danilo Tuler is maintaining Win32 binaries for LuaSocket, which are also |
| 105 | available from LuaForge. These are compatible with the | 106 | available from LuaForge. These are compatible with the |
| 106 | <a href=http://luaforge.net/projects/luabinaries>LuaBinaries</a> | 107 | <a href=http://luaforge.net/projects/luabinaries>LuaBinaries</a>, |
| 107 | available from LuaForge. | 108 | also available from LuaForge. |
| 108 | </p> | 109 | </p> |
| 109 | 110 | ||
| 110 | <p> | 111 | <p> |
| 111 | For those that want to give LuaSocket a quick try, download the | 112 | If you are using Lua 5.0, and want to give LuaSocket a quick |
| 112 | stand-alone archive and unpack everything into | 113 | try, download the stand-alone archive and unpack everything into |
| 113 | a directory, say <tt>c:\luasocket</tt>. Then set <tt>LUA_INIT</tt> to load | 114 | a directory, say <tt>c:\luasocket</tt>. Then set <tt>LUA_INIT</tt> to load |
| 114 | the <tt>compat-5.1.lua</tt> and set <tt>LUA_PATH</tt> and | 115 | the <tt>compat-5.1.lua</tt> and set <tt>LUA_PATH</tt> and |
| 115 | <tt>LUA_CPATH</tt> to look for files in the current directory: | 116 | <tt>LUA_CPATH</tt> to look for files in the current directory: |
| @@ -135,6 +136,23 @@ Lua 5.0.2 Copyright (C) 1994-2004 Tecgraf, PUC-Rio | |||
| 135 | --> the source to this web page gets dumped to terminal | 136 | --> the source to this web page gets dumped to terminal |
| 136 | </pre> | 137 | </pre> |
| 137 | 138 | ||
| 139 | <p> | ||
| 140 | If you are using Lua 5.1, you shouldn't use | ||
| 141 | <tt>compat-5.1.lua</tt>. Just unpack the standalone | ||
| 142 | directory, set <tt>LUA_CPATH</tt> and <tt>LUA_PATH</tt>, and | ||
| 143 | you should be ready to run: | ||
| 144 | <p> | ||
| 145 | |||
| 146 | <pre class=example> | ||
| 147 | c:\luasocket\> set LUA_CPATH=?.dll | ||
| 148 | c:\luasocket\> set LUA_PATH=?.lua | ||
| 149 | c:\luasocket\> lua5.1 | ||
| 150 | Lua 5.1 Copyright (C) 1994-2006 Lua.org, PUC-Rio | ||
| 151 | > http = require"socket.http" | ||
| 152 | > print(http.request"http://www.cs.princeton.edu/~diego/professional/luasocket/" | ||
| 153 | --> the source to this web page gets dumped to terminal | ||
| 154 | </pre> | ||
| 155 | |||
| 138 | <p> When you are done playing, take a look at the | 156 | <p> When you are done playing, take a look at the |
| 139 | <a href=installation.html>installation</a> section of the manual to find out | 157 | <a href=installation.html>installation</a> section of the manual to find out |
| 140 | how to properly install the library. </p> | 158 | how to properly install the library. </p> |
diff --git a/doc/installation.html b/doc/installation.html index 725db42..dadfe72 100644 --- a/doc/installation.html +++ b/doc/installation.html | |||
| @@ -39,27 +39,24 @@ Installation"> | |||
| 39 | 39 | ||
| 40 | <h2>Installation</h2> | 40 | <h2>Installation</h2> |
| 41 | 41 | ||
| 42 | <p> LuaSocket 2.0.1 uses the new package proposal for Lua 5.1. | 42 | <p> LuaSocket 2.0.1 uses the new package system for Lua 5.1. |
| 43 | All Lua library developers are encouraged to update their libraries so that | 43 | All Lua library developers are encouraged to update their libraries so that |
| 44 | all libraries can coexist peacefully and users can benefit from the | 44 | all libraries can coexist peacefully and users can benefit from the |
| 45 | standardization and flexibility of the standard. | 45 | standardization and flexibility of the standard. |
| 46 | </p> | 46 | </p> |
| 47 | 47 | ||
| 48 | <p> | 48 | <p> |
| 49 | The proposal was considered important enough by some of us to justify | 49 | Those stuck with Lua 5.0 will need the |
| 50 | early adoption, even before release of Lua 5.1. | ||
| 51 | Thus, a compatibility module | ||
| 52 | <a href=http://www.keplerproject.org/compat/>compat-5.1</a> | 50 | <a href=http://www.keplerproject.org/compat/>compat-5.1</a> |
| 53 | has been released in conjunction with Roberto Ierusalimschy and <a | 51 | module. It is maintained by |
| 54 | href=http://www.keplerproject.org/>The Kepler Project</a> team. | 52 | <a href=http://www.keplerproject.org/>The Kepler |
| 55 | It implements the Lua 5.1 package proposal on top of Lua 5.0. </p> | 53 | Project</a>'s team, and implements the Lua 5.1 package proposal |
| 56 | 54 | on top of Lua 5.0. </p> | |
| 57 | <p> As far as LuaSocket is concerned, this means that whoever is | 55 | |
| 58 | deploying a non-standard distribution of LuaSocket will probably | 56 | <p> Here we will only describe the standard distribution. |
| 59 | have no problems customizing it. Here we will only describe the standard distribution. If the standard doesn't meet your | 57 | If the standard doesn't meet your needs, we refer you to the |
| 60 | needs, we refer you to the Lua discussion list, where any question about | 58 | Lua discussion list, where any question about the package |
| 61 | the package scheme will likely already have been answered. | 59 | scheme will likely already have been answered. </p> |
| 62 | </p> | ||
| 63 | 60 | ||
| 64 | <h3>Directory structure</h3> | 61 | <h3>Directory structure</h3> |
| 65 | 62 | ||
| @@ -88,7 +85,7 @@ distribution directory structure:</p> | |||
| 88 | </pre> | 85 | </pre> |
| 89 | 86 | ||
| 90 | <p> Naturally, on Unix systems, <tt>core.dll</tt> | 87 | <p> Naturally, on Unix systems, <tt>core.dll</tt> |
| 91 | would be replaced by <tt>core.so</tt>. | 88 | would be replaced by <tt>core.so</tt>. |
| 92 | </p> | 89 | </p> |
| 93 | 90 | ||
| 94 | <p> In order for the interpreter to find all LuaSocket components, three | 91 | <p> In order for the interpreter to find all LuaSocket components, three |
| @@ -100,6 +97,11 @@ LUA_INIT=@<LDIR>/compat-5.1.lua | |||
| 100 | </pre> | 97 | </pre> |
| 101 | 98 | ||
| 102 | <p> | 99 | <p> |
| 100 | This is only need for Lua 5.0! Lua 5.1 comes with | ||
| 101 | the package system bult in, of course. | ||
| 102 | </p> | ||
| 103 | |||
| 104 | <p> | ||
| 103 | The other two environment variables instruct the compatibility module to | 105 | The other two environment variables instruct the compatibility module to |
| 104 | look for dynamic libraries and extension modules in the appropriate | 106 | look for dynamic libraries and extension modules in the appropriate |
| 105 | directories and with the appropriate filename extensions. | 107 | directories and with the appropriate filename extensions. |
| @@ -64,9 +64,9 @@ work. Just run | |||
| 64 | 64 | ||
| 65 | lua check-links.lua [-n] {<url>} > output | 65 | lua check-links.lua [-n] {<url>} > output |
| 66 | 66 | ||
| 67 | and open the result to see a list of broken links. You can | 67 | and open the result to see a list of broken links. Make sure |
| 68 | also use the '-n' switch to run the same program in | 68 | you check the '-n' switch. It runs in non-blocking mode, |
| 69 | non-blocking mode to see how much faster things can get. | 69 | using coroutines, and is MUCH faster! |
| 70 | 70 | ||
| 71 | forward.lua -- coroutine based forward server | 71 | forward.lua -- coroutine based forward server |
| 72 | 72 | ||
diff --git a/src/makefile b/src/makefile index 9a97dd3..a21a346 100644 --- a/src/makefile +++ b/src/makefile | |||
| @@ -10,6 +10,7 @@ include ../config | |||
| 10 | #------ | 10 | #------ |
| 11 | # Modules belonging to socket-core | 11 | # Modules belonging to socket-core |
| 12 | # | 12 | # |
| 13 | |||
| 13 | SOCKET_OBJS:= \ | 14 | SOCKET_OBJS:= \ |
| 14 | $(COMPAT)/compat-5.1.o \ | 15 | $(COMPAT)/compat-5.1.o \ |
| 15 | luasocket.o \ | 16 | luasocket.o \ |
| @@ -48,13 +49,13 @@ UNIX_OBJS:=\ | |||
| 48 | all: $(SOCKET_SO) $(MIME_SO) | 49 | all: $(SOCKET_SO) $(MIME_SO) |
| 49 | 50 | ||
| 50 | $(SOCKET_SO): $(SOCKET_OBJS) | 51 | $(SOCKET_SO): $(SOCKET_OBJS) |
| 51 | $(LD) $(LDFLAGS) -o $@ $^ | 52 | $(LD) $(LDFLAGS) -o $@ $(SOCKET_OBJS) |
| 52 | 53 | ||
| 53 | $(MIME_SO): $(MIME_OBJS) | 54 | $(MIME_SO): $(MIME_OBJS) |
| 54 | $(LD) $(LDFLAGS) -o $@ $^ | 55 | $(LD) $(LDFLAGS) -o $@ $(MIME_OBJS) |
| 55 | 56 | ||
| 56 | $(UNIX_SO): $(UNIX_OBJS) | 57 | $(UNIX_SO): $(UNIX_OBJS) |
| 57 | $(LD) $(LDFLAGS) -o $@ $^ | 58 | $(LD) $(LDFLAGS) -o $@ $(UNIX_OBJS) |
| 58 | 59 | ||
| 59 | #------ | 60 | #------ |
| 60 | # List of dependencies | 61 | # List of dependencies |
