summaryrefslogtreecommitdiff
path: root/lib/cycle-check.h
blob: 5f2ad1dc17afcc11d8dc5ca73d29453b51382846 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#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.  */

# 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