mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-11 22:54:02 +02:00
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.
24 lines
432 B
C
24 lines
432 B
C
#ifndef CYCLE_CHECK_H
|
|
# define CYCLE_CHECK_H 1
|
|
|
|
# if HAVE_INTTYPES_H
|
|
# include <inttypes.h>
|
|
# endif
|
|
# if HAVE_STDINT_H
|
|
# include <stdint.h>
|
|
# endif
|
|
# include <stdbool.h>
|
|
# include "dev-ino.h"
|
|
|
|
struct cycle_check_state
|
|
{
|
|
struct dev_ino dev_ino;
|
|
uintmax_t chdir_counter;
|
|
int magic;
|
|
};
|
|
|
|
void cycle_check_init (struct cycle_check_state *state);
|
|
bool cycle_check (struct cycle_check_state *state, struct stat const *sb);
|
|
|
|
#endif
|