Command Line Functionality related to the command line Vendor: Apple BSD Linux Microsoft QNX Red Hat SUN/Oracle Product: OS-X PPC FreeBSD Linux SUA QNX 6 Cygwin 1.5 Solaris Sparc Kernel: Darwin 8.6.0 6.1 2.6.x Interix 3.5 x86 6.4.1 x86 6.5.0 Cygwin 1.5.24 10 GA 9 GA LibC: N/A N/A GNU LibC uClibC 0.9.28 Interix Interix -lport QNX LibC 2 QNX LibC 3 Newlib Solaris Solaris X X X X - X - - X X - getopt_long() X X X X - X - - X X - getopt() X X ** (no opt args) ** (no opt args) Configuration Configuration is the basic format and type of information we obtain for a particular operating system. This information is useful for a configure script to be able to determine the type of platform it is. This information is by no means complete and only goes to show some real world examples. You should research the platforms you are interested in and investigate the variants you may need to detect. From autotools, the "config.guess" and "config.sub" scripts will be extended as new systems are added and these scripts should be used as the authorative source. Vendor: Apple BSD Microsoft Novell QNX Red Hat SUN/Oracle Ubuntu Product: OS-X PPC FreeBSD SUA SuSE 10.0 QNX 6 Cygwin 1.5 Cygwin 1.7 Fedora Core 3 Fedora Core 5 Solaris Sparc Solaris x86 8.04.3 LTS 10.04 Kernel: Darwin 8.6.0 6.1 7.0 Interix 3.5 Interix 6.1 Linux 2.6.x x86 6.4.1 x86 6.5.0 Cygwin 1.5.24 Cygwin 1.7.7 Linux 2.6.x Linux 2.6.x 10 GA 9 GA 10 Linux 2.6.x Linux 2.6.x LibC: N/A N/A N/A Interix Interix -lport Interix x86 GNU LibC QNX LibC 2 QNX LibC 3 Newlib Newlib GNU LibC GNU LibC Solaris Solaris -lxnet Solaris Solaris -lxnet Solaris GNU LibC 2.7 GNU LibC 2.11.1 triplet cpu powerpc i386 i386 i586 x86_64 / i586 i686 i386 i386 i686 i686 i686 i686 sparc sparc i386 i586 i686 triplet os darwin8.6.0 freebsd6.1 freebsd7.0 interix3.5 interix6.1 linux-gnu nto-qnx6.4.1 nto-qnx6.5.0 cygwin cygwin linux-gnu linux-gnu solaris2.10 solaris2.9 solaris2.11 linux-gnu linux-gnu triplet vendor apple unknown unknown pc unknown / pc pc pc pc pc pc pc pc sun sun pc pc pc uname -m Power Macintosh i386 i386 x86 genuineintel i686 x86pc x86pc i686 i686 i686 i686 sun4u sun4u i86pc i586 i686 uname -r 8.6.0 6.1-RELEASE 7.0-RELEASE 3.5 6.1 2.6.13-15.13-default 6.4.1 6.5.0 1.5.24(0.156/4/2) 1.7.5(0.225/5/3) 2.6.11-1.35_FC3 2.6.17-1.2817_FC5 5.10 5.9 5.11 2.6.24-26-generic 2.6.32-24-generic uname -s Darwin FreeBSD FreeBSD Interix Interix Linux QNX QNX CYGWIN_NT-5.1 CYGWIN_NT-6.1-WOW64 Linux Linux SunOS SunOS SunOS Linux Linux uname -v Darwin Kernel Version 8.6.0; Tue Mar 7 16:58:48 PST 2006; root:xnu-792.6.70.obj~1/RELEASE_PPC FreeBSD 6.1-RELEASE #0: Sun May 7 04:32:43 UTC 2006 address@hidden:/usr/obj/usr/src/sys/GENERIC FreeBSD 7.0-RELEASE #0: Sun Feb 24 19:59:52 UTC 2008 SP-8.0.1969.1 10.0.6030.0 #1 Tue Nov 28 13:43:50 UTC 2006 2009/05/20-17:35:31EDT 2010/07/09-14:44:03EDT 2007-01-31 10:57 2010-04-12 19:07 #1 Mon Jun 13 00:52:08 EDT 2005 #1 Mon Sep 11 01:17:06 EDT 2006 Generic Generic_112233-10 snv_38 #1 SMP Tue Dec 1 18:37:31 UTC 2009 #39-Ubuntu SMP Wed Jul 28 06:07:29 UTC 2010 Curses ncurses 5.2 ncurses SysV ncurses 5.x ncurses 5.x SysV SysV ncurses 5.7 CFLAGS -D_ALL_SOURCE -D_USE_LIBPORT -I/usr/include/port -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ LIBS -lport -lxnet -lxnet Disk I/O Disk specific functionality Vendor: Apple BSD Linux Microsoft QNX Red Hat SUN/Oracle Product: OS-X PPC FreeBSD Linux SUA QNX 6 Cygwin 1.5 Solaris Sparc Kernel: Darwin 8.6.0 6.1 2.6.x Interix 3.5 x86 6.4.1 x86 6.5.0 Cygwin 1.5.24 10 GA 9 GA LibC: N/A N/A GNU LibC uClibC 0.9.28 Interix Interix -lport QNX LibC 2 QNX LibC 3 Newlib Solaris Solaris fdatasync() - - X X - - X X X - - Environment Features for manipulating the environment Vendor: BSD Linux Microsoft QNX Red Hat SUN/Oracle Product: FreeBSD Linux SUA QNX 6 Cygwin 1.5 Cygwin 1.7 Solaris Sparc Kernel: 6.1 7.0 2.6.x Interix 6.1 x86 6.4.1 x86 6.5.0 Cygwin 1.5.24 Cygwin 1.7.7 10 GA 9 GA LibC: N/A N/A GNU LibC uClibC 0.9.28 Interix x86 QNX LibC 2 QNX LibC 3 Newlib Newlib Solaris Solaris clearenv() - - X X - X X - - - - getenv() X X X X X X X X X X X putenv() X X X X X X X X X X X setenv() X X X X X X X X X X - unsetenv() X X X X X X X X X X - Library Types Not all operating systems implement all types. Here we see for what configurations what types are defined and how it is configured. Vendor: Apple BSD Linux Microsoft QNX Red Hat SUN/Oracle Product: OS-X PPC FreeBSD Linux SUA QNX 6 Cygwin 1.5 Cygwin 1.7 Solaris Sparc Kernel: Darwin 8.6.0 6.1 7.0 2.6.x Interix 3.5 Interix 6.1 x86 6.4.1 x86 6.5.0 Cygwin 1.5.24 Cygwin 1.7.7 10 GA 9 GA LibC: N/A N/A N/A GNU LibC uClibC 0.9.28 Interix Interix -lport Interix x86 QNX LibC 2 QNX LibC 3 Newlib Newlib Solaris Solaris X X X X X - X X X X X X X X X X X X X X X X - X X X X X - - X X X X X X - ssize_t X X X X X X X X X X X X X uint64_t X X X X X - X X X X X X X X sizeof(char) 1 1 1 1 1 1 1 1 1 1 1 1 1 sizeof(short) 2 2 2 2 2 2 2 2 2 2 2 2 2 sizeof(int) 4 4 4 4 4 4 4 4 4 4 4 4 4 sizeof(long) 4 4 4 4 4 4 4 4 4 4 4 4 4 sizeof(long long) 8 8 8 8 8 8 8 8 8 8 8 8 8 sizeof(void *) 4 4 4 4 4 4 4 4 4 4 4 4 4 Processes Not all Operating Systems behave the same with regards to threading and processes. Not all operating systems support threading reliably and so we try to highlight the differences here. Vendor: BSD Linux Microsoft QNX Red Hat SUN/Oracle Product: FreeBSD Linux SUA QNX 6 Cygwin 1.5 Cygwin 1.7 Solaris Sparc Kernel: 6.1 7.0 2.6.x Interix 6.1 x86 6.4.1 x86 6.5.0 Cygwin 1.5.24 Cygwin 1.7.7 10 GA LibC: N/A N/A GNU LibC Interix x86 QNX LibC 2 QNX LibC 3 Newlib Newlib Solaris O_CLOEXEC - - ** - X X - X - fork() X X X ** (local stack only) ** (single thread only) ** (single thread only) ** (local stack only) ** (local stack only) X X X X X X X X X X X X X X X X pthread_attr_getguardsize() X X X - X pthread_attr_getstack() X X X - X pthread_create() X -lpthread X X X X X X sem_init() -lpthread X X X X X -lrt - X - X X - - X posix_spawn() - X X X - X spawn() - - - X X - - - Sockets Sockets were first implemented by BSD. The sockets interface is probably one of the most varied interface as each vendor has added their own extra features, or not implemented features. Vendor: Apple BSD Linux Microsoft QNX Red Hat SUN/Oracle Product: OS-X PPC FreeBSD Linux SUA QNX 6 Cygwin 1.5 Cygwin 1.7 Solaris Sparc Kernel: Darwin 8.6.0 6.1 7.0 2.6.x Interix 3.5 Interix 6.1 x86 6.4.1 x86 6.5.0 Cygwin 1.5.24 Cygwin 1.7.7 10 GA 9 GA LibC: N/A N/A N/A GNU LibC uClibC 0.9.28 Interix Interix -lport Interix x86 QNX LibC 2 QNX LibC 3 Newlib Newlib Solaris Solaris -lxnet Solaris Solaris -lxnet X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X - - - - - X X - - X X X X socklen_t X X X X X int X X X X X X X X X X sockaddr.sa_len X X - - - - - X X - - - - - - connect() X X X -lsocket -lsocket X X -lsocket X getaddrinfo() X X X X - - X X X - X - - - - gethostbyaddr() X X X X X X -lsocket -lsocket X X X X X X gethostbyname() X X X X X X X -lsocket -lsocket X X -lnsl X X X getipnodebyaddr() X X - - - - - - - - - - - - getipnodebyname() X X - - - - - - - - - - - - inet_addr() X X X X X X X X X X X X X X inet_aton() X X X X X X X X X X - - - - inet_ntoa() X X X X X X X X X X X X X X inet_ntop() X X X X - X X X X X X - X - inet_pton() X X X X - X X X X X X - X - X X X X X - X X X X X X X X X X X X X X - - - X X - - X X X X AF_INET X X X X X X X X X X X X X X AF_INET6 X X X X - X X X - X X X X X AF_UNSPEC X X X X X X X X X X X X X X IFF_BROADCAST X X X X - X X X X X X X X X IFF_LOOPBACK X X X X - X X X X X X X X X IFF_MULTICAST X X X X - X X X X X X X X X IFF_POINTOPOINT X X X X - X X X - X X X X X Vendor: Apple BSD Linux Microsoft QNX Red Hat SUN/Oracle Product: OS-X PPC FreeBSD Linux SUA QNX 6 Cygwin 1.5 Cygwin 1.7 Solaris Sparc Kernel: Darwin 8.6.0 6.1 7.0 2.6.x Interix 3.5 Interix 6.1 x86 6.4.1 x86 6.5.0 Cygwin 1.5.24 Cygwin 1.7.7 10 GA 9 GA LibC: N/A N/A N/A GNU LibC uClibC 0.9.28 Interix Interix -lport Interix x86 QNX LibC 2 QNX LibC 3 Newlib Newlib Solaris Solaris -lxnet Solaris Solaris -lxnet IFF_RUNNING X X X X - X X X X X X X X X IFF_UP X X X X - X X X X X X X X X SIOCGARP - - X X - - X X - - X X X X SIOCGIFADDR X X X X - - - X X X X X X X X SIOCGIFBRDADDR X X X X - - - X X X X X X X X SIOCGIFCONF X X ** ** - X - X X X X X X X X SIOCGIFDSTADDR X X X X - - - X X - X X X X X SIOCGIFFLAGS X X X X - X - X X ** X X X X X SIOCGIFFRNDLYNAM - - - - - X - - - - SIOCGIFHWADDR - - X X - - - - - X X - - - - SIOCGIFNETMASK X X X X - ** - ** ** X X X X X X SIOCGSIZIFCONF - - - - - - - - - - - - - - - if_indextoname() X X X X X X X X - X - X - - if_nametoindex() X X X X X X X X - X - X - - - - X X - - - - - - - - - - - X X X X X - - - X X - - X X X X struct ether_addr X X X - - - - X X X X ether_ntoa() - - X X - - - X X - - - - - - X X X - - X X - X - - - - freeifaddrs() X X X - X X - X - - - - getifaddrs() X X X - X X - ** - - - - X X - - X X - - X X X X struct sockaddr_dl X X - - X X - - X X X X AF_LINK X X - - - - X X - - X X X X X X X X X X X X X X X X X X msghdr.msg_control X X X X X X X X X X - X - X Vendor: Apple BSD Linux Microsoft QNX Red Hat SUN/Oracle Product: OS-X PPC FreeBSD Linux SUA QNX 6 Cygwin 1.5 Cygwin 1.7 Solaris Sparc Kernel: Darwin 8.6.0 6.1 7.0 2.6.x Interix 3.5 Interix 6.1 x86 6.4.1 x86 6.5.0 Cygwin 1.5.24 Cygwin 1.7.7 10 GA 9 GA LibC: N/A N/A N/A GNU LibC uClibC 0.9.28 Interix Interix -lport Interix x86 QNX LibC 2 QNX LibC 3 Newlib Newlib Solaris Solaris -lxnet Solaris Solaris -lxnet CMSG_ALIGN - - X X - X - - X X - - - - CMSG_DATA X X X X - X X X X X - X - X CMSG_FIRSTHDR X X X X - X X X X X - X - X CMSG_LEN X X X X - X X X X X - X - - CMSG_NXTHDR X X X X - X X X X X - X - X CMSG_SPACE X X X X - X X X X X - X - - _CMSG_DATA_ALIGN - - - - - - - - - - - X - X _CMSG_HDR_ALIGN - - - - - - - - - - - X - X IP_PKTINFO - - X X - - - ** - - - - - IP_RECVDSTADDR X X - - - X X - - X X X X IP_RECVIF X X - - - X X - - X X X X -lnsl - - - - - - - - - - - X - X - -lsocket - - - - X X - X X - - X - X - Strings Strings are a common point of failure for security issues (buffer overflows). The GNU system has extended functions that are similar to the standard C library. However, not all Operating Systems have implemented all functions and it may be necessary that local implementations be written. Vendor: Apple BSD Linux Microsoft QNX Red Hat SUN/Oracle Product: OS-X PPC FreeBSD Linux SUA QNX 6 Cygwin 1.5 Cygwin 1.7 Solaris Sparc Kernel: Darwin 8.6.0 6.1 7.0 2.6.x Interix 3.5 Interix 6.1 x86 6.4.1 x86 6.5.0 Cygwin 1.5.24 Cygwin 1.7.7 10 GA 9 GA LibC: N/A N/A N/A GNU LibC uClibC 0.9.28 Interix Interix x86 QNX LibC 2 QNX LibC 3 Newlib Newlib Solaris Solaris X X X X X X X X X X X X X X X X X X X X X X X X X X getline() - - - X X - - - - X X - - strncasecmp() X X X X X X X X X X X X X strnlen() - - - X X - - - - X X - - vsnprintf() X X X X X X X X Terminal Terminals are devices that can be the serial port, or the console. In the early days of unix, they were historically the same (a Wyse terminal was a terminal connected to a mainframe via a serial console) Vendor: Apple BSD Linux Microsoft QNX Red Hat SUN/Oracle Product: OS-X PPC FreeBSD Linux SUA QNX 6 Cygwin 1.5 Solaris Sparc Kernel: Darwin 8.6.0 6.1 7.0 2.6.x Interix 3.5 x86 6.4.1 x86 6.5.0 Cygwin 1.5.24 10 GA 9 GA LibC: N/A N/A N/A GNU LibC Interix QNX LibC 2 QNX LibC 3 Newlib Solaris Solaris -lxnet Solaris Solaris -lxnet - - - X - X X X X X COM port cuad(M) cuad(M) cuad(M) ttyS(M) tty(MM) X (driver dependent) X (driver dependent) com(N) tty(X) tty(X) tty(X) tty(X) CNEW_RTSCTS - - - - - - - - - CRTSCTS X X X X - X X X X X IMAXBEL X X X X X X X X X X IUCLC - - - X - X X X X X Terminal: Baudrates Configuration of the serial port. This is very similar to the category Terminal. Vendor: Linux Red Hat SUN/Oracle Product: Linux Cygwin 1.5 Cygwin 1.7 Solaris Sparc Solaris x86 Kernel: 2.6.24 2.6.x Cygwin 1.5.24 Cygwin 1.7.0 10 GA 10 LibC: GNU LibC uClibC 0.9.28 uClibC 0.9.30 Newlib Newlib Solaris Solaris B0 X X X X X X X B50 X X X X X X X B75 X X X X X X X B110 X X X X X X X B134 X X X X X X X B150 X X X X X X X B200 X X X X X X X B300 X X X X X X X B600 X X X X X X X B1200 X X X X X X X B1800 X X X X X X X B2400 X X X X X X X B4800 X X X X X X X B9600 X X X X X X X B19200 X X X X X X X B38400 X X X X X X X B57600 X X X X X X X B76800 - - - - - X - B115200 X X X X X X X B128000 - - - X X - - B153600 - - - - - X X B230400 X - X X X X X B256000 - - - X X - - B307200 - - - - - X X B460800 X - X X X X X Vendor: Linux Red Hat SUN/Oracle Product: Linux Cygwin 1.5 Cygwin 1.7 Solaris Sparc Solaris x86 Kernel: 2.6.24 2.6.x Cygwin 1.5.24 Cygwin 1.7.0 10 GA 10 LibC: GNU LibC uClibC 0.9.28 uClibC 0.9.30 Newlib Newlib Solaris Solaris B500000 X - X X X - - B576000 X - X X X - - B921600 X - X X X - - B1000000 X - X X X - - B1152000 X - X X X - - B1500000 X - X X X - - B2000000 X - X X X - - B2500000 X - X X X - - B3000000 X - X X X - - B3500000 X - X - - - - B4000000 X - X - - - - Time Functions This category contains information relevant for the time of day and other clock features. Vendor: BSD Linux Microsoft QNX Red Hat SUN/Oracle Product: FreeBSD Linux SUA QNX 6 Cygwin 1.5 Cygwin 1.7 Solaris Sparc Kernel: 6.1 7.0 2.6.x Interix 3.5 Interix 6.1 x86 6.4.1 x86 6.5.0 Cygwin 1.5.24 Cygwin 1.7.7 10 GA 9 GA LibC: N/A N/A GNU LibC uClibC 0.9.28 Interix Interix -lport Interix x86 QNX LibC 2 QNX LibC 3 Newlib Newlib Solaris Solaris -lxnet Solaris Solaris -lxnet localtime_r() X X X X X** X** X** X X X X X X X** X** timeradd() X X X X - X X X X X X - - - - timercmp() X X X X X** X** X** X X X X X X X X timersub() X X X X - X X X X X X - - - - clock_gettime() X X X X X X