[CVS] RPM: rpm-5_4: lua/local/ lposix.c

2016-05-05 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: lua  Date:   06-May-2016 00:29:30
  Branch: rpm-5_4  Handle: 2016050522293000

  Modified files:   (Branch: rpm-5_4)
lua/local   lposix.c

  Log:
- lua: readd a symlink() syscall wrapper.

  Summary:
RevisionChanges Path
1.14.4.11   +8  -0  lua/local/lposix.c
  

  patch -p0 <<'@@ .'
  Index: lua/local/lposix.c
  
  $ cvs diff -u -r1.14.4.10 -r1.14.4.11 lposix.c
  --- lua/local/lposix.c19 Apr 2016 12:55:44 -  1.14.4.10
  +++ lua/local/lposix.c5 May 2016 22:29:30 -   1.14.4.11
  @@ -769,6 +769,13 @@
return pushresult(L,
(lua_toboolean(L,3) ? symlink : link)(oldpath, newpath), NULL);
   }
  +static int Psymlink(lua_State *L)
  +{
  + const char *oldpath = luaL_checkstring(L, 1);
  + const char *newpath = luaL_checkstring(L, 2);
  + return pushresult(L,
  + symlink(oldpath, newpath), NULL);
  +}
   
   /***
   Read value of a symbolic link.
  @@ -3755,6 +3762,7 @@
MENTRY( Pkill   ),
MENTRY( Pkillpg ),
MENTRY( Plink   ),
  + MENTRY( Psymlink),
MENTRY( Plocaltime  ),
MENTRY( Plseek  ),
MENTRY( Pmkdir  ),
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: lua/local/ lposix.c lua/ lua.h

2014-09-27 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: lua  Date:   27-Sep-2014 17:48:46
  Branch: rpm-5_4  Handle: 2014092715484501

  Modified files:   (Branch: rpm-5_4)
lua lua.h
lua/local   lposix.c

  Log:
- lua: -Wdocumentation fixes.

  Summary:
RevisionChanges Path
1.14.4.9+9  -0  lua/local/lposix.c
1.3.6.6 +1  -1  lua/lua.h
  

  patch -p0 '@@ .'
  Index: lua/local/lposix.c
  
  $ cvs diff -u -r1.14.4.8 -r1.14.4.9 lposix.c
  --- lua/local/lposix.c23 Sep 2014 18:14:48 -  1.14.4.8
  +++ lua/local/lposix.c27 Sep 2014 15:48:46 -  1.14.4.9
  @@ -1,3 +1,8 @@
  +#if __clang__
  +#pragma clang diagnostic push
  +#pragma clang diagnostic ignored -Wdocumentation
  +#endif
  +
   /***
   @module lposix
   */
  @@ -4308,4 +4313,8 @@
return 1;
   }
   
  +#if __clang__
  +#pragma clang diagnostic pop
  +#endif
  +
   /*EOF*/
  @@ .
  patch -p0 '@@ .'
  Index: lua/lua.h
  
  $ cvs diff -u -r1.3.6.5 -r1.3.6.6 lua.h
  --- lua/lua.h 24 Sep 2014 16:54:33 -  1.3.6.5
  +++ lua/lua.h 27 Sep 2014 15:48:45 -  1.3.6.6
  @@ -171,7 +171,7 @@
   LUA_API int (lua_type) (lua_State *L, int idx)
LUA_GNUC_PURE;
   LUA_API const char *(lua_typename) (lua_State *L, int tp)
  -'LUA_GNUC_CONST;
  + LUA_GNUC_CONST;
   
   LUA_API lua_Number  (lua_tonumberx) (lua_State *L, int idx, int *isnum);
   LUA_API lua_Integer (lua_tointegerx) (lua_State *L, int idx, int *isnum);
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: lua/local/ lposix.c

2014-09-23 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: lua  Date:   23-Sep-2014 20:14:48
  Branch: rpm-5_4  Handle: 2014092318144800

  Modified files:   (Branch: rpm-5_4)
lua/local   lposix.c

  Log:
- lua: fix: mode uninitialized (clang -Wsometimes-uninitialized).

  Summary:
