* unixcompat.h: Emit warnings for the fallback case of the

major/minor/makedev macros.
This commit is contained in:
Roland Illig 2005-02-07 22:59:51 +00:00
parent b4b0f1dbfc
commit 2dbdf6d200
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2005-02-07 Roland Illig <roland.illig@gmx.de>
* unixcompat.h: Emit warnings for the fallback case of the
major/minor/makedev macros.
2005-02-07 Roland Illig <roland.illig@gmx.de>
* view.c: Changed type of view->blocks from int to size_t.

View File

@ -19,12 +19,15 @@
#endif
#ifndef major
# warning major() is undefined. Device numbers will not be shown correctly.
# define major(devnum) (((devnum) >> 8) & 0xff)
#endif
#ifndef minor
# warning minor() is undefined. Device numbers will not be show correctly.
# define minor(devnum) (((devnum) & 0xff)
#endif
#ifndef makedev
# warning makedev() is undefined. Device numbers will not be show correctly.
# define makedev(major,minor) ((((major) & 0xff) << 8) | ((minor) & 0xff))
#endif