Print this page
3165 correct pointer to integer conversion in Privilege.xs

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/perl/contrib/Sun/Solaris/Privilege/Privilege.xs
          +++ new/usr/src/cmd/perl/contrib/Sun/Solaris/Privilege/Privilege.xs
↓ open down ↓ 3 lines elided ↑ open up ↑
   4    4  
   5    5  /* Solaris includes. */
   6    6  #include <priv.h>
   7    7  #include <ctype.h>
   8    8  
   9    9  /* Perl includes. */
  10   10  #include "EXTERN.h"
  11   11  #include "perl.h"
  12   12  #include "XSUB.h"
  13   13  
  14      -#define IVCONST(s, c)   newCONSTSUB(s, #c, newSViv((int)c));
       14 +#define IVCONST(s, c)   newCONSTSUB(s, #c, newSViv((int)(intptr_t)c));
  15   15  #define POFF            (sizeof ("PRIV_") - 1)
  16   16  
  17   17  #define RETPRIVSET(set)         \
  18   18          ST(0) = sv_newmortal();                                         \
  19   19          sv_setref_pv(ST(0), "Sun::Solaris::Privilege::PrivsetPtr",      \
  20   20              (void*)(set));                                              \
  21   21          SvREADONLY_on(SvRV(ST(0)))
  22   22  
  23   23  typedef int sysret;
  24   24  
↓ open down ↓ 267 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX