1
0
Fork 0
forked from len0rd/rockbox

Better POSIX compatibility for mkdir(), rmdir() and opendir()

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4521 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2004-04-20 10:15:39 +00:00
parent 6afe393706
commit 18d5d30c1c
3 changed files with 7 additions and 7 deletions

View file

@ -150,7 +150,7 @@ struct plugin_api {
int (*read_line)(int fd, char* buffer, int buffer_size); int (*read_line)(int fd, char* buffer, int buffer_size);
/* dir */ /* dir */
DIR* (*opendir)(char* name); DIR* (*opendir)(const char* name);
int (*closedir)(DIR* dir); int (*closedir)(DIR* dir);
struct dirent* (*readdir)(DIR* dir); struct dirent* (*readdir)(DIR* dir);

View file

@ -28,7 +28,7 @@
static DIR opendirs[MAX_OPEN_DIRS]; static DIR opendirs[MAX_OPEN_DIRS];
DIR* opendir(char* name) DIR* opendir(const char* name)
{ {
char namecopy[MAX_PATH]; char namecopy[MAX_PATH];
char* part; char* part;
@ -117,7 +117,7 @@ struct dirent* readdir(DIR* dir)
return theent; return theent;
} }
int mkdir(char *name, int mode) int mkdir(const char *name, int mode)
{ {
DIR *dir; DIR *dir;
char namecopy[MAX_PATH]; char namecopy[MAX_PATH];
@ -182,7 +182,7 @@ int mkdir(char *name, int mode)
return rc; return rc;
} }
int rmdir(char* name) int rmdir(const char* name)
{ {
int rc; int rc;
DIR* dir; DIR* dir;

View file

@ -71,10 +71,10 @@ typedef struct DIRtag
#ifndef DIRFUNCTIONS_DEFINED #ifndef DIRFUNCTIONS_DEFINED
extern DIR* opendir(char* name); extern DIR* opendir(const char* name);
extern int closedir(DIR* dir); extern int closedir(DIR* dir);
extern int mkdir(char* name, int mode); extern int mkdir(const char* name, int mode);
extern int rmdir(char* name); extern int rmdir(const char* name);
extern struct dirent* readdir(DIR* dir); extern struct dirent* readdir(DIR* dir);