-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor adjustments for increased mingw64 compat
... but far away from complete / working
- Loading branch information
Showing
3 changed files
with
20 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
/* Temporary directories and temporary files with automatic cleanup. | ||
Copyright (C) 2006, 2011-2021 Free Software Foundation, Inc. | ||
Copyright (C) 2006, 2011-2022 Free Software Foundation, Inc. | ||
Written by Bruno Haible <[email protected]>, 2006. | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 3 of the License, or | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
|
@@ -78,6 +78,11 @@ struct temp_dir | |
/* More fields are present here, but not public. */ | ||
}; | ||
|
||
/* Remove all registered files and subdirectories inside DIR and DIR itself. | ||
DIR cannot be used any more after this call. | ||
Return 0 upon success, or -1 if there was some problem. */ | ||
extern int cleanup_temp_dir (struct temp_dir *dir); | ||
|
||
/* Create a temporary directory. | ||
PREFIX is used as a prefix for the name of the temporary directory. It | ||
should be short and still give an indication about the program. | ||
|
@@ -89,7 +94,8 @@ struct temp_dir | |
is shown and NULL is returned. */ | ||
extern struct temp_dir * create_temp_dir (const char *prefix, | ||
const char *parentdir, | ||
bool cleanup_verbose); | ||
bool cleanup_verbose) | ||
_GL_ATTRIBUTE_DEALLOC (cleanup_temp_dir, 1); | ||
|
||
/* Register the given ABSOLUTE_FILE_NAME as being a file inside DIR, that | ||
needs to be removed before DIR can be removed. | ||
|
@@ -130,12 +136,9 @@ extern int cleanup_temp_subdir (struct temp_dir *dir, | |
Return 0 upon success, or -1 if there was some problem. */ | ||
extern int cleanup_temp_dir_contents (struct temp_dir *dir); | ||
|
||
/* Remove all registered files and subdirectories inside DIR and DIR itself. | ||
DIR cannot be used any more after this call. | ||
Return 0 upon success, or -1 if there was some problem. */ | ||
extern int cleanup_temp_dir (struct temp_dir *dir); | ||
|
||
#if !defined (__GNUC__) && !defined (__clang__) | ||
typedef int mode_t; | ||
#endif | ||
|
||
/* ================== Opening and closing temporary files ================== */ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters