home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 26.ddi / root.3 / usr / ucbinclude / sys / sysmacros.h
Encoding:
C/C++ Source or Header  |  1990-12-08  |  1.5 KB  |  52 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10.  
  11. #ident    "@(#)//usr/ucbinclude/sys/sysmacros.h.sl 1.1 4.0 12/08/90 30289 AT&T-USL"
  12.  
  13. /*******************************************************************
  14.  
  15.         PROPRIETARY NOTICE (Combined)
  16.  
  17. This source code is unpublished proprietary information
  18. constituting, or derived under license from AT&T's UNIX(r) System V.
  19. In addition, portions of such source code were derived from Berkeley
  20. 4.3 BSD under license from the Regents of the University of
  21. California.
  22.  
  23.  
  24.  
  25.         Copyright Notice 
  26.  
  27. Notice of copyright on this source code product does not indicate 
  28. publication.
  29.  
  30.     (c) 1986,1987,1988,1989  Sun Microsystems, Inc
  31.     (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
  32.               All rights reserved.
  33. ********************************************************************/ 
  34.  
  35. /*
  36.  * Major/minor device constructing/busting macros.
  37.  */
  38.  
  39. #ifndef _SYS_SYSMACROS_H
  40. #define _SYS_SYSMACROS_H
  41.  
  42. /* major part of a device */
  43. #define       major(x)        ((int)(((unsigned)(x)>>8)&0377))
  44.  
  45. /* minor part of a device */
  46. #define       minor(x)        ((int)((x)&0377))
  47.  
  48. /* make a device number */
  49. #define       makedev(x,y)    ((dev_t)(((x)<<8) | (y)))
  50.  
  51. #endif /*!_SYS_SYSMACROS_H*/
  52.