/*
    AUTOMATICALLY GENERATED BY tspec 2.10
    API SUBSET: xpg3:sys/msg.h
*/

#ifndef __TDF_XPG3_SYS_MSG_H
#define __TDF_XPG3_SYS_MSG_H

#ifdef __cplusplus
extern "C" {
#endif

#pragma TenDRA declaration block api__xpg3__sys_msg begin

#ifndef __TDF_XPG3_SYS_TYPES_H
#pragma extend interface "../../xpg3.api/sys/types.h"
#endif /* __TDF_XPG3_SYS_TYPES_H */
#ifndef __TDF_XPG3_SYS_IPC_H
#pragma extend interface "../../xpg3.api/sys/ipc.h"
#endif /* __TDF_XPG3_SYS_IPC_H */
#pragma token EXP const : int : MSG_NOERROR # xpg3.msg.MSG_NOERROR
/* These are unsigned short in xpg3, unsigned long in sysv */
#if __STRICT_SYSV
typedef unsigned long __local_msg_q_t;
typedef unsigned long __local_msg_l_t;
#else /* __STRICT_SYSV */
#if __STRICT_XPG3
typedef unsigned short __local_msg_q_t;
typedef unsigned short __local_msg_l_t;
#else /* __STRICT_XPG3 */
#pragma token VARIETY __local_msg_q_t # xpg3.msg.__local_msg_q_t
#pragma token VARIETY __local_msg_l_t # xpg3.msg.__local_msg_l_t
#endif /* __STRICT_XPG3 */
#endif /* __STRICT_SYSV */
/* This type has been abstracted */
#if __STRICT_XPG3
typedef pid_t __local_msg_pid_t;
#else /* __STRICT_XPG3 */
#pragma token VARIETY __local_msg_pid_t # xpg3.msg.__local_msg_pid_t
#endif /* __STRICT_XPG3 */
#pragma token STRUCT TAG msqid_ds # xpg3.msg.msqid_ds
#pragma token MEMBER struct ipc_perm : struct msqid_ds : msg_perm # xpg3.msg.msqid_ds.msg_perm
#pragma token MEMBER __local_msg_q_t : struct msqid_ds : msg_qnum # xpg3.msg.msqid_ds.msg_qnum
#pragma token MEMBER __local_msg_l_t : struct msqid_ds : msg_qbytes # xpg3.msg.msqid_ds.msg_qbytes
#pragma token MEMBER __local_msg_pid_t : struct msqid_ds : msg_lspid # xpg3.msg.msqid_ds.msg_lspid
#pragma token MEMBER __local_msg_pid_t : struct msqid_ds : msg_lrpid # xpg3.msg.msqid_ds.msg_lrpid
#pragma token MEMBER time_t : struct msqid_ds : msg_stime # xpg3.msg.msqid_ds.msg_stime
#pragma token MEMBER time_t : struct msqid_ds : msg_rtime # xpg3.msg.msqid_ds.msg_rtime
#pragma token MEMBER time_t : struct msqid_ds : msg_ctime # xpg3.msg.msqid_ds.msg_ctime
#pragma token FUNC int (key_t, int) : msgget # xpg3.msg.msgget
#pragma token FUNC int (int, void *, size_t, long, int) : msgrcv # xpg3.msg.msgrcv
#pragma token FUNC int (int, const void *, size_t, int) : msgsnd # xpg3.msg.msgsnd
#ifndef __BUILDING_LIBS
#pragma token FUNC int (int, int, struct msqid_ds *) : msgctl # xpg3.msg.msgctl
#else /* __BUILDING_LIBS */
#pragma token FUNC int (int, int, struct msqid_ds *) : __old_msgctl # xpg3.msg.msgctl
#endif /* __BUILDING_LIBS */

#pragma interface MSG_NOERROR
#if __STRICT_SYSV
#else /* __STRICT_SYSV */
#if __STRICT_XPG3
#else /* __STRICT_XPG3 */
#pragma interface __local_msg_q_t __local_msg_l_t
#endif /* __STRICT_XPG3 */
#endif /* __STRICT_SYSV */
#if __STRICT_XPG3
#else /* __STRICT_XPG3 */
#pragma interface __local_msg_pid_t
#endif /* __STRICT_XPG3 */
#pragma interface TAG msqid_ds TAG msqid_ds.msg_perm TAG msqid_ds.msg_qnum
#pragma interface TAG msqid_ds.msg_qbytes TAG msqid_ds.msg_lspid
#pragma interface TAG msqid_ds.msg_lrpid TAG msqid_ds.msg_stime
#pragma interface TAG msqid_ds.msg_rtime TAG msqid_ds.msg_ctime msgget
#pragma interface msgrcv msgsnd
#ifndef __BUILDING_LIBS
#pragma interface msgctl
#else /* __BUILDING_LIBS */
#pragma interface __old_msgctl
#endif /* __BUILDING_LIBS */

#pragma TenDRA declaration block end

#ifdef __cplusplus
}
#endif

#endif /* __TDF_XPG3_SYS_MSG_H */
