r10873 vince - in /trunk/netsurf/utils: config.h utils.c

netsurf at semichrome.net netsurf at semichrome.net
Sat Oct 9 18:11:29 BST 2010


Author: vince
Date: Sat Oct  9 12:11:28 2010
New Revision: 10873

URL: http://source.netsurf-browser.org?rev=10873&view=rev
Log:
add realpath compatability for windows

Modified:
    trunk/netsurf/utils/config.h
    trunk/netsurf/utils/utils.c

Modified: trunk/netsurf/utils/config.h
URL: http://source.netsurf-browser.org/trunk/netsurf/utils/config.h?rev=10873&r1=10872&r2=10873&view=diff
==============================================================================
--- trunk/netsurf/utils/config.h (original)
+++ trunk/netsurf/utils/config.h Sat Oct  9 12:11:28 2010
@@ -53,6 +53,11 @@
 #undef HAVE_UTSNAME
 #endif
 
+#define HAVE_REALPATH
+#if (defined(_WIN32))
+#undef HAVE_REALPATH
+#endif
+
 #define HAVE_MKDIR
 #if (defined(_WIN32))
 #undef HAVE_MKDIR

Modified: trunk/netsurf/utils/utils.c
URL: http://source.netsurf-browser.org/trunk/netsurf/utils/utils.c?rev=10873&r1=10872&r2=10873&view=diff
==============================================================================
--- trunk/netsurf/utils/utils.c (original)
+++ trunk/netsurf/utils/utils.c Sat Oct  9 12:11:28 2010
@@ -490,3 +490,18 @@
 	return 0;
 }
 #endif
+
+#ifndef HAVE_REALPATH
+char *realpath(const char *path, char *resolved_path)
+{
+	char *ret;
+	if (resolved_path == NULL) {
+		ret=strdup(path);
+	} else {
+		ret = resolved_path;
+		strcpy(resolved_path, path);
+	}
+	return ret;
+}
+
+#endif




More information about the netsurf-commits mailing list