The EXPORT command breaks the build in windows due to conflicting
declaration of sdl_main by SDL_main.h, when built for WIN32. No such
conflict exists for non-windows builds.
Here we just substitute the non-windows definition of EXPORT.
... and allow main() to be called by external module.
Useful for UI implementations that simply layer on top of ui-console
(rather than reimplement it). In such cases, ui-console can be built as
a library rather than top-level executable. The higher-level UI can
then "launch" the ui-console implementation in its own process/thread
by calling main directly (rather than spawning a separate ui-console
process). This is not only a general convenience, but also allows the
higher-level UI to provide a state callback to synchronize its display.
This commit facilitates downstream UI development, but is not likely to
be of interest to general users who build ui-console from makefile.
Therefore, the CALLBACK_* build flags are omitted from the makefile help
text.
Different operation systems (Unix vs. Windows) use different line ending types.
It can easily happen that users from different systems edit files and replace
all line endings of a file with the system specific version. This screws up
diffs and makes merges harder.
Git can normalize line endings for specific files and avoid this problem.
Binary files should be marked to avoid accidentally normalization.
SDL needs to overwrite the main function to initialize the inner state on some
operating systems. Not doing it this way will cause random crashes and
undefined behaviour.
Systems which need a special main function are for example Apple MacOS,
Android, iPhone or Win32. SDL will handle it automatically and keep systems
without such requirement with an untouched main function.
Posix only defines that PATH_MAX may is defined through limits.h.
GNU/Hurd has removed this definition without violating the standards.
Mupen64Plus still relies on it and we work around that problem by
defining PATH_MAX as 4096 in all places it is needed. This is not 100%
correct as their are ways to generate longer paths, but mupen64plus must
be heavily refactored in some places to fix the actual problem.
---