diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-02 16:33:53 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-02 16:33:53 +0000 |
commit | ce2e26e5241106fdc6be13dce6382284ae195152 (patch) | |
tree | 6cb132c07464eeed06bc75221bbbaf9506725308 | |
parent | 6a0deba8537181f0c697c91c2e093de6e8388d91 (diff) | |
download | perl-ce2e26e5241106fdc6be13dce6382284ae195152.tar.gz |
export opendir() set of functions on win32
p4raw-id: //depot/perl@1273
-rw-r--r-- | win32/include/dirent.h | 12 | ||||
-rw-r--r-- | win32/makedef.pl | 6 | ||||
-rw-r--r-- | win32/win32.c | 12 | ||||
-rw-r--r-- | win32/win32iop.h | 7 |
4 files changed, 25 insertions, 12 deletions
diff --git a/win32/include/dirent.h b/win32/include/dirent.h index 8cc7e11479..be363ce804 100644 --- a/win32/include/dirent.h +++ b/win32/include/dirent.h @@ -38,12 +38,12 @@ typedef struct _dir_struc struct direct dirstr; // Directory structure to return } DIR; -DIR *opendir(char *filename); -struct direct *readdir(DIR *dirp); -long telldir(DIR *dirp); -void seekdir(DIR *dirp,long loc); -void rewinddir(DIR *dirp); -int closedir(DIR *dirp); +DIR * win32_opendir(char *filename); +struct direct * win32_readdir(DIR *dirp); +long win32_telldir(DIR *dirp); +void win32_seekdir(DIR *dirp,long loc); +void win32_rewinddir(DIR *dirp); +int win32_closedir(DIR *dirp); #endif //_INC_DIRENT diff --git a/win32/makedef.pl b/win32/makedef.pl index d3a5196d7a..6592e468ed 100644 --- a/win32/makedef.pl +++ b/win32/makedef.pl @@ -583,6 +583,12 @@ win32_wait win32_waitpid win32_kill win32_str_os_error +win32_opendir +win32_readdir +win32_telldir +win32_seekdir +win32_rewinddir +win32_closedir Perl_win32_init Perl_init_os_extras Perl_getTHR diff --git a/win32/win32.c b/win32/win32.c index 68b6bb8962..03552debbf 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -637,7 +637,7 @@ do_exec(char *cmd) * return the pointer to the current file name. */ DIR * -opendir(char *filename) +win32_opendir(char *filename) { DIR *p; long len; @@ -715,7 +715,7 @@ opendir(char *filename) * string pointer to the nDllExport entry. */ struct direct * -readdir(DIR *dirp) +win32_readdir(DIR *dirp) { int len; static int dummy = 0; @@ -743,7 +743,7 @@ readdir(DIR *dirp) /* Telldir returns the current string pointer position */ long -telldir(DIR *dirp) +win32_telldir(DIR *dirp) { return (long) dirp->curr; } @@ -753,21 +753,21 @@ telldir(DIR *dirp) *(Saved by telldir). */ void -seekdir(DIR *dirp, long loc) +win32_seekdir(DIR *dirp, long loc) { dirp->curr = (char *)loc; } /* Rewinddir resets the string pointer to the start */ void -rewinddir(DIR *dirp) +win32_rewinddir(DIR *dirp) { dirp->curr = dirp->start; } /* free the memory allocated by opendir */ int -closedir(DIR *dirp) +win32_closedir(DIR *dirp) { Safefree(dirp->start); Safefree(dirp); diff --git a/win32/win32iop.h b/win32/win32iop.h index 6f4444eb3b..b22a1870a9 100644 --- a/win32/win32iop.h +++ b/win32/win32iop.h @@ -262,6 +262,13 @@ END_EXTERN_C #define waitpid win32_waitpid #define kill win32_kill +#define opendir win32_opendir +#define readdir win32_readdir +#define telldir win32_telldir +#define seekdir win32_seekdir +#define rewinddir win32_rewinddir +#define closedir win32_closedir + #ifdef HAVE_DES_FCRYPT #undef crypt #define crypt win32_crypt |