CHECK_STRING (infile, 1);
}
else
-#ifdef VMS
- infile = build_string ("NLA0:");
-#else
- infile = build_string ("/dev/null");
-#endif /* not VMS */
+ infile = build_string (NULL_DEVICE);
if (nargs >= 3)
{
report_file_error ("Opening process input file", Fcons (infile, Qnil));
}
/* Search for program; barf if not found. */
- openp (Vexec_path, args[0], "", &path, 1);
+ openp (Vexec_path, args[0], EXEC_SUFFIXES, &path, 1);
if (NILP (path))
{
close (filefd);
new_argv[0] = XSTRING (path)->data;
if (XTYPE (buffer) == Lisp_Int)
- fd[1] = open ("/dev/null", O_WRONLY), fd[0] = -1;
+ fd[1] = open (NULL_DEVICE, O_WRONLY), fd[0] = -1;
else
{
pipe (fd);
if (new_argv[0][0] != '/')
{
tem = Qnil;
- openp (Vexec_path, program, "", &tem, 1);
+ openp (Vexec_path, program, EXEC_SUFFIXES, &tem, 1);
if (NILP (tem))
report_file_error ("Searching for program", Fcons (program, Qnil));
new_argv[0] = XSTRING (tem)->data;
else
{
close (XPROCESS (proc)->outfd);
- XFASTINT (XPROCESS (proc)->outfd) = open ("/dev/null", O_WRONLY);
+ XFASTINT (XPROCESS (proc)->outfd) = open (NULL_DEVICE, O_WRONLY);
}
#endif /* VMS */
#endif /* did not do TOICREMOTE */
this is exit code of synchronous subprocess. */
extern int synch_process_retcode;
+/* The name of the file open to get a null file, or a data sink.
+ VMS, MS-DOS, and OS/2 redefine this. */
+#ifndef NULL_DEVICE
+#define NULL_DEVICE "/dev/null"
+#endif
+
+/* A string listing the possible suffixes used for executable files,
+ separated by colons. VMS, MS-DOS, and OS/2 redefine this. */
+#ifndef EXEC_SUFFIXES
+#define EXEC_SUFFIXES ""
+#endif