summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ffi.c9
-rw-r--r--stdlib/doc-syms.tl35
-rw-r--r--txr.12
3 files changed, 28 insertions, 18 deletions
diff --git a/ffi.c b/ffi.c
index f115b3b5..6cbfe8c8 100644
--- a/ffi.c
+++ b/ffi.c
@@ -44,6 +44,9 @@
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
+#if HAVE_SOCKETS
+#include <sys/socket.h>
+#endif
#if HAVE_MMAP
#include <sys/mman.h>
#include <unistd.h>
@@ -4669,6 +4672,12 @@ static void ffi_init_extra_types(void)
ffi_typedef(intern(lit("uid-t"), user_package),
type_by_size[convert(uid_t, -1) > 0][sizeof (uid_t)]);
#endif
+
+#if HAVE_SOCKETS
+ ffi_typedef(intern(lit("socklen-t"), user_package),
+ type_by_size[convert(socklen_t, -1) > 0][sizeof (socklen_t)]);
+#endif
+
ffi_typedef(intern(lit("longlong"), user_package),
type_by_size[0][sizeof (long long)]);
ffi_typedef(intern(lit("ulonglong"), user_package),
diff --git a/stdlib/doc-syms.tl b/stdlib/doc-syms.tl
index 6243ffaa..8284884b 100644
--- a/stdlib/doc-syms.tl
+++ b/stdlib/doc-syms.tl
@@ -167,8 +167,8 @@
("bindable" "N-0222F2E3")
("bit" "D-004C")
("bitset" "D-0037")
- ("blkcnt-t" "N-01D716FE")
- ("blksize-t" "N-01D716FE")
+ ("blkcnt-t" "N-01153D9E")
+ ("blksize-t" "N-01153D9E")
("block" "D-006F")
("block*" "N-02F60DCE")
("bool" "D-002D")
@@ -343,7 +343,7 @@
("clearhash" "N-00836D97")
("clocal" "N-01B1B5DF")
("clock-t" "N-00AB2580")
- ("clockid-t" "N-01D716FE")
+ ("clockid-t" "N-01153D9E")
("close" "D-0016")
("close-stream" "N-00596930")
("closedir" "N-01FEE88A")
@@ -485,7 +485,7 @@
("delcons" "N-03A1ABA8")
("delete-package" "N-02E687F3")
("derived" "N-0151798B")
- ("dev-t" "N-01D716FE")
+ ("dev-t" "N-01153D9E")
("diff" "N-0385B074")
("digits" "N-03CC559E")
("digpow" "N-030C5561")
@@ -813,8 +813,8 @@
("from-list" "N-01FFD230")
("frr" "N-031971BD")
("fs" "N-03B6902C")
- ("fsblkcnt-t" "N-01D716FE")
- ("fsfilcnt-t" "N-01D716FE")
+ ("fsblkcnt-t" "N-01153D9E")
+ ("fsfilcnt-t" "N-01153D9E")
("fstat" "N-006DE1CC")
("ft" "N-03B6902C")
("ftw" "N-0057F54E")
@@ -895,7 +895,7 @@
("getresuid" "N-03D37234")
("getrlimit" "N-03AB0CF0")
("getuid" "N-00125C22")
- ("gid-t" "N-01D716FE")
+ ("gid-t" "N-01153D9E")
("ginterate" "N-02F671F4")
("giterate" "N-02F671F4")
("glob" "N-00E6C7DE")
@@ -964,7 +964,7 @@
("iapply" "N-026C3723")
("icanon" "N-0072FF5E")
("icrnl" "N-02391683")
- ("id-t" "N-01D716FE")
+ ("id-t" "N-01153D9E")
("identity" "N-004834CC")
("identity*" "N-004834CC")
("ido" "N-011CFC0C")
@@ -1001,7 +1001,7 @@
("indent-off" "N-00512FDD")
("inhash" "N-0161147E")
("inlcr" "N-02391683")
- ("ino-t" "N-01D716FE")
+ ("ino-t" "N-01153D9E")
("inpck" "N-02391683")
("int" "N-0235F4E4")
("int-buf" "N-00DCFA5F")
@@ -1056,7 +1056,7 @@
("keepql" "N-00583609")
("keepqual" "N-00583609")
("key" "N-020D5C1D")
- ("key-t" "N-01D716FE")
+ ("key-t" "N-01153D9E")
("keyword-package" "N-0383342A")
("keywordp" "N-01405F25")
("kfs" "N-02D33A30")
@@ -1117,7 +1117,7 @@
("load" "D-0080")
("load-for" "N-0020A085")
("load-time" "D-0047")
- ("loff-t" "N-01D716FE")
+ ("loff-t" "N-01153D9E")
("log" "D-0046")
("log-alert" "N-035D75EC")
("log-auth" "N-0116F48F")
@@ -1265,7 +1265,7 @@
("mmakunbound" "N-02964FC0")
("mmap" "N-03C6CE44")
("mod" "D-003F")
- ("mode-t" "N-01D716FE")
+ ("mode-t" "N-01153D9E")
("mprotect" "N-02805A83")
("ms-async" "N-01F782B2")
("ms-invalidate" "N-01F782B2")
@@ -1296,7 +1296,7 @@
("nl0" "N-03BD477F")
("nl1" "N-03BD477F")
("nldly" "N-03BD477F")
- ("nlink-t" "N-01D716FE")
+ ("nlink-t" "N-01153D9E")
("noflsh" "N-0072FF5E")
("none" "D-006B")
("not" "D-0069")
@@ -1339,7 +1339,7 @@
("ocrnl" "N-03BD477F")
("oddp" "D-0039")
("ofdel" "N-03BD477F")
- ("off-t" "N-01D716FE")
+ ("off-t" "N-01153D9E")
("offsetof" "N-013D0A5C")
("ofill" "N-03BD477F")
("ofs" "N-02D33AA0")
@@ -1420,7 +1420,7 @@
("pendin" "N-0072FF5E")
("perm" "N-0176D3A1")
("pic" "N-02AF39D2")
- ("pid-t" "N-01D716FE")
+ ("pid-t" "N-01153D9E")
("pinc" "N-00E4BC37")
("pipe" "N-03F6D390")
("placelet" "N-0393C970")
@@ -1769,6 +1769,7 @@
("sockaddr-in" "N-01DD05D9")
("sockaddr-in6" "N-013DD169")
("sockaddr-un" "N-01DD05D2")
+ ("socklen-t" "N-01153D9E")
("some" "D-0040")
("sort" "N-01FE5176")
("sort-group" "N-01E65DDC")
@@ -1785,7 +1786,7 @@
("split-str-set" "N-0296195B")
("sqrt" "D-0027")
("square" "D-0032")
- ("ssize-t" "N-01D716FE")
+ ("ssize-t" "N-01153D9E")
("sspl" "N-0296195B")
("sssucc" "N-038E636C")
("ssucc" "N-038E636C")
@@ -1990,7 +1991,7 @@
("typep" "N-03B8D9EE")
("ubit" "N-011F2878")
("uchar" "N-0008D7DC")
- ("uid-t" "N-01D716FE")
+ ("uid-t" "N-01153D9E")
("uint" "N-0235F4E4")
("uint-buf" "N-00DCFA5F")
("uint-carray" "N-00797A01")
diff --git a/txr.1 b/txr.1
index af5855ac..2ae68b26 100644
--- a/txr.1
+++ b/txr.1
@@ -77692,7 +77692,7 @@ The macro expression
is equivalent to the expression
.codn "(ffi (elemtype X))" .
-.coNP FFI types @, blkcnt-t @, blksize-t @, clockid-t @, dev-t @, fsblkcnt-t @, fsfilcnt-t @, gid-t @, id-t @, ino-t @, key-t @, loff-t @, mode-t @, nlink-t @, off-t @, pid-t @ ssize-t and @ uid-t
+.coNP FFI types @, blkcnt-t @, blksize-t @, clockid-t @, dev-t @, fsblkcnt-t @, fsfilcnt-t @, gid-t @, id-t @, ino-t @, key-t @, loff-t @, mode-t @, nlink-t @, off-t @, pid-t @, ssize-t @ uid-t and @ socklen-t
The additional names of various common POSIX types may also be available,
depending on platform. They are provided as
.code typedef