mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=3653
This commit is contained in:
parent
c53aa2bbec
commit
1d88e353c6
|
@ -13902,3 +13902,12 @@ Rom June 17 2004
|
||||||
- Tag for 3.13 release, all platforms
|
- Tag for 3.13 release, all platforms
|
||||||
boinc_core_release_3_13
|
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() {
|
struct utmp *getutent() {
|
||||||
if (ufp == NULL) {
|
if (ufp == NULL) {
|
||||||
#if defined(HAVE__ETC_UTMP)
|
#if defined(UTMP_LOCATION)
|
||||||
if ((ufp = fopen("/etc/utmp", "r")) == NULL) {
|
if ((ufp = fopen(UTMP_LOCATION, "r")) == NULL) {
|
||||||
#elif defined(HAVE__VAR_RUN_UTMP)
|
#elif defined(UTMP_FILE)
|
||||||
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) {
|
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
|
#endif
|
||||||
return((struct utmp *)NULL);
|
return((struct utmp *)NULL);
|
||||||
}
|
}
|
||||||
|
|
12
config.h.in
12
config.h.in
|
@ -296,15 +296,6 @@
|
||||||
/* Define to 1 if /dev/tty1 exists */
|
/* Define to 1 if /dev/tty1 exists */
|
||||||
#undef HAVE__DEV_TTY1
|
#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 */
|
/* Host for this compilation */
|
||||||
#undef HOSTTYPE
|
#undef HOSTTYPE
|
||||||
|
|
||||||
|
@ -348,6 +339,9 @@
|
||||||
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
|
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
|
||||||
#undef TM_IN_SYS_TIME
|
#undef TM_IN_SYS_TIME
|
||||||
|
|
||||||
|
/* utmp file location */
|
||||||
|
#undef UTMP_LOCATION
|
||||||
|
|
||||||
/* Version number of package */
|
/* Version number of package */
|
||||||
#undef VERSION
|
#undef VERSION
|
||||||
|
|
||||||
|
|
|
@ -7774,82 +7774,18 @@ _ACEOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo "$as_me:$LINENO: checking for /var/run/utmp" >&5
|
for f in /etc/utmp /var/adm/utmp /var/run/utmp; do
|
||||||
echo $ECHO_N "checking for /var/run/utmp... $ECHO_C" >&6
|
if test -f $f; then
|
||||||
if test "${ac_cv_file__var_run_utmp+set}" = set; then
|
utmp_file=$f
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
fi
|
||||||
else
|
done
|
||||||
test "$cross_compiling" = yes &&
|
if test -n "$utmp_file"; then
|
||||||
{ { 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
|
cat >>confdefs.h <<_ACEOF
|
||||||
#define HAVE__VAR_RUN_UTMP 1
|
#define UTMP_LOCATION "$utmp_file"
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
fi
|
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
|
if test -e "/dev/mouse"; then
|
||||||
|
|
||||||
|
|
10
configure.ac
10
configure.ac
|
@ -120,7 +120,15 @@ AC_TYPE_SIZE_T
|
||||||
AC_STRUCT_TM
|
AC_STRUCT_TM
|
||||||
AC_STRUCT_TIMEZONE
|
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
|
dnl Checks for device files
|
||||||
if test -e "/dev/mouse"; then
|
if test -e "/dev/mouse"; then
|
||||||
|
|
Loading…
Reference in New Issue