Changeset 311e5e3ab7ee5981eaf187565472c0b942c7bc79

Show
Ignore:
Timestamp:
05/01/08 17:37:43 (3 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1209656263 +0300
git-parent:

[0065092103e830b8d2e1e167c9630ee3e76d5e19]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1209656263 +0300
Message:

Use macro for attribute((packed))

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • include/vlc_codecs.h

    r449fd28 r311e5e3  
    4545#define _WAVEFORMATEX_ 
    4646typedef struct 
    47 #ifdef HAVE_ATTRIBUTE_PACKED 
    48     __attribute__((__packed__)) 
    49 #endif 
     47ATTR_PACKED 
    5048_WAVEFORMATEX { 
    5149    uint16_t   wFormatTag; 
     
    6260#define _WAVEFORMATEXTENSIBLE_ 
    6361typedef struct 
    64 #ifdef HAVE_ATTRIBUTE_PACKED 
    65     __attribute__((__packed__)) 
    66 #endif 
     62ATTR_PACKED 
    6763_WAVEFORMATEXTENSIBLE { 
    6864    WAVEFORMATEX Format; 
     
    8076#define _WAVEHEADER_ 
    8177typedef struct 
    82 #ifdef HAVE_ATTRIBUTE_PACKED 
    83     __attribute__((__packed__)) 
    84 #endif 
     78ATTR_PACKED 
    8579_WAVEHEADER { 
    8680    uint32_t MainChunkID; 
     
    10397#define _BITMAPINFOHEADER_ 
    10498typedef struct 
    105 #ifdef HAVE_ATTRIBUTE_PACKED 
    106     __attribute__((__packed__)) 
    107 #endif 
     99ATTR_PACKED 
    108100{ 
    109101    uint32_t   biSize; 
     
    121113 
    122114typedef struct 
    123 #ifdef HAVE_ATTRIBUTE_PACKED 
    124     __attribute__((__packed__)) 
    125 #endif 
     115ATTR_PACKED 
    126116{ 
    127117    BITMAPINFOHEADER bmiHeader; 
     
    133123#define _RECT32_ 
    134124typedef struct 
    135 #ifdef HAVE_ATTRIBUTE_PACKED 
    136     __attribute__((__packed__)) 
    137 #endif 
     125ATTR_PACKED 
    138126{ 
    139127    int left, top, right, bottom; 
     
    149137#define _VIDEOINFOHEADER_ 
    150138typedef struct 
    151 #ifdef HAVE_ATTRIBUTE_PACKED 
    152     __attribute__((__packed__)) 
    153 #endif 
     139ATTR_PACKED 
    154140{ 
    155141    RECT32            rcSource; 
     
    165151#define _RGBQUAD_ 
    166152typedef struct 
    167 #ifdef HAVE_ATTRIBUTE_PACKED 
    168     __attribute__((__packed__)) 
    169 #endif 
     153ATTR_PACKED 
    170154{ 
    171155    uint8_t rgbBlue; 
     
    179163#define _TRUECOLORINFO_ 
    180164typedef struct 
    181 #ifdef HAVE_ATTRIBUTE_PACKED 
    182     __attribute__((__packed__)) 
    183 #endif 
     165ATTR_PACKED 
    184166{ 
    185167    uint32_t dwBitMasks[3]; 
     
    191173#define _VIDEOINFO_ 
    192174typedef struct 
    193 #ifdef HAVE_ATTRIBUTE_PACKED 
    194     __attribute__((__packed__)) 
    195 #endif 
     175ATTR_PACKED 
    196176{ 
    197177    RECT32            rcSource; 
  • include/vlc_common.h

    r0065092 r311e5e3  
    781781#endif 
    782782 
     783#ifdef HAVE_ATTRIBUTE_PACKED 
     784#   define ATTR_PACKED __attribute__((__packed__)) 
     785#endif 
     786 
    783787/* */ 
    784788#define VLC_UNUSED(x) (void)(x)