packages feed

hs-bindgen-1.0.0.0: test-artefacts/headers/golden/attributes/attributes.h

/** @file
 * Attributes
 *
 * See https://clang.llvm.org/docs/AttributeReference.html
 */

#define PACKED __attribute__((__packed__))

// named struct with attribute
struct __attribute__((__packed__)) foo {
    char c;
    int  i;
};

// named struct with macro attribute
struct PACKED bar {
    char c;
    int  i;
};

// untagged struct with attribute
typedef struct __attribute__((__packed__)) {
    char c;
    int  i;
} baz;

// untagged struct with macro attribute
typedef struct PACKED {
    char c;
    int  i;
} qux;

// Extract from _stdio.h on OSX
typedef struct __sFILE {
    int _r;
    int _w;
    int	(* _Nullable _close)(void *);
} FILE;