changelog

来自「制作2.6内核的CLFS时 patch包」· 代码 · 共 1,660 行 · 第 1/5 页

TXT
1,660
字号
	$(PACKAGE).	(TAGS): Scan $(HDRS).	(maintainer-clean): Renamed from realclean.  Remove patchlevel.h.	* backupfile.h (simple_backup_suffix): Now const *.	(find_backup_file_name, base_name, get_version): Args are now const *.	(base_name): New decl.	* backupfile.c (<config.h>): Include only if HAVE_CONFIG_H.	(<argmatch.h>): Include.	(<string.h>): Include if HAVE_STRING_H, not if STDC_HEADERS.	(<strings.h>): Include if !HAVE_STRING_H.	(<unistd.h>): Do not include.	(<dirent.h>): Redo include as per current autoconf standards.	(<limits.h>): Include if HAVE_LIMITS_H. Define CHAR_BIT if not defined.	(NLENGTH): Now returns size_t.	(CLOSEDIR, INT_STRLEN_BOUND): New macros.	(ISDIGIT): Use faster method.	(find_backup_file_name): No longer depends on NODIR.	Remove redundant code.	(make_version_name): Remove; do it more portably.	(max_backup_version): Args are now const *.	(version_number): Simplify digit checking.	(basename, concat, dirname): Remove.	(argmatch, invalid_arg): Move to argmatch.c.  Simplify test for	ambiguous args.  When reporting an error, use program_name not "patch".	(addext): Move to addext.c.  Treat all negative values from pathconf	like -1.  Always use long extension if it fits, even if the filesystem	does not support long file names.	(backup_types): Now const.	* common.h, inp.h (XTERN): Renamed from EXT to avoid collision	with errno.h reserved name space.	* common.h (DEBUGGING): Now an integer; default is 1.	(enum diff): New type.	(diff_type): Use it instead of small integers.	(CONTEXT_DIFF, NORMAL_DIFF, ED_DIFF, NEW_CONTEXT_DIFF, UNI_DIFF):	Now enumerated values instead of macros.	(NO_DIFF): New enumerated value (used instead of 0).	(volatile): Default to the empty string if __STDC__ is not defined.	(<signal.h>): Do not include.	(Chmod, Close, Fclose, Fflush, Fputc, Signal, Sprintf, Strcat,	Strcpy, Unlink, Write): Remove these macros; casts to void are	not needed for GNU coding standards.	(INITHUNKMAX): Move to pch.c.	(malloc, realloc, INT_MIN, MAXLINELEN, strNE, strnNE,	Reg1, Reg2, Reg3, Reg4, Reg5, Reg6, Reg7, Reg8, Reg9, Reg10, Reg11,	Reg12, Reg13, Reg14, Reg15, Reg16): Remove these macros.	(S_IXOTH, S_IWOTH, S_IROTH, S_IXGRP, S_IWGRP,	S_IRGRP, S_IXUSR, S_IWUSR, S_IRUSR, O_RDONLY, O_RDWR):	Define these macros, if not defined.	(CTYPE_DOMAIN, ISLOWER, ISSPACE, ISDIGIT, PARAMS): New macros.	(instat): Renamed from filestat; used for input file now.	(bufsize, using_plan_a, debug, strippath): Not statically initialized.	(debug): #define to 0 if not DEBUGGING, so that users of `debug'	no longer need to be surrounded by `#if DEBUGGING'.	(out_of_mem, filec, filearg, outname, toutkeep, trejkeep): Remove.	(inname, inerrno, dry_run, origbase): New variables.	(origprae): Now const*.	(TMPOUTNAME, TMPINNAME, TMPPATNAME): Now const*volatile.	(verbosity): New variable; subsumes `verbose'.	(DEFAULT_VERBOSITY, SILENT, VERBOSE): Values in a new enum.	(verbose): Removed.	(VOID): Use `#ifdef __STDC__' instead of`#if __STDC__',	for consistency elsewhere.	(__attribute__): New macro (empty if not a recent GCC).	(fatal_exit): Renamed from my_exit.	(errno): Don't define if STDC_HEADERS.	(<string.h>): Include if either STDC_HEADERS or HAVE_STRING_H.	(memcmp, memcpy): Define if !STDC_HEADERS && !HAVE_STRING_H	&& !HAVE_MEMCHR.	(<stdlib.h>): Include if HAVE_STDLIB_H, not if STDC_HEADERS.	(atol, getenv, malloc, realloc, lseek): Declare only if not defined	as a macro.	(popen, strcpy, strcat, mktemp): Do not declare.	(lseek): Declare to yield off_t, not long.	(<fcntl.h>): Include only if HAVE_FCNTL_H.	* inp.h (get_input_file): New decl.	* inp.c (SCCSPREFIX, GET, GET_LOCKED, SCCSDIFF, RCSSUFFIX, CHECKOUT,	CHECKOUT_LOCKED, RCSDIFF): Moved here from common.h.	(i_ptr): Now char const **.	(i_size): Remove.	(TIBUFSIZE_MINIMUM): Define only if not already defined.	(plan_a, plan_b): Arg is now const *.	(report_revision): Declare before use.  It's now the caller's	responsibility to test whether revision is 0.	(scan_input, report_revision, get_input_file):	Be less chatty unless --verbose.	(get_input_file): New function, split off from plan_a.	Reuse file status gotten by pch if possible.  Allow for dry run.	Use POSIX bits for creat, not number.  Check for creation and	close failure, and use fstat not stat.  Use memcpy not strncpy.	(plan_a): Rewrite for speed.	Caller now assigns result to using_plan_a.	Don't bother reading empty files; during dry runs they might not exist.	Use ISSPACE, not isspace.	(plan_b): Allow for dry runs.  Use ISSPACE, and handle sign extension	correctly on arg.  Use POSIX symbol for open arg.	* patch.c (backup, output, patchname, program_name): New vars.	(last_frozen_line): Moved here from inp.h.	(TMPREJNAME): Moved here from common.h.	(optind_last): Removed.	(do_defines, if_defined, not_defined, else_defined, end_defined):	Now char const.  Prepend with \n (except for not_defined) to	allow for files ending in non-newline.	(Argv): Now char*const*.	(main, get_some_switches): Exit status 0 means success,	1 means hunks were rejected, 2 means trouble.	(main, locate_hunk, patch_match): Keep track of patch prefix context	separately from suffix context; this fixes several bugs.	(main): Initialize bufsize, strippath.	Be less chatty unless --verbose.	No more NODIR; always have version control available.	Require environment variables to be nonempty to have effect.	Add support for --dry-run, --output, --verbose.	Invoke get_input_file first, before deciding among do_ed_script,	plan_a, or plan_b.	Clear ofp after closing it, to keep discipline that ofp is either	0 or open, to avoid file descriptor leaks.  Conversely, rejfp doesn't	need this trick since static analysis is enough to show when it	needs to be closed.	Don't allow file-creation patches to be applied to existing files.	Misordered hunks are now not fatal errors; just go on to the next file.	It's a fatal error to fall back on plan B when --output is given,	since the moving hand has writ.	Add support for binary files.	Check for I/O errors.	chmod output file ourselves, rather than letting move_file do it;	this saves global state.	Use better grammar when outputting hunks messages, e.g. avoid	`1 hunks'.	(main, reinitialize_almost_everything):	Remove support for multiple file arguments.	Move get_some_switches call from reinitialize_almost_everything	to main.	(reinitialize_almost_everything): No need to reinitialize things	that are no longer global variables, e.g. outname.	(shortopts): Remove leading "-"; it's no longer important to	return options and arguments in order.  '-b' no longer takes operand.	-p's operand is no longer optional.  Add -i, -Y, -z.  Remove -S.	(longopts): --suffix is now pared with -z, not -b.  --backup now	means -b.  Add --input, --basename-prefix, --dry-run, --verbose.	Remove --skip.  --strip's operand is now required.	(option_help): New variable.  Use style of current coding standards.	Change to match current option set.	(usage): Use it.	(get_some_switches): Get all switches, since `+' is defunct.	New options -i, -Y, -z, --verbose, --dry-run.	Option -S removed.	-b now means backup (backup_type == simple), not simple_backup_suffix.	-B now implies backup, and requires nonempty operand.	-D no longer requires first char of argument to be an identifier.	`-o -' is now disallowed (formerly output to regular file named "-").	-p operand is now required.	-v no longer needs to cleanup (no temp files can exist at that point).	-V now implies backup.	Set inname, patchname from file name arguments, if any;	do not set filearg.  It's now an error if extra operands are given.	(abort_junk): Check for write errors in reject file.	(apply_hunk, copy_till): Return error flag, so that failure to apply	out-of-order hunk is no longer fatal.	(apply_hunk): New arg after_newline,	for patching files not ending in newline.	Cache ofp for speed.  Check for write errors.	(OUTSIDE, IN_IFNDEF, IN_IFDEF, IN_ELSE): Now part of an enumerated type	instead of being #defined to small integers.	Change while-do to do-while when copying !-part for R_do_defines,	since condition is always true the first time through the loop.	(init_output, init_reject): Arg is now const *.	(copy_till, spew_output): Do not insert ``missing'' newlines;	propagate them via new after_newline argument.	(spew_output): Nothing to copy if last_frozen_line == input lines.	Do not close (ofp) if it's null.	(dump_line): Remove.	(similar): Ignore presence or absence of trailing newlines.	Check for only ' ' or '\t', not isspace (as per POSIX.2).	(make_temp): Use tmpnam if mktemp is not available.	(cleanup): New function.	(fatal_exit): Use it.  Renamed from my_exit.	Take signal to exit with, not exit status (which is now always 2).	* pch.h, pch.c (pch_prefix_context, pch_suffix_context):	New fns replacing pch_context.	(another_hunk): Now yields int, not bool; -1 means out of memory.	Now takes difftype as argument.	(pch_write_line): Now returns boolean indicating whether we're after	a newline just after the write, for supporting non-text files.	* pch.c (isdigit): Remove; use ISDIGIT instead.	(INITHUNKMAX): Moved here from common.h.	(p_context): Removed.  We need to keep track of the pre- and post-	context separately, in:	(p_prefix_context, p_suffix_context): New variables.	(bestguess): Remove.	(open_patch_file): Arg is now char const *.	Copy file a buffer at a time, not a char at a time, for speed.	(grow_hunkmax): Now returns success indicator.	(there_is_another_patch, skip_to, another_hunk, do_ed_script):	Be less chatty unless --verbose.	(there_is_another_patch):	Avoid infinite loop if user input keeps yielding EOF.	(intuit_diff_type): New returns enum diff, not int.	Strip paths as they're being fetched.	Set ok_to_create_file correctly even if patch is reversed.	Set up file names correctly with unidiff output.	Use algorithm specified by POSIX 1003.2b/D11 to deduce	name of file to patch, with the exception of patches	that can create files.	(skip_to): Be verbose if !inname, since we're about to ask the	user for a file name and the context will help the user choose.	(another_hunk): Keep context as LINENUM, not int.	If the replacement is missing, calculate its context correctly.	Don't assume input ends in newline.	Keep track of patch prefix context separately from suffix context;	this fixes several bugs.	Don't assume blank lines got chopped if the replacement is missing.	Report poorly-formed hunks instead of aborting.	Do not use strcpy on overlapping strings; it's not portable.	Work even if lines are incomplete.	Fix bugs associated with context-less context hunks,	particularly when patching in reverse.	(pget_line): Now takes just 1 arg; instead of second arg,	just examine using_plan_a global.  Return -1 if we ran out	of memory.	(do_ed_script): Now takes output FILE * argument.	Take name of editor from ED_PROGRAM instead of hardwiring /bin/ed.	Don't bother unlinking TMPOUTNAME.	Check for popen failure.	Flush pipe to check for output errors.	If ofp is nonzero, copy result to it, instead of trying to	move the result.	* util.h, util.c (say1, say2, say3, say4, fatal1, fatal2, fatal3,	fatal4, pfatal1, pfatal2, pfatal3, pfatal4, ask1, ask2, ask3, ask4):	Remove; replaced with following.	(ask, say, fatal, pfatal): New stdarg functions.	(fetchname): Remove last, `assume_exists' parameter.	(savebuf, savestr, move_file, copy_file): Args are now const *.	(exit_with_signal): New function, for proper process status if	a signal is received as per POSIX.2.	(basename): Rename to `base_name' and move to backupfile.	* util.c (<signal.h>): Include here, not in common.h.	(vararg_start): New macro.	(va_dcl, va_start, va_arg, va_end): Define if neither <stdarg.h>	nor <varargs.h> are available.	(SIGCHLD): Define to SIGCLD if SIGCLD is defined and	SIGCHLD isn't.	(private_strerror): Remove.	(move_file): Remove option of moving to stdout.	Add support for -Y, -z.	Don't assume chars in file name are nonnegative.	Use copy_file if rename fails due to EXDEV;	report failure if rename fails for any other reason.	(copy_file, makedirs): Use POSIX symbols for permissions.	(copy_file): Open source before destination.	(remove_prefix): New function.	(vfprintf): New function, if !HAVE_VPRINTF.	(afatal, apfatal, zfatal, zpfatal, errnum): Remove.	(fatal, pfatal, say): New functions that use stdarg.	All callers changed.	(zask): Renamed from `ask'.  Now uses stdarg.  Output to stdout,	and read from /dev/tty, or if that cannot be opened, from	stderr, stdout, stdin, whichever is first a tty.	Print "EOF" when an EOF is read.  Do not echo input.	(sigs): New array.	(sigset_t, sigemptyset, sigmask, sigaddset, sigismember, SIG_BLOCK,	SIG_UNBLOCK, SIG_SETMASK, sigprocmask, sigblock, sigsetmask):	Define substitutes if not available.	(initial_signal_mask, signals_to_block): New vars.	(fatal_exit_handler): New function, if !HAVE_SIGACTION.	(set_signals, ignore_signals): Use sigaction and sigprocmask style	signal-handling if possible; it doesn't lose signals.	(set_signals): Default SIGCHLD to work around SysV fork+wait bug.	(mkdir): First arg is now const *.	(makedirs): Handle multiple adjacent slashes correctly.	(fetchname): Do not worry about whether the file exists	(that is now the caller's responsibility).	Treat a sequence of one or more slashes like one slash.	Do not unstrip leading directories if they all exist and if	no -p option was given; POSIX doesn't allow this.	(memcmp): Remove (now a macro in common.h).	* version.c (copyright_string, free_software_msgid, authorship_msgid):	New constants.	(version): Use them.  Use program_name instead of hardwiring it.	* patch.man: Generate date from RCS Id.	Rewrite to match the above changes.Fri Jul 30 02:02:51 1993  Paul Eggert  (eggert@twinsun.com)	* configure.in (AC_HAVE_FUNCS): Add mkdir.	* common.h (Chmod, Fputc, Write, VOID): New macros.	(malloc, realloc): Yield `VOID *', not `char *'.	* util.h (makedirs): Omit `striplast' argument.  Remove `aask'.	* inp.c (plan_a): Remove fixed internal buffer.  Remove lint.	* util.c (set_signals, ignore_signals): Trap SIGTERM, too.	(makedirs): Removed fixed internal buffer.  Omit `striplast' argument.	(mkdir): New function, if !HAVE_MKDIR.	(fetchname): Remove fixed internal buffer.	Remove lint from various functions.	* patch.c, pch.c: Remove lint.Thu Jul 29 20:52:07 1993  David J. MacKenzie  (djm@wookumz.gnu.ai.mit.edu)	* Makefile.in (config.status): Run config.status --recheck, not	configure, to get the right args passed.Thu Jul 29 07:46:16 1993  Paul Eggert  (eggert@twinsun.com)	* The following changes remove all remaining fixed limits on memory,	and fix bugs in patch's handling of null bytes and files that do not	end in newline.  `Patch' now works on binary files.	* backupfile.c (find_backup_file_name): Don't dump core if malloc fails.	* EXTERN.h, INTERN.h (EXITING): New macro.	* backupfile.[ch], patch.c, pch.c: Add PARAMS to function declarations.	* common.h (bool): Change to int, so ANSI C prototype promotion works.	(CANVARARG): Remove varargs hack; it wasn't portable.	(filearg): Now a pointer, not an array, so that it can be reallocated.	(GET*, SCCSDIFF, CHECKOUT*, RCSDIFF): Quote operands to commands.	(my_exit): Declare here.	(BUFFERSIZE, Ctl, filemode, Fseek, Fstat, Lseek, MAXFILEC, MAXHUNKSIZE,	Mktemp, myuid, Null, Nullch, Null

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?