Commit Graph

322 Commits

Author SHA1 Message Date
Dennis Schridde
a0d6f9d239 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]
2012-10-04 10:55:13 +02:00
Dennis Schridde
b35607e8a4 Fix warning: C++ style comments are not allowed in ISO C90 2012-10-04 10:51:44 +02:00
Dennis Schridde
f42c1a1a38 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
2012-10-04 10:48:07 +02:00
Dennis Schridde
5e55437028 Bump version to 1.6.2 and set version via define in src/lfs.c to make it better visible 2012-10-03 02:58:57 +02:00
Dennis Schridde
8e7217e74f Full Lua 5.2 compatibility and adherance to modules-create-no-globals 2012-10-03 02:54:08 +02:00
Fabio Mascarenhas
944e325e29 fix build for Lua 5.2; version 1.6.1 2012-10-01 15:57:09 -03:00
Fabio Mascarenhas
201d18a497 Merge pull request #17 from rrthomas/master
Use Lua 5.2's own luaL_register
2012-10-01 11:53:35 -07:00
Reuben Thomas
584066ee86 lfs.c: use Lua 5.2's own luaL_register 2012-10-01 19:44:00 +01:00
Fabio Mascarenhas
d71c63cdb7 luafilesystem 1.6.0 2012-10-01 11:11:48 -03:00
Fabio Mascarenhas
4a299c53b6 Merge pull request #15 from ewmailing/master
Improvements to use of getcwd() for using the correct max path length
2012-09-26 06:49:35 -07:00
Fabio Mascarenhas
420db54f1e Merge pull request #14 from icgood/master
5.2 compatibility
2012-08-31 12:09:14 -07:00
Eric Wing
37c2309a40 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).
2012-05-01 14:38:02 -07:00
Fabio Mascarenhas
84f1af5eef applied debian patches from enrico tassi 2012-04-08 20:25:40 -03:00
Ian Good
f634765b26 implements fake luaL_register in Lua 5.2+ 2012-02-28 03:37:14 +00:00
Fabio Mascarenhas
149e0fb8ec Merge pull request #8 from rrthomas/master
New lfs.link and other goodies
2011-06-09 14:09:31 -07:00
Reuben Thomas
83faa7e05d Simplify and clarify metatable creation functions. 2011-06-09 20:35:12 +01:00
Reuben Thomas
3cea6c6e96 Add lfs.link. 2011-06-09 19:53:41 +01:00
Reuben Thomas
7e979318bd Use package.config to get directory separator. 2011-06-09 19:53:41 +01:00
Reuben Thomas
de03ad370c Add a comment for make_dir. 2011-06-09 19:53:41 +01:00
Reuben Thomas
fbdff8f1a5 Fix typo in manual. 2011-06-09 19:53:41 +01:00
Reuben Thomas
f42e7e3543 Simplify dir_iter_factory slightly. 2011-06-09 19:53:41 +01:00
Reuben Thomas
d61eb8078d Add .gitignore for *.o and *.so. 2011-06-09 19:53:41 +01:00
Reuben Thomas
361cede4d0 Add trivial implementation of setmode on non-Windows platforms. 2011-06-09 19:53:41 +01:00
Reuben Thomas
3140ca4db8 Make test.lua find its interpreter using /usr/bin/env. 2011-06-09 19:53:41 +01:00
Reuben Thomas
530c9140c7 Add trivial link_info support on Windows (using STAT_FUNC). 2011-06-09 19:53:41 +01:00
Fabio Mascarenhas
d292b3243f update links to bug tracker and cvs 2011-06-06 10:53:39 -03:00
Fabio Mascarenhas
2f55c33b0c change to build with lua 5.2 alpha, issue #5 2011-06-06 10:49:39 -03:00
Fabio Mascarenhas
ae5a05deec fixed dir length bug in windows directory iterator 2010-06-09 14:14:25 -03:00
Fabio Mascarenhas
fd028d3257 removed umask calls in lfs.mkdir, see kepler-list message from Enrico at 2009-12-27 2009-12-29 17:06:25 -02:00
Fabio Mascarenhas
8ff20138af packaging for version 1.5.0 - changing _VERSION v1.5.0 2009-10-20 18:54:35 -02:00
Fabio Mascarenhas
5ffde8ae51 packaging for version 1.5.0 2009-10-20 18:54:02 -02:00
Fabio Mascarenhas
2b5f187a40 cvs rockspecs now point to github 2009-09-24 14:29:44 -03:00
mascarenhas
f715ad9998 fixed typo in makefile 2009-09-21 17:02:44 +00:00
mascarenhas
c293392539 overhaul of lock_dir to remove staleness checks (due to race condition) and simplify the function 2009-07-04 02:10:16 +00:00
mascarenhas
327acf788f updated docs for lfs.dir 2009-06-03 20:53:55 +00:00
mascarenhas
375d009d89 added explicit next and close methods to second return value of lfs.dir (the directory object), for explicit iteration or explicit closing 2009-06-03 20:49:18 +00:00
mascarenhas
c1eff3de6b fixing lfs.lock_dir on windows to return "File exists" instead of looping, plus
documenting lfs.lock_dir
2009-04-24 22:24:06 +00:00
mascarenhas
b80d2baacc added lfs.lock_dir (directory locking) for Windows. On Windows the timeout
parameter is ignored, as killing the process removes the lock automatically
2009-04-24 22:11:12 +00:00
mascarenhas
d21c4ae194 locking via lockfiles in posix systems. API:
lock, err = lfs.lock_dir(path, [seconds_stale])
  Creates a lockfile (called lockfile.lfs) in <path> if it does not
  exist and returns the lock. If the lock already exists checks it
  it's stale, using the second parameter (default for the second
  parameter is INT_MAX, which in practice means the lock will never
  be stale. To free the the lock call lock:free().
  In case of any errors it returns nil and the error message. In
  particular, if the lock exists and is not stale it returns the
  "File exists" message.
2009-03-25 19:14:17 +00:00
carregal
342df4a5a3 Credits review 2009-02-04 21:21:33 +00:00
carregal
7961aab687 Updating the rockspec URL 2009-02-03 22:42:16 +00:00
carregal
657faad984 Packaging version 1.4.2 v1_4_2 2009-02-03 22:05:48 +00:00
mascarenhas
16961a6c2c compiling with borland c 2008-12-15 16:13:55 +00:00
carregal
57d9592448 Fixed bug [#39794] Compile error on Solaris 10
Bug report and patch by Aaron B.
2008-12-12 13:26:37 +00:00
carregal
b941f90d24 Moving to "modules" builds on the rockspecs 2008-12-09 18:39:20 +00:00
carregal
b8acd4ca54 Fixing bug [#13198] lfs.attributes(filename, 'size') overflow on files > 2 Gb again
(bug report and patch by KUBO Takehiro)
2008-07-31 19:34:22 +00:00
carregal
21412ad14c Mentioning the need of using the same C runtime (Ignacio Burgueño) 2008-05-08 18:45:15 +00:00
carregal
5c7eb0e1ff Updated package URL 2008-05-07 20:01:02 +00:00
carregal
1e40455d39 Packaging version 1.4.1 v1_4_1 2008-05-07 19:44:39 +00:00
carregal
d4bfd537a8 Packaging version 1.4.1 2008-05-07 19:06:37 +00:00