Compare commits

...

9 Commits

Author SHA1 Message Date
Roland McGrath
f6d5cdba19 (main): Pass missing arg to tmpnam. 1995-02-22 03:19:53 +00:00
Roland McGrath
fcb29e5e96 Check for strsignal. 1995-02-22 03:18:18 +00:00
Roland McGrath
d7a043b46c (child_error): Use strsignal. 1995-02-22 03:17:54 +00:00
Roland McGrath
d85ab5953a (main): Don't call signame_init #ifdef HAVE_STRSIGNAL. 1995-02-22 03:17:22 +00:00
Roland McGrath
93dd485ab6 (strsignal): Declare it. 1995-02-22 03:15:51 +00:00
Roland McGrath
5c350f4fd5 [! HAVE_STRSIGNAL] (strsignal): New function. 1995-02-22 03:13:12 +00:00
Roland McGrath
514c4bac33 (strerror): Fix swapped args in sprintf. 1995-02-22 03:10:16 +00:00
Roland McGrath
8f24715a10 (CFLAGS, LDFLAGS): Don't set these variables. 1995-02-13 16:50:03 +00:00
Roland McGrath
4c7f18cd09 (print_version): Add 95 to copyright years. 1995-02-11 01:39:58 +00:00
6 changed files with 37 additions and 21 deletions

View File

@@ -5,10 +5,6 @@ AC_INIT(vpath.c)dnl dnl A distinctive file to look for in srcdir.
AC_CONFIG_HEADER(config.h) AC_CONFIG_HEADER(config.h)
AC_CONFIG_SUBDIRS(glob) dnl Run configure in glob subdirectory. AC_CONFIG_SUBDIRS(glob) dnl Run configure in glob subdirectory.
# We want these before the checks, so the checks can modify their values.
test -z "$CFLAGS" && CFLAGS=-g AC_SUBST(CFLAGS)
test -z "$LDFLAGS" && LDFLAGS=-g AC_SUBST(LDFLAGS)
AC_PROG_MAKE_SET AC_PROG_MAKE_SET
AC_PROG_CC AC_PROG_CC
AC_PROG_INSTALL AC_PROG_INSTALL
@@ -45,7 +41,7 @@ AC_MSG_RESULT($ac_cv_check_symbol_$1)])dnl
AC_CHECK_FUNCS(getdtablesize psignal mktemp \ AC_CHECK_FUNCS(getdtablesize psignal mktemp \
dup2 getcwd sigsetmask getgroups setlinebuf \ dup2 getcwd sigsetmask getgroups setlinebuf \
seteuid setegid setreuid setregid strerror) seteuid setegid setreuid setregid strerror strsignal)
AC_CHECK_SYMBOL(sys_siglist) AC_CHECK_SYMBOL(sys_siglist)
AC_CHECK_SYMBOL(_sys_siglist) AC_CHECK_SYMBOL(_sys_siglist)
AC_FUNC_ALLOCA AC_FUNC_ALLOCA

9
job.c
View File

@@ -174,14 +174,9 @@ child_error (target_name, exit_code, exit_sig, coredump, ignored)
"*** [%s] Error %d", "*** [%s] Error %d",
target_name, exit_code); target_name, exit_code);
else else
{
char *coredump_string = coredump ? " (core dumped)" : "";
if (exit_sig > 0 && exit_sig < NSIG)
error ("*** [%s] %s%s", error ("*** [%s] %s%s",
target_name, sys_siglist[exit_sig], coredump_string); target_name, strsignal (exit_sig),
else coredump ? " (core dumped)" : "");
error ("*** [%s] Signal %d%s", target_name, exit_sig, coredump_string);
}
} }
static unsigned int dead_children = 0; static unsigned int dead_children = 0;

6
main.c
View File

