compat: add realpath(3) emulation for Windows
This is a simple emulation of POSIX realpath(3) for Windows.
@@ -72,6 +72,14 @@ static inline char* basename(const char *path)
return buf;
}
+static inline char* realpath(char *path, char *buf)
+{
+ if (buf != NULL) {
+ return NULL; /* Read BUGS in realpath(3) */
+ }
+ return _fullpath(NULL, path, 0);
+}
+
/* mk_utils.c exposes localtime_r */
extern struct tm *localtime_r(const time_t *timep, struct tm * result);
