[wmii] wmii-4 20060828 doesn't compile on Solaris

From: Stefan Tibus <sjti_AT_gmx.net>
Date: Thu, 12 Oct 2006 15:50:28 +0200

Hello there,

I didn't try this for a long time, but wanted to bring
my wmii-4 from my PC to my Sun machine. However the
compiler there doesn't seem to like the following in
libixp/ixp.h:
        /* from fcall(3) in plan9port */
        typedef struct Fcall {
                unsigned char type;
                unsigned short tag;
                unsigned int fid;
                union {
                        struct { /* Tversion, Rversion */
                                unsigned int msize;
                                char *version;
                        };
                        struct { /* Tflush */
                                unsigned short oldtag;
                        };
                        struct { /* Rerror */
                                char *ename;
                        };
                        struct { /* Ropen, Rcreate */
                                Qid qid; /* +Rattach */
                                unsigned int iounit;
                        };
                        struct { /* Rauth */
                                Qid aqid;
                        };
                        struct { /* Tauth, Tattach */
                                unsigned int afid;
                                char *uname;
                                char *aname;
                        };
                        struct { /* Tcreate */
                                unsigned int perm;
                                char *name;
                                unsigned char mode; /* +Topen */
                        };
                        struct { /* Twalk */
                                unsigned int newfid;
                                unsigned short nwname;
                                char *wname[IXP_MAX_WELEM];
                        };
                        struct { /* Rwalk */
                                unsigned short nwqid;
                                Qid wqid[IXP_MAX_WELEM];
                        };
                        struct { /* Twrite */
                                unsigned long long offset; /* +Tread */
                                /* +Rread */
                                unsigned int count; /* +Tread */
                                char *data;
                        };
                        struct { /* Twstat, Rstat */
                                unsigned short nstat;
                                unsigned char *stat;
                        };
                };
        } Fcall;

These are the compiler messages regarding libixp/client.c:
        CC client.c
        "ixp.h", line 53: warning: enumerator value overflows INT_MAX (2147483647)
        "ixp.h", line 167: warning: unnamed union member
        "ixp.h", line 170: warning: unnamed union member
        "ixp.h", line 173: warning: unnamed union member
        "ixp.h", line 177: warning: unnamed union member
        "ixp.h", line 180: warning: unnamed union member
        "ixp.h", line 185: warning: unnamed union member
        "ixp.h", line 190: warning: unnamed union member
        "ixp.h", line 195: warning: unnamed union member
        "ixp.h", line 199: warning: unnamed union member
        "ixp.h", line 205: warning: unnamed union member
        "ixp.h", line 209: warning: unnamed union member
        "ixp.h", line 210: zero-sized struct/union
        "ixp.h", line 210: warning: unnamed struct member
        "client.c", line 31: improper member use: ename
        "client.c", line 50: improper member use: msize
        "client.c", line 51: improper member use: version
        "client.c", line 57: improper member use: version
        "client.c", line 63: improper member use: version
        "client.c", line 69: improper member use: afid
        "client.c", line 70: improper member use: uname
        "client.c", line 71: improper member use: aname
        "client.c", line 77: improper member use: qid
        "client.c", line 102: improper member use: name
        "client.c", line 103: improper member use: perm
        "client.c", line 104: improper member use: mode
        "client.c", line 116: improper member use: newfid
        "client.c", line 116: warning: improper pointer/integer combination: op "="
        "client.c", line 118: improper member use: name
        "client.c", line 119: improper member use: nwname
        "client.c", line 120: improper member use: name
        "client.c", line 121: improper member use: nwname
        "client.c", line 122: improper member use: wname
        "client.c", line 147: improper member use: mode
        "client.c", line 165: improper member use: iounit
        "client.c", line 170: improper member use: offset
        "client.c", line 171: improper member use: count
        "client.c", line 174: improper member use: data
        "client.c", line 174: improper member use: count
        "client.c", line 175: improper member use: data
        "client.c", line 177: improper member use: count
        "client.c", line 186: improper member use: iounit
        "client.c", line 194: improper member use: offset
        "client.c", line 195: improper member use: count
        "client.c", line 196: improper member use: data
        "client.c", line 200: improper member use: count
        cc: acomp failed for client.c
        *** Error code 2

...it seems to have problems with this constrcuct of
anonymous union and structs. May I just strip out these
union and structs and thus make all these members direct
members of Fcall?

Thanks,
Stefan

-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
Received on Thu Oct 12 2006 - 15:50:59 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:15:15 UTC