implements fake luaL_register in Lua 5.2+
Due to Android (and apparently Sun) not supporting getcwd(NULL, 0), I've changed to call to getcwd to specify a buffer and explicit size which successfully works around the problem. One minor performance advantage is that one less malloc/free is needed since the buffer is now created on the stack. Apparently, this was already changed in a prior commit I didn't see initially, but I think the use of an invented/arbitrary PATH_MAX is incorrect. Platforms should generally provide a constant for this and PATH_MAX itself is already defined on some systems like Linux which can cause collisions. This commit improves on those changes by leveraging the constants provided by the compiler/system.

To help keep the code consistent but still correct, new platform specific code needed to be introduced for the max length. On POSIX I am assuming it is that <sys/param.h> provides MAXPATHLEN. This is what the Mac/BSD man page says to use and verified this is also defined on Ubuntu Linux and Android. On Windows, MAX_PATH is used. MAX_PATH seems to still be 260 which seems kind of small; is there a different constant we are supposed to use? In both cases, the respective constants are mapped to a new #define for LFS_MAXPATHLEN to allow the code to refer to one constant and avoid any potential name collisions in case MAXPATHLEN is defined already by something else on Windows (e.g. Cygwin).
Merge pull request #14 from icgood/master

5.2 compatibility
Merge pull request #15 from ewmailing/master

Improvements to use of getcwd() for using the correct max path length
luafilesystem 1.6.0
lfs.c: use Lua 5.2's own luaL_register
Merge pull request #17 from rrthomas/master

Use Lua 5.2's own luaL_register
fix build for Lua 5.2; version 1.6.1
Full Lua 5.2 compatibility and adherance to modules-create-no-globals
Bump version to 1.6.2 and set version via define in src/lfs.c to make it better visible
Set global "lfs" when opening module

* Ensures backward compatibility with LFS 1.5
* Module name is defined as LFS_LIBNAME, similar to how Lua standard libraries are defined
Fix warning: C++ style comments are not allowed in ISO C90
Fix warnings: unused variable

On non-win32 lfs_setmode was defined to 0, ignoring all parameters.
Now the parameters are explicitly discarded.

Fixes:
src/lfs.c: In function ‘lfs_g_setmode’:
src/lfs.c:324:7: warning: unused variable ‘op’ [-Wunused-variable]
src/lfs.c:321:47: warning: unused parameter ‘f’ [-Wunused-parameter]
Merge pull request #18 from devurandom/fix/lua52

Full Lua 5.2 compatibility and adherance to modules-create-no-globals
Merge pull request #19 from devurandom/fix/warnings

Fix some warnings GCC produced on Linux
Merge remote-tracking branch 'upstream/master'

* upstream/master:
  Fix warnings: unused variable
  Fix warning: C++ style comments are not allowed in ISO C90
  Set global "lfs" when opening module
  Bump version to 1.6.2 and set version via define in src/lfs.c to make it better visible
  Full Lua 5.2 compatibility and adherance to modules-create-no-globals
  fix build for Lua 5.2; version 1.6.1
  lfs.c: use Lua 5.2's own luaL_register
  luafilesystem 1.6.0
  Due to Android (and apparently Sun) not supporting getcwd(NULL, 0), I've changed to call to getcwd to specify a buffer and explicit size which successfully works around the problem. One minor performance advantage is that one less malloc/free is needed since the buffer is now created on the stack. Apparently, this was already changed in a prior commit I didn't see initially, but I think the use of an invented/arbitrary PATH_MAX is incorrect. Platforms should generally provide a constant for this and PATH_MAX itself is already defined on some systems like Linux which can cause collisions. This commit improves on those changes by leveraging the constants provided by the compiler/system.
  implements fake luaL_register in Lua 5.2+
Updated to 1.6.2