Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!oliveb!sun!gorodish!guy From: guy@gorodish.UUCP Newsgroups: comp.lang.c,comp.unix.wizards Subject: Re: pointer alignment when int != char * Message-ID: <26910@sun.uucp> Date: Mon, 31-Aug-87 16:10:38 EDT Article-I.D.: sun.26910 Posted: Mon Aug 31 16:10:38 1987 Date-Received: Wed, 2-Sep-87 00:44:06 EDT References: <493@its63b.ed.ac.uk> <6061@brl-smoke.ARPA> <3812@spool.WISC.EDU> <588@murphy.UUCP> Sender: news@sun.uucp Lines: 16 Xref: utgpu comp.lang.c:3902 comp.unix.wizards:3721 > However, I will say this, because I don't think the standard has really > addressed it: there should be a way to take any pointer and generate a byte > offset from byte 0 in whatever address space the code is running in. The > reason is that you need such a beast to feed to lseek if you want to access > something through one of the /dev/mem devices (or maybe /proc). The standard should NOT address this. The standard mentions neither "lseek" nor "/dev/mem" nor "/proc". This sort of thing is rather non-portable, and is as such completely outside the scope of the standard. Since getting at some other address space must be done in a different fashion on different implementations, it is perfectly OK to require that getting the location in that other address space also be done in a different fashion on different implementations. Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com