author Ryan C. Gordon <>
Mon, 29 Oct 2018 20:00:03 -0400
changeset 12369 68c87b40b434
parent 10722 30e271a26a02
permissions -rwxr-xr-x
winmain: Don't use SDL_malloc (or SDL_stack_alloc, which might be malloc).

Otherwise, we are using the allocator before the app can set up its own hooks.

Now we use VirtualAlloc, and WideCharToMultiByte (because SDL_iconv uses
SDL_malloc, too!) to get ready to call into SDL_main.

This also makes console_wmain() call into the same routines as everything
else, so we don't have to deal with those allocations, too. Hopefully we
end up with the same results from GetCommandLine() as we do in wargv.

Fixes Bugzilla #4340.
     1 #!/bin/sh
     2 #
     3 echo "Generating build information using autoconf"
     4 echo "This may take a while ..."
     6 srcdir=`dirname $0`
     7 test -z "$srcdir" && srcdir=.
     8 cd "$srcdir"
    10 # Regenerate configuration files
    11 cat acinclude/* >aclocal.m4
    12 found=false
    13 for autoconf in autoconf autoconf259 autoconf-2.59
    14 do if which $autoconf >/dev/null 2>&1; then $autoconf && found=true; break; fi
    15 done
    16 if test x$found = xfalse; then
    17     echo "Couldn't find autoconf, aborting"
    18     exit 1
    19 fi
    20 (cd test; sh
    22 # Run configure for this platform
    23 echo "Now you are ready to run ./configure"