*** empty log message ***

svn path=/trunk/boinc/; revision=3642
This commit is contained in:
Daniel Hsu 2004-06-17 21:52:11 +00:00
parent 612a2922af
commit caf6cebaa9
4 changed files with 97 additions and 1 deletions

View File

@ -445,7 +445,15 @@ static struct utmp ut;
struct utmp *getutent() {
if (ufp == NULL) {
#if defined(HAVE__ETC_UTMP)
if ((ufp = fopen("/etc/utmp", "r")) == NULL) {
#elif defined(HAVE__VAR_RUN_UTMP)
if ((ufp = fopen("/var/run/utmp", "r")) == NULL) {
#elif defined(HAVE__RUN_ADM_UTMP)
if ((ufp = fopen("/var/adm/utmp", "r")) == NULL) {
#else
if ((ufp = fopen(UTMP_FILE, "r")) == NULL) {
#endif
return((struct utmp *)NULL);
}
}

View File

@ -296,6 +296,15 @@
/* Define to 1 if /dev/tty1 exists */
#undef HAVE__DEV_TTY1
/* Define to 1 if you have the file `/etc/utmp'. */
#undef HAVE__ETC_UTMP
/* Define to 1 if you have the file `/var/adm/utmp'. */
#undef HAVE__VAR_ADM_UTMP
/* Define to 1 if you have the file `/var/run/utmp'. */
#undef HAVE__VAR_RUN_UTMP
/* Host for this compilation */
#undef HOSTTYPE

79
configure vendored
View File

@ -1,5 +1,5 @@
#! /bin/sh
# From configure.ac Revision: 1.94 .
# From configure.ac Revision: 1.95 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.57 for BOINC 3.11.
#
@ -7774,6 +7774,83 @@ _ACEOF
fi
echo "$as_me:$LINENO: checking for /var/run/utmp" >&5
echo $ECHO_N "checking for /var/run/utmp... $ECHO_C" >&6
if test "${ac_cv_file__var_run_utmp+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
test "$cross_compiling" = yes &&
{ { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
{ (exit 1); exit 1; }; }
if test -r "/var/run/utmp"; then
ac_cv_file__var_run_utmp=yes
else
ac_cv_file__var_run_utmp=no
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_file__var_run_utmp" >&5
echo "${ECHO_T}$ac_cv_file__var_run_utmp" >&6
if test $ac_cv_file__var_run_utmp = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE__VAR_RUN_UTMP 1
_ACEOF
fi
echo "$as_me:$LINENO: checking for /var/adm/utmp" >&5
echo $ECHO_N "checking for /var/adm/utmp... $ECHO_C" >&6
if test "${ac_cv_file__var_adm_utmp+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
test "$cross_compiling" = yes &&
{ { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
{ (exit 1); exit 1; }; }
if test -r "/var/adm/utmp"; then
ac_cv_file__var_adm_utmp=yes
else
ac_cv_file__var_adm_utmp=no
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_file__var_adm_utmp" >&5
echo "${ECHO_T}$ac_cv_file__var_adm_utmp" >&6
if test $ac_cv_file__var_adm_utmp = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE__VAR_ADM_UTMP 1
_ACEOF
fi
echo "$as_me:$LINENO: checking for /etc/utmp" >&5
echo $ECHO_N "checking for /etc/utmp... $ECHO_C" >&6
if test "${ac_cv_file__etc_utmp+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
test "$cross_compiling" = yes &&
{ { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
{ (exit 1); exit 1; }; }
if test -r "/etc/utmp"; then
ac_cv_file__etc_utmp=yes
else
ac_cv_file__etc_utmp=no
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_file__etc_utmp" >&5
echo "${ECHO_T}$ac_cv_file__etc_utmp" >&6
if test $ac_cv_file__etc_utmp = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE__ETC_UTMP 1
_ACEOF
fi
if test -e "/dev/mouse"; then
cat >>confdefs.h <<\_ACEOF

View File

@ -120,6 +120,8 @@ AC_TYPE_SIZE_T
AC_STRUCT_TM
AC_STRUCT_TIMEZONE
AC_CHECK_FILES(/var/run/utmp /var/adm/utmp /etc/utmp)
dnl Checks for device files
if test -e "/dev/mouse"; then
AC_DEFINE(HAVE__DEV_MOUSE, 1, [Define to 1 if /dev/mouse exists])