Make opendir() filename const in Win32-land & friends

That fact that it wasn't const already was highlighted by a warning
from pp_open_dir() generated by change 24743. Rather than undo the
const change in pp_open_dir(), this seems to make more sense. Hope I
haven't broken Netware or WinCE.

p4raw-id: //depot/perl@24974
This commit is contained in:
Steve Hay 2005-06-24 12:27:45 +00:00
parent 4184c77b77
commit 0e06f75d89
10 changed files with 11 additions and 11 deletions

View File

@ -567,7 +567,7 @@ nw_rmdir(const char *dir)
}
DIR *
nw_opendir(char *filename)
nw_opendir(const char *filename)
{
char *buff = NULL;
int len = 0;

View File

@ -961,7 +961,7 @@ PerlDirClose(struct IPerlDir* piPerl, DIR *dirp)
}
DIR*
PerlDirOpen(struct IPerlDir* piPerl, char *filename)
PerlDirOpen(struct IPerlDir* piPerl, const char *filename)
{
return nw_opendir(filename);
}

View File

@ -184,7 +184,7 @@ PerlDirClose(struct IPerlDir* piPerl, DIR *dirp)
}
DIR*
PerlDirOpen(struct IPerlDir* piPerl, char *filename)
PerlDirOpen(struct IPerlDir* piPerl, const char *filename)
{
return nw_opendir(filename);
}

View File

@ -366,7 +366,7 @@ typedef int (*LPMakedir)(struct IPerlDir*, const char*, int);
typedef int (*LPChdir)(struct IPerlDir*, const char*);
typedef int (*LPRmdir)(struct IPerlDir*, const char*);
typedef int (*LPDirClose)(struct IPerlDir*, DIR*);
typedef DIR* (*LPDirOpen)(struct IPerlDir*, char*);
typedef DIR* (*LPDirOpen)(struct IPerlDir*, const char*);
typedef struct direct* (*LPDirRead)(struct IPerlDir*, DIR*);
typedef void (*LPDirRewind)(struct IPerlDir*, DIR*);
typedef void (*LPDirSeek)(struct IPerlDir*, DIR*, long);

View File

@ -42,7 +42,7 @@ typedef struct _dir_struc
} DIR;
#if 0 /* these have moved to win32iop.h */
DIR * win32_opendir(char *filename);
DIR * win32_opendir(const char *filename);
struct direct * win32_readdir(DIR *dirp);
long win32_telldir(DIR *dirp);
void win32_seekdir(DIR *dirp,long loc);

View File

@ -1136,7 +1136,7 @@ PerlDirClose(struct IPerlDir* piPerl, DIR *dirp)
}
DIR*
PerlDirOpen(struct IPerlDir* piPerl, char *filename)
PerlDirOpen(struct IPerlDir* piPerl, const char *filename)
{
return win32_opendir(filename);
}

View File

@ -732,7 +732,7 @@ Perl_do_exec(pTHX_ char *cmd)
* return the pointer to the current file name.
*/
DllExport DIR *
win32_opendir(char *filename)
win32_opendir(const char *filename)
{
dTHX;
DIR *dirp;

View File

@ -117,7 +117,7 @@ DllExport int win32_open_osfhandle(intptr_t handle, int flags);
DllExport intptr_t win32_get_osfhandle(int fd);
DllExport FILE* win32_fdupopen(FILE *pf);
DllExport DIR* win32_opendir(char *filename);
DllExport DIR* win32_opendir(const char *filename);
DllExport struct direct* win32_readdir(DIR *dirp);
DllExport long win32_telldir(DIR *dirp);
DllExport void win32_seekdir(DIR *dirp, long loc);

View File

@ -1144,7 +1144,7 @@ PerlDirClose(struct IPerlDir* piPerl, DIR *dirp)
}
DIR*
PerlDirOpen(struct IPerlDir* piPerl, char *filename)
PerlDirOpen(struct IPerlDir* piPerl, const char *filename)
{
return win32_opendir(filename);
}

View File

@ -643,7 +643,7 @@ Perl_do_exec(pTHX_ char *cmd)
* return the pointer to the current file name.
*/
DllExport DIR *
win32_opendir(char *filename)
win32_opendir(const char *filename)
{
dTHX;
DIR *dirp;
@ -822,7 +822,7 @@ win32_closedir(DIR *dirp)
/////!!!!!!!!!!! return here and do right stuff!!!!
DllExport DIR *
win32_opendir(char *filename)
win32_opendir(const char *filename)
{
return opendir(filename);
}