about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-06-07 00:08:27 +0000
committerUlrich Drepper <drepper@redhat.com>1999-06-07 00:08:27 +0000
commitf21aa4c28f70da7efccf44f4be0d5239ac0aa711 (patch)
treec8c2e1cd7ed42f5a78ce4d87c9de094f10f06d8b /sysdeps/unix/sysv/linux
parent9a8fcca0b33c26759134a545ac45251df53418a3 (diff)
downloadglibc-f21aa4c28f70da7efccf44f4be0d5239ac0aa711.tar.gz
glibc-f21aa4c28f70da7efccf44f4be0d5239ac0aa711.tar.xz
glibc-f21aa4c28f70da7efccf44f4be0d5239ac0aa711.zip
Update.
1999-06-07  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/unix/sysv/linux/sys/sysmacros.h (makedev): Handle signed
	parameters.
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r--sysdeps/unix/sysv/linux/sys/sysmacros.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/sys/sysmacros.h b/sysdeps/unix/sysv/linux/sys/sysmacros.h
index 4c065393a6..63c1343284 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 */