aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/w32.c')
-rw-r--r--src/w32.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/w32.c b/src/w32.c
index 12d1f21b091..7b54924d736 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -1005,6 +1005,32 @@ init_environment (char ** argv)
1005 _snprintf (buf, sizeof(buf)-1, "emacs_dir=%s", modname); 1005 _snprintf (buf, sizeof(buf)-1, "emacs_dir=%s", modname);
1006 _putenv (strdup (buf)); 1006 _putenv (strdup (buf));
1007 } 1007 }
1008 /* Handle running emacs from the build directory: src/oo-spd/i386/ */
1009
1010 /* FIXME: should use substring of get_emacs_configuration ().
1011 But I don't think the Windows build supports alpha, mips etc
1012 anymore, so have taken the easy option for now. */
1013 else if (p && stricmp (p, "\\i386") == 0)
1014 {
1015 *p = 0;
1016 p = strrchr (modname, '\\');
1017 if (p != NULL)
1018 {
1019 *p = 0;
1020 p = strrchr (modname, '\\');
1021 if (p && stricmp (p, "\\src") == 0)
1022 {
1023 char buf[SET_ENV_BUF_SIZE];
1024
1025 *p = 0;
1026 for (p = modname; *p; p++)
1027 if (*p == '\\') *p = '/';
1028
1029 _snprintf (buf, sizeof(buf)-1, "emacs_dir=%s", modname);
1030 _putenv (strdup (buf));
1031 }
1032 }
1033 }
1008 } 1034 }
1009 1035
1010 for (i = 0; i < (sizeof (env_vars) / sizeof (env_vars[0])); i++) 1036 for (i = 0; i < (sizeof (env_vars) / sizeof (env_vars[0])); i++)