[libcpp] struct deps renaming

https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00199.html
	libcpp/
	* include/mkdeps.h: Rename struct deps to struct mkdeps.
	* mkdeps.c: Likewise.
	* include/cpplib.h (cpp_get_deps): Rename return type..
	* directives.c (cpp_get_deps): Likewise.
	* internal.h (struct cpp_reader): Rename deps field type.

	gcc/c-family/
	* c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.

From-SVN: r270905
This commit is contained in:
Nathan Sidwell
2019-05-06 11:34:47 +00:00
committed by Nathan Sidwell
parent 1b5e2d7b90
commit b744fc85f5
8 changed files with 41 additions and 32 deletions
+1 -1
View File
@@ -953,7 +953,7 @@ extern void cpp_set_include_chains (cpp_reader *, cpp_dir *, cpp_dir *, int);
extern cpp_options *cpp_get_options (cpp_reader *);
extern cpp_callbacks *cpp_get_callbacks (cpp_reader *);
extern void cpp_set_callbacks (cpp_reader *, cpp_callbacks *);
extern struct deps *cpp_get_deps (cpp_reader *);
extern struct mkdeps *cpp_get_deps (cpp_reader *);
/* This function reads the file, but does not start preprocessing. It
returns the name of the original file; this is the same as the
+11 -11
View File
@@ -26,54 +26,54 @@ along with this program; see the file COPYING3. If not see
/* This is the data structure used by all the functions in mkdeps.c.
It's quite straightforward, but should be treated as opaque. */
struct deps;
struct mkdeps;
/* Create a deps buffer. */
extern struct deps *deps_init (void);
extern struct mkdeps *deps_init (void);
/* Destroy a deps buffer. */
extern void deps_free (struct deps *);
extern void deps_free (struct mkdeps *);
/* Add a set of "vpath" directories. The second argument is a colon-
separated list of pathnames, like you would set Make's VPATH
variable to. If a dependency or target name begins with any of
these pathnames (and the next path element is not "..") that
pathname is stripped off. */
extern void deps_add_vpath (struct deps *, const char *);
extern void deps_add_vpath (struct mkdeps *, const char *);
/* Add a target (appears on left side of the colon) to the deps list. Takes
a boolean indicating whether to quote the target for MAKE. */
extern void deps_add_target (struct deps *, const char *, int);
extern void deps_add_target (struct mkdeps *, const char *, int);
/* Sets the default target if none has been given already. An empty
string as the default target is interpreted as stdin. */
extern void deps_add_default_target (struct deps *, const char *);
extern void deps_add_default_target (struct mkdeps *, const char *);
/* Add a dependency (appears on the right side of the colon) to the
deps list. Dependencies will be printed in the order that they
were entered with this function. By convention, the first
dependency entered should be the primary source file. */
extern void deps_add_dep (struct deps *, const char *);
extern void deps_add_dep (struct mkdeps *, const char *);
/* Write out a deps buffer to a specified file. The third argument
is the number of columns to word-wrap at (0 means don't wrap). */
extern void deps_write (const struct deps *, FILE *, unsigned int);
extern void deps_write (const struct mkdeps *, FILE *, unsigned int);
/* Write out a deps buffer to a file, in a form that can be read back
with deps_restore. Returns nonzero on error, in which case the
error number will be in errno. */
extern int deps_save (struct deps *, FILE *);
extern int deps_save (struct mkdeps *, FILE *);
/* Read back dependency information written with deps_save into
the deps buffer. The third argument may be NULL, in which case
the dependency information is just skipped, or it may be a filename,
in which case that filename is skipped. */
extern int deps_restore (struct deps *, FILE *, const char *);
extern int deps_restore (struct mkdeps *, FILE *, const char *);
/* For each dependency *except the first*, emit a dummy rule for that
file, causing it to depend on nothing. This is used to work around
the intermediate-file deletion misfeature in Make, in some
automatic dependency schemes. */
extern void deps_phony_targets (const struct deps *, FILE *);
extern void deps_phony_targets (const struct mkdeps *, FILE *);
#endif /* ! LIBCPP_MKDEPS_H */