summaryrefslogtreecommitdiff
path: root/src/lib/libcmd/features
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcmd/features')
-rw-r--r--src/lib/libcmd/features/ids9
-rw-r--r--src/lib/libcmd/features/sockets3
-rw-r--r--src/lib/libcmd/features/symlink23
-rw-r--r--src/lib/libcmd/features/utsname15
4 files changed, 50 insertions, 0 deletions
diff --git a/src/lib/libcmd/features/ids b/src/lib/libcmd/features/ids
new file mode 100644
index 0000000..c8f7faa
--- /dev/null
+++ b/src/lib/libcmd/features/ids
@@ -0,0 +1,9 @@
+lib endgrent,getgrent,setgrent
+lib fsid,getfsgid,isfsg sys/types.h sys/fss.h fsg.h -lfsg
+lib getsid unistd.h
+mac fsid sys/types.h sys/fss.h fsg.h
+cat{
+ #if !_lib_fsid && _mac_fsid
+ #define _lib_fsid 1
+ #endif
+}end
diff --git a/src/lib/libcmd/features/sockets b/src/lib/libcmd/features/sockets
new file mode 100644
index 0000000..2660abb
--- /dev/null
+++ b/src/lib/libcmd/features/sockets
@@ -0,0 +1,3 @@
+sys socket
+hdr arpa.inet,netinet.in
+lib getsockname,getsockopt,inet_ntoa
diff --git a/src/lib/libcmd/features/symlink b/src/lib/libcmd/features/symlink
new file mode 100644
index 0000000..789db0b
--- /dev/null
+++ b/src/lib/libcmd/features/symlink
@@ -0,0 +1,23 @@
+lib lchmod note{ lchmod implemented }end execute{
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <errno.h>
+ int
+ main()
+ {
+ lchmod("No-FiLe", 0);
+ return errno != ENOENT;
+ }
+}end
+
+lib lchown note{ lchown implemented }end execute{
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <errno.h>
+ int
+ main()
+ {
+ lchown("No-FiLe", 0, 0);
+ return errno != ENOENT;
+ }
+}end
diff --git a/src/lib/libcmd/features/utsname b/src/lib/libcmd/features/utsname
new file mode 100644
index 0000000..7254867
--- /dev/null
+++ b/src/lib/libcmd/features/utsname
@@ -0,0 +1,15 @@
+lib getdomainname,gethostid,gethostname,sethostname,syscall,systeminfo,uname
+lib syssgi
+mem utsname.base_rel,utsname.idnumber,utsname.m_type,utsname.nodeext sys/utsname.h
+sys syscall,systeminfo,syssgi
+
+tst cross{
+ u=`/bin/uname -o 2>/dev/null`
+ case $u in
+ UWIN-*) u=UWIN ;;
+ esac
+ case $u in
+ '') ;;
+ *) echo "#define _UNAME_os_DEFAULT \"$u\" /* default os name */" ;;
+ esac
+}end