is_system_labeled privP modctl acl facl lltostr ulltostr _getauthnam \
_getauthattr deflt _getprofnam _getprofattr _getusernam _getuserattr \
_getauuserent _getauusernam _getexecattr vfsent fdwalk closefrom ipsecalg \
- gethostent sigsendset sigsend stack_getbounds thr_sighndlrinfo mkdev \
+ gethostent sigsendset sigsend stack_getbounds thr_sighndlrinfo \
_getexecprof _fgetuserattr priv_str _sbrk_grow_aligned cftime ascftime \
inet_ntoa_r
sysdep_routines += sys_fdsync sys_brk sys_fcntl sys_utssys sys_lwp_private \
sys/ptyvar.h sys/synch.h sys/fork.h sys/sockio.h sys/ioccom.h sys/tty.h \
sys/trap.h sys/sysconfig.h sys/ptms.h sys/stack.h sys/regset.h sys/fault.h \
sys/reg.h sys/siginfo.h sys/types32.h sys/isa_defs.h sys/int_types.h \
- sys/inttypes.h sys/atomic.h sys/machtypes.h sys/elf.h
+ sys/inttypes.h sys/atomic.h sys/machtypes.h sys/elf.h sys/mkdev.h
sysdep_headers += rtld_db.h pcsample.h atomic.h bits/machtypes.h
headers := $(filter-out sys/sysinfo.h sys/swap.h, $(headers))
endif
_link_aton; _link_ntoa; llseek; lltostr;
# m
- __makedev; __major; membar_enter; membar_exit; membar_producer;
- membar_consumer; memcntl; meminfo; __minor; modctl; mount;
+ membar_enter; membar_exit; membar_producer; membar_consumer; memcntl;
+ meminfo; modctl; mount;
# n
ntp_adjtime; ntp_gettime;
+++ /dev/null
-/* Copyright (C) 2008 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Bartley <dtbartle@csclub.uwaterloo.ca>, 2008.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#include <sys/types.h>
-#include <errno.h>
-#include <mkdevP.h>
-#include <sys/param.h>
-
-major_t __major (const int version, const dev_t devnum)
-{
- if ((version != OLDDEV && version != NEWDEV) || devnum == NODEV)
- {
- __set_errno (EINVAL);
- return NODEV;
- }
-
- if (version == OLDDEV)
- {
- if ((devnum >> O_BITSMINOR) > O_MAXMAJ)
- {
- __set_errno (EINVAL);
- return NODEV;
- }
-
- return devnum >> O_BITSMINOR;
- }
- else /* NEWDEV */
- {
- if ((devnum >> L_BITSMINOR) > L_MAXMAJ)
- {
- __set_errno (EINVAL);
- return NODEV;
- }
-
- return devnum >> L_BITSMINOR;
- }
-}
-
-
-minor_t __minor (const int version, const dev_t devnum)
-{
- if ((version != OLDDEV && version != NEWDEV) || devnum == NODEV)
- {
- __set_errno (EINVAL);
- return NODEV;
- }
-
- if (version == OLDDEV)
- return devnum & O_MAXMIN;
- else /* NEWDEV */
- return devnum & L_MAXMIN;
-}
-
-
-dev_t __makedev (const int version, const major_t majdev, const minor_t mindev)
-{
- if (version != OLDDEV && version != NEWDEV)
- {
- __set_errno (EINVAL);
- return NODEV;
- }
-
- if (version == OLDDEV)
- {
- if (majdev > O_MAXMAJ || mindev > O_MAXMIN)
- {
- __set_errno (EINVAL);
- return NODEV;
- }
- return (majdev << O_BITSMINOR) | mindev;
- }
- else /* NEWDEV */
- {
- if (majdev > L_MAXMAJ || mindev > L_MAXMIN)
- {
- __set_errno (EINVAL);
- return NODEV;
- }
-
- dev_t devnum = (majdev << L_BITSMINOR) | mindev;
- if (devnum == NODEV)
- __set_errno (EINVAL);
- return devnum;
- }
-}
+++ /dev/null
-/* Copyright (C) 2008 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by David Bartley <dtbartle@csclub.uwaterloo.ca>, 2008.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#ifndef _MKDEVP_H
-#define _MKDEVP_H
-
-#define OLDDEV 0
-#define NEWDEV 1
-
-#endif /* _MKDEVP_H */
#include <errno.h>
#include <sys/ptms.h>
#include <streams/stropts.h>
-#include <mkdevP.h>
+#include <sys/sysmacros.h>
/* Directory where we can find the slave pty nodes. */
#define _PATH_DEVPTS "/dev/pts/"
struct stat st;
if (fstat (fd, &st) < 0)
return -1;
- int ptyno = __minor (NEWDEV, st.st_rdev);
+ int ptyno = minor (st.st_rdev);
/* Buffer we use to print the number in. For a maximum size for
`int' of 8 bytes we never need more than 20 digits. */
# define L_MAXMIN L_MAXMIN32
# endif
-# define major(x) (major_t)((((unsigned)(x)) >> O_BITSMINOR) & O_MAXMAJ)
-# define minor(x) (minor_t)((x) & O_MAXMIN)
+# define major(x) (major_t)(((dev_t)(x)) >> L_BITSMINOR)
+# define getmajor(x) major(x)
+# define minor(x) (minor_t)((x) & L_MAXMIN)
+# define getminor(x) minor(x)
-# define makedev(x, y) (unsigned short)(((x) << O_BITSMINOR) | \
- ((y) & O_MAXMIN))
-# define makedevice(x, y) (dev_t)(((dev_t)(x) << L_BITSMINOR) | \
+# define makedev(x, y) (dev_t)(((dev_t)(x) << L_BITSMINOR) | \
((y) & L_MAXMIN))
+# define makedevice(x, y) makedev(x, y)
# define emajor(x) (major_t)(((unsigned int)(x) >> O_BITSMINOR) > \
O_MAXMAJ) ? NODEV : (((unsigned int)(x) >> O_BITSMINOR) & O_MAXMAJ)
# define eminor(x) (minor_t)((x) & O_MAXMIN)
-# define getemajor(x) (major_t)((((dev_t)(x) >> L_BITSMINOR) > L_MAXMAJ) ? \
- NODEV : (((dev_t)(x) >> L_BITSMINOR) & L_MAXMAJ))
-# define geteminor(x) (minor_t)((x) & L_MAXMIN)
-
# define cmpdev(x) (o_dev_t)((((x) >> L_BITSMINOR) > O_MAXMAJ || \
((x) & L_MAXMIN) > O_MAXMIN) ? NODEV : \
((((x) >> L_BITSMINOR) << O_BITSMINOR) | ((x) & O_MAXMIN)))
# define expdev(x) (dev_t)(((dev_t)(((x) >> O_BITSMINOR) & O_MAXMAJ) << \
L_BITSMINOR) | ((x) & O_MAXMIN))
-
# define howmany(x, y) (((x)+((y)-1))/(y))
# define roundup(x, y) ((((x)+((y)-1))/(y))*(y))
-#endif /* __USE_MISC */
-
-#ifdef __USE_MISC
-
# define IS_P2ALIGNED(v, a) ((((uintptr_t)(v)) & ((uintptr_t)(a) - 1)) == 0)
# define ISP2(x) (((x) & ((x) - 1)) == 0)