Compare commits

...

30 Commits

Author SHA1 Message Date
Roland McGrath
3a12be3a73 autoheader 1995-03-24 07:30:46 +00:00
Roland McGrath
2346f99368 Regenerated for 3.72.12 1995-03-24 07:28:53 +00:00
Roland McGrath
d855846472 . 1995-03-24 07:27:44 +00:00
Roland McGrath
b9f7d21e42 Regenerated 1995-03-24 06:37:24 +00:00
Roland McGrath
db089ad3e3 . 1995-03-24 05:58:13 +00:00
Roland McGrath
1331cca1fa (handle_non_switch_argument): New function, broken out of decode_switches.
(decode_switches): Set optind to 0 to reinitialize getopt, not to 1.  When
getopt_long returns EOF, break the loop and handle remaining args with a
simple second loop.
1995-03-24 05:56:41 +00:00
Roland McGrath
fe05aaf7f2 (update_file_1): Handle FILE->update_status == 2 in -d printout. 1995-03-24 05:40:22 +00:00
Roland McGrath
cc35ff7381 (remake_file): Set update_status to 2 instead of 1 for no rule to make.
Mention parent (dependent) in error message.
1995-03-24 05:33:31 +00:00
Roland McGrath
a146085382 (start_job_command, reap_children): Set update_status to 2 instead of 1
for failed commands.
1995-03-24 05:32:12 +00:00
Roland McGrath
79fcb77ad1 (signame_init): Define SIGINFO. 1995-03-21 21:44:32 +00:00
Roland McGrath
3608635ec6 (search_path): Function removed (was already #if 0'd out). 1995-03-21 21:24:36 +00:00
Roland McGrath
ca53696814 Remove AC_TYPE_GETGROUPS; nothing needs it any more. 1995-03-21 21:23:26 +00:00
Roland McGrath
61dac07200 Updated from libc 1995-03-17 21:17:43 +00:00
Roland McGrath
9e42026e08 . 1995-03-17 21:16:34 +00:00
Roland McGrath
b52ea79ee6 Write @CPPFLAGS@ translation. 1995-03-17 20:57:17 +00:00
Roland McGrath
e483431569 . 1995-03-13 05:51:54 +00:00
Roland McGrath
28b622b8a1 (stamp-glob): Remove $(globfiles), not the whole glob directory. 1995-03-13 05:51:44 +00:00
Roland McGrath
cbfc50cb51 (parse_file_seq): Rearranged l(a b)' -> l(a) l(b)' loop to not
skip the elt immediately preceding `l(...'.
1995-03-13 05:45:44 +00:00
Roland McGrath
deb7cced6e Regenerated for 3.72.11 1995-03-10 20:36:06 +00:00
Roland McGrath
f9af56ac67 . 1995-03-10 20:36:06 +00:00
Roland McGrath
3ba2e947ac Changed find_char_unquote callers here too. 1995-03-10 20:34:41 +00:00
Roland McGrath
13d0eeb8e5 (find_char_unquote): Make second arg a string of stop chars instead of a
single stop char.  Stop when any char in the string is hit.
All callers changed.
(find_semicolon): Pass stop chars "#;" to one find_char_unquote call,
instead of using two calls.  If the match is not a ; but a #, return zero.
1995-03-10 20:33:40 +00:00
Roland McGrath
d9f063656b . 1995-03-10 19:08:28 +00:00
Roland McGrath
aceefb74da (read_makefile, parse_file_seq): Fix typo __MS_DOS__ -> __MSDOS__. 1995-03-10 19:07:26 +00:00
Roland McGrath
f38d98e988 Regenerated for 3.72.10 1995-03-10 19:00:29 +00:00
Roland McGrath
ff8ff73e65 . 1995-03-10 18:58:47 +00:00
Roland McGrath
8478b0c10a (globfiles): Add glob/configure.bat.
(distfiles): Add configh.dos, configure.bat.
1995-03-10 18:56:38 +00:00
Roland McGrath
1adf3a07dc (read_makefile, parse_file_seq) [__MS_DOS__]: Don't see : as separator in
"C:\...".
1995-03-09 01:42:12 +00:00
Roland McGrath
a5a27a893d (STDC_HEADERS): Define only if undefined.
(HAVE_SYS_PARAM_H): Don't define this.
(HAVE_STRERROR): Define this.
1995-03-09 01:13:02 +00:00
Roland McGrath
595f7598ae (construct_command_argv_internal) [__MSDOS__]: Fix typos. 1995-03-09 01:08:14 +00:00
17 changed files with 593 additions and 343 deletions

View File

@@ -1,5 +1,63 @@
Fri Mar 24 00:32:32 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* Version 3.72.12.
* main.c (handle_non_switch_argument): New function, broken out of
decode_switches.
(decode_switches): Set optind to 0 to reinitialize getopt, not to 1.
When getopt_long returns EOF, break the loop and handle remaining args
with a simple second loop.
* remake.c (remake_file): Set update_status to 2 instead of 1 for
no rule to make. Mention parent (dependent) in error message.
(update_file_1): Handle FILE->update_status == 2 in -d printout.
* job.c (start_job_command, reap_children): Set update_status to 2
instead of 1 for failed commands.
Tue Mar 21 16:23:38 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* job.c (search_path): Function removed (was already #if 0'd out).
* configure.in: Remove AC_TYPE_GETGROUPS; nothing needs it any more.
Fri Mar 17 15:57:40 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* configure.bat: Write @CPPFLAGS@ translation.
Mon Mar 13 00:45:59 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* read.c (parse_file_seq): Rearranged `l(a b)' -> `l(a) l(b)' loop
to not skip the elt immediately preceding `l(...'.
Fri Mar 10 13:56:49 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* Version 3.72.11.
* read.c (find_char_unquote): Make second arg a string of stop
chars instead of a single stop char. Stop when any char in the
string is hit. All callers changed.
(find_semicolon): Pass stop chars "#;" to one find_char_unquote call,
instead of using two calls. If the match is not a ; but a #,
return zero.
* misc.c: Changed find_char_unquote callers here too.
* Version 3.72.10.
* read.c (read_makefile, parse_file_seq): Fix typo __MS_DOS__ ->
__MSDOS__.
* GNUmakefile (globfiles): Add glob/configure.bat.
(distfiles): Add configh.dos, configure.bat.
Wed Mar 8 13:10:57 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
Fixes for MS-DOS from DJ Delorie.
* read.c (read_makefile, parse_file_seq) [__MS_DOS__]: Don't see :
as separator in "C:\...".
* configh.dos (STDC_HEADERS): Define only if undefined.
(HAVE_SYS_PARAM_H): Don't define this.
(HAVE_STRERROR): Define this.
* job.c (construct_command_argv_internal) [__MSDOS__]: Fix typos.
* Version 3.72.9.
* main.c (decode_switches): Reset optind to 1 instead of 0.
@@ -36,7 +94,7 @@ Fri Feb 10 18:44:12 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* Version 3.72.6.
* job.c (start_job_command): Remember to call notice_finsihed_file
* job.c (start_job_command): Remember to call notice_finished_file
under -n when not recursing. To do this, consolidate that code
under the empty command case and goto there for the -n case.

View File

@@ -152,10 +152,10 @@ $(prog): $(objs) $(globdep) #$(addprefix $(ARCH)/,gmalloc.o mcheck.o)
mv -f $@.new $@
globfiles = $(addprefix glob/,COPYING.LIB configure.in configure Makefile.in \
glob.c fnmatch.c glob.h fnmatch.h)
configure.bat glob.c fnmatch.c glob.h fnmatch.h)
$(globfiles): stamp-glob ;
stamp-glob: /home/gd/gnu/libc/posix/glob.tar
-rm -rf glob
-rm -f $(globfiles)
tar xvf $< glob
cvs commit -m'Updated from libc' glob
touch $@
@@ -223,6 +223,7 @@ tarfiles: $(tarfiles)
distfiles=README INSTALL COPYING ChangeLog NEWS \
configure Makefile.in configure.in build.sh.in mkinstalldirs \
configh.dos configure.bat \
acconfig.h $(srcs) remote-*.c $(globfiles) \
make.texinfo make-stds.texi \
make.?? make.??s make.toc make.aux make.man texinfo.tex TAGS tags \

2
README
View File

@@ -1,4 +1,4 @@
This directory contains the 3.72.9 test release of GNU Make.
This directory contains the 3.72.12 test release of GNU Make.
All bugs reported for previous test releases have been fixed.
Some bugs surely remain.

View File

@@ -20,10 +20,6 @@
/* Define for DGUX with <sys/dg_sys_info.h>. */
#undef DGUX
/* Define to the type of elements in the array set by `getgroups'.
Usually this is either `int' or `gid_t'. */
#undef GETGROUPS_T
/* Define if the `getloadavg' function needs to be run setuid or setgid. */
#undef GETLOADAVG_PRIVILEGED

View File

@@ -16,7 +16,9 @@
#define RETSIGTYPE void
/* Define if you have the ANSI C header files. */
#ifndef STDC_HEADERS
#define STDC_HEADERS
#endif
/* Define if `sys_siglist' is declared by <signal.h>. */
#define SYS_SIGLIST_DECLARED
@@ -49,7 +51,7 @@
#define HAVE_LIMITS_H
/* Define if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H
#undef HAVE_SYS_PARAM_H
/* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H
@@ -60,6 +62,7 @@
/* Define if you have the <memory.h> header file. */
#define HAVE_MEMORY_H
#define INCLUDEDIR "c:/djgpp/include"
#define LIBDIR "c:/djgpp/lib"
/* Define if you have the `strerror' function. */
#define HAVE_STRERROR
#define SCCS_GET "get"

155
configure vendored
View File

@@ -1,8 +1,8 @@
#! /bin/sh
# From configure.in Id: configure.in,v 1.47 1995/02/22 03:18:18 roland Alpha
# From configure.in Id: configure.in,v 1.48 1995/03/21 21:23:26 roland Exp
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.1.3
# Generated automatically using autoconf version 2.2.1
# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
@@ -219,7 +219,7 @@ EOF
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
echo "configure generated by autoconf version 2.1.3"
echo "configure generated by autoconf version 2.2.1"
exit 0 ;;
-with-* | --with-*)
@@ -385,8 +385,8 @@ fi
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} conftest.$ac_ext $CFLAGS $CPPFLAGS -c 1>&5 2>&5'
ac_link='${CC-cc} conftest.$ac_ext $CFLAGS $CPPFLAGS $LDFLAGS -o conftest $LIBS 1>&5 2>&5'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
@@ -973,77 +973,12 @@ EOF
EOF
fi
echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
ac_cv_type_getgroups=cross
else
cat > conftest.$ac_ext <<EOF
#line 985 "configure"
#include "confdefs.h"
/* Thanks to Mike Rendell for this test. */
#include <sys/types.h>
#define NGID 256
#undef MAX
#define MAX(x, y) ((x) > (y) ? (x) : (y))
main()
{
gid_t gidset[NGID];
int i, n;
union { gid_t gval; long lval; } val;
val.lval = -1;
for (i = 0; i < NGID; i++)
gidset[i] = val.gval;
n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
gidset);
/* Exit non-zero if getgroups seems to require an array of ints. This
happens when gid_t is short but getgroups modifies an array of ints. */
exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
}
EOF
eval $ac_link
if test -s conftest && (./conftest; exit) 2>/dev/null; then
ac_cv_type_getgroups=gid_t
else
ac_cv_type_getgroups=int
fi
fi
rm -fr conftest*
if test $ac_cv_type_getgroups = cross; then
cat > conftest.$ac_ext <<EOF
#line 1020 "configure"
#include "confdefs.h"
#include <unistd.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
rm -rf conftest*
ac_cv_type_getgroups=gid_t
else
rm -rf conftest*
ac_cv_type_getgroups=int
fi
rm -f conftest*
fi
fi
echo "$ac_t""$ac_cv_type_getgroups" 1>&6
cat >> confdefs.h <<EOF
#define GETGROUPS_T $ac_cv_type_getgroups
EOF
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1047 "configure"
#line 982 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1074,7 +1009,7 @@ if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1078 "configure"
#line 1013 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -1115,7 +1050,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1119 "configure"
#line 1054 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
@@ -1191,7 +1126,7 @@ if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1195 "configure"
#line 1130 "configure"
#include "confdefs.h"
int main() { return 0; }
@@ -1263,7 +1198,7 @@ if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1267 "configure"
#line 1202 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -1325,7 +1260,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1329 "configure"
#line 1264 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1374,7 +1309,7 @@ if eval "test \"`echo '$''{'ac_cv_check_symbol_sys_siglist'+set}'`\" = set"; the
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1378 "configure"
#line 1313 "configure"
#include "confdefs.h"
int main() { return 0; }
@@ -1406,7 +1341,7 @@ if eval "test \"`echo '$''{'ac_cv_check_symbol__sys_siglist'+set}'`\" = set"; th
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1410 "configure"
#line 1345 "configure"
#include "confdefs.h"
int main() { return 0; }
@@ -1440,7 +1375,7 @@ if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1444 "configure"
#line 1379 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() { return 0; }
@@ -1471,7 +1406,7 @@ if eval "test \"`echo '$''{'ac_cv_func_alloca'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1475 "configure"
#line 1410 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -1529,7 +1464,7 @@ if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1533 "configure"
#line 1468 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -1557,7 +1492,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1561 "configure"
#line 1496 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1611,7 +1546,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
#line 1615 "configure"
#line 1550 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -1652,7 +1587,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1656 "configure"
#line 1591 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
@@ -1686,7 +1621,7 @@ else
ac_cv_func_vfork=no
else
cat > conftest.$ac_ext <<EOF
#line 1690 "configure"
#line 1625 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
@@ -1804,7 +1739,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
#line 1808 "configure"
#line 1743 "configure"
#include "confdefs.h"
#include <stdio.h>
/* If setvbuf has the reversed format, exit 0. */
@@ -1848,7 +1783,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lelf $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1852 "configure"
#line 1787 "configure"
#include "confdefs.h"
int main() { return 0; }
@@ -1881,7 +1816,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lkvm $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1885 "configure"
#line 1820 "configure"
#include "confdefs.h"
int main() { return 0; }
@@ -1915,7 +1850,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lutil $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1919 "configure"
#line 1854 "configure"
#include "confdefs.h"
int main() { return 0; }
@@ -1953,7 +1888,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgetloadavg $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1957 "configure"
#line 1892 "configure"
#include "confdefs.h"
int main() { return 0; }
@@ -1990,7 +1925,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1994 "configure"
#line 1929 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2048,7 +1983,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2052 "configure"
#line 1987 "configure"
#include "confdefs.h"
#include <sys/dg_sys_info.h>
EOF
@@ -2077,7 +2012,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldgc $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2081 "configure"
#line 2016 "configure"
#include "confdefs.h"
int main() { return 0; }
@@ -2131,7 +2066,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2135 "configure"
#line 2070 "configure"
#include "confdefs.h"
#include <inq_stats/cpustats.h>
EOF
@@ -2170,7 +2105,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2174 "configure"
#line 2109 "configure"
#include "confdefs.h"
#include <sys/cpustats.h>
EOF
@@ -2207,7 +2142,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2211 "configure"
#line 2146 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
@@ -2243,7 +2178,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2247 "configure"
#line 2182 "configure"
#include "confdefs.h"
#include <nlist.h>
EOF
@@ -2270,7 +2205,7 @@ EOF
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2274 "configure"
#line 2209 "configure"
#include "confdefs.h"
#include <nlist.h>
int main() { return 0; }
@@ -2307,7 +2242,7 @@ if eval "test \"`echo '$''{'ac_cv_func_getloadavg_setgid'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2311 "configure"
#line 2246 "configure"
#include "confdefs.h"
#include "$srcdir/getloadavg.c"
#ifdef LDAV_PRIVILEGED
@@ -2362,7 +2297,7 @@ else
ac_cv_func_strcoll=no
else
cat > conftest.$ac_ext <<EOF
#line 2366 "configure"
#line 2301 "configure"
#include "confdefs.h"
#include <string.h>
main ()
@@ -2396,7 +2331,7 @@ if test $ac_cv_func_getdtablesize = no; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2400 "configure"
#line 2335 "configure"
#include "confdefs.h"
#include <unistd.h>
int main() { return 0; }
@@ -2433,7 +2368,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2437 "configure"
#line 2372 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
@@ -2467,7 +2402,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2471 "configure"
#line 2406 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2516,7 +2451,7 @@ if eval "test \"`echo '$''{'make_cv_union_wait'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2520 "configure"
#line 2455 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
@@ -2564,7 +2499,7 @@ if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2568 "configure"
#line 2503 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -2605,7 +2540,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsun $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2609 "configure"
#line 2544 "configure"
#include "confdefs.h"
int main() { return 0; }
@@ -2751,7 +2686,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
echo "$CONFIG_STATUS generated by autoconf version 2.1.3"
echo "$CONFIG_STATUS generated by autoconf version 2.2.1"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
@@ -2762,7 +2697,9 @@ done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
trap 'rm -fr `echo Makefile build.sh config.h | tr : " "` conftest*; exit 1' 1 2 15
trap 'rm -fr `echo Makefile build.sh config.h | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;

