Xref: utzoo comp.lang.c:36975 comp.unix.programmer:1292 Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!ukma!rutgers!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.lang.c,comp.unix.programmer Subject: Re: caddr_t Message-ID: <20353:Mar1209:10:2991@kramden.acf.nyu.edu> Date: 12 Mar 91 09:10:29 GMT References: <1991Mar8.192533.717@citib.com> <692@tndsyd.oz.au> Followup-To: comp.unix.programmer Organization: IR Lines: 19 In article <692@tndsyd.oz.au> berny@tndsyd.oz.au (Berny Goodheart) writes: > caddr_t Byte aligned Virtual memory address. > daddr_t Block number of a block device. > dev_t Major-Minor device number. > label_t Data block for 'setjmp' > off_t Byte offset in file. > paddr_t Physical memory address > These and other data types are defined in "types.h" and should only > be used in kernel code such as device drivers. Uh, no. On most UNIX systems, st_dev in a struct st has type dev_t, and you'd better use that if you want portable code. off_t is also used outside the kernel (for, e.g., lseek()), though I've seen systems where it doesn't exist. caddr_t is used in many outside libraries. POSIX defines dev_t, gid_t, ino_t, mode_t, nlink_t, off_t, pid_t, and uid_t. I wouldn't recommend that you use most of these in portable code. ---Dan