How to pack structures in VxWorks OS ? - VxWorks

This is a discussion on How to pack structures in VxWorks OS ? - VxWorks ; Hi all, Will attribute__((packed)) work in VxWorks OS ? If not, what should I do to pack structures in VxWorks ? Kindly reply to this query. Thanking You, Dilip....

+ Reply to Thread
Results 1 to 2 of 2

Thread: How to pack structures in VxWorks OS ?

  1. How to pack structures in VxWorks OS ?

    Hi all,

    Will attribute__((packed)) work in VxWorks OS ?

    If not, what should I do to pack structures in VxWorks ?

    Kindly reply to this query.

    Thanking You,
    Dilip.

  2. Re: How to pack structures in VxWorks OS ?

    On Jan 23, 2:33*am, dilipjoy...@gmail.com wrote:
    > Hi all,
    >
    > Will attribute__((packed)) work in VxWorks OS ?
    >
    > If not, what should I do to pack structures in VxWorks ?
    >
    > Kindly reply to this query.
    >
    > Thanking You,
    > Dilip.


    On gcc-2.96 (builds for VxWorks 5.5), use the macro that's in
    dosFsLib.h:

    #define _WRS_PACK_ALIGN(x) __attribute__((packed, aligned(x)))

    struct myType {
    ...
    } _WRS_PACK_ALIGN(1);

    - Matt

+ Reply to Thread