/* By default there is no special suffix for executables. */
#ifndef EXECUTABLE_SUFFIX
-#if __MSDOS__
-#define EXECUTABLE_SUFFIX ".exe"
-#else
#define EXECUTABLE_SUFFIX ""
#endif
+
+/* By default, colon separates directories in a path. */
+#ifndef PATH_SEPARATOR
+#define PATH_SEPARATOR ':'
#endif
#define obstack_chunk_alloc xmalloc
putenv (str)
char *str;
{
-#ifndef __MSDOS__ /* not sure about MS/DOS */
#ifndef VMS /* nor about VMS */
extern char **environ;
bcopy (old_environ, environ+1, sizeof (char *) * (num_envs+1));
#endif /* VMS */
-#endif /* __MSDOS__ */
}
#endif /* HAVE_PUTENV */
pfatal_with_name (scmd + strlen (program) + 2);
for (i=1; argv[i]; i++)
- fprintf (argfile, "%s\n", argv[i]);
+ {
+ char *cp;
+ for (cp = argv[i]; *cp; cp++)
+ {
+ if (*cp == '"' || *cp == '\'' || *cp == '\\' || isspace (*cp))
+ fputc ('\\', argfile);
+ fputc (*cp, argfile);
+ }
+ fputc ('\n', argfile);
+ }
fclose (argfile);
i = system (scmd);
startp = endp = temp;
while (1)
{
- if ((*endp == ':') || (*endp == 0))
+ if (*endp == PATH_SEPARATOR || *endp == 0)
{
strncpy (nstore, startp, endp-startp);
if (endp == startp)
startp = endp = temp;
while (1)
{
- if ((*endp == ':') || (*endp == 0))
+ if (*endp == PATH_SEPARATOR || *endp == 0)
{
strncpy (nstore, startp, endp-startp);
if (endp == startp)
startp = endp = temp;
while (1)
{
- if ((*endp == ':') || (*endp == 0))
+ if (*endp == PATH_SEPARATOR || *endp == 0)
{
strncpy (nstore, startp, endp-startp);
if (endp == startp)