summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorTaco Hoekwater <taco@elvenkind.com>2010-06-10 13:37:54 +0000
committerTaco Hoekwater <taco@elvenkind.com>2010-06-10 13:37:54 +0000
commitda353234f401986deb76831d76effffd0d0e2257 (patch)
treecb7a89a8165d63e7073c95083129bf27d2fac8b1 /Build
parent1d63465de44b4702dada9563b70c568ef26ca141 (diff)
fix luatex lfs.currentdir() under Sun Studio Compiler
git-svn-id: svn://tug.org/texlive/trunk@18867 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/luatexdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/luatexdir/luafilesystem/src/lfs.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog
index 2ad4cc34f35..473f5a8ddb7 100644
--- a/Build/source/texk/web2c/luatexdir/ChangeLog
+++ b/Build/source/texk/web2c/luatexdir/ChangeLog
@@ -1,3 +1,6 @@
+2010-06-10 Taco Hoekwater <taco@luatex.org>
+ * luafilesystem/src/lfs.c(get_dir): do not assume Gnu C compiler.
+
2010-06-10 Peter Breitenlohner <peb@mppmu.mpg.de>
* am/libluatex.am (libluatex_a_CPPFLAGS): Add $(AM_CPPFLAGS).
@@ -5,7 +8,6 @@
* am/luatex.am (luatex_CPPFLAGS): Add $(AM_CPPFLAGS).
2010-06-10 Taco Hoekwater <taco@luatex.org>
-
* luasocket/src/options.c, luafontloader/fontforge/fontforge/parsettfatt.c,
luafontloader/fontforge/fontforge/parsettf.c,
luafontloader/fontforge/fontforge/lookups.c: enlarge static buffers
diff --git a/Build/source/texk/web2c/luatexdir/luafilesystem/src/lfs.c b/Build/source/texk/web2c/luatexdir/luafilesystem/src/lfs.c
index c4598e41aae..eed623dfad8 100644
--- a/Build/source/texk/web2c/luatexdir/luafilesystem/src/lfs.c
+++ b/Build/source/texk/web2c/luatexdir/luafilesystem/src/lfs.c
@@ -114,15 +114,14 @@ static int change_dir (lua_State *L) {
** and a string describing the error
*/
static int get_dir (lua_State *L) {
- char *path;
- if ((path = getcwd(NULL, 0)) == NULL) {
+ char path[500];
+ if (getcwd((char *)path, 500) == NULL) {
lua_pushnil(L);
lua_pushstring(L, getcwd_error);
return 2;
}
else {
lua_pushstring(L, path);
- free(path);
return 1;
}
}