Hi again  ;-)

I do have the following C struct:

typedef unsigned long   tcflag_t;
typedef unsigned char   cc_t;
typedef long            speed_t;        /* XXX should be unsigned long */

struct termios {
        tcflag_t        c_iflag;        /* input flags */
        tcflag_t        c_oflag;        /* output flags */
        tcflag_t        c_cflag;        /* control flags */
        tcflag_t        c_lflag;        /* local flags */
        cc_t            c_cc[NCCS];     /* control chars */
        speed_t         c_ispeed;       /* input speed */
        speed_t         c_ospeed;       /* output speed */
};

with NCCS being #define'd to 20.

I need to allocate space for this struct and therefore want to know its size ... As I don't need the struct itself I thought about calculating the size but I figure there's the problem of getting all the padding to count to the size...

How would I do that ?

Thx!!

Frank

_______________________________________________
cffi-devel mailing list
cffi-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel

Reply via email to