diff options
Diffstat (limited to 'lib/cycle-check.h')
-rw-r--r-- | lib/cycle-check.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/cycle-check.h b/lib/cycle-check.h new file mode 100644 index 000000000..6f8c55d5d --- /dev/null +++ b/lib/cycle-check.h @@ -0,0 +1,33 @@ +#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> + + #if HAVE_STDBOOL_H + # include <stdbool.h> + #else + typedef enum {false = 0, true = 1} bool; + #endif + + so that the proper identifiers are all declared. */ + +# include "dev-ino.h" + +struct cycle_check_state +{ + struct dev_ino dev_ino; + size_t chdir_counter; + long unsigned int magic; +}; + +void cycle_check_init (struct cycle_check_state *state); +bool cycle_check (struct cycle_check_state *state, struct stat const *sb); + +#endif |