RevisionChanges Path
1.14.4.8+1  -1  lua/local/lposix.c
  

  patch -p0 '@@ .'
  Index: lua/local/lposix.c
  
  $ cvs diff -u -r1.14.4.7 -r1.14.4.8 lposix.c
  --- lua/local/lposix.c31 Jul 2013 19:43:48 -  1.14.4.7
  +++ lua/local/lposix.c23 Sep 2014 18:14:48 -  1.14.4.8
  @@ -1680,7 +1680,7 @@
   {
const char *path = luaL_checkstring(L, 1);
int flags = luaL_checkint(L, 2);
  - mode_t mode;
  + mode_t mode = ;
if (flags  O_CREAT) {
const char *modestr = luaL_checkstring(L, 3);
if (mode_munch(mode, modestr))
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: lua/local/ lposix.c

2013-07-31 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: lua  Date:   31-Jul-2013 21:43:48
  Branch: rpm-5_4  Handle: 2013073119434800

  Modified files:   (Branch: rpm-5_4)
lua/local   lposix.c

  Log:
- sys/param.h defines NODEV as ((dev_t) -1) which confuses MENTRY
macro

  Summary:
RevisionChanges Path
1.14.4.7+4  -0  lua/local/lposix.c
  

  patch -p0 '@@ .'
  Index: lua/local/lposix.c
  
  $ cvs diff -u -r1.14.4.6 -r1.14.4.7 lposix.c
  --- lua/local/lposix.c29 Jun 2013 21:58:11 -  1.14.4.6
  +++ lua/local/lposix.c31 Jul 2013 19:43:48 -  1.14.4.7
  @@ -3933,6 +3933,10 @@
MENTRY( NETUNREACH  );
MENTRY( NFILE   );
MENTRY( NOBUFS  );
  +/* sys/param.h defines NODEV as ((dev_t) -1) which confuses MENTRY macro */
  +#ifdef NODEV
  +#undef   NODEV
  +#endif
   #if !defined(__APPLE__)
MENTRY( NODEV   );
   #endif
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: lua/local/ lposix.c

2013-06-29 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: lua  Date:   29-Jun-2013 23:10:44
  Branch: rpm-5_4  Handle: 2013062921104400

  Modified files:   (Branch: rpm-5_4)
lua/local   lposix.c

  Log:
- coverity #1040630

  Summary:
RevisionChanges Path
1.14.4.2+1  -1  lua/local/lposix.c
  

  patch -p0 '@@ .'
  Index: lua/local/lposix.c
  
  $ cvs diff -u -r1.14.4.1 -r1.14.4.2 lposix.c
  --- lua/local/lposix.c29 Jun 2013 21:03:26 -  1.14.4.1
  +++ lua/local/lposix.c29 Jun 2013 21:10:44 -  1.14.4.2
  @@ -3286,7 +3286,7 @@
   static int sockaddr_to_lua(lua_State *L, int family, struct sockaddr *sa)
   {
char addr[INET6_ADDRSTRLEN];
  - int port;
  + int port = 0;
struct sockaddr_in *sa4;
struct sockaddr_in6 *sa6;
   
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: lua/local/ lposix.c

2013-06-29 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: lua  Date:   29-Jun-2013 23:11:54
  Branch: rpm-5_4  Handle: 2013062921115400

  Modified files:   (Branch: rpm-5_4)
lua/local   lposix.c

  Log:
- coverity #1040629

  Summary:
RevisionChanges Path
1.14.4.3+1  -1  lua/local/lposix.c
  

  patch -p0 '@@ .'
  Index: lua/local/lposix.c
  
  $ cvs diff -u -r1.14.4.2 -r1.14.4.3 lposix.c
  --- lua/local/lposix.c29 Jun 2013 21:10:44 -  1.14.4.2
  +++ lua/local/lposix.c29 Jun 2013 21:11:54 -  1.14.4.3
  @@ -3197,7 +3197,7 @@
   
   static int Ptcsetattr(lua_State *L)
   {
  - struct termios t;
  + struct termios t = {};
int fd = luaL_checknumber(L, 1);
int act = luaL_checknumber(L, 2);
luaL_checktype(L, 3, LUA_TTABLE);
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: lua/local/ lposix.c

2013-06-29 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: lua  Date:   29-Jun-2013 23:13:59
  Branch: rpm-5_4  Handle: 2013062921135800

  Modified files:   (Branch: rpm-5_4)
lua/local   lposix.c

  Log:
- coverity #1040628

  Summary:
RevisionChanges Path
1.14.4.4+1  -1  lua/local/lposix.c
  

  patch -p0 '@@ .'
  Index: lua/local/lposix.c
  
  $ cvs diff -u -r1.14.4.3 -r1.14.4.4 lposix.c
  --- lua/local/lposix.c29 Jun 2013 21:11:54 -  1.14.4.3
  +++ lua/local/lposix.c29 Jun 2013 21:13:58 -  1.14.4.4
  @@ -1405,7 +1405,7 @@
*/
   static int Pmsgget(lua_State *L)
   {
  - mode_t mode;
  + mode_t mode = 0;
const char *modestr;
key_t key = luaL_checkint(L, 1);
int msgflg = luaL_optint(L, 2, 0);
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: lua/local/ lposix.c

2013-06-29 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: lua  Date:   29-Jun-2013 23:17:41
  Branch: rpm-5_4  Handle: 2013062921174100

  Modified files:   (Branch: rpm-5_4)
lua/local   lposix.c

  Log:
- coverity #1040627

  Summary:
RevisionChanges Path
1.14.4.5+2  -2  lua/local/lposix.c
  

  patch -p0 '@@ .'
  Index: lua/local/lposix.c
  
  $ cvs diff -u -r1.14.4.4 -r1.14.4.5 lposix.c
  --- lua/local/lposix.c29 Jun 2013 21:13:58 -  1.14.4.4
  +++ lua/local/lposix.c29 Jun 2013 21:17:41 -  1.14.4.5
  @@ -207,10 +207,10 @@
   {
mode_t tmp_mode = 0;
char* endp = NULL;
  - if (strlen(p)  8)
  + if (p == NULL || *p == '\0' || strlen(p)  8)
return -4; /* error -- bad syntax, string too long */
tmp_mode = strtol(p, endp, 8);
  - if (p  endp  *p != '\0'  *endp == '\0') {
  + if (endp  *endp == '\0') {
*mode = tmp_mode;
return 0;
}
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: lua/local/ lposix.c

2013-06-29 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: lua  Date:   29-Jun-2013 23:58:11
  Branch: rpm-5_4  Handle: 2013062921581100

  Modified files:   (Branch: rpm-5_4)
lua/local   lposix.c

  Log:
- remove gcc warnings on Mac OS X.

  Summary:
RevisionChanges Path
1.14.4.6+8  -3  lua/local/lposix.c
  

  patch -p0 '@@ .'
  Index: lua/local/lposix.c
  
  $ cvs diff -u -r1.14.4.5 -r1.14.4.6 lposix.c
  --- lua/local/lposix.c29 Jun 2013 21:17:41 -  1.14.4.5
  +++ lua/local/lposix.c29 Jun 2013 21:58:11 -  1.14.4.6
  @@ -3438,12 +3438,14 @@
   
   static int Paccept(lua_State *L)
   {
  - int r;
int fd_client;
struct sockaddr_storage sa;
unsigned int salen;
  +#ifdef   UNUSED
char host[NI_MAXHOST];
char serv[NI_MAXSERV];
  + int r;
  +#endif
   
int fd = luaL_checknumber(L, 1);
   
  @@ -3487,8 +3489,10 @@
void *ud, *buf;
socklen_t salen;
struct sockaddr_storage sa;
  +#ifdef   UNUSED
char host[NI_MAXHOST];
char serv[NI_MAXSERV];
  +#endif
int r;
int fd = luaL_checkint(L, 1);
int count = luaL_checkint(L, 2);
  @@ -3647,10 +3651,10 @@
   */
   static int Pfdatasync(lua_State *L)
   {
  -  int fd = luaL_checkint(L, 1);
  -#if defined(__APPLE__)
  +#if defined(__APPLE__)   /* XXX no prototype on Mac OS X Mountain Lion */
 return pushresult(L, 0, NULL);
   #else
  +  int fd = luaL_checkint(L, 1);
 return pushresult(L, fdatasync(fd), NULL);
   #endif
   }
  @@ -3809,6 +3813,7 @@
MENTRY( Precvfrom   ),
MENTRY( Psend   ),
MENTRY( Psendto ),
  + MENTRY( Pshutdown   ),
MENTRY( Psetsockopt ),
   #endif
   
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org