diff --git a/ChangeLog b/ChangeLog index 3888642b..2b0ba8c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -87,6 +87,12 @@ * default.c (default_variables) [__MSDOS__]: Define CXX to gpp. +2000-01-27 Paul D. Smith + + * gettext.c: Some warning cleanups, and a fix for systems which + don't define HAVE_ALLOCA (the workaround code was included + twice). + 2000-01-25 Paul D. Smith Change gettext support to use the simplified version in libit 0.7. diff --git a/function.c b/function.c index 743fe796..c993c744 100644 --- a/function.c +++ b/function.c @@ -492,9 +492,9 @@ func_notdir_suffix(o, argv, funcname) char *list_iterator = argv[0]; char *p2 =0; int doneany =0; - int len=0; + unsigned int len=0; - int is_suffix = streq(funcname, "suffix"); + int is_suffix = streq (funcname, "suffix"); int is_notdir = !is_suffix; while ((p2 = find_next_token (&list_iterator, &len)) != 0) { @@ -555,7 +555,7 @@ func_basename_dir(o, argv, funcname) int doneany=0; unsigned int len=0; char *p=0; - int is_basename= streq(funcname, "basename"); + int is_basename= streq (funcname, "basename"); int is_dir= !is_basename; while ((p2 = find_next_token (&p3, &len)) != 0) @@ -563,7 +563,7 @@ func_basename_dir(o, argv, funcname) p = p2 + len; while (p >= p2 && (!is_basename || *p != '.')) { - if (IS_PATHSEP(*p)) + if (IS_PATHSEP (*p)) break; --p; } diff --git a/gettext.c b/gettext.c index b35b18dc..aef9c01e 100644 --- a/gettext.c +++ b/gettext.c @@ -563,7 +563,8 @@ _nl_explode_name (name, language, modifier, territory, codeset, if (*codeset != cp && (*codeset)[0] != '\0') { - *normalized_codeset = _nl_normalize_codeset (*codeset, + *normalized_codeset = _nl_normalize_codeset ((const unsigned + char *)*codeset, cp - *codeset); if (strcmp (*codeset, *normalized_codeset) == 0) free ((char *) *normalized_codeset); @@ -1220,13 +1221,13 @@ read_alias_file (fname, fname_len) unsigned char *value; unsigned char *cp; - if (fgets (buf, sizeof buf, fp) == NULL) + if (fgets ((char *)buf, sizeof buf, fp) == NULL) /* EOF reached. */ break; /* Possibly not the whole line fits into the buffer. Ignore the rest of the line. */ - if (strchr (buf, '\n') == NULL) + if (strchr ((char *)buf, '\n') == NULL) { char altbuf[BUFSIZ]; do @@ -1279,8 +1280,8 @@ read_alias_file (fname, fname_len) if (nmap >= maxmap) extend_alias_table (); - alias_len = strlen (alias) + 1; - value_len = strlen (value) + 1; + alias_len = strlen ((char *)alias) + 1; + value_len = strlen ((char *)value) + 1; if (string_space_act + alias_len + value_len > string_space_max) { @@ -1750,41 +1751,6 @@ static const char *guess_category_value PARAMS ((int category, const char *categoryname)) internal_function; -/* For those loosing systems which don't have `alloca' we have to add - some additional code emulating it. */ -#ifdef HAVE_ALLOCA -/* Nothing has to be done. */ -# define ADD_BLOCK(list, address) /* nothing */ -# define FREE_BLOCKS(list) /* nothing */ -#else -struct block_list -{ - void *address; - struct block_list *next; -}; -# define ADD_BLOCK(list, addr) \ - do { \ - struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \ - /* If we cannot get a free block we cannot add the new element to \ - the list. */ \ - if (newp != NULL) { \ - newp->address = (addr); \ - newp->next = (list); \ - (list) = newp; \ - } \ - } while (0) -# define FREE_BLOCKS(list) \ - do { \ - while (list != NULL) { \ - struct block_list *old = list; \ - list = list->next; \ - free (old); \ - } \ - } while (0) -# undef alloca -# define alloca(size) (malloc (size)) -#endif /* have alloca */ - /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source code is also used in GNU C Library where the names have a __ diff --git a/remake.c b/remake.c index d4c8a03a..914e7d43 100644 --- a/remake.c +++ b/remake.c @@ -62,9 +62,6 @@ static int library_search PARAMS ((char **lib, FILE_TIMESTAMP *mtime_ptr)); should only make one goal at a time and return as soon as one goal whose `changed' member is nonzero is successfully made. */ -/* We need to know this "lower down" for correct error handling. */ -static int updating_makefiles = 0; - int update_goal_chain (goals, makefiles) register struct dep *goals; @@ -74,8 +71,6 @@ update_goal_chain (goals, makefiles) unsigned int j = job_slots; int status = -1; - updating_makefiles = makefiles; - #define MTIME(file) (makefiles ? file_mtime_no_search (file) \ : file_mtime (file)) diff --git a/tests/ChangeLog b/tests/ChangeLog index 231c4869..fe8b25c3 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -17,6 +17,11 @@ * scripts/targets/SECONDARY: Ditto. * scripts/targets/INTERMEDIATE: Ditto. +2000-01-27 Paul D. Smith + + * test_driver.pl (toplevel): Don't try to run test scripts which + are really directories. + 2000-01-23 Paul D. Smith * scripts/features/include: Remove a check; the fix caused more diff --git a/tests/test_driver.pl b/tests/test_driver.pl index 4fb738b4..18dcc4be 100644 --- a/tests/test_driver.pl +++ b/tests/test_driver.pl @@ -117,7 +117,8 @@ sub toplevel closedir (SCRIPTDIR); foreach $dir (@dirs) { - next if ! -d "$scriptpath/$dir" || $dir =~ /^\.\.?$/ || $dir eq 'CVS'; + next if ($dir =~ /^\.\.?$/ || $dir eq 'CVS' || $dir eq 'RCS' + || ! -d "$scriptpath/$dir"); push (@rmdirs, $dir); mkdir ("$workpath/$dir", 0777) || &error ("Couldn't mkdir $workpath/$dir: $!\n"); @@ -127,7 +128,7 @@ sub toplevel closedir (SCRIPTDIR); foreach $test (@files) { - next if $test =~ /^\.\.?$/ || $test =~ /~$/ || $test eq 'CVS'; + next if $test =~ /~$/ || -d $test; push (@TESTS, "$dir/$test"); } }