[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: BeOS PPC Compilation Fixes

From: Sam TH <sam_at_uchicago.edu>
Date: 2000-12-03 09:59:03 CET

Now, the real problem. The following code won't be accepted by the MetroWorks compiler:

### mwcc Compiler Error:
# svn_string_t data = { (char *)buf, len, len, fc->pool };
# ^
# illegal constant expression
#----------------------------------------------------------
    File "/boot/home/subversion/subversion/libsvn_ra_dav/fetch.c"; Line 354
#----------------------------------------------------------

The problem appears to be not being able to use variables in this sort of structure initalization. For example, the following code won't compile either:

typedef struct {char *a; char *b;} mystruct;

void foo(char * a, char * b)
{
        mystruct = {a, b}
}

I'm not sure if this is our fault, or the compilers. Is there a good
way to work around this? I couldn't find any pertinent compiler
options.

Thanks
           
        sam th
        sam@uchicago.edu
        http://www.abisource.com/~sam/
        GnuPG Key:
        http://www.abisource.com/~sam/key

  • application/pgp-signature attachment: stored
Received on Sat Oct 21 14:36:16 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.