Commit 1d88e353 authored by Daniel Hsu's avatar Daniel Hsu

*** empty log message ***

svn path=/trunk/boinc/; revision=3653
parent c53aa2bb
......@@ -13902,3 +13902,12 @@ Rom June 17 2004
- Tag for 3.13 release, all platforms
boinc_core_release_3_13
Daniel 17 June 2004
- Determine utmp location at compile time
config.h.in
configure
configure.ac
client/
hostinfo_unix.C
......@@ -445,14 +445,14 @@ 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 defined(UTMP_LOCATION)
if ((ufp = fopen(UTMP_LOCATION, "r")) == NULL) {
#elif defined(UTMP_FILE)
if ((ufp = fopen(UTMP_FILE, "r")) == NULL) {
#elif defined(_PATH_UTMP)
if ((ufp = fopen(_PATH_UTMP, "r")) == NULL) {
#else
if ((ufp = fopen("/etc/utmp", "r")) == NULL) {
#endif
return((struct utmp *)NULL);
}
......
......@@ -296,15 +296,6 @@
/* Define to 1 if /dev/tty1 exists */
#undef HAVE__DEV_TTY1
/* Define to 1 if you have the file `AC_File'. */
#undef HAVE__ETC_UTMP
/* Define to 1 if you have the file `AC_File'. */
#undef HAVE__VAR_ADM_UTMP
/* Define to 1 if you have the file `AC_File'. */
#undef HAVE__VAR_RUN_UTMP
/* Host for this compilation */
#undef HOSTTYPE
......@@ -348,6 +339,9 @@
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME
/* utmp file location */
#undef UTMP_LOCATION
/* Version number of package */
#undef VERSION
......
......@@ -7774,83 +7774,19 @@ _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
for f in /etc/utmp /var/adm/utmp /var/run/utmp; do
if test -f $f; then
utmp_file=$f
fi
done
if test -n "$utmp_file"; then
cat >>confdefs.h <<_ACEOF
#define HAVE__ETC_UTMP 1
#define UTMP_LOCATION "$utmp_file"
_ACEOF
fi
if test -e "/dev/mouse"; then
cat >>confdefs.h <<\_ACEOF
......
......@@ -120,7 +120,15 @@ AC_TYPE_SIZE_T
AC_STRUCT_TM
AC_STRUCT_TIMEZONE
AC_CHECK_FILES(/var/run/utmp /var/adm/utmp /etc/utmp)
dnl utmp file location
for f in /etc/utmp /var/adm/utmp /var/run/utmp; do
if test -f $f; then
utmp_file=$f
fi
done
if test -n "$utmp_file"; then
AC_DEFINE_UNQUOTED(UTMP_LOCATION, "$utmp_file", utmp file location)
fi
dnl Checks for device files
if test -e "/dev/mouse"; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment