1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # T2 SDE: package/.../lua-posix/mktemp.patch
5 # Copyright (C) 2008 The T2 SDE Project
7 # More information can be found in the files COPYING and README.
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
15 # --- T2-COPYRIGHT-NOTE-END ---
17 diff -urN posix.orig/lposix.c posix/lposix.c
18 --- posix.orig/lposix.c 2008-02-28 17:37:32.000000000 +0100
19 +++ posix/lposix.c 2008-02-28 17:45:41.000000000 +0100
21 return pushresult(L, mkdir(path, 0777), path);
24 +static int Pmktemp(lua_State *L) /** mktemp(path) */
26 + char *path = strdup (luaL_checkstring(L, 1));
27 + lua_pushstring(L, mktemp(path));
32 static int Pchdir(lua_State *L) /** chdir(path) */
38 + {"mktemp", Pmktemp},
40 {"pathconf", Ppathconf},