diff --git a/Configure b/Configure index 44c12ced40..7a13249caa 100755 --- a/Configure +++ b/Configure @@ -478,6 +478,7 @@ d_fd_set='' d_fds_bits='' d_fdclose='' d_fdim='' +d_fdopendir='' d_fegetround='' d_ffs='' d_ffsl='' @@ -13344,6 +13345,10 @@ esac set i_fcntl eval $setvar +: see if fdopendir exists +set fdopendir d_fdopendir +eval $inlibc + : see if fork exists set fork d_fork eval $inlibc @@ -25052,6 +25057,7 @@ d_flockproto='$d_flockproto' d_fma='$d_fma' d_fmax='$d_fmax' d_fmin='$d_fmin' +d_fdopendir='$d_fdopendir' d_fork='$d_fork' d_fp_class='$d_fp_class' d_fp_classify='$d_fp_classify' diff --git a/Cross/config.sh-arm-linux b/Cross/config.sh-arm-linux index bfa0b00d5f..9e05653919 100644 --- a/Cross/config.sh-arm-linux +++ b/Cross/config.sh-arm-linux @@ -212,6 +212,7 @@ d_fd_macros='define' d_fd_set='define' d_fdclose='undef' d_fdim='undef' +d_fdopendir=undef d_fds_bits='undef' d_fegetround='define' d_ffs='undef' diff --git a/Cross/config.sh-arm-linux-n770 b/Cross/config.sh-arm-linux-n770 index 47ad5c37e3..365e4c4f96 100644 --- a/Cross/config.sh-arm-linux-n770 +++ b/Cross/config.sh-arm-linux-n770 @@ -211,6 +211,7 @@ d_fd_macros='define' d_fd_set='define' d_fdclose='undef' d_fdim='undef' +d_fdopendir=undef d_fds_bits='undef' d_fegetround='define' d_ffs='undef' diff --git a/Porting/Glossary b/Porting/Glossary index bb505c653b..8b2965ca99 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -947,6 +947,11 @@ d_fmin (d_fmin.U): This variable conditionally defines the HAS_FMIN symbol, which indicates to the C program that the fmin() routine is available. +d_fdopendir (d_fdopendir.U): + This variable conditionally defines the HAS_FORK symbol, which + indicates that the fdopen routine is available to open a + directory descriptor. + d_fork (d_fork.U): This variable conditionally defines the HAS_FORK symbol, which indicates to the C program that the fork() routine is available. diff --git a/Porting/config.sh b/Porting/config.sh index a921f7e1c7..6231ea0f31 100644 --- a/Porting/config.sh +++ b/Porting/config.sh @@ -223,6 +223,7 @@ d_fd_macros='define' d_fd_set='define' d_fdclose='undef' d_fdim='define' +d_fdopendir='define' d_fds_bits='define' d_fegetround='define' d_ffs='define' diff --git a/config_h.SH b/config_h.SH index da0f2dbcd7..5a0f81cf20 100755 --- a/config_h.SH +++ b/config_h.SH @@ -142,6 +142,12 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_fcntl HAS_FCNTL /**/ +/* HAS_FDOPENDIR: + * This symbol, if defined, indicates that the fdopen routine is + * available to open a directory descriptor. + */ +#$d_fdopendir HAS_FDOPENDIR /**/ + /* HAS_FGETPOS: * This symbol, if defined, indicates that the fgetpos routine is * available to get the file position indicator, similar to ftell(). diff --git a/configure.com b/configure.com index 99527c180b..7c38711bb8 100644 --- a/configure.com +++ b/configure.com @@ -6010,6 +6010,7 @@ $ WC "d_fd_set='" + d_fd_set + "'" $ WC "d_fd_macros='define'" $ WC "d_fdclose='undef'" $ WC "d_fdim='" + d_fdim + "'" +$ WC "d_fdopendir='undef'" $ WC "d_fds_bits='define'" $ WC "d_fegetround='undef'" $ WC "d_ffs='undef'" diff --git a/plan9/config_sh.sample b/plan9/config_sh.sample index 636acbdf6d..246bad9544 100644 --- a/plan9/config_sh.sample +++ b/plan9/config_sh.sample @@ -212,6 +212,7 @@ d_fd_macros='undef' d_fd_set='undef' d_fdclose='undef' d_fdim='undef' +d_fdopendir=undef d_fds_bits='undef' d_fegetround='undef' d_ffs='undef' diff --git a/win32/config.gc b/win32/config.gc index f8776188c0..34aa8de6ed 100644 --- a/win32/config.gc +++ b/win32/config.gc @@ -199,6 +199,7 @@ d_fd_macros='define' d_fd_set='define' d_fdclose='undef' d_fdim='undef' +d_fdopendir='undef' d_fds_bits='define' d_fegetround='undef' d_ffs='undef' diff --git a/win32/config.vc b/win32/config.vc index 619979e22b..536085fe94 100644 --- a/win32/config.vc +++ b/win32/config.vc @@ -199,6 +199,7 @@ d_fd_macros='define' d_fd_set='define' d_fdclose='undef' d_fdim='undef' +d_fdopendir='undef' d_fds_bits='define' d_fegetround='undef' d_ffs='undef'