[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: compilation problem in liblber/decode.c



Apparently this syntax is only legal in C++, and GNU C allows it as an
extension. Easily fixed, will patch it soon.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc  
  Symas: Premier OpenSource Development and Support

> -----Original Message-----
> From: owner-openldap-bugs@OpenLDAP.org
> [mailto:owner-openldap-bugs@OpenLDAP.org]On Behalf Of Mei-Hui Su
> Sent: Friday, January 11, 2002 5:03 PM
> To: openldap-bugs@OpenLDAP.org
> Subject: compilation problem in liblber/decode.c
> 
> 
> 
> Hi,
> 
>   I am running on solaris 2.7 using native cc and
> latest openldap from the repository. I am getting 
> compilation errors on the instantiation of a structure.
> 
> "/nfs/globus2/MEI/nPROJ_CC/OpenLDAP/OpenLDAP-dev/ldap/libraries/
> liblber/decode.c", line 732: non-constant initializer: op "NAME"
> "/nfs/globus2/MEI/nPROJ_CC/OpenLDAP/OpenLDAP-dev/ldap/libraries/
> liblber/decode.c", line 741: non-constant initializer: op "NAME"
> "/nfs/globus2/MEI/nPROJ_CC/OpenLDAP/OpenLDAP-dev/ldap/libraries/
> liblber/decode.c", line 750: non-constant initializer: op "NAME"
> "/nfs/globus2/MEI/nPROJ_CC/OpenLDAP/OpenLDAP-dev/ldap/libraries/
> liblber/decode.c", line 763: non-constant initializer: op "NAME"
> "/nfs/globus2/MEI/nPROJ_CC/OpenLDAP/OpenLDAP-dev/ldap/libraries/
> liblber/decode.c", line 904: cannot recover from previous errors
> 
>   and the problem line is 
>                 case 'V':       /* sequence of strings + lengths */
>                 {
> --------->>>>>          bgbvr cookie = { ber, BvVec };
>                         cookie.res.bv = va_arg( ap, struct berval *** );
>                         cookie.alloc = 1;
>                         rc = ber_get_stringbvr( &cookie, 0 );
>                         break;
>                 }
> 
>   I had no problem with gcc on linux but solaris compiler does 
> not like it.
> 
> mei
>