Cygwin: Allow to build without experimental AF_UNIX code by default

Introduce __WITH_AF_UNIX preprocessor flag to enable the new code

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2018-06-26 16:31:17 +02:00
parent 17918cc6a6
commit 6c55be9dbb
8 changed files with 36 additions and 1 deletions

View File

@@ -192,8 +192,12 @@ class path_conv
int is_fs_device () const {return isdevice () && is_fs_special ();}
int is_fs_special () const {return dev.is_fs_special ();}
int is_lnk_special () const {return is_fs_device () || isfifo () || is_lnk_symlink ();}
#ifdef __WITH_AF_UNIX
int issocket () const {return dev.is_device (FH_LOCAL)
|| dev.is_device (FH_UNIX);}
#else
int issocket () const {return dev.is_device (FH_LOCAL);}
#endif /* __WITH_AF_UNIX */
int iscygexec () const {return path_flags & PATH_CYGWIN_EXEC;}
int isopen () const {return path_flags & PATH_OPEN;}
int isctty_capable () const {return path_flags & PATH_CTTY;}