projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
NaCl runtime fixes
[mono.git]
/
eglib
/
src
/
gfile-posix.c
diff --git
a/eglib/src/gfile-posix.c
b/eglib/src/gfile-posix.c
index 48a9192ab69fad8ea0d2ce2d195549af6442982e..d52ad9488029ce44211dca08a75c78bd0d857d23 100644
(file)
--- a/
eglib/src/gfile-posix.c
+++ b/
eglib/src/gfile-posix.c
@@
-154,6
+154,15
@@
g_file_open_tmp (const gchar *tmpl, gchar **name_used, GError **error)
gchar *
g_get_current_dir (void)
{
gchar *
g_get_current_dir (void)
{
+#ifdef __native_client__
+ char *buffer;
+ if ((buffer = getenv("NACL_PWD"))) {
+ buffer = g_strdup(buffer);
+ } else {
+ buffer = g_strdup(".");
+ }
+ return buffer;
+#else
int s = 32;
char *buffer = NULL, *r;
gboolean fail;
int s = 32;
char *buffer = NULL, *r;
gboolean fail;
@@
-172,4
+181,5
@@
g_get_current_dir (void)
* so we return the buffer here since it has a pointer to the valid string
*/
return buffer;
* so we return the buffer here since it has a pointer to the valid string
*/
return buffer;
+#endif
}
}