]> sjero.net Git - wget/blobdiff - src/utils.h
[svn] Fix a possible race condition when opening files.
[wget] / src / utils.h
index 28976ff522c87e471c6b72188c3c949ea686f019..d22463edec3eb7f13d1aedf50dde8cf0001868d1 100644 (file)
@@ -45,7 +45,7 @@ struct hash_table;
 
 struct file_memory {
   char *content;
-  long length;
+  wgint length;
   int mmap_p;
 };
 
@@ -68,13 +68,22 @@ char **sepstring PARAMS ((const char *));
 int frontcmp PARAMS ((const char *, const char *));
 void fork_to_background PARAMS ((void));
 
+#ifdef HAVE_STDARG_H
+char *aprintf PARAMS ((const char *, ...))
+     GCC_FORMAT_ATTR (1, 2);
+#else  /* not HAVE_STDARG_H */
+char *aprintf ();
+#endif /* not HAVE_STDARG_H */
+
 void touch PARAMS ((const char *, time_t));
 int remove_link PARAMS ((const char *));
 int file_exists_p PARAMS ((const char *));
 int file_non_directory_p PARAMS ((const char *));
-long file_size PARAMS ((const char *));
+wgint file_size PARAMS ((const char *));
 int make_directory PARAMS ((const char *));
 char *unique_name PARAMS ((const char *, int));
+FILE *unique_create PARAMS ((const char *, int, char **));
+FILE *fopen_excl PARAMS ((const char *, int));
 char *file_merge PARAMS ((const char *, const char *));
 
 int acceptable PARAMS ((const char *));
@@ -102,10 +111,11 @@ int string_set_contains PARAMS ((struct hash_table *, const char *));
 void string_set_free PARAMS ((struct hash_table *));
 void free_keys_and_values PARAMS ((struct hash_table *));
 
-char *legible PARAMS ((long));
+char *legible PARAMS ((wgint));
 char *legible_large_int PARAMS ((LARGE_INT));
-int numdigit PARAMS ((long));
-char *number_to_string PARAMS ((char *, long));
+int numdigit PARAMS ((wgint));
+char *number_to_string PARAMS ((char *, wgint));
+char *number_to_static_string PARAMS ((wgint));
 
 struct wget_timer *wtimer_allocate PARAMS ((void));
 struct wget_timer *wtimer_new PARAMS ((void));