|
@@ -1,28 +1,29 @@
|
1
|
|
---- a/ext/posix/posix.c
|
2
|
|
-+++ b/ext/posix/posix.c
|
3
|
|
-@@ -1970,6 +1970,7 @@ static int Pctermid(lua_State *L)
|
4
|
|
- return 1;
|
5
|
|
- }
|
|
1
|
+diff -Naur luaposix-release-v33.0.0.orig/ext/posix/unistd.c luaposix-release-v33.0.0/ext/posix/unistd.c
|
|
2
|
+--- luaposix-release-v33.0.0.orig/ext/posix/unistd.c 2014-11-04 17:49:35.000000000 +0200
|
|
3
|
++++ luaposix-release-v33.0.0/ext/posix/unistd.c 2014-12-14 00:59:14.878622722 +0200
|
|
4
|
+@@ -526,6 +526,7 @@
|
|
5
|
+ #endif
|
|
6
|
+
|
6
|
7
|
|
7
|
8
|
+#ifndef NO_GETLOGIN
|
8
|
9
|
/***
|
9
|
10
|
Current logged-in user.
|
10
|
|
- @see getlogin(3)
|
11
|
|
-@@ -1980,6 +1981,7 @@ static int Pgetlogin(lua_State *L)
|
12
|
|
- lua_pushstring(L, getlogin());
|
13
|
|
- return 1;
|
|
11
|
+ @treturn[1] string username, if successful
|
|
12
|
+@@ -538,6 +539,7 @@
|
|
13
|
+ checknargs(L, 0);
|
|
14
|
+ return pushstringresult(getlogin());
|
14
|
15
|
}
|
15
|
16
|
+#endif
|
16
|
17
|
|
17
|
|
- static void Fgetpasswd(lua_State *L, int i, const void *data)
|
18
|
|
- {
|
19
|
|
-@@ -3786,7 +3788,9 @@ static const luaL_Reg R[] =
|
20
|
|
- #if _POSIX_VERSION >= 200112L
|
21
|
|
- MENTRY( Pgetgroups ),
|
22
|
|
- #endif
|
|
18
|
+
|
|
19
|
+ /***
|
|
20
|
+@@ -1037,7 +1039,9 @@
|
|
21
|
+ LPOSIX_FUNC( Pgetegid ),
|
|
22
|
+ LPOSIX_FUNC( Pgeteuid ),
|
|
23
|
+ LPOSIX_FUNC( Pgetgid ),
|
23
|
24
|
+#ifndef NO_GETLOGIN
|
24
|
|
- MENTRY( Pgetlogin ),
|
|
25
|
+ LPOSIX_FUNC( Pgetlogin ),
|
25
|
26
|
+#endif
|
26
|
|
- MENTRY( Pgetopt ),
|
27
|
|
- MENTRY( Pgetpasswd ),
|
28
|
|
- MENTRY( Pgetpid ),
|
|
27
|
+ LPOSIX_FUNC( Pgetpgrp ),
|
|
28
|
+ LPOSIX_FUNC( Pgetpid ),
|
|
29
|
+ LPOSIX_FUNC( Pgetppid ),
|