mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
common: Prefix the mkdir functions with gnupg_. Make args const.
* common/mkdir_p.h (mkdir_p): Rename from this... (gnupg_mkdir_p): ... to this. Change directory_component's type from char * to const char *. (amkdir_p): Rename from this... (gnupg_amkdir_p): ... to this. Change directory_component's type from char * to const char *. * common/mkdir_p.c (mkdir_p): Rename from this... (gnupg_mkdir_p): ... to this. Change directory_component's type from char * to const char *. (amkdir_p): Rename from this... (gnupg_amkdir_p): ... to this. Change directory_component's type from char * to const char *. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>.
This commit is contained in:
parent
3de5ef7598
commit
93e855553e
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
|
|
||||||
gpg_error_t
|
gpg_error_t
|
||||||
amkdir_p (char **directory_components)
|
gnupg_amkdir_p (const char **directory_components)
|
||||||
{
|
{
|
||||||
gpg_error_t err = 0;
|
gpg_error_t err = 0;
|
||||||
int count;
|
int count;
|
||||||
@ -138,7 +138,7 @@ amkdir_p (char **directory_components)
|
|||||||
|
|
||||||
|
|
||||||
gpg_error_t
|
gpg_error_t
|
||||||
mkdir_p (char *directory_component, ...)
|
gnupg_mkdir_p (const char *directory_component, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
gpg_error_t err = 0;
|
gpg_error_t err = 0;
|
||||||
@ -174,7 +174,7 @@ mkdir_p (char *directory_component, ...)
|
|||||||
va_end (ap);
|
va_end (ap);
|
||||||
|
|
||||||
if (!err)
|
if (!err)
|
||||||
err = amkdir_p (dirs);
|
err = gnupg_amkdir_p (dirs);
|
||||||
|
|
||||||
xfree (dirs);
|
xfree (dirs);
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
first try to create the directory "foo/bar" and then the directory
|
first try to create the directory "foo/bar" and then the directory
|
||||||
"foo/bar/xyzzy". On success returns 0, otherwise an error code is
|
"foo/bar/xyzzy". On success returns 0, otherwise an error code is
|
||||||
returned. */
|
returned. */
|
||||||
gpg_error_t mkdir_p (char *directory_component, ...) GPGRT_ATTR_SENTINEL(0);
|
gpg_error_t gnupg_mkdir_p (const char *directory_component, ...) GPGRT_ATTR_SENTINEL(0);
|
||||||
|
|
||||||
/* Like mkdir_p, but DIRECTORY_COMPONENTS is a NULL terminated
|
/* Like mkdir_p, but DIRECTORY_COMPONENTS is a NULL terminated
|
||||||
array, e.g.:
|
array, e.g.:
|
||||||
@ -47,6 +47,6 @@ gpg_error_t mkdir_p (char *directory_component, ...) GPGRT_ATTR_SENTINEL(0);
|
|||||||
char **dirs = { "foo", "bar", NULL };
|
char **dirs = { "foo", "bar", NULL };
|
||||||
amkdir_p (dirs);
|
amkdir_p (dirs);
|
||||||
*/
|
*/
|
||||||
gpg_error_t amkdir_p (char **directory_components);
|
gpg_error_t gnupg_amkdir_p (const char **directory_components);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user