From: Gurusamy Sarathy Date: Thu, 2 Jul 1998 16:33:53 +0000 (+0000) Subject: export opendir() set of functions on win32 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ce2e26e5241106fdc6be13dce6382284ae195152;p=p5sagit%2Fp5-mst-13.2.git export opendir() set of functions on win32 p4raw-id: //depot/perl@1273 --- diff --git a/win32/include/dirent.h b/win32/include/dirent.h index 8cc7e11..be363ce 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 d3a5196..6592e46 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 68b6bb8..03552de 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 6f4444e..b22a187 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