Print this page
remove support for non-ANSI compilation


   2  * CDDL HEADER START
   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*


  22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 
  26 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T     */
  27 /*        All Rights Reserved   */
  28 
  29 #ifndef _SYS_MKDEV_H
  30 #define _SYS_MKDEV_H
  31 
  32 #include <sys/types.h>
  33 
  34 #ifdef  __cplusplus
  35 extern "C" {
  36 #endif
  37 
  38 /*
  39  * SVR3/Pre-EFT device number constants.
  40  */
  41 #define ONBITSMAJOR     7       /* # of SVR3 major device bits */


  65 #define MAXMIN          MAXMIN64
  66 
  67 #else /* !_LP64 */
  68 
  69 #define NBITSMAJOR      NBITSMAJOR32
  70 #define NBITSMINOR      NBITSMINOR32
  71 #define MAXMAJ          MAXMAJ32
  72 #define MAXMIN          MAXMIN32
  73 
  74 #endif /* !_LP64 */
  75 
  76 #if !defined(_KERNEL)
  77 
  78 /*
  79  * Undefine sysmacros.h device macros.
  80  */
  81 #undef makedev
  82 #undef major
  83 #undef minor
  84 
  85 #if defined(__STDC__)
  86 
  87 extern dev_t makedev(const major_t, const minor_t);
  88 extern major_t major(const dev_t);
  89 extern minor_t minor(const dev_t);
  90 extern dev_t __makedev(const int, const major_t, const minor_t);
  91 extern major_t __major(const int, const dev_t);
  92 extern minor_t __minor(const int, const dev_t);
  93 
  94 #else
  95 
  96 extern dev_t makedev();
  97 extern major_t major();
  98 extern minor_t minor();
  99 extern dev_t __makedev();
 100 extern major_t __major();
 101 extern minor_t __minor();
 102 
 103 #endif  /* defined(__STDC__) */
 104 
 105 #define OLDDEV 0        /* old device format */
 106 #define NEWDEV 1        /* new device format */
 107 
 108 #define makedev(maj, min)       (__makedev(NEWDEV, maj, min))
 109 #define major(dev)              (__major(NEWDEV, dev))
 110 #define minor(dev)              (__minor(NEWDEV, dev))
 111 
 112 #endif  /* !defined(_KERNEL) */
 113 
 114 #ifdef  __cplusplus
 115 }
 116 #endif
 117 
 118 #endif  /* _SYS_MKDEV_H */


   2  * CDDL HEADER START
   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  23  *
  24  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  25  * Use is subject to license terms.
  26  */
  27 
  28 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T     */
  29 /*        All Rights Reserved   */
  30 
  31 #ifndef _SYS_MKDEV_H
  32 #define _SYS_MKDEV_H
  33 
  34 #include <sys/types.h>
  35 
  36 #ifdef  __cplusplus
  37 extern "C" {
  38 #endif
  39 
  40 /*
  41  * SVR3/Pre-EFT device number constants.
  42  */
  43 #define ONBITSMAJOR     7       /* # of SVR3 major device bits */


  67 #define MAXMIN          MAXMIN64
  68 
  69 #else /* !_LP64 */
  70 
  71 #define NBITSMAJOR      NBITSMAJOR32
  72 #define NBITSMINOR      NBITSMINOR32
  73 #define MAXMAJ          MAXMAJ32
  74 #define MAXMIN          MAXMIN32
  75 
  76 #endif /* !_LP64 */
  77 
  78 #if !defined(_KERNEL)
  79 
  80 /*
  81  * Undefine sysmacros.h device macros.
  82  */
  83 #undef makedev
  84 #undef major
  85 #undef minor
  86 


  87 extern dev_t makedev(const major_t, const minor_t);
  88 extern major_t major(const dev_t);
  89 extern minor_t minor(const dev_t);
  90 extern dev_t __makedev(const int, const major_t, const minor_t);
  91 extern major_t __major(const int, const dev_t);
  92 extern minor_t __minor(const int, const dev_t);
  93 











  94 #define OLDDEV 0        /* old device format */
  95 #define NEWDEV 1        /* new device format */
  96 
  97 #define makedev(maj, min)       (__makedev(NEWDEV, maj, min))
  98 #define major(dev)              (__major(NEWDEV, dev))
  99 #define minor(dev)              (__minor(NEWDEV, dev))
 100 
 101 #endif  /* !defined(_KERNEL) */
 102 
 103 #ifdef  __cplusplus
 104 }
 105 #endif
 106 
 107 #endif  /* _SYS_MKDEV_H */