Do test for field names in utsname structure in C++ rather than C to work around bug in g++ 3.0 prerelease that makes the names different in C and C++ (we only use the result in C++). r=cls@seawood.org b=63604

This commit is contained in:
dbaron%fas.harvard.edu 2001-03-11 18:09:12 +00:00
Родитель c85af27178
Коммит 81e520b8ea
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -1863,6 +1863,11 @@ else
AC_MSG_RESULT(no)
fi
dnl On the gcc trunk (as of 2001-02-09) _GNU_SOURCE, and thus __USE_GNU,
dnl are defined when compiling C++ but not C. Since the result of this
dnl test is used only in C++, do it in C++.
AC_LANG_CPLUSPLUS
AC_MSG_CHECKING(for uname.domainname)
AC_CACHE_VAL(ac_cv_have_uname_domainname_field,
[AC_TRY_COMPILE([#include <sys/utsname.h>],
@ -1893,6 +1898,8 @@ else
AC_MSG_RESULT(no)
fi
AC_LANG_C
AC_MSG_CHECKING(for 64-bit OS)
AC_TRY_RUN([ int main () {
if (sizeof(long) == 8) { return 0; } return 1; } ],