]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Remove now-inaccurate comment about the files
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 28 Jul 2004 00:31:14 +0000 (00:31 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 28 Jul 2004 00:31:14 +0000 (00:31 +0000)
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.

lib/cycle-check.h

index 76cf104ab3f305b800bcfe925b103509d5d3c05b..8c50c30eae6b967af09cf41696ac41b449773cbb 100644 (file)
@@ -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);