-- ***************************************************************************** -- $Id: system_calls_s.m4,v 1.5 1993/12/24 15:10:10 courtel Exp $ -- -- Kind : Package specification -- Abstract : Unix system calls interface -- Review : -- Portable : NO -- Short/rename : SYS -- -- Copyright 1990 - 1993 Centre d'Etudes de la Navigation Aerienne (CENA) -- -- PARADISE is free software; you can redistribute it and/or modify it -- under the terms of the GNU Library General Public License -- as published by the Free Software Foundation; -- -- PARADISE is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU Library General Public License for more details. -- -- You should have received a copy of the GNU Library General Public License -- along with PARADISE; see the file COPYING.LIB. If not, write to -- the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -- ***************************************************************************** changequote([,])dnl changecom(--)dnl define(M4_NAME, ifelse(M4COMPILER,TELESOFT,INTERFACE_INFORMATION,INTERFACE_NAME))dnl define(M4_STRING, ifelse(M4COMPILER,VERDIX,LANGUAGE.C_SUBP_PREFIX & "$1", M4COMPILER,ALSYS,"$1", M4COMPILER,TELESOFT,"_$1"))dnl with C_TYPES; ifelse(M4COMPILER,VERDIX,with LANGUAGE;) package SYSTEM_CALLS is -- ***************************************************************************** -- OUTLINE : Interface to Unix system calls -- -- EXCEPTIONS : -- CONTAINS TASKS ? : NO -- MODIFICATIONS : -- REFERENCES : Unix manual, part 2 -- -- CONTENTS : -- - Function C_ACCEPT -- - Function C_ACCESS -- - Function BIND -- - Functions CHMOD & FCHMOD -- - Function CLOSE -- - Function CONNECT -- - Functions DUP & DUP2 -- - Function FCNTL -- - Functions FORK & VFORK -- - Function GETHOSTNAME -- - Function GETITIMER -- - Functions GETPID & GETPPID -- - Function GETSOCKNAME -- - Function GETSOCKOPT -- - Function GETTIMEOFDAY -- - Function KILL -- - Function LISTEN -- - Function MKDIR -- - Function MKFIFO -- - Function OPEN -- - Function PIPE -- - Function POLL -- - Function READ -- - Function RECV & RECVFROM -- - Function RMDIR -- - Function C_SELECT -- - Functions SEND & SENDTO -- - Function SETHOSTNAME -- - Function SETITIMER -- - Function SETSOCKOPT -- - Function SETTIMEOFDAY -- - Function SHUTDOWN -- - Function SIGBLOCK -- - Function SIGSETMASK -- - Function SOCKET -- - Functions STAT, LSTAT & FSTAT -- - Function UMASK -- - Function UNLINK -- - Function WRITE -- - Package IOCTL -- ***************************************************************************** package C renames C_TYPES; -- ***************************************************************************** -- Accept a connection on a socket. Return a non-negative descriptor for the -- accepted socket on success. -- ***************************************************************************** function C_ACCEPT (S : C.C_INT; ADDR : C.C_PTR; ADDRLEN : C.C_PTR) return C.C_INT; -- ***************************************************************************** -- The file named by PATH is checked for acessibility according to MODE, which -- is an inclusive of R_OK, W_OK, X_OK, and F_OK (defined in ). -- ***************************************************************************** function C_ACCESS (PATH : C.C_PTR; MODE : C.C_INT) return C.C_INT; -- ***************************************************************************** -- Bind a name to a socket. Returns 0 on success. -- ***************************************************************************** function BIND (S : C.C_INT; NAME : C.C_PTR; NAMELEN : C.C_INT) return C.C_INT; -- ***************************************************************************** -- Set the mode of the file referred to by PATH or the descriptor FD according -- to MODE. -- ***************************************************************************** function CHMOD (PATH : C.C_PTR; MODE : C.MODE_T) return C.C_INT; function FCHMOD (FD : C.C_INT; MODE : C.MODE_T) return C.C_INT; -- ***************************************************************************** -- Delete a descriptor from the per-process reference table. Returns 0 on -- success. -- ***************************************************************************** function CLOSE (FD : C.C_INT) return C.C_INT; -- ***************************************************************************** -- Initiate a connection on a socket. Returns 0 on success -- ***************************************************************************** function CONNECT (S : C.C_INT; NAME : C.C_PTR; NAMELEN : C.C_INT) return C.C_INT; -- ***************************************************************************** -- Duplicate an existing object descriptor. DUP returns the lowest numbered -- descriptor that is not currently used by the process. With DUP2, FD2 -- specifies the desired value of the new descriptor. -- -- The new descriptor refers to the same object, uses the same seek pointer, and -- has the same access mode as the old descriptor. -- ***************************************************************************** function DUP (FD : C.C_INT) return C.C_INT; function DUP2 (FD1, FD2 : C.C_INT) return C.C_INT; -- ***************************************************************************** -- Perform a variety of functions on open descriptors. CMD is the command -- applied to the descriptor FD, that may use the argument ARG. -- ***************************************************************************** function FCNTL (FD : C.C_INT; CMD : C.C_INT; ARG : C.C_INT) return C.C_INT; -- ***************************************************************************** -- Create a new process. On success, returns 0 to the child process and the -- process id of the child process to the parent process. -- ***************************************************************************** function FORK return C.PID_T; -- ***************************************************************************** -- Return the standard host name for the current processor, as previously set by -- SETHOSTNAME. The paramater NAMELEN specifies the size of NAME. -- ***************************************************************************** function GETHOSTNAME (NAME : C.C_PTR; NAMELEN : C.SIZE_T) return C.C_INT; -- ***************************************************************************** -- Store the current value of the timer specified by WHICH into the structure -- pointed to by VALUE -- ***************************************************************************** function GETITIMER (WHICH : C.C_INT; VALUE : C.C_PTR) return C.C_INT; -- ***************************************************************************** -- Get process identification. GETPID returns the process ID of the current -- process. GETPPID returns the process ID of the parent of the current process. -- ***************************************************************************** function GETPID return C.PID_T; function GETPPID return C.PID_T; -- ***************************************************************************** -- Return the current NAME for the specified socket. The NAMELEN parameter -- should be initialized to indicate the amount of space pointed to by NAME. -- On return it contains the actual size of the name returned. -- ***************************************************************************** function GETSOCKNAME (S : C.C_INT; NAME : C.C_PTR; NAMELEN : C.C_PTR) return C.C_INT; -- ***************************************************************************** -- Get options on sockets. S is the socket, LEVEL is the protocol level, OPTNAME -- the selected option, and OPTVAL and OPTLEN are used to access options values. -- ***************************************************************************** function GETSOCKOPT (S, LEVEL, OPTNAME : C.C_INT; OPTVAL : C.C_PTR; OPTLEN : C.C_PTR) return C.C_INT; -- ***************************************************************************** -- Get the current date and time. TP points to a TIMEVAL structure, and TZP to a -- TIMEZONE structure If any of them is a NULL pointer, the information is not -- returned. -- ***************************************************************************** function GETTIMEOFDAY (TP : C.C_PTR; TZP : C.C_PTR) return C.C_INT; -- ***************************************************************************** -- Send a signal to a process or a group of processes. Return 0 on success. -- ***************************************************************************** function KILL (PID : C.PID_T; SIG : C.C_INT) return C.C_INT; -- ***************************************************************************** -- Listen for connections on a socket. The BACKLOG parameter defines the maximum -- length the queue of pending connections may grow to. Returns 0 on success. -- ***************************************************************************** function LISTEN (S, BACKLOG : C.C_INT) return C.C_INT; -- ***************************************************************************** -- Create a new directory file with name PATH. The mode mask of the new -- directory is initialized from MODE. -- ***************************************************************************** function MKDIR (PATH : C.C_PTR; MODE : C.MODE_T) return C.C_INT; -- ***************************************************************************** -- Create a new FIFO special file named by the pathname pointed to by PATH. The -- access permissions of the new FIFO are initialized from MODE. -- ***************************************************************************** function MKFIFO (PATH : C.C_PTR; MODE : C.MODE_T) return C.C_INT; -- ***************************************************************************** -- Open or create a file for reading or writing, as specified by the FLAGS -- argument, and returns a descriptor for that file. If the FLAGS argument -- indicate the file is to be created if it does not already exist, it is -- created with mode MODE. PATH points to the pathname of a file. -- ***************************************************************************** function OPEN (PATH : C.C_PTR; FLAGS : C.C_INT; MODE : C.MODE_T := 0) return C.C_INT; -- ***************************************************************************** -- Create an interprocess communication channel, and returns two file -- descriptors FD(0) - opened for reading - and FD(1) - opened for writing. -- Returns 0 on success -- ***************************************************************************** function PIPE (FS : C.C_PTR) return C.C_INT; ifelse(M4SYSTEM,SUNOS,[--!! SunOS -- ***************************************************************************** -- Provide users with a mechanism for multiplexing input/output over a set of -- file descriptors. It identifies those files descriptors on which a user can -- send or receive messages, or on which certain events have occured. Upon -- success, the total number of file descriptors that has been selected is -- returned. -- -- FDS specifies the file descriptors to be examined and the events of interest -- for each file descriptor. -- ***************************************************************************** function POLL (FDS : C.C_PTR; NFDS : C.C_UNSIGNED_LONG; TIMEOUT : C.C_INT) return C.C_INT; --!! End]) ifelse(M4SYSTEM,HPUX,[--!! HP-UX -- ***************************************************************************** -- Send a signal to the executing program. Return 0 on success. -- ***************************************************************************** function C_RAISE (SIG : C.C_INT) return C.C_INT; --!! End]) -- ***************************************************************************** -- Attempt to read NBYTE bytes of data from the object referenced by the -- descriptor FD into the buffer pointed to by BUF. Upon success, the number of -- bytes actually read and placed in the buffer is returned. -- ***************************************************************************** function READ (FD : C.C_INT; BUF : C.C_PTR; NBYTE : C.SIZE_T) return C.SSIZE_T; -- ***************************************************************************** -- Receive a message from a socket. RECV may be used only on a connected socket, -- while recvfrom may be used to receive data on a socket whether it is in a -- connected state or not. -- If FROM is a null pointer, the source address of the message is filled in. -- FROMLEN is a value-result parameter, initialized to the size of the buffer -- associated with from, and modified on return to indicate the actual size of -- the address stored there. -- The number of bytes received is returned on success. -- ***************************************************************************** function RECV (S : C.C_INT; BUF : C.C_PTR; LEN, FLAGS : C.C_INT) return C.C_INT; function RECVFROM (S : C.C_INT; BUF : C.C_PTR; LEN, FLAGS : C.C_INT; FROM : C.C_PTR; FROMLEN : C.C_PTR) return C.C_INT; -- ***************************************************************************** -- Remove a directory file whose name is given by PATH. -- ***************************************************************************** function RMDIR (PATH : C.C_PTR) return C.C_INT; -- ***************************************************************************** -- Examine the I/O descriptor sets whose addresses are passed in READFS, -- WRITEFS, and EXCEPTFS to see if some of their descriptors are ready for -- reading, ready for writing, or have an exceptional condition pending. WIDTH -- is the number of bits to be checked in each bit mask that represent a file -- descriptor; the descriptors from 0 through WIDTH - 1 in the descriptor sets -- are examined. On return, it replaces the given descriptor sets with subsets -- consisting of those descriptors that are ready for the requested operation. -- The total number of ready descriptors in all the sets is returned. -- -- If TIMEOUT is not a null pointer, it specifies a maximum interval to wait -- for the selection to complete. If TIMEOUT is a NULL pointer, the select -- blocks indefinitely. -- -- Any of READFS, WRITEFS, and EXCEPTFS may be given as NULL pointers if no -- descriptors are of interest. -- ***************************************************************************** function C_SELECT (NFDS : C.SIZE_T; READFS, WRITEFS, EXCEPTFS : C.C_PTR; TIMEOUT : C.C_PTR) return C.C_INT; -- ***************************************************************************** -- Send a message from a socket. SEND may be used only when the socket is in a -- connected state, while SENDTO may be used at any time. -- The address of the target is given by TO with TOLEN specifying its size. The -- length of the message is given by LEN. -- ***************************************************************************** function SEND (S : C.C_INT; MSG : C.C_PTR; LEN, FLAGS : C.C_INT) return C.C_INT; function SENDTO (S : C.C_INT; MSG : C.C_PTR; LEN, FLAGS : C.C_INT; TO : C.C_PTR; TOLEN : C.C_INT) return C.C_INT; -- ***************************************************************************** -- Set the name of the host machine to be NAME, which has length NAMELEN. This -- call is restricted to the super-user and is normally used only when the -- system is bootstrapped. -- ***************************************************************************** function SETHOSTNAME (NAME : C.C_PTR; NAMELEN : C.SIZE_T) return C.C_INT; -- ***************************************************************************** -- Set the value of the timer specified by WHICH to the value specified in the -- structure pointed to by VALUE, and if OVALUE is not a NULL pointer, store the -- previous value of the timer in the structure pointed to by OVALUE. -- ***************************************************************************** function SETITIMER (WHICH : C.C_INT; VALUE, OVALUE : C.C_PTR) return C.C_INT; -- ***************************************************************************** -- Set options on sockets. S is the socket, LEVEL is the protocol level, OPTNAME -- the selected option, and OPTVAL and OPTLEN are used to access options values. -- ***************************************************************************** function SETSOCKOPT (S, LEVEL, OPTNAME : C.C_INT; OPTVAL : C.C_PTR; OPTLEN : C.C_INT) return C.C_INT; -- ***************************************************************************** -- Set the date and time; TP points to a TIMEVAL structure, and TZP to a -- TIMEZONE structure. -- ***************************************************************************** function SETTIMEOFDAY (TP : C.C_PTR; TZP : C.C_PTR) return C.C_INT; -- ***************************************************************************** -- Causes all or part of a full-duplex connection on the socket associated with -- S to be shutdown. If HOW is 0, then further receives will be disallowed. If -- HOW is 1, then further sends will be disallowed. If HOW is 2, the further -- sends and receives will be disallowed. Returns 0 on success. -- ***************************************************************************** function SHUTDOWN (S : C.C_INT; HOW : C.C_INT) return C.C_INT; -- ***************************************************************************** -- Add the signals specified in MASK to the set of signals currently blocked -- from delivery. A signal is blocked if the appropriate bit in MASK is set. -- The previous signal mask is returned, and may be restored using SIGSETMASK. -- ***************************************************************************** define(M4_MASK, ifelse(M4SYSTEM,SUNOS,C.C_INT,M4SYSTEM,HPUX,C.C_LONG))dnl function SIGBLOCK (MASK : M4_MASK) return M4_MASK; -- ***************************************************************************** -- Set the signals currently being blocked from delivery according to MASK, and -- return the previous signal mask. A signal is blocked if the appropriate bit -- in MASK is set. The procedure SIGBLOCK is provided to construct the mask for -- a given signal. -- ***************************************************************************** function SIGSETMASK (MASK : M4_MASK) return M4_MASK; -- ***************************************************************************** -- Create an endpoint for communication and return a descriptor. The DOMAIN -- parameter specifies a communications domain within which communication will -- take place; this selects the protocol family which should be used. The socket -- has the indicated TYPE, which specifies the semantics of communication. The -- PROTOCOL specifies a particular protocol to be used with the socket. -- ***************************************************************************** function SOCKET (DOMAIN, SOCK_TYPE, PROTOCOL : C.C_INT) return C.C_INT; -- ************************************************************************** -- Obtain information about the file named by PATH. -- LSTAT is like STAT except in the case where the named file is a symbolic -- link, in which case LSTAT returns information about the link, while STAT -- returns information about the file the link references. -- FSTAT obtains the same information about an open file referenced by FD. -- BUF is a pointer to a STAT structure into which information is placed -- concerning the file. -- ************************************************************************** function STAT (PATH : C.C_PTR; BUF : C.C_PTR) return C.C_INT; function LSTAT (PATH : C.C_PTR; BUF : C.C_PTR) return C.C_INT; function FSTAT (FD : C.C_INT; BUF : C.C_PTR) return C.C_INT; -- ***************************************************************************** -- Set the process's file creation mask to MASK and return the previous value of -- the mask. -- ***************************************************************************** function UMASK (MASK : C.MODE_T) return C.MODE_T; -- ***************************************************************************** -- Remove directory entry. Return 0 on success. -- ***************************************************************************** function UNLINK (PATH : C.C_PTR) return C.C_INT; -- ***************************************************************************** -- Attempt to write NBYTE bytes of data to the object referenced by the -- descriptor FD from the buffer pointed to by BUF. Upon success, the number of -- bytes actually written is returned. -- ***************************************************************************** function WRITE (FD : C.C_INT; BUF : C.C_PTR; NBYTE : C.SIZE_T) return C.SSIZE_T; -- ***************************************************************************** -- As the system call `ioctl' would be very long to interface, because of its -- multiple commands, only some commands have an interface, through this -- subpackage and a C module -- ***************************************************************************** package IOCTL is -- ========================================================================== -- If the integer whose address is arg is non-zero, this request sets the -- state of the socket as asynchronous. Otherwise, the socket is put into -- synchronous mode (the default). Asynchronous mode enables the delivery of -- the SIGIO signal when a) new data arrives, or b) for connection-oriented -- protocols, whenever additional outgoing buffer space becomes available, or -- when the connection is established or broken. The process group or -- process ID associated with the socket must be non- zero in order for SIGIO -- signals to be sent; the signal is delivered according to the semantics of -- SIOCSPGRP described below. -- ========================================================================== function FIOASYNC (FD : C.C_INT; ARG : C.C_PTR) return C.C_INT; -- ========================================================================== -- If the integer referenced by arg is non-zero, system asynchronous I/O is -- enabled. That is, enable SIGIO to be sent to the process currently -- designated with FIOSSAIOOWN (see below) whenever the terminal device file -- status changes from "no read data available" to "read data available". If -- no process has been designated with FIOSSAIOOWN, enable SIGIO to be sent -- to the first process that opened the terminal device file. -- ========================================================================== function FIOSSAIOSTAT (FD : C.C_INT; ARG : C.C_PTR) return C.C_INT; -- ========================================================================== -- Set the process ID that will receive the SIGIO signals due to system -- asynchronous I/O to the value of the integer referenced by arg. If no -- process can be found corresponding to that specified by the integer -- referenced by arg, the call returns -1 with errno set to ESRCH. A user -- with appropriate privileges can designate that any process receive the -- SIGIO signals. If the request is not made by a user with appropriate -- privileges and the calling process does not either designate that itself -- or another process whose real, saved, or effective user ID matches its -- real or effective user ID or the calling process does not designate a -- process that is a descendant of the calling process to receive the SIGIO -- signals, the call returns -1 with errno set to EPERM. -- ========================================================================== function FIOSSAIOOWN (FD : C.C_INT; ARG : C.C_PTR) return C.C_INT; -- ========================================================================== -- Set the process group or process ID associated with the socket to be the -- value of the integer with the address ARG. A process group or process ID -- associated with the socket in this manner is signaled when the state of -- socket changes : SIGURG is delivered upon the receipt of out-of-band data; -- SIGIO is delivered if the socket is asynchronous, as described in FIOASYNC -- above. If the value of the integer with the address arg is positive, the -- signal is sent to the process whose process ID matches the value -- specified. If the value is negative, the signal is sent to all the -- processes that have a process group equal to the absolute value of the -- value specified. If the value is zero, no signal is sent to any process. -- It is necessary to issue this request with a non-zero integer value to -- enable the signal delivery mechanism described above; the default for the -- process group or process ID value is zero. -- ========================================================================== function SIOCSPGRP (FD : C.C_INT; ARG : C.C_PTR) return C.C_INT; -- ========================================================================== -- Set the value of the integer pointed to by ARG to non-zero if the socket -- referred to by the descriptor FD has been read up to where the out-of-band -- data byte starts, and to zero otherwise. For sockets other than STREAM TCP -- sockets, the value is always set to 0. -- ========================================================================== function SIOCATMARK (FD : C.C_INT; ARG : C.C_PTR) return C.C_INT; private pragma INTERFACE (C, FIOASYNC); pragma INTERFACE (C, FIOSSAIOSTAT); pragma INTERFACE (C, FIOSSAIOOWN); pragma INTERFACE (C, SIOCSPGRP); pragma INTERFACE (C, SIOCATMARK); pragma M4_NAME (FIOASYNC, M4_STRING(fioasync)); pragma M4_NAME (FIOSSAIOSTAT, M4_STRING(fiossaiostat)); pragma M4_NAME (FIOSSAIOOWN, M4_STRING(fiossaioown)); pragma M4_NAME (SIOCSPGRP, M4_STRING(siocspgrp)); pragma M4_NAME (SIOCATMARK, M4_STRING(siocatmark)); end IOCTL; --!! End]) private pragma INTERFACE (C, C_ACCEPT); pragma INTERFACE (C, C_ACCESS); pragma INTERFACE (C, BIND); pragma INTERFACE (C, CHMOD); pragma INTERFACE (C, CLOSE); pragma INTERFACE (C, CONNECT); pragma INTERFACE (C, DUP); pragma INTERFACE (C, DUP2); pragma INTERFACE (C, FCHMOD); pragma INTERFACE (C, FCNTL); pragma INTERFACE (C, FORK); pragma INTERFACE (C, GETHOSTNAME); pragma INTERFACE (C, GETITIMER); pragma INTERFACE (C, GETPID); pragma INTERFACE (C, GETPPID); pragma INTERFACE (C, GETSOCKNAME); pragma INTERFACE (C, GETSOCKOPT); pragma INTERFACE (C, GETTIMEOFDAY); pragma INTERFACE (C, MKDIR); pragma INTERFACE (C, MKFIFO); pragma INTERFACE (C, KILL); pragma INTERFACE (C, LISTEN); pragma INTERFACE (C, OPEN); pragma INTERFACE (C, PIPE); ifelse(M4SYSTEM,SUNOS,pragma INTERFACE (C, POLL);) ifelse(M4SYSTEM,HPUX,pragma INTERFACE (C, C_RAISE);) pragma INTERFACE (C, READ); pragma INTERFACE (C, RECV); pragma INTERFACE (C, RECVFROM); pragma INTERFACE (C, RMDIR); pragma INTERFACE (C, C_SELECT); pragma INTERFACE (C, SEND); pragma INTERFACE (C, SENDTO); pragma INTERFACE (C, SETHOSTNAME); pragma INTERFACE (C, SETITIMER); pragma INTERFACE (C, SETSOCKOPT); pragma INTERFACE (C, SETTIMEOFDAY); pragma INTERFACE (C, SHUTDOWN); pragma INTERFACE (C, SIGBLOCK); pragma INTERFACE (C, SIGSETMASK); pragma INTERFACE (C, SOCKET); pragma INTERFACE (C, STAT); pragma INTERFACE (C, LSTAT); pragma INTERFACE (C, FSTAT); pragma INTERFACE (C, UMASK); pragma INTERFACE (C, UNLINK); pragma INTERFACE (C, WRITE); pragma M4_NAME (C_ACCEPT, M4_STRING(accept)); pragma M4_NAME (C_ACCESS, M4_STRING(access)); pragma M4_NAME (BIND, M4_STRING(bind)); pragma M4_NAME (CHMOD, M4_STRING(chmod)); pragma M4_NAME (FCHMOD, M4_STRING(fchmod)); pragma M4_NAME (CLOSE, M4_STRING(close)); pragma M4_NAME (CONNECT, M4_STRING(connect)); pragma M4_NAME (DUP, M4_STRING(dup)); pragma M4_NAME (DUP2, M4_STRING(dup2)); pragma M4_NAME (FCNTL, M4_STRING(fcntl)); pragma M4_NAME (FORK, M4_STRING(fork)); pragma M4_NAME (GETHOSTNAME, M4_STRING(gethostname)); pragma M4_NAME (GETITIMER, M4_STRING(getitimer)); pragma M4_NAME (GETPID, M4_STRING(getpid)); pragma M4_NAME (GETPPID, M4_STRING(getppid)); pragma M4_NAME (GETSOCKNAME, M4_STRING(getsockname)); pragma M4_NAME (GETSOCKOPT, M4_STRING(getsockopt)); pragma M4_NAME (GETTIMEOFDAY, M4_STRING(gettimeofday)); pragma M4_NAME (KILL, M4_STRING(kill)); pragma M4_NAME (LISTEN, M4_STRING(listen)); pragma M4_NAME (MKDIR, M4_STRING(mkdir)); pragma M4_NAME (MKFIFO, M4_STRING(mkfifo)); pragma M4_NAME (OPEN, M4_STRING(open)); pragma M4_NAME (PIPE, M4_STRING(pipe)); ifelse(M4SYSTEM,SUNOS,pragma M4_NAME (POLL, M4_STRING(poll));) ifelse(M4SYSTEM,HPUX,pragma M4_NAME (C_RAISE, M4_STRING(raise));) pragma M4_NAME (READ, M4_STRING(read)); pragma M4_NAME (RECV, M4_STRING(recv)); pragma M4_NAME (RECVFROM, M4_STRING(recvfrom)); pragma M4_NAME (RMDIR, M4_STRING(rmdir)); pragma M4_NAME (C_SELECT, M4_STRING(select)); pragma M4_NAME (SEND, M4_STRING(send)); pragma M4_NAME (SENDTO, M4_STRING(sendto)); pragma M4_NAME (SETHOSTNAME, M4_STRING(sethostname)); pragma M4_NAME (SETITIMER, M4_STRING(setitimer)); pragma M4_NAME (SETSOCKOPT, M4_STRING(setsockopt)); pragma M4_NAME (SETTIMEOFDAY, M4_STRING(settimeofday)); pragma M4_NAME (SHUTDOWN, M4_STRING(shutdown)); pragma M4_NAME (SIGBLOCK, M4_STRING(sigblock)); pragma M4_NAME (SIGSETMASK, M4_STRING(sigsetmask)); pragma M4_NAME (SOCKET, M4_STRING(socket)); pragma M4_NAME (STAT, M4_STRING(stat)); pragma M4_NAME (LSTAT, M4_STRING(lstat)); pragma M4_NAME (FSTAT, M4_STRING(fstat)); pragma M4_NAME (UMASK, M4_STRING(umask)); pragma M4_NAME (UNLINK, M4_STRING(unlink)); pragma M4_NAME (WRITE, M4_STRING(write)); end SYSTEM_CALLS;