🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5252

Re: switch (expression)

#5252
From: Doug Gwyn
Date: Fri, 29 Jul 1988 02:43
16 lines
1311 bytes
In article <755@vsi.UUCP> sullivan@vsi.UUCP (Michael T Sullivan) writes:
>I don't know about casting should be avoided.  I'm looking at shmop(2) manual
>page for our 3B2 (shared memory operation) and it says:
>	"Shmat {which is a char* function -mts} returns the data segment
>	start address of the attached shared memory segment...
>	Otherwise, a value of -1 is returned and errno is set to indicate
>	the error."
>Somebody at AT&T must think casting a pointer to an int (or a long) isn't
>such a bad idea, unless I'm missing something (it has been known to happen).

That's a well-known serious design botch on AT&T's part.
At the time of the UNIX/RT-UNIX/TS merge, when the IPC
stuff first was wedged into USG UNIX 3.0 to make 4.0,
the problem with this practice should have been evident
(unlike the situation with brk(2)).  Therefore it's really
inexcusable.
Technical Details
Message-ID: <8254@brl-smoke.ARPA>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!ames!umd5!brl-adm!brl-smoke!gwyn
References: <1988Jul12.105547.13268@light.uucp> <755@vsi.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!ames!umd5!brl-adm!brl-smoke!gwyn
From: gwyn@brl-smoke.ARPA (Doug Gwyn )
Newsgroups: comp.std.c
Subject: Re: switch (expression)
Message-ID: <8254@brl-smoke.ARPA>
Date: 29 Jul 88 02:43:57 GMT
References: <1988Jul12.105547.13268@light.uucp> <755@vsi.UUCP>
Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>)
Organization: Ballistic Research Lab (BRL), APG, MD.
Lines: 15