@@ -424,7 +424,7 @@ main (argc, argv, envp)
reading_filename = 0; reading_filename = 0;
reading_lineno_ptr = 0; reading_lineno_ptr = 0;
#ifndef HAVE_SYS_SIGLIST #if !defined (HAVE_STRSIGNAL) && !defined (HAVE_SYS_SIGLIST)
signame_init (); signame_init ();
#endif #endif
@@ -708,7 +708,7 @@ main (argc, argv, envp)
(void) mktemp (name); (void) mktemp (name);
#else #else
static char name[L_tmpnam]; static char name[L_tmpnam];
(void) tmpnam (); (void) tmpnam (name);
#endif #endif
outfile = fopen (name, "w"); outfile = fopen (name, "w");
@@ -1856,7 +1856,7 @@ print_version ()
printf ("-%s", remote_description); printf ("-%s", remote_description);
printf (", by Richard Stallman and Roland McGrath.\n\ printf (", by Richard Stallman and Roland McGrath.\n\
%sCopyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc.\n\ %sCopyright (C) 1988, 89, 90, 91, 92, 93, 94, 95 Free Software Foundation, Inc.\n\
%sThis is free software; see the source for copying conditions.\n\ %sThis is free software; see the source for copying conditions.\n\
%sThere is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\ %sThere is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\
%sPARTICULAR PURPOSE.\n\n", precede, precede, precede, precede); %sPARTICULAR PURPOSE.\n\n", precede, precede, precede, precede);

4
misc.c
View File

@@ -1,5 +1,5 @@
/* Miscellaneous generic support functions for GNU Make. /* Miscellaneous generic support functions for GNU Make.
Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc. Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 1995 Free Software Foundation, Inc.
This file is part of GNU Make. This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify GNU Make is free software; you can redistribute it and/or modify
@@ -260,7 +260,7 @@ strerror (errnum)
if (errno < sys_nerr) if (errno < sys_nerr)
return sys_errlist[errnum]; return sys_errlist[errnum];
sprintf ("Unknown error %d", buf, errnum); sprintf (buf, "Unknown error %d", errnum);
return buf; return buf;
} }
#endif #endif

View File

@@ -1,5 +1,5 @@
/* Convert between signal names and numbers. /* Convert between signal names and numbers.
Copyright (C) 1990, 1992, 1993 Free Software Foundation, Inc. Copyright (C) 1990, 1992, 1993, 1995 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@@ -273,3 +273,20 @@ psignal (signal, message)
fprintf (stderr, "%s: %s\n", message, sys_siglist[signal]); fprintf (stderr, "%s: %s\n", message, sys_siglist[signal]);
} }
#endif #endif
#ifndef HAVE_STRSIGNAL
/* Return the string associated with the signal number. */
char *
strsignal (signal)
int signal;
{
static char buf[] = "Signal 12345678901234567890";
if (signal > 0 || signal < NSIG)
return sys_siglist[signal];
sprintf (buf, "Signal %d", signal);
return buf;
}
#endif

View File

@@ -1,5 +1,5 @@
/* Convert between signal names and numbers. /* Convert between signal names and numbers.
Copyright (C) 1990, 1992, 1993 Free Software Foundation, Inc. Copyright (C) 1990, 1992, 1993, 1995 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@ char *sig_abbrev (int number);
signal by that name. */ signal by that name. */
int sig_number (const char *abbrev); int sig_number (const char *abbrev);
/* Avoid conflicts with a system header file that might define these two. */ /* Avoid conflicts with a system header file that might define these three. */
#ifndef HAVE_PSIGNAL #ifndef HAVE_PSIGNAL
/* Print to standard error the name of SIGNAL, preceded by MESSAGE and /* Print to standard error the name of SIGNAL, preceded by MESSAGE and
@@ -37,6 +37,11 @@ int sig_number (const char *abbrev);
void psignal (int signal, const char *message); void psignal (int signal, const char *message);
#endif #endif
#ifndef HAVE_STRSIGNAL
/* Return the name of SIGNAL. */
char *strsignal (int signal);
#endif
#if !defined (HAVE_SYS_SIGLIST) #if !defined (HAVE_SYS_SIGLIST)
/* Names for signals from 0 to NSIG-1. */ /* Names for signals from 0 to NSIG-1. */
extern const char *sys_siglist[]; extern const char *sys_siglist[];
@@ -50,6 +55,9 @@ int sig_number ();
#if !defined (HAVE_SYS_SIGLIST) && !defined (HAVE_PSIGNAL) #if !defined (HAVE_SYS_SIGLIST) && !defined (HAVE_PSIGNAL)
void psignal (); void psignal ();
#endif #endif
#ifndef HAVE_STRSIGNAL
char *strsignal (int signal);
#endif
#if !defined (HAVE_SYS_SIGLIST) #if !defined (HAVE_SYS_SIGLIST)
extern char *sys_siglist[]; extern char *sys_siglist[];
#endif #endif