1 #define PERL_NO_GET_CONTEXT
9 #if defined(__GNUC__) && defined(__cplusplus) && defined(WIN32)
13 #if defined(__GNUC__) && defined(__cplusplus) && defined(WIN32)
22 /* This comment is a kludge to get metaconfig to see the symbols
27 and include the appropriate metaconfig unit
28 so that Configure will test how to turn on non-blocking I/O
29 for a file descriptor. See config.h for how to use these
32 While I'm at it, I'll have metaconfig look for HAS_POLL too.
37 XS_Fcntl_S_ISREG(pTHX_ CV* cv)
42 /* Preserve the semantics of the perl code, which was:
43 sub S_ISREG { ( $_[0] & _S_IFMT() ) == S_IFREG() }
47 PERL_UNUSED_VAR(cv); /* -W */
56 PUSHs(((SvUV(mode) & S_IFMT) == (UV)ix) ? &PL_sv_yes : &PL_sv_no);
60 #include "const-c.inc"
62 MODULE = Fcntl PACKAGE = Fcntl
78 PUSHu(SvUV(mode) & 07777);
85 PUSHu(items ? (SvUV(ST(0)) & S_IFMT) : S_IFMT);
91 cv = newXS("Fcntl::S_ISREG", XS_Fcntl_S_ISREG, file);
92 XSANY.any_i32 = S_IFREG;
95 cv = newXS("Fcntl::S_ISDIR", XS_Fcntl_S_ISREG, file);
96 XSANY.any_i32 = S_IFDIR;
99 cv = newXS("Fcntl::S_ISLNK", XS_Fcntl_S_ISREG, file);
100 XSANY.any_i32 = S_IFLNK;
103 cv = newXS("Fcntl::S_ISSOCK", XS_Fcntl_S_ISREG, file);
104 XSANY.any_i32 = S_IFSOCK;
107 cv = newXS("Fcntl::S_ISBLK", XS_Fcntl_S_ISREG, file);
108 XSANY.any_i32 = S_IFBLK;
111 cv = newXS("Fcntl::S_ISCHR", XS_Fcntl_S_ISREG, file);
112 XSANY.any_i32 = S_IFCHR;
115 cv = newXS("Fcntl::S_ISFIFO", XS_Fcntl_S_ISREG, file);
116 XSANY.any_i32 = S_IFIFO;
119 cv = newXS("Fcntl::S_ISWHT", XS_Fcntl_S_ISREG, file);
120 XSANY.any_i32 = S_IFWHT;
123 cv = newXS("Fcntl::S_ISENFMT", XS_Fcntl_S_ISREG, file);
124 XSANY.any_i32 = S_ENFMT;