Revision 1.16 and later of ext/yp/yp.c fails to build under Solaris 8
with WorkShop Compilers 5.0 98/12/15 C 5.0.  The compilation dies with
the following errors:

"yp.c", line 218: non-constant initializer: op "U&"
"yp.c", line 218: non-constant initializer: op "U&"
"yp.c", line 218: non-constant initializer: op "U&"

My knowledge of C portability is weak in these cases, but the
following patch appears to fix things here.  Can some of you more
knowledgeable folks give this a quick look and let me know if it's
okay for me to commit this?

-- 
Jon Parise ([EMAIL PROTECTED])  .  Rochester Inst. of Technology
http://www.csh.rit.edu/~jon/  :  Computer Science House Member
Index: yp.c
===================================================================
RCS file: /repository/php4/ext/yp/yp.c,v
retrieving revision 1.19
diff -u -r1.19 yp.c
--- yp.c        2001/03/20 20:04:41     1.19
+++ yp.c        2001/04/07 17:36:16
@@ -215,9 +215,13 @@
 {
        int r;
        zval *status, *key, *value;
-       zval **args [3] = { &status, &key, &value };
+       zval **args [3];
        zval *retval;
        CLS_FETCH();
+
+       args[0] = &status;
+       args[1] = &key;
+       args[2] = &value;
 
        MAKE_STD_ZVAL (status);
        ZVAL_LONG (status, ypprot_err (instatus));

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to