diff options
Diffstat (limited to 'mcon/U/d_readdir.U')
-rw-r--r-- | mcon/U/d_readdir.U | 84 |
1 files changed, 70 insertions, 14 deletions
diff --git a/mcon/U/d_readdir.U b/mcon/U/d_readdir.U index 7003d14..535dd07 100644 --- a/mcon/U/d_readdir.U +++ b/mcon/U/d_readdir.U @@ -1,11 +1,11 @@ -?RCS: $Id: d_readdir.U 1 2006-08-24 12:32:52Z rmanfredi $ +?RCS: $Id: d_readdir.U 167 2013-05-08 17:58:00Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: -?RCS: You may redistribute only under the terms of the Artistic Licence, +?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of -?RCS: that same Artistic Licence; a copy of which may be found at the root +?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: d_readdir.U,v $ @@ -15,9 +15,7 @@ ?RCS: Revision 3.0 1993/08/18 12:06:52 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: -?X: Force checking for <dirent.h> inclusion -?X:INC: i_dirent -?MAKE:d_readdir d_seekdir d_telldir d_rewinddir: Inlibc +?MAKE:d_readdir d_seekdir d_telldir d_rewinddir: Trylink cat i_dirent ?MAKE: -pick add $@ %< ?S:d_readdir: ?S: This variable conditionally defines HAS_READDIR if readdir() is @@ -62,18 +60,76 @@ ?H:. ?LINT:set d_readdir d_seekdir d_telldir d_rewinddir : see if readdir and friends exist -set readdir d_readdir -eval $inlibc +$cat >try.c <<EOC +#$i_dirent I_DIRENT +#ifdef I_DIRENT +#include <dirent.h> +#endif +int main(void) +{ + static DIR *dir; + struct dirent *ret; + ret = readdir(dir); + return ret ? 0 : 1; +} +EOC +cyn=readdir +set d_readdir +eval $trylink + @if d_seekdir || HAS_SEEKDIR -set seekdir d_seekdir -eval $inlibc +$cat >try.c <<EOC +#$i_dirent I_DIRENT +#ifdef I_DIRENT +#include <dirent.h> +#endif +int main(void) +{ + static DIR *dir; + static long loc; + seekdir(dir, loc); + return 0; +} +EOC +cyn=seekdir +set d_seekdir +eval $trylink @end @if d_telldir || HAS_TELLDIR -set telldir d_telldir -eval $inlibc +$cat >try.c <<EOC +#$i_dirent I_DIRENT +#ifdef I_DIRENT +#include <dirent.h> +#endif +int main(void) +{ + static DIR *dir; + static long ret; + ret |= telldir(dir); + if (ret) + return 1; + return 0; +} +EOC +cyn=telldir +set d_telldir +eval $trylink @end @if d_rewinddir || HAS_REWINDDIR -set rewinddir d_rewinddir -eval $inlibc +$cat >try.c <<EOC +#$i_dirent I_DIRENT +#ifdef I_DIRENT +#include <dirent.h> +#endif +int main(void) +{ + static DIR *dir; + rewinddir(dir); + return 0; +} +EOC +cyn=rewinddir +set d_rewinddir +eval $trylink @end |