I hope Phil can take a look at the command 'make micaz sim' on cygwin 1.7.2+

In short to fix the issue, change the following from

 _READ_WRITE_RETURN_TYPE _EXFNPTR(_read, (struct _reent *, _PTR,
                                           char *, int));
to
 _READ_WRITE_RETURN_TYPE _EXFUN((*_read), (struct _reent *, _PTR,
                                           char *, int));

i.e. move from _EXFNPTR macro to _EXFUN macro wherever _EXFNPTR is
used in /usr/include/sys/reent.h

-------------------------
Wrote a small c program to test out the ncc parser but it seems to be
working fine for the program, so don't know where the problem is
coming from
-------------------------
// EMULATING parsing error for _EXFNPTR
//_READ_WRITE_RETURN_TYPE _EXFNPTR(_read, (struct _reent *, _PTR, char *, int));

// defines
#define _EXFNPTR(name, proto)   ( * name) proto
#define _EXFUN(name, proto)              name proto
#define NULL 0
// structs
struct _s1 { int _v1; };

typedef struct _s t_s;
struct _s
{
        struct _s1 _s1;
        int _v;
        int _EXFNPTR(_foo, (struct _s1 *, void *, char *, int));
        int _EXFUN((*_bar),(struct _s1*, void *, char *, int));
};

// definitions
int test(t_s s)
{
        return s._foo(&s._s1, NULL, NULL, s._v) + s._bar(&s._s1, NULL, NULL, 
s._v);
}

int f1(struct _s1 * s1, void * v, char *c, int x){ return x + s1->_v1 ;}

// launch
int main()
{
        struct _s1 s1;
        s1._v1 = 1;

        t_s s;

        s._s1 = s1;
        s._v = 2;
        s._foo = &f1;
        s._bar = &f1;

        test(s);

        return 0;
}

-----------------------
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to