Lisp_Object output_file = Qnil;
#ifdef MSDOS /* Demacs 1.1.1 91/10/16 HIRANO Satoshi */
char *tempfile = NULL;
- int pid;
#else
sigset_t oldset;
pid_t pid;
}
#ifdef MSDOS /* MW, July 1993 */
- /* Note that on MSDOS `child_setup' actually returns the child process
- exit status, not its PID, so assign it to status below. */
- pid = child_setup (filefd, fd_output, fd_error, new_argv, 0, current_dir);
+ status = child_setup (filefd, fd_output, fd_error, new_argv, 0, current_dir);
- if (pid < 0)
+ if (status < 0)
{
child_errno = errno;
unbind_to (count, Qnil);
code_convert_string_norecord (build_string (strerror (child_errno)),
Vlocale_coding_system, 0);
}
- status = pid;
for (i = 0; i < CALLPROC_FDS; i++)
if (0 <= callproc_fd[i])
CURRENT_DIR is an elisp string giving the path of the current
directory the subprocess should have. Since we can't really signal
a decent error from within the child, this should be verified as an
- executable directory by the parent. */
+ executable directory by the parent.
+
+ On GNUish hosts, either exec or return an error number.
+ On MS-Windows, either return a pid or signal an error.
+ On MS-DOS, either return an exit status or signal an error. */
-int
+CHILD_SETUP_TYPE
child_setup (int in, int out, int err, char **new_argv, bool set_pgrp,
Lisp_Object current_dir)
{
make_number (bool_vector_size (a3)));
}
-Lisp_Object
+_Noreturn void
wrong_type_argument (register Lisp_Object predicate, register Lisp_Object value)
{
/* If VALUE is not even a valid Lisp object, we'd want to abort here
case Alogand:
case Alogior:
case Alogxor:
- return wrong_type_argument (Qinteger_or_marker_p, val);
+ wrong_type_argument (Qinteger_or_marker_p, val);
case Amax:
if (!argnum || isnan (next) || next > accum)
accum = next;
#define lisp_h_CHECK_NUMBER(x) CHECK_TYPE (INTEGERP (x), Qintegerp, x)
#define lisp_h_CHECK_SYMBOL(x) CHECK_TYPE (SYMBOLP (x), Qsymbolp, x)
#define lisp_h_CHECK_TYPE(ok, predicate, x) \
- ((ok) ? (void) 0 : (void) wrong_type_argument (predicate, x))
+ ((ok) ? (void) 0 : wrong_type_argument (predicate, x))
#define lisp_h_CONSP(x) (XTYPE (x) == Lisp_Cons)
#define lisp_h_EQ(x, y) (XLI (x) == XLI (y))
#define lisp_h_FLOATP(x) (XTYPE (x) == Lisp_Float)
extern void char_table_set (Lisp_Object, int, Lisp_Object);
/* Defined in data.c. */
-extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object);
+extern _Noreturn void wrong_type_argument (Lisp_Object, Lisp_Object);
extern _Noreturn void wrong_choice (Lisp_Object, Lisp_Object);
extern void notify_variable_watchers (Lisp_Object symbol, Lisp_Object newval,
Lisp_Object operation, Lisp_Object where);
INLINE Lisp_Object
CAR (Lisp_Object c)
{
- return (CONSP (c) ? XCAR (c)
- : NILP (c) ? Qnil
- : wrong_type_argument (Qlistp, c));
+ if (CONSP (c))
+ return XCAR (c);
+ if (!NILP (c))
+ wrong_type_argument (Qlistp, c);
+ return Qnil;
}
INLINE Lisp_Object
CDR (Lisp_Object c)
{
- return (CONSP (c) ? XCDR (c)
- : NILP (c) ? Qnil
- : wrong_type_argument (Qlistp, c));
+ if (CONSP (c))
+ return XCDR (c);
+ if (!NILP (c))
+ wrong_type_argument (Qlistp, c);
+ return Qnil;
}
/* Take the car or cdr of something whose type is not known. */
/* Defined in callproc.c. */
#ifndef DOS_NT
- _Noreturn
+# define CHILD_SETUP_TYPE _Noreturn void
+#else
+# define CHILD_SETUP_TYPE int
#endif
-extern int child_setup (int, int, int, char **, bool, Lisp_Object);
+extern CHILD_SETUP_TYPE child_setup (int, int, int, char **, bool, Lisp_Object);
extern void init_callproc_1 (void);
extern void init_callproc (void);
extern void set_initial_environment (void);