From f21aa4c28f70da7efccf44f4be0d5239ac0aa711 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 7 Jun 1999 00:08:27 +0000 Subject: Update. 1999-06-07 Ulrich Drepper * sysdeps/unix/sysv/linux/sys/sysmacros.h (makedev): Handle signed parameters. --- sysdeps/unix/sysv/linux/sys/sysmacros.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sysdeps') diff --git a/sysdeps/unix/sysv/linux/sys/sysmacros.h b/sysdeps/unix/sysv/linux/sys/sysmacros.h index 4c06539..63c1343 100644 --- a/sysdeps/unix/sysv/linux/sys/sysmacros.h +++ b/sysdeps/unix/sysv/linux/sys/sysmacros.h @@ -27,11 +27,13 @@ #if defined __GNUC__ && __GNUC__ >= 2 # define major(dev) ((int)(((dev) >> 8) & 0xff)) # define minor(dev) ((int)((dev) & 0xff)) -# define makedev(major, minor) (((major) << 8) | (minor)) +# define makedev(major, minor) ((((unsigned int) (major)) << 8) \ + | ((unsigned int) (minor))) #else # define major(dev) (((dev).__val[0] >> 8) & 0xff) # define minor(dev) ((dev).__val[0] & 0xff) -# define makedev(major, minor) { (((major) << 8) | (minor)), 0 } +# define makedev(major, minor) { ((((unsigned int) (major)) << 8) \ + | ((unsigned int) (minor))), 0 } #endif #endif /* sys/sysmacros.h */ -- cgit v1.1