diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2004-07-28 00:31:14 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2004-07-28 00:31:14 +0000 |
commit | 6cb7a76f8e927844be91e30f172e85f2735b848a (patch) | |
tree | 6999cfdea6028e2e2d565f63650a602f934f0a07 /lib | |
parent | 62ce2087cb983e60c4bd9bf7741b2f3e8e69b0c4 (diff) | |
download | coreutils-6cb7a76f8e927844be91e30f172e85f2735b848a.tar.xz |
Remove now-inaccurate comment about the files
you need to include first. You don't need to include any files
other than the usual config.h.
Include <inttypes.h> and <stdint.h> if available, for uintmax_t.
Remove 'struct stat;' not needed since we know sys/stat.h has
been included by dev-ino.h.
(struct cycle_check_state): Change chdir_counter to uintmax_t,
not size_t, since it isn't limited by object sizes.
Change magic from long unsigned int to int; that's good enough
for our use.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cycle-check.h | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/lib/cycle-check.h b/lib/cycle-check.h index 76cf104ab..8c50c30ea 100644 --- a/lib/cycle-check.h +++ b/lib/cycle-check.h @@ -1,29 +1,20 @@ #ifndef CYCLE_CHECK_H # define CYCLE_CHECK_H 1 -/* Before including this file, you need something like the following: - - #if HAVE_CONFIG_H - # include <config.h> - #endif - - #include <sys/types.h> - #include <sys/stat.h> - - #include <stdbool.h> - - so that the proper identifiers are all declared. */ - +# if HAVE_INTTYPES_H +# include <inttypes.h> +# endif +# if HAVE_STDINT_H +# include <stdint.h> +# endif # include <stdbool.h> # include "dev-ino.h" -struct stat; - struct cycle_check_state { struct dev_ino dev_ino; - size_t chdir_counter; - long unsigned int magic; + uintmax_t chdir_counter; + int magic; }; void cycle_check_init (struct cycle_check_state *state); |