Patch from Matt Whitlock:
There are actually two distinct classes of problems at play here.
On the one hand, libsdl2's configure.ac has some POSIX conformance
issues - namely, the use of 'echo -n' and the passage of arguments
containing embedded backslashes to 'echo', neither of which is
defined by POSIX. The attached patch takes care of these issues.
Ozkan Sezer
Our config.guess and config.sub are rather outdated.
Attached new versions of them here.
However, build-scripts/config.sub.patch do not apply
to these new versions: I don't know if and where that
patch is still needed.
Cameron Cawley
stdlib: Added SDL_round, SDL_roundf, SDL_lround and SDL_lroundf
The default implementation is based on the one used in the Windows RT video driver.
Keep Semaphore Kernel Object impl for Windows 7 and older - choose at runtime
v2: - Fix mixed int/LONG types
- Reorder definitions
- Add missing include
v3: - Use `GetModuleHandle()` to load the API Set
SDL_SemPost() was called by the FIFO threads after the semaphore was
freed because the main thread actually synchronized on the
`writerRunning`/`readersRunning` count and not the semaphores itself.
v2: - Add SRW definitions as suggested by Ozkan Sezer
Allows building against older platform headers.
- Rename "hidden" function parameter `mutex_` to `_mutex`
v3: - Use GetModuleHandle instead of LoadLibrary
- Fix typo in comment
SDL_systhread.c and SDL_syslocale.c used to call LoadLibrary() without
calling FreeLibrary() later. GetModuleHandleW() should always succeed
because GetModuleHandleW() itself is imported from kernel32.dll and we
don't need to bother releasing it.
- acinclude/alsa.m4, esd.m4: Ran through autoupdate to replace several
AC_TRY_[COMPILE|LINK|RUN] with corresponding AC_???_IFELSE , so that
autoconf-2.70 doesn't warn.
- sdl2.m4: Ditto.
- test/acinclude.m4 (sdl2): Ditto.
- remove HP/UX 9 (%@#!) support
- change fopen() mode from "a" to "w" in test code.
- bump its serial num to 2.
- test/acinclude.m4: same sdl2.m4 updates.
- revise for better compatibility with new autoconf,
- remove HP/UX 9 (%@#!) support from it,
- replace system("touch conf.esdtest") with fopen/fclose in the
test code (see, e.g. glib-2.0.m4 -- sdl.m4 does the same.)