# define uintptr_t unsigned long
#endif
+#if !GNULIB_FCNTL_SAFER
+/* The results of open() in this file are not used with fchdir,
+ therefore save some unnecessary work in fchdir.c. */
+# undef open
+# undef close
+#endif
+
/* The use of 'volatile' in the types below (and ISO C 99 section 5.1.2.3.(5))
ensure that while constructing or modifying the data structures, the field
size_t old_allocated = cleanup_list.tempdir_allocated;
size_t new_allocated = 2 * cleanup_list.tempdir_allocated + 1;
struct tempdir * volatile *new_array =
- (struct tempdir * volatile *)
- xmalloc (new_allocated * sizeof (struct tempdir * volatile));
+ XNMALLOC (new_allocated, struct tempdir * volatile);
if (old_allocated == 0)
/* First use of this facility. Register the cleanup handler. */
}
/* Initialize a 'struct tempdir'. */
- tmpdir = (struct tempdir *) xmalloc (sizeof (struct tempdir));
+ tmpdir = XMALLOC (struct tempdir);
tmpdir->dirname = NULL;
tmpdir->cleanup_verbose = cleanup_verbose;
tmpdir->subdirs = gl_list_create_empty (GL_LINKEDHASH_LIST,