Print this page
3900 illumos will not build against gcc compiled perl
@@ -1,7 +1,8 @@
/*
* Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014 Racktop Systems.
*/
/*
* Project.xs contains XS wrappers for the project database maniplulation
* functions as provided by libproject and described in getprojent(3EXACCT).
*/
@@ -158,11 +159,11 @@
PREINIT:
struct project proj, *projp;
char buf[PROJECT_BUFSZ];
PPCODE:
PUTBACK;
- if (projp = getprojent(&proj, buf, sizeof (buf))) {
+ if ((projp = getprojent(&proj, buf, sizeof (buf)))) {
XSRETURN(pushret_project(projp));
} else {
XSRETURN_EMPTY;
}
@@ -178,11 +179,11 @@
PREINIT:
struct project proj, *projp;
char buf[PROJECT_BUFSZ];
PPCODE:
PUTBACK;
- if (projp = getprojbyname(name, &proj, buf, sizeof (buf))) {
+ if ((projp = getprojbyname(name, &proj, buf, sizeof (buf)))) {
XSRETURN(pushret_project(projp));
} else {
XSRETURN_EMPTY;
}
@@ -192,11 +193,11 @@
PREINIT:
struct project proj, *projp;
char buf[PROJECT_BUFSZ];
PPCODE:
PUTBACK;
- if (projp = getprojbyid(id, &proj, buf, sizeof (buf))) {
+ if ((projp = getprojbyid(id, &proj, buf, sizeof (buf)))) {
XSRETURN(pushret_project(projp));
} else {
XSRETURN_EMPTY;
}
@@ -206,11 +207,11 @@
PREINIT:
struct project proj, *projp;
char buf[PROJECT_BUFSZ];
PPCODE:
PUTBACK;
- if (projp = getdefaultproj(user, &proj, buf, sizeof (buf))) {
+ if ((projp = getdefaultproj(user, &proj, buf, sizeof (buf)))) {
XSRETURN(pushret_project(projp));
} else {
XSRETURN_EMPTY;
}
@@ -220,11 +221,11 @@
PREINIT:
struct project proj, *projp;
char buf[PROJECT_BUFSZ];
PPCODE:
PUTBACK;
- if (projp = fgetprojent(fh, &proj, buf, sizeof (buf))) {
+ if ((projp = fgetprojent(fh, &proj, buf, sizeof (buf)))) {
XSRETURN(pushret_project(projp));
} else {
XSRETURN_EMPTY;
}
@@ -234,10 +235,12 @@
char *proj
PREINIT:
char buf[PROJECT_BUFSZ];
CODE:
RETVAL = inproj(user, proj, buf, sizeof (buf));
+OUTPUT:
+ RETVAL
int
getprojidbyname(proj)
char *proj
@@ -266,11 +269,11 @@
rctlblk_t *blk1 = NULL;
rctlblk_t *blk2 = NULL;
rctlblk_t *tmp = NULL;
rctl_priv_t priv;
rctl_qty_t value;
- int flags;
+ int flags = 0;
int ret;
int err = 0;
char string[24]; /* 24 will always hold a uint64_t */
PPCODE:
Newc(0, blk1, rctlblk_size(), char, rctlblk_t);