summaryrefslogtreecommitdiffstats
path: root/osdep/io.c
Commit message (Collapse)AuthorAgeFilesLines
* win32: add getenv() UTF-8 variantwm42013-09-181-0/+60
| | | | | | | This is a bit "hard", because getenv() returns a static string, and we can't just return an allocated string. We also want getenv() to be thread-safe if possible. (If the mpv core is going to be more threaded, we sure do want the lower layers to be thread-safe as well.)
* windows support: fix _wstat misusagewm42013-01-131-1/+1
| | | | | | | I have no idea when or how this broke, but _wstati64() is the function we want anyway (64 bit filesize). Possibly this was a mingw-w64 bug. It's unknown why "wstat()" just doesn't work in this case, as it's not defined by MSDN and could be defined by mingw as it needs.
* win32: use more unicode functionswm42012-04-061-5/+20
| | | | | | | | Use the *W variants instead of the implicit *A functions. (One could define the UNICODE macro to switch the functions without suffix from A to W, but I'm too lazy to figure out how portable that is, etc.) Also make sure io.h defines a unicode aware printf().
* windows: terminal: unicode, --msgcolor, size changeMartin Herkt2012-03-091-0/+58
| | | | | | | Make mp_msg() support unicode output, --msgcolor and variable screen sizes. Patch reintegrated by wm4.
* windows support: unicode filenameswm42012-03-091-0/+185
Windows uses a legacy codepage for char* / runtime functions accepting char *. Using UTF-8 as the codepage with setlocale() is explicitly forbidden. Work this around by overriding the MSVCRT functions with wrapper macros, that assume UTF-8 and use "proper" API calls like _wopen etc. to deal with unicode filenames. All code that uses standard functions that take or return filenames must now include osdep/io.h. stat() can't be overridden, because MinGW-w64 itself defines "stat" as a macro. Change code to use use mp_stat() instead. This is not perfectly clean, but still somewhat sane, and much better than littering the rest of the mplayer code with MinGW specific hacks. It's also a bit fragile, but that's actually little different from the previous situation. Also, MinGW is unlikely to ever include a nice way of dealing with this.