… | |
… | |
17 | #include <sys/socket.h> |
17 | #include <sys/socket.h> |
18 | #include <sys/stat.h> |
18 | #include <sys/stat.h> |
19 | #include <limits.h> |
19 | #include <limits.h> |
20 | #include <fcntl.h> |
20 | #include <fcntl.h> |
21 | #include <sched.h> |
21 | #include <sched.h> |
|
|
22 | |
|
|
23 | #if HAVE_SYS_MKDEV_H |
|
|
24 | # include <sys/mkdev.h> |
|
|
25 | #elif HAVE_SYS_SYSMACROS_H |
|
|
26 | # include <sys/sysmacros.h> |
|
|
27 | #endif |
22 | |
28 | |
23 | #if _POSIX_MEMLOCK || _POSIX_MEMLOCK_RANGE || _POSIX_MAPPED_FILES |
29 | #if _POSIX_MEMLOCK || _POSIX_MEMLOCK_RANGE || _POSIX_MAPPED_FILES |
24 | # include <sys/mman.h> |
30 | # include <sys/mman.h> |
25 | #endif |
31 | #endif |
26 | |
32 | |
… | |
… | |
188 | #endif |
194 | #endif |
189 | #ifndef minor |
195 | #ifndef minor |
190 | # define minor(dev) ((dev) & 0xff) |
196 | # define minor(dev) ((dev) & 0xff) |
191 | #endif |
197 | #endif |
192 | |
198 | |
|
|
199 | /* solaris has a non-posix/unix compliant PAGESIZE that breaks compilation */ |
|
|
200 | #ifdef __sun |
|
|
201 | # undef PAGESIZE |
|
|
202 | #endif |
|
|
203 | |
193 | #if PAGESIZE <= 0 |
204 | #if PAGESIZE <= 0 |
194 | # define PAGESIZE sysconf (_SC_PAGESIZE) |
205 | # define PAGESIZE sysconf (_SC_PAGESIZE) |
195 | #endif |
206 | #endif |
196 | |
207 | |
197 | /*****************************************************************************/ |
208 | /*****************************************************************************/ |
… | |
… | |
1628 | |
1639 | |
1629 | REQ_SEND; |
1640 | REQ_SEND; |
1630 | } |
1641 | } |
1631 | |
1642 | |
1632 | void |
1643 | void |
1633 | stat_xtime () |
1644 | st_xtime () |
1634 | ALIAS: |
1645 | ALIAS: |
1635 | stat_atime = 1 |
1646 | st_atime = 1 |
1636 | stat_mtime = 2 |
1647 | st_mtime = 2 |
1637 | stat_ctime = 4 |
1648 | st_ctime = 4 |
1638 | stat_xtime = 7 |
1649 | st_xtime = 7 |
1639 | PPCODE: |
1650 | PPCODE: |
1640 | EXTEND (SP, 3); |
1651 | EXTEND (SP, 3); |
1641 | if (ix & 1) PUSHs (newSVnv (PL_statcache.st_atime + 1e-9 * ATIMENSEC)); |
1652 | if (ix & 1) PUSHs (newSVnv (PL_statcache.st_atime + 1e-9 * ATIMENSEC)); |
1642 | if (ix & 2) PUSHs (newSVnv (PL_statcache.st_mtime + 1e-9 * MTIMENSEC)); |
1653 | if (ix & 2) PUSHs (newSVnv (PL_statcache.st_mtime + 1e-9 * MTIMENSEC)); |
1643 | if (ix & 4) PUSHs (newSVnv (PL_statcache.st_ctime + 1e-9 * CTIMENSEC)); |
1654 | if (ix & 4) PUSHs (newSVnv (PL_statcache.st_ctime + 1e-9 * CTIMENSEC)); |
1644 | |
1655 | |
1645 | void |
1656 | void |
1646 | stat_xtimensec () |
1657 | st_xtimensec () |
1647 | ALIAS: |
1658 | ALIAS: |
1648 | stat_atimensec = 1 |
1659 | st_atimensec = 1 |
1649 | stat_mtimensec = 2 |
1660 | st_mtimensec = 2 |
1650 | stat_ctimensec = 4 |
1661 | st_ctimensec = 4 |
1651 | stat_xtimensec = 7 |
1662 | st_xtimensec = 7 |
1652 | PPCODE: |
1663 | PPCODE: |
1653 | EXTEND (SP, 3); |
1664 | EXTEND (SP, 3); |
1654 | if (ix & 1) PUSHs (newSViv (ATIMENSEC)); |
1665 | if (ix & 1) PUSHs (newSViv (ATIMENSEC)); |
1655 | if (ix & 2) PUSHs (newSViv (MTIMENSEC)); |
1666 | if (ix & 2) PUSHs (newSViv (MTIMENSEC)); |
1656 | if (ix & 4) PUSHs (newSViv (CTIMENSEC)); |
1667 | if (ix & 4) PUSHs (newSViv (CTIMENSEC)); |