Print this page
remove support for non-ANSI compilation
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/msg.h
+++ new/usr/src/uts/common/sys/msg.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License, Version 1.0 only
6 6 * (the "License"). You may not use this file except in compliance
7 7 * with the License.
8 8 *
9 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 * or http://www.opensolaris.org/os/licensing.
11 11 * See the License for the specific language governing permissions
12 12 * and limitations under the License.
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
13 13 *
14 14 * When distributing Covered Code, include this CDDL HEADER in each
15 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 * If applicable, add the following below this CDDL HEADER, with the
17 17 * fields enclosed by brackets "[]" replaced with your own identifying
18 18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 19 *
20 20 * CDDL HEADER END
21 21 */
22 22 /*
23 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24 + *
23 25 * Copyright 1999-2003 Sun Microsystems, Inc. All rights reserved.
24 26 * Use is subject to license terms.
25 27 */
26 28
27 29 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28 30 /* All Rights Reserved */
29 31
30 32
31 33 #ifndef _SYS_MSG_H
32 34 #define _SYS_MSG_H
33 35
34 -#pragma ident "%Z%%M% %I% %E% SMI"
35 -
36 36 #include <sys/ipc.h>
37 37
38 38 #ifdef __cplusplus
39 39 extern "C" {
40 40 #endif
41 41
42 42 /*
43 43 * IPC Message Facility.
44 44 */
45 45
46 46 /*
47 47 * Implementation Constants.
48 48 */
49 49
50 50 /*
51 51 * Permission Definitions.
52 52 */
53 53 #define MSG_R 0400 /* read permission */
54 54 #define MSG_W 0200 /* write permission */
55 55
56 56 /*
57 57 * ipc_perm Mode Definitions.
58 58 */
59 59 #define MSG_RWAIT 01000 /* a reader is waiting for a message */
60 60 #define MSG_WWAIT 02000 /* a writer is waiting to send */
61 61
62 62 /*
63 63 * Message Operation Flags.
64 64 */
65 65 #define MSG_NOERROR 010000 /* no error if big message */
66 66
67 67 typedef unsigned long msgqnum_t;
68 68 typedef unsigned long msglen_t;
69 69
70 70 struct msg;
71 71 struct msqid_ds {
72 72 struct ipc_perm msg_perm; /* operation permission struct */
73 73 struct msg *msg_first; /* ptr to first message on q */
74 74 struct msg *msg_last; /* ptr to last message on q */
75 75 msglen_t msg_cbytes; /* current # bytes on q */
76 76 msgqnum_t msg_qnum; /* # of messages on q */
77 77 msglen_t msg_qbytes; /* max # of bytes on q */
78 78 pid_t msg_lspid; /* pid of last msgsnd */
79 79 pid_t msg_lrpid; /* pid of last msgrcv */
80 80 #if defined(_LP64)
81 81 time_t msg_stime; /* last msgsnd time */
82 82 time_t msg_rtime; /* last msgrcv time */
83 83 time_t msg_ctime; /* last change time */
84 84 #else
85 85 time_t msg_stime; /* last msgsnd time */
86 86 int32_t msg_pad1; /* reserved for time_t expansion */
87 87 time_t msg_rtime; /* last msgrcv time */
88 88 int32_t msg_pad2; /* time_t expansion */
89 89 time_t msg_ctime; /* last change time */
90 90 int32_t msg_pad3; /* time_t expansion */
91 91 #endif
92 92 short msg_cv;
93 93 short msg_qnum_cv;
94 94 long msg_pad4[3]; /* reserve area */
95 95 };
96 96
97 97 /*
98 98 * User message buffer template for msgsnd and msgrecv system calls.
99 99 */
100 100
101 101 #ifdef _KERNEL
102 102 struct ipcmsgbuf {
103 103 #else
104 104 struct msgbuf {
105 105 #endif /* _KERNEL */
106 106 #if defined(_XOPEN_SOURCE)
107 107 long _mtype; /* message type */
108 108 char _mtext[1]; /* message text */
109 109 #else
110 110 long mtype; /* message type */
111 111 char mtext[1]; /* message text */
112 112 #endif
113 113 };
114 114
115 115 /*
116 116 * Header and message header structures for msgsnap() system call.
117 117 */
118 118 struct msgsnap_head {
↓ open down ↓ |
73 lines elided |
↑ open up ↑ |
119 119 size_t msgsnap_size; /* bytes consumed/required in the buffer */
120 120 size_t msgsnap_nmsg; /* number of messages in the buffer */
121 121 };
122 122
123 123 struct msgsnap_mhead {
124 124 size_t msgsnap_mlen; /* number of bytes in message that follows */
125 125 long msgsnap_mtype; /* message type */
126 126 };
127 127
128 128 #if !defined(_KERNEL)
129 -#if defined(__STDC__)
130 129 int msgctl(int, int, struct msqid_ds *);
131 130 int msgget(key_t, int);
132 131 int msgids(int *, uint_t, uint_t *);
133 132 int msgsnap(int, void *, size_t, long);
134 133 ssize_t msgrcv(int, void *, size_t, long, int);
135 134 int msgsnd(int, const void *, size_t, int);
136 -#else /* __STDC__ */
137 -int msgctl();
138 -int msgget();
139 -int msgids();
140 -int msgsnap();
141 -int msgrcv();
142 -int msgsnd();
143 -#endif /* __STDC__ */
144 135 #endif /* ! _KERNEL */
145 136
146 137 #ifdef __cplusplus
147 138 }
148 139 #endif
149 140
150 141 #endif /* _SYS_MSG_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX