COMP: add a check for makedev, which isn't available with the PGI compiler
on Cray XT3 Alex
This commit is contained in:
parent
c190756e24
commit
1d81cf994a
|
@ -107,6 +107,7 @@ FOREACH(func
|
||||||
glob
|
glob
|
||||||
major
|
major
|
||||||
minor
|
minor
|
||||||
|
makedev
|
||||||
)
|
)
|
||||||
CHECK_SYMBOL_EXISTS_EX("${func}")
|
CHECK_SYMBOL_EXISTS_EX("${func}")
|
||||||
ENDFOREACH(func)
|
ENDFOREACH(func)
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
/* Define if your system has a working minor */
|
/* Define if your system has a working minor */
|
||||||
#cmakedefine HAVE_MINOR @HAVE_MINOR@
|
#cmakedefine HAVE_MINOR @HAVE_MINOR@
|
||||||
|
|
||||||
|
/* Define if your system has a working minor */
|
||||||
|
#cmakedefine HAVE_MAKEDEV @HAVE_MAKEDEV@
|
||||||
|
|
||||||
/* Define to 1 if you have the <ctype.h> header file. */
|
/* Define to 1 if you have the <ctype.h> header file. */
|
||||||
#cmakedefine HAVE_CTYPE_H @HAVE_CTYPE_H@
|
#cmakedefine HAVE_CTYPE_H @HAVE_CTYPE_H@
|
||||||
|
|
||||||
|
|
|
@ -25,3 +25,11 @@
|
||||||
#ifndef HAVE_MINOR
|
#ifndef HAVE_MINOR
|
||||||
# define minor(dev) ((int)((dev) & 0xff))
|
# define minor(dev) ((int)((dev) & 0xff))
|
||||||
#endif
|
#endif
|
||||||
|
/* On Cray XT3 when using thr PGI pgcc 7.0.4 sys/sysmacros.h ends up without
|
||||||
|
makedev(), since __i386__ is not defined when GLIBC_HAVE_LONG_LONG should
|
||||||
|
be enabled in features.h */
|
||||||
|
#ifndef HAVE_MAKEDEV
|
||||||
|
# define makedev(major, minor) ((((int)((major) & 0xff)) << 8 ) \
|
||||||
|
| ((int)((minor) & 0xff)) )
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue