mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-05 19:14:27 +03:00
* unixcompat.h: Provides macros and functions that are missing in
some Unix variants. * Makefile.am: Added unixcompat.h.
This commit is contained in:
parent
ccc1b17f7d
commit
0e1609c2f9
@ -1,3 +1,9 @@
|
|||||||
|
2005-01-25 Roland Illig <roland.illig@gmx.de>
|
||||||
|
|
||||||
|
* unixcompat.h: Provides macros and functions that are missing in
|
||||||
|
some Unix variants.
|
||||||
|
* Makefile.am: Added unixcompat.h.
|
||||||
|
|
||||||
2005-01-25 Roland Illig <roland.illig@gmx.de>
|
2005-01-25 Roland Illig <roland.illig@gmx.de>
|
||||||
|
|
||||||
* dialog.h (widget_msg_t): Added WIDGET_RESIZED to inform widgets
|
* dialog.h (widget_msg_t): Added WIDGET_RESIZED to inform widgets
|
||||||
|
@ -59,7 +59,7 @@ SRCS = achown.c achown.h background.c background.h boxes.c boxes.h \
|
|||||||
slint.c subshell.c subshell.h textconf.c textconf.h \
|
slint.c subshell.c subshell.h textconf.c textconf.h \
|
||||||
tree.c tree.h treestore.c treestore.h tty.h user.c user.h \
|
tree.c tree.h treestore.c treestore.h tty.h user.c user.h \
|
||||||
util.c util.h utilunix.c view.c view.h vfsdummy.h widget.c \
|
util.c util.h utilunix.c view.c view.h vfsdummy.h widget.c \
|
||||||
widget.h win.c win.h wtools.c wtools.h
|
widget.h win.c win.h wtools.c wtools.h unixcompat.h
|
||||||
|
|
||||||
if CHARSET
|
if CHARSET
|
||||||
mc_SOURCES = $(SRCS) $(CHARSET_SRC)
|
mc_SOURCES = $(SRCS) $(CHARSET_SRC)
|
||||||
|
25
src/unixcompat.h
Normal file
25
src/unixcompat.h
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#ifndef MC_UNIXCOMPAT_H
|
||||||
|
#define MC_UNIXCOMPAT_H
|
||||||
|
|
||||||
|
/* This header file collects differences between the various Unix
|
||||||
|
* variants that are supported by the Midnight Commander and provides
|
||||||
|
* replacement routines if they are not natively available.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* The major/minor macros are not specified in SUSv3, so we can only hope
|
||||||
|
* they are provided by the operating system or emulate it.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <sys/types.h> /* BSD */
|
||||||
|
#ifdef HAVE_SYS_MKDEV_H
|
||||||
|
# include <sys/mkdev.h> /* Solaris 9 */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef major
|
||||||
|
# define major(devnum) (((devnum) >> 8) & 0xff)
|
||||||
|
#endif
|
||||||
|
#ifndef minor
|
||||||
|
# define minor(devnum) (((devnum) & 0xff)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user