summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-09-08 13:05:05 +0200
committerNicholas Clark <nick@ccl4.org>2011-09-13 11:28:08 +0200
commit7a0041190305e665f483121711d8335d568e2933 (patch)
tree2c4ffe353821a1a073e6d07d0d70d6089aacb585 /ext
parent2a59a32c567e75f15784d3cfd9afe9861f38dd15 (diff)
downloadperl-7a0041190305e665f483121711d8335d568e2933.tar.gz
Merge the implementations of 2 sets of POSIX functions.
Using ALIAS to merge POSIX::sig{pending,suspend} and POSIX::tc{flow,flush,sendbreak} reduces the size of POSIX.so by about 2K on this platform.
Diffstat (limited to 'ext')
-rw-r--r--ext/POSIX/POSIX.xs29
1 files changed, 14 insertions, 15 deletions
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index 764a9e53f9..50498eaaee 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -1515,6 +1515,12 @@ sigaction(sig, optaction, oldaction = 0)
SysRet
sigpending(sigset)
POSIX::SigSet sigset
+ ALIAS:
+ sigsuspend = 1
+ CODE:
+ RETVAL = ix ? sigsuspend(sigset) : sigpending(sigset);
+ OUTPUT:
+ RETVAL
SysRet
sigprocmask(how, sigset, oldsigset = 0)
@@ -1538,10 +1544,6 @@ INIT:
croak("oldsigset is not of type POSIX::SigSet");
}
-SysRet
-sigsuspend(signal_mask)
- POSIX::SigSet signal_mask
-
void
_exit(status)
int status
@@ -1802,17 +1804,14 @@ SysRet
tcflow(fd, action)
int fd
int action
-
-
-SysRet
-tcflush(fd, queue_selector)
- int fd
- int queue_selector
-
-SysRet
-tcsendbreak(fd, duration)
- int fd
- int duration
+ ALIAS:
+ tcflush = 1
+ tcsendbreak = 2
+ CODE:
+ RETVAL = ix == 1 ? tcflush(fd, action)
+ : (ix < 1 ? tcflow(fd, action) : tcsendbreak(fd, action));
+ OUTPUT:
+ RETVAL
char *
asctime(sec, min, hour, mday, mon, year, wday = 0, yday = 0, isdst = -1)