View File

@@ -17,7 +17,8 @@ echo "} ">> config.sed
echo "s/@srcdir@/./ ">> config.sed
echo "s/@CC@/gcc/ ">> config.sed
echo "s/@CFLAGS@/-O2 -g -DHAVE_CONFIG_H/ ">> config.sed
echo "s/@CFLAGS@/-O2 -g/ ">> config.sed
echo "s/@CPPFLAGS@/-DHAVE_CONFIG_H/ ">> config.sed
echo "s/@LDFLAGS@// ">> config.sed
echo "s/@RANLIB@/ranlib/ ">> config.sed
echo "s/@DEFS@// ">> config.sed

View File

@@ -15,7 +15,6 @@ AC_MINIX
AC_HEADER_STDC
AC_HEADER_DIRENT
AC_TYPE_UID_T dnl Also does gid_t.
AC_TYPE_GETGROUPS
AC_TYPE_PID_T
AC_TYPE_SIGNAL
AC_CHECK_HEADERS(unistd.h limits.h sys/param.h fcntl.h string.h memory.h \

View File

@@ -0,0 +1,315 @@
Wed Mar 8 13:38:13 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* posix/glob/configure.bat: Fixes from DJ.
Wed Feb 22 00:44:41 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* posix/glob/configure.in: Put AC_ISC_POSIX before AC_CONST.
Sun Feb 5 17:59:53 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* malloc/malloc.c (__malloc_extra_blocks): New variable.
(malloc): When getting more core, get __malloc_extra_blocks extra;
put the new block at the end of the free list and let the next loop
iteration use the initial portion of it.
* malloc/free.c (_free_internal): Account for twice
__malloc_extra_blocks in deciding if we have so much extra memory
we should return it to the system.
* malloc/malloc.h (__malloc_extra_blocks): Declare it.
* posix/glob.c (prefix_array, glob_pattern_p): Remove gratuitous
const in parameter decl.
Fri Jan 27 17:53:49 1995 Jim Meyering (meyering@comco.com)
* posix/fnmatch.c: Declare errno if it's not defined.
That's simpler than testing #if !defined(__GNU_LIBRARY__)
&& !defined(STDC_HEADERS).
Thu Jan 26 00:02:01 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* io/ftw.c: Avoid `ret' as variable name.
* posix/glob.c: Likewise.
Wed Jan 25 00:45:56 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* posix/glob/configure.in: Put AC_AIX and AC_MINIX early, before
any compile tests.
Mon Jan 16 15:49:07 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* posix/glob/Makefile.in: Remove config.h and config.log.
Sun Jan 15 06:56:47 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* posix/glob/configure.in: Add AC_CONST check.
Wed Dec 7 14:05:12 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* posix/glob/Makefile.in (realclean): Remove config.status.
* posix/glob/Makefile.in (DEFS): New variable, set from @DEFS@.
(CPPFLAGS): Remove @DEFS@ from here.
(.c.o): Use $(DEFS).
Tue Dec 6 19:04:50 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* posix/glob/Makefile.in (CPPFLAGS): Include @DEFS@.
Mon Dec 5 12:05:10 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* posix/glob/configure.in: Add AC_PROG_CC.
Mon Nov 7 00:38:45 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* posix/glob/configure.in: Converted to Autoconf v2.
* posix/glob.c: Test HAVE_DIRENT_H, HAVE_SYS_DIR_H, HAVE_NDIR_H
instead of DIRENT, SYSDIR, NDIR.
* posix/glob/Makefile.in (CC): New variable, set from @CC@.
(CPPFLAGS): Set from @CPPFLAGS@, not @DEFS@.
Sun Oct 09 01:19:38 1994 Jim Meyering (meyering@comco.com)
* posix/fnmatch.c: Remove CONFIG_BROKETS conditional.
Sun Oct 2 18:35:16 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* posix/glob.h (__P): Change arg name to `protos', for congruence
with 4.4 BSD.
* posix/fnmatch.h (__P): Likewise.
Tue Sep 6 19:06:00 1994 Roland McGrath <roland@geech.gnu.ai.mit.edu>
* posix/glob.c (prefix_array, glob): Avoid const on initialized
variables. Some compiler generates bad code.
Mon Jul 25 17:17:28 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* posix/glob/configure.bat: New file.
* posix/Makefile (glob.tar): Add glob/configure.bat.
Tue Dec 14 13:08:35 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
* posix/fnmatch.h: #undef FNM_PATHNAME, FNM_NOESCAPE, and
FNM_PERIOD before defining them.
Mon Oct 18 04:22:42 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
* posix/glob/configure.in: Use AC_HAVE_HEADERS instead of
AC_MEMORY_H and AC_UNISTD_H; omit AC_USG (not needed).
Sun Oct 10 14:31:35 1993 Jim Meyering (meyering@comco.com)
* posix/fnmatch.c [CONFIG_BROKETS]: Include <config.h> only under
this condition, else "config.h".
Wed May 12 16:24:23 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
* posix/glob.c: Move include <unistd.h> before dir includes.
[HAVE_UNISTD_H] [! POSIX] [_POSIX_SOURCE]: Define POSIX.
Thu Apr 22 17:40:28 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
* posix/glob/Makefile.in (.c.o): Put $(CFLAGS) last.
(glob.o): Depend on glob.c.
(fnmatch.o): Depend on fnmatch.c.
Fri Apr 16 12:24:21 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
* posix/glob.c, posix/fnmatch.c: Surround code with
#if defined (_LIBC) || !defined (__GNU_LIBRARY__)
Wed Apr 14 12:49:10 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
* posix/glob.c [USG, NeXT]: Don't test these.
[HAVE_STRING_H]: Test this to include string.h and define ANSI_STRING.
[HAVE_MEMORY_H]: Test this instead of NEED_MEMORY_H.
[! ANSI_STRING]: Put decls of bcopy and #define of memcpy et al here.
* posix/fnmatch.c [HAVE_CONFIG_H]: #include "config.h".
Mon Apr 12 16:34:53 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
* posix/glob.c: Rationalize directory header conditionals.
Sun Apr 11 18:53:50 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
* posix/fnmatch.h [__cplusplus || __STDC__]: Don't #define const.
Sun Mar 28 16:12:33 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
* posix/fnmatch.c (case '*'): Before final loop, fold C1, rather
than foling *P before it goes into C1. C might need folding instead.
Thu Mar 25 13:40:17 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
* posix/fnmatch.h [!_POSIX_C_SOURCE || ...]: Make this test
_GNU_SOURCE, not _BSD_SOURCE; these are our extensions, not theirs.
(FNM_CASEFOLD): New bit.
(__FNM_FLAGS): Removed macro.
* posix/fnmatch.c (fnmatch): Don't test for bogus flag bits; who cares?
(FOLD): New macro to casefold a char if FNM_CASEFOLD.
Use it to fold all chars before comparison.
Mon Mar 8 13:20:02 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
* posix/glob/Makefile.in (VPATH): Set this to @srcdir@.
(srcdir): Set this to $(VPATH).
* posix/glob.c (glob): In no matches with GLOB_NOCHECK set case,
add NULL terminator to PGLOB->gl_pathv.
(prefix_array): Renamed arg PREFIX to DIRNAME, local var PRELEN to
DIRLEN. If DIRNAME is just "/", don't prepend it, so we get
"/foo" instead of "//foo".
(glob): Move qsort call outside of the else clause of the
glob_pattern_p test; it should always be done.
Thu Jan 21 20:12:25 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
* posix/glob.c: Put #includes of <glob.h> and <fnmatch.h> after
all system includes, in case one of them has conflicting defns of
FNM_* or GLOB_*, so we will redefine. #undef FNM_* and GLOB_*
before including our headers.
Tue Jan 19 16:16:05 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
* posix/glob.c (my_realloc): Cast result of malloc/realloc to (char *).
Thu Jan 14 13:52:43 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
* posix/glob/Makefile.in (realclean): Remove Makefile.
Mon Jan 4 17:05:44 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu)
* posix/glob/Makefile.in (RANLIB): Define to @RANLIB@.
(RANLIB_TEST): Removed.
(libglob.a): Don't use it.
Mon Dec 28 15:50:31 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
* posix/glob.c [HAVE_CONFIG_H]: Test this, not SHELL, to decide
whether or not we want to #include "config.h".
Wed Nov 18 13:42:09 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
* posix/fnmatch.h (FNM_LEADING_DIR): New flag.
* posix/fnmatch.c (fnmatch): Support it.
Sun Oct 11 16:58:36 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
* posix/glob.c (__glob_{open,read,close}dir_hook): New vars.
(glob_in_dir): Use them.
* posix/glob.h: Declare them.
Fri Sep 18 16:32:16 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
* posix/glob/Makefile.in (AR, ARFLAGS): Define.
(libglob.a): Use those vars instead of hardcoding.
Thu Aug 13 18:30:58 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
* posix/glob.c: Always #include <sys/types.h>.
[! USG]: Don't do it here.
[STDC_HEADERS]: Test this instead of __STDC__ for size_t.
[HAVE_STRCOLL]: Test this instead of ANSI_STRING for strcoll.
* posix/glob/Makefile.in (Makefile): Remove rule.
Tue Aug 11 15:01:50 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
* posix/glob.c [_AIX]: Don't declare alloca.
Thu Jul 30 15:42:01 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
* posix/glob/Makefile.in (Makefile): Depend on config.status; invoke
it directly instead of using $(SHELL).
* posix/glob.c [! USG]: #include <sys/types.h> before <sys/dir.h>.
Sun Jul 26 17:03:31 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
* posix/glob.c [_AIX]: #pragma alloca first thing.
[ANSI_STRING]: Remove #define's for index et al.
Thu Jul 9 21:27:39 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
* posix/glob.c [STDC_STRINGS]: Don't test this.
[! ANSI_STRING]: Put memcpy, strrchr, memset defns here instead.
* posix/glob/Makefile.in (glob.o, fnmatch.o): / after $(srcdir).
Sat Jul 4 20:44:42 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
* posix/glob/Makefile.in (glob.o, fnmatch.o): Put $(srcdir) on deps.
Wed Jul 1 00:13:40 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
* posix/glob.c [! ANSI_STRING]: #define strcoll to strcmp.
Remove extra decls of free, qsort, malloc, and realloc.
Wed Jun 24 19:09:04 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
* posix/glob.c [DIRENT] (direct): Don't define to dirent.
[! DIRENT] (direct): Define to dirent.
Wed Jun 17 17:58:05 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
* posix/glob.c (my_realloc): Test only __GNU_LIBRARY__. Can't trust
STDC_HEADERS.
Tue Jun 16 20:20:01 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
* posix/glob/Makefile: Moved to posix/glob/Makefile.in.
(VPATH, srcdir, CPPFLAGS): Define to be replaced by autoconf.
* posix/glob.c: Rearranged conditionals for use with autoconf.
Tue Jun 9 20:15:12 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
* posix/glob/Makefile: Fixed copyright notice.
(realclean): Don't remove ~ backup files.
Tue Jun 2 21:49:22 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
* posix/glob.c (__ptr_t): Define.
Wed May 27 18:09:40 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
* posix/fnmatch.h (FNM_FILE_NAME): Alias for FNM_PATHNAME.
Fri May 22 01:52:04 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
* posix/glob.h, posix/fnmatch.h: Use explicit cruft for C++.
Define __P and const for C++/ANSI vs old C ourselves, to avoid
dependence on <sys/cdefs.h>.
Sun May 17 15:50:00 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
* posix/glob.c (glob): Don't let us fall off the end without returning.
Thu May 14 01:45:12 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu)
* posix/glob.h (GLOB_MAGCHAR): Check user feature-test macros,
rather than __USE_BSD, so we don't depend on features.h.
* posix/glob.h [__USE_BSD] (GLOB_MAGCHAR): Declare.
(glob_t): Added member `gl_flags'.
* posix/glob.c (glob, glob_in_dir): Set gl_flags member to FLAGS;
or in GLOB_MAGCHAR if any metachars are seen.
Thu Jan 16 18:43:05 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu)
* posix/glob.c [sgi]: No alloca.h, after all.
Fri Oct 18 15:27:58 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
* posix/glob.c [sgi]: Use <sys/dir.h>.
Tue Jul 23 14:11:29 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
* posix/glob.c: Don't #include <stddef.h> #ifdef sun.
Is there anyone on the face of the planet other than me capable of
implementing the ANSI C standard to spec????
* posix/glob.c [DIRENT]: #include <sys/types.h> before <dirent.h>
#ifdef USG.

View File

@@ -1,23 +1,26 @@
@echo off
echo Configuring glob for GO32
rem This batch file assumes a unix-type "sed" program
echo # Makefile generated by "configure.bat"> Makefile
if exist config.sed del config.sed
echo "s/@srcdir@/./ ">> config.sed
echo "s/@RANLIB@/ranlib/ ">> config.sed
echo "s/@LDFLAGS@// ">> config.sed
echo "s/@DEFS@/-DHAVE_CONFIG_H -I../ ">> config.sed
echo "s/@REMOTE@/s/ ">> config.sed
echo "s/@ALLOCA@// ">> config.sed
echo "s/@LIBS@// ">> config.sed
echo "s/@LIBOBJS@// ">> config.sed
echo "s/^Makefile *:/_Makefile:/ ">> config.sed
echo "s/^config.h *:/_config.h:/ ">> config.sed
sed -e "s/^\"//" -e "s/\"$//" -e "s/[ ]*$//" config.sed > config2.sed
sed -f config2.sed Makefile.in >> Makefile
del config.sed
del config2.sed
@echo off
echo Configuring glob for GO32
rem This batch file assumes a unix-type "sed" program
echo # Makefile generated by "configure.bat"> Makefile
if exist config.sed del config.sed
echo "s/@srcdir@/./ ">> config.sed
echo "s/@CC@/gcc/ ">> config.sed
echo "s/@CFLAGS@/-O2 -g/ ">> config.sed
echo "s/@CPPFLAGS@/-DHAVE_CONFIG_H -I../ ">> config.sed
echo "s/@AR@/ar/ ">> config.sed
echo "s/@RANLIB@/ranlib/ ">> config.sed
echo "s/@LDFLAGS@// ">> config.sed
echo "s/@DEFS@// ">> config.sed
echo "s/@ALLOCA@// ">> config.sed
echo "s/@LIBS@// ">> config.sed
echo "s/@LIBOBJS@// ">> config.sed
echo "s/^Makefile *:/_Makefile:/ ">> config.sed
echo "s/^config.h *:/_config.h:/ ">> config.sed
sed -e "s/^\"//" -e "s/\"$//" -e "s/[ ]*$//" config.sed > config2.sed
sed -f config2.sed Makefile.in >> Makefile
del config.sed
del config2.sed

115
job.c
View File

@@ -377,7 +377,7 @@ reap_children (block, err)
delete non-precious targets, and abort. */
static int delete_on_error = -1;
child_error (c->file->name, exit_code, exit_sig, coredump, 0);
c->file->update_status = 1;
c->file->update_status = 2;
if (delete_on_error == -1)
{
struct file *f = lookup_file (".DELETE_ON_ERROR");
@@ -405,7 +405,7 @@ reap_children (block, err)
Since there are more commands that wanted to be run,
the target was not completely remade. So we treat
this as if a command had failed. */
c->file->update_status = 1;
c->file->update_status = 2;
}
else
{
@@ -433,7 +433,7 @@ reap_children (block, err)
}
/* When we get here, all the commands for C->file are finished
(or aborted) and C->file->update_status contains 0 or 1. But
(or aborted) and C->file->update_status contains 0 or 2. But
C->file->command_state is still cs_running if all the commands
ran; notice_finish_file looks for cs_running to tell it that
it's interesting to check the file's modtime again now. */
@@ -1071,111 +1071,6 @@ child_execute_job (stdin_fd, stdout_fd, argv, envp)
exec_command (argv, envp);
}
#if 0
/* Default path to search for executables. */
static char default_path[] = ":/bin:/usr/bin";
/* Search PATH for FILE.
If successful, store the full pathname in PROGRAM and return 1.
If not sucessful, return zero. */
static int
search_path (file, path, program)
char *file, *path, *program;
{
if (path == 0 || path[0] == '\0')
path = default_path;
if (
#ifdef __MSDOS__
strpbrk (file, "/\\:")
#else
index (file, '/')
#endif
!= 0)
{
strcpy (program, file);
return 1;
}
else
{
unsigned int len;
#ifdef HAVE_GETGROUPS
#ifndef HAVE_UNISTD_H
extern int getgroups ();
#endif
static int ngroups = -1;
#ifdef NGROUPS_MAX
static GETGROUPS_T groups[NGROUPS_MAX];
#define ngroups_max NGROUPS_MAX
#else
static GETGROUPS_T *groups = 0;
static int ngroups_max;
if (groups == 0)
{
ngroups_max = GET_NGROUPS_MAX;
groups = (GETGROUPS_T *) malloc (ngroups_max * sizeof (GETGROUPS_T));
}
#endif
if (groups != 0 && ngroups == -1)
ngroups = getgroups (ngroups_max, groups);
#endif /* Have getgroups. */
len = strlen (file) + 1;
do
{
struct stat st;
int perm;
char *p;
p = index (path, PATH_SEPARATOR_CHAR);
if (p == 0)
p = path + strlen (path);
if (p == path)
bcopy (file, program, len);
else
{
bcopy (path, program, p - path);
program[p - path] = '/';
bcopy (file, program + (p - path) + 1, len);
}
if (safe_stat (program, &st) == 0
&& S_ISREG (st.st_mode))
{
if (st.st_uid == geteuid ())
perm = (st.st_mode & 0100);
else if (st.st_gid == getegid ())
perm = (st.st_mode & 0010);
else
{
#ifdef HAVE_GETGROUPS
register int i;
for (i = 0; i < ngroups; ++i)
if (groups[i] == st.st_gid)
break;
if (i < ngroups)
perm = (st.st_mode & 0010);
else
#endif /* Have getgroups. */
perm = (st.st_mode & 0001);
}
if (perm != 0)
return 1;
}
path = p + 1;
} while (*path != '\0');
}
return 0;
}
#endif /* search_path commented out */
/* Replace the current process with one running the command in ARGV,
with environment ENVP. This function does not return. */
@@ -1497,7 +1392,7 @@ construct_command_argv_internal (line, restp, shell, ifs)
strcat (dos_bname, ".bat");
strcat (dos_bename, ".err");
}
batch = fopen(bename, "w"); /* Create a file. */
batch = fopen (dos_bename, "w"); /* Create a file. */
if (batch != NULL)
fclose (batch);
batch = fopen (dos_bname, "w");
@@ -1506,7 +1401,7 @@ construct_command_argv_internal (line, restp, shell, ifs)
fprintf (batch, "\nif errorlevel 1 del %s\n", dos_bename);
fclose (batch);
new_argv = (char **) xmalloc(2 * sizeof(char *));
new_argv[0] = strdup (bname);
new_argv[0] = strdup (dos_bname);
new_argv[1] = 0;
}
#else /* Not MSDOS. */

114
main.c
View File

@@ -1198,6 +1198,51 @@ init_switches ()
long_options[i].name = 0;
}
static void
handle_non_switch_argument (arg, env)
char *arg;
int env;
{
/* Non-option argument. It might be a variable definition. */
struct variable *v;
if (arg[0] == '-' && arg[1] == '\0')
/* Ignore plain `-' for compatibility. */
return;
v = try_variable_definition ((char *) 0, 0, arg, o_command);
if (v != 0)
{
/* It is indeed a variable definition. Record a pointer to
the variable for later use in define_makeflags. */
struct command_variable *cv
= (struct command_variable *) xmalloc (sizeof (*cv));
cv->variable = v;
cv->next = command_variables;
command_variables = cv;
}
else if (! env)
{
/* Not an option or variable definition; it must be a goal
target! Enter it as a file and add it to the dep chain of
goals. */
struct file *f = enter_command_line_file (arg);
f->cmd_target = 1;
if (goals == 0)
{
goals = (struct dep *) xmalloc (sizeof (struct dep));
lastgoal = goals;
}
else
{
lastgoal->next
= (struct dep *) xmalloc (sizeof (struct dep));
lastgoal = lastgoal->next;
}
lastgoal->name = 0;
lastgoal->file = f;
}
}
/* Decode switches from ARGC and ARGV.
They came from the environment if ENV is nonzero. */
@@ -1221,67 +1266,18 @@ decode_switches (argc, argv, env)
but not for options from the environment. */
opterr = !env;
/* Reset getopt's state. */
optind = 1;
optind = 0;
while (optind < argc)
{
/* Parse the next argument. */
c = getopt_long (argc, argv, options, long_options, (int *) 0);
if (c == EOF)
{
/* There are no more options according to getting getopt, but
there are some arguments left. Since we have asked for
non-option arguments to be returned in order, I think this
only happens when there is a "--" argument to prevent later
arguments from being options. Since getopt has finished its
job, just update its state variables for the next argument and
set C as if it had returned 1, indicating a non-option
argument. */
optarg = argv[optind++];
c = 1;
}
if (c == 1)
{
/* Non-option argument. It might be a variable definition. */
struct variable *v;
if (optarg[0] == '-' && optarg[1] == '\0')
/* Ignore plain `-' for compatibility. */
continue;
v = try_variable_definition ((char *) 0, 0, optarg, o_command);
if (v != 0)
{
/* It is indeed a variable definition. Record a pointer to
the variable for later use in define_makeflags. */
struct command_variable *cv
= (struct command_variable *) xmalloc (sizeof (*cv));
cv->variable = v;
cv->next = command_variables;
command_variables = cv;
}
else if (! env)
{
/* Not an option or variable definition; it must be a goal
target! Enter it as a file and add it to the dep chain of
goals. */
struct file *f = enter_command_line_file (optarg);
f->cmd_target = 1;
if (goals == 0)
{
goals = (struct dep *) xmalloc (sizeof (struct dep));
lastgoal = goals;
}
else
{
lastgoal->next
= (struct dep *) xmalloc (sizeof (struct dep));
lastgoal = lastgoal->next;
}
lastgoal->name = 0;
lastgoal->file = f;
}
}
/* End of arguments, or "--" marker seen. */
break;
else if (c == 1)
/* An argument not starting with a dash. */
handle_non_switch_argument (optarg, env);
else if (c == '?')
/* Bad option. We will print a usage message and die later.
But continue to parse the other options so the user can
@@ -1384,6 +1380,14 @@ positive integral argument",
}
}
/* There are no more options according to getting getopt, but there may
be some arguments left. Since we have asked for non-option arguments
to be returned in order, this only happens when there is a "--"
argument to prevent later arguments from being options. */
while (optind < argc)
handle_non_switch_argument (argv[optind++], env);
if (!env && (bad || print_usage_flag))
{
/* Print a nice usage message. */

2
misc.c
View File

@@ -126,7 +126,7 @@ remove_comments (line)
{
char *comment;
comment = find_char_unquote (line, '#', 0);
comment = find_char_unquote (line, "#", 0);
if (comment != 0)
/* Cut off the line at the #. */

68
read.c
View File

@@ -723,6 +723,11 @@ read_makefile (filename, flags)
else
break;
}
#ifdef __MSDOS__
/* For MS-DOS, skip a "C:\...". */
if (p != 0 && p[1] == '\\' && isalpha (p[-1]))
p = 0;
#endif
if (p != 0)
{
struct nameseq *target;
@@ -1432,9 +1437,9 @@ record_files (filenames, pattern, pattern_percent, deps, commands_started,
one, or nil if there are none. */
char *
find_char_unquote (string, stopchar, blank)
find_char_unquote (string, stopchars, blank)
char *string;
int stopchar;
char *stopchars;
int blank;
{
unsigned int string_len = strlen (string);
@@ -1442,19 +1447,12 @@ find_char_unquote (string, stopchar, blank)
while (1)
{
if (blank)
{
while (*p != '\0' && *p != stopchar && !isblank (*p))
++p;
if (*p == '\0')
break;
}
else
{
p = index (p, stopchar);
if (p == 0)
break;
}
while (*p != '\0' && index (stopchars, *p) == 0
&& (!blank || !isblank (*p)))
++p;
if (*p == '\0')
break;
if (p > string && p[-1] == '\\')
{
/* Search for more backslashes. */
@@ -1488,7 +1486,7 @@ char *
find_percent (pattern)
char *pattern;
{
return find_char_unquote (pattern, '%', 0);
return find_char_unquote (pattern, "%", 0);
}
/* Search STRING for an unquoted ; that is not after an unquoted #. */
@@ -1497,8 +1495,11 @@ static char *
find_semicolon (string)
char *string;
{
return (find_char_unquote (string, '#', 0) == 0
? find_char_unquote (string, ';', 0) : 0);
char *match = find_char_unquote (string, ";#", 0);
if (match != 0 && *match == '#')
/* We found a comment before a semicolon. No match. */
match = 0;
return match;
}
/* Parse a string into a sequence of filenames represented as a
@@ -1526,6 +1527,9 @@ parse_file_seq (stringp, stopchar, size, strip)
register char *p = *stringp;
char *q;
char *name;
char stopchars[2];
stopchars[0] = stopchar;
stopchars[1] = '\0';
while (1)
{
@@ -1537,7 +1541,12 @@ parse_file_seq (stringp, stopchar, size, strip)
break;
/* Yes, find end of next name. */
q = p;
p = find_char_unquote (q, stopchar, 1);
p = find_char_unquote (q, stopchars, 1);
#ifdef __MSDOS__
/* For MS-DOS, skip a "C:\...". */
if (stopchar == ':' && p != 0 && p[1] == '\\' && isalpha (p[-1]))
p = 0;
#endif
if (p == 0)
p = q + strlen (q);
@@ -1573,7 +1582,9 @@ parse_file_seq (stringp, stopchar, size, strip)
an elt further down the chain (i.e., previous in the file list)
with an unmatched `(' (e.g., "lib(mem"). */
for (new1 = new, lastnew1 = 0; new1 != 0; lastnew1 = new1, new1 = new1->next)
new1 = new;
lastnew1 = 0;
while (new1 != 0)
if (new1->name[0] != '(' /* Don't catch "(%)" and suchlike. */
&& new1->name[strlen (new1->name) - 1] == ')'
&& index (new1->name, '(') == 0)
@@ -1654,14 +1665,21 @@ parse_file_seq (stringp, stopchar, size, strip)
name = concat (libname, new1->name, ")");
free (new1->name);
new1->name = name;
lastnew1 = new1;
new1 = new1->next;
}
if (new1 == 0)
/* We might have slurped up the whole list,
and continuing the loop would dereference NEW1. */
break;
}
else
{
/* No frobnication happening. Just step down the list. */
lastnew1 = new1;
new1 = new1->next;
}
}
else
{
lastnew1 = new1;
new1 = new1->next;
}
#endif

View File

@@ -573,14 +573,17 @@ update_file_1 (file, depth)
switch (file->update_status)
{
case 1:
case 2:
DEBUGPR ("Failed to remake target file `%s'.\n");
break;
case 0:
DEBUGPR ("Successfully remade target file `%s'.\n");
break;
case 1:
DEBUGPR ("Target file `%s' needs remade under -q.\n");
break;
default:
assert (file->update_status == 0 || file->update_status == 1);
assert (file->update_status >= 0 && file->update_status <= 2);
break;
}
@@ -833,15 +836,29 @@ remake_file (file)
else
{
/* This is a dependency file we cannot remake. Fail. */
static char noway[] = "No rule to make target";
static const char msg_noparent[]
= "%sNo rule to make target `%s'%s";
static const char msg_parent[]
= "%sNo rule to make target `%s', needed by `%s'%s";
if (keep_going_flag || file->dontcare)
{
if (!file->dontcare)
error ("*** %s `%s'.", noway, file->name);
file->update_status = 1;
{
if (file->parent == 0)
error (msg_noparent, "*** ", file->name, ".");
else
error (msg_parent, "*** ",
file->name, file->parent->name, ".");
}
file->update_status = 2;
}
else
fatal ("%s `%s'", noway, file->name);
{
if (file->parent == 0)
fatal (msg_noparent, "", file->name, "");
else
fatal (msg_parent, "", file->name, file->parent->name, "");
}
}
}
else

View File

@@ -216,6 +216,9 @@ signame_init ()
#if defined (SIGDANGER)
init_sig (SIGDANGER, "DANGER", "Danger signal");
#endif
#if defined (SIGINFO)
init_sig (SIGINFO, "INFO", "Information request");
#endif
}
/* Return the abbreviation for signal NUMBER. */

View File

@@ -1,4 +1,4 @@
char *version_string = "3.72.9";
char *version_string = "3.72.11";
/*
Local variables: