Commits on Dec 19, 2012
  1. Add an assertion if particular indices in an array/struct are duplica…

    Fix struct/array index lookup if the previous entry used a designated
    initializer, but this particular entry didn't. In that case, our index
    is the previous member's index + 1, but we used to use the counter as
    index, which is wrong.
    Also fix the unit test, which contained code triggering both problems,
    which ended up going in an infinite loop.
    committed Dec 19, 2012
Commits on Dec 11, 2012
  1. doc: add README

    lu-zero committed Dec 11, 2012
Commits on Nov 17, 2012
  1. Don't add ordinals to the def files

    If ordinals are added, linking to the created .lib file links
    by ordinal instead of by name. Linking by name is preferred in
    general (unless one wants to squeeze down the binary size). Linking
    by ordinal only makes sense if the def file is maintained manually,
    making sure the ordinal number of each function stays the same in
    every build even if functions are added/removed.
    mstorsjo committed Nov 17, 2012
Commits on Oct 19, 2012
Commits on Oct 18, 2012
  1. makedef: Properly support x86_64

    Symbols on x86_64 should not be prefixed with an underscore.
    Signed-off-by: Derek Buitenhuis <>
    dwbuiten committed Oct 18, 2012
  2. makedef: Replace a printf with print

    Signed-off-by: Derek Buitenhuis <>
    dwbuiten committed Oct 18, 2012
  3. makedef: Cosmetics: Consistent if/unless spacing

    Signed-off-by: Derek Buitenhuis <>
    dwbuiten committed Oct 18, 2012
Commits on Oct 13, 2012
Commits on Oct 8, 2012
  1. Don't detect clang as cl.exe.

    committed Oct 8, 2012
Commits on Oct 7, 2012
Commits on Oct 3, 2012
Commits on Sep 28, 2012
  1. cosmetics: Clean up the wrapper

    Signed-off-by: Derek Buitenhuis <>
    dwbuiten committed Sep 28, 2012
Commits on Sep 14, 2012
Commits on Sep 7, 2012
  1. Indent before writing the extra tokens

    This fixes cases where there are interleaved preprocessor line
    comments in structs with designated initializers (pcmdec.c with
    gcc). Before this, the starting # was written at the end of the
    previous line.
    mstorsjo committed Sep 7, 2012
  2. Fix brace placement

    mstorsjo committed Sep 7, 2012
Commits on Sep 6, 2012
  1. Handle the -Fi and -Fe parameters just like -Fo

    They still share the same buffer, so it won't behave right
    if more than one of them are specified at the same time.
    mstorsjo committed Sep 6, 2012
Commits on Sep 5, 2012
  1. Pass msvc parameters with a dash instead of a slash

    The slash version is the official one, while msvc actually supports
    both. Consistently use dashes, to easier distinguish paths from
    This helps running msvc via wine on linux.
    mstorsjo committed Sep 5, 2012
Commits on Sep 4, 2012
  1. Handle initializing unions in functions with a separate assignment call

    This avoids having to convert floats to their binary representation,
    for runtime assignments.
    This converts code like
    void func() {
        union foo a = { .f = f };
        int a;
    void func() {
        union foo a;
        a.f = f;
            int a;
    In practice it isn't formatted this prettily though. The closing
    extra braces are placed on separate rows, which probably will mess
    up the row numbering (for debuggers etc). It should ideally be grouped
    close to the existing brace that close the function/scope, but with
    my current implementation, it is prepended to the following token
    instead. (And in that case, we need the extra newline, since
    if the following line starts with a #, it will be messed up if the
    extra } is prepended there - that's why the current extra newline
    is there.)
    mstorsjo committed Sep 3, 2012
  2. Support unions with designated initializers

    Add the necessary casts for storing ints in pointers or vice
    versa, convert float/double compile time constants into their
    integer representation.
    If a 32 bit field is stored via a 64 bit field on big endian,
    the value should be shifted up.
    This doesn't handle things that can't be done with casts or
    as float/double binary representations.
    mstorsjo committed Sep 3, 2012