* sysdeps/mach/hurd/times.c (__times) [NO_CREATION_TIME]: Don't try
to use BI.creation_time. * mach/Machrules (MIG): Add -x c to CPP value passed down.
This commit is contained in:
parent
30537cab78
commit
746f400783
|
@ -1,5 +1,10 @@
|
||||||
2002-02-16 Roland McGrath <roland@frob.com>
|
2002-02-16 Roland McGrath <roland@frob.com>
|
||||||
|
|
||||||
|
* sysdeps/mach/hurd/times.c (__times) [NO_CREATION_TIME]: Don't try
|
||||||
|
to use BI.creation_time.
|
||||||
|
|
||||||
|
* mach/Machrules (MIG): Add -x c to CPP value passed down.
|
||||||
|
|
||||||
* config.h.in: Add #undef HAVE_HOST_PAGE_SIZE.
|
* config.h.in: Add #undef HAVE_HOST_PAGE_SIZE.
|
||||||
* sysdeps/mach/configure.in: Check for host_page_size RPC to define it.
|
* sysdeps/mach/configure.in: Check for host_page_size RPC to define it.
|
||||||
* mach/mach_init.c (__mach_init) [HAVE_HOST_PAGE_SIZE]: Use
|
* mach/mach_init.c (__mach_init) [HAVE_HOST_PAGE_SIZE]: Use
|
||||||
|
|
|
@ -3499,12 +3499,12 @@ else
|
||||||
#line 3500 "configure"
|
#line 3500 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
int main()
|
main()
|
||||||
{
|
{
|
||||||
FILE *f=fopen("conftestval", "w");
|
FILE *f=fopen("conftestval", "w");
|
||||||
if (!f) return(1);
|
if (!f) exit(1);
|
||||||
fprintf(f, "%d\n", sizeof(long double));
|
fprintf(f, "%d\n", sizeof(long double));
|
||||||
return(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:3511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
if { (eval echo configure:3511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||||
|
@ -3737,6 +3737,8 @@ case "$add_ons" in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if test "`(cd $srcdir; pwd)`" = "`pwd`"; then
|
if test "`(cd $srcdir; pwd)`" = "`pwd`"; then
|
||||||
config_makefile=
|
config_makefile=
|
||||||
else
|
else
|
||||||
|
@ -3966,6 +3968,7 @@ s%@static_nss@%$static_nss%g
|
||||||
s%@nopic_initfini@%$nopic_initfini%g
|
s%@nopic_initfini@%$nopic_initfini%g
|
||||||
s%@DEFINES@%$DEFINES%g
|
s%@DEFINES@%$DEFINES%g
|
||||||
s%@linux_doors@%$linux_doors%g
|
s%@linux_doors@%$linux_doors%g
|
||||||
|
s%@mach_interface_list@%$mach_interface_list%g
|
||||||
s%@VERSION@%$VERSION%g
|
s%@VERSION@%$VERSION%g
|
||||||
s%@RELEASE@%$RELEASE%g
|
s%@RELEASE@%$RELEASE%g
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# Rules for MiG interfaces that want to go into the C library.
|
# Rules for MiG interfaces that want to go into the C library.
|
||||||
# Copyright (C) 1991,92,93,94,95,96,98,99,2001 Free Software Foundation, Inc.
|
# Copyright (C) 1991,92,93,94,95,96,98,99,2001,02
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
# This file is part of the GNU C Library.
|
# This file is part of the GNU C Library.
|
||||||
|
|
||||||
# The GNU C Library is free software; you can redistribute it and/or
|
# The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -56,7 +57,7 @@ MIGFLAGS = -DMACH_IPC_COMPAT=0 -DSTANDALONE -DTypeCheck=0 \
|
||||||
$(+includes) $(migdefines) -subrprefix __
|
$(+includes) $(migdefines) -subrprefix __
|
||||||
# Putting CC in the enivronment makes the mig wrapper script
|
# Putting CC in the enivronment makes the mig wrapper script
|
||||||
# use the same compiler setup we are using to run cpp.
|
# use the same compiler setup we are using to run cpp.
|
||||||
MIG := CC='${CC}' CPP='${CPP}' $(MIG)
|
MIG := CC='${CC}' CPP='${CPP} -x c' $(MIG)
|
||||||
|
|
||||||
.SUFFIXES: .defs # Just to set specified_rule_matched.
|
.SUFFIXES: .defs # Just to set specified_rule_matched.
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,90 @@
|
||||||
|
|
||||||
|
### Sanity checks for Mach header installation
|
||||||
|
ac_safe=`echo "mach/mach_types.h" | sed 'y%./+-%__p_%'`
|
||||||
echo $ac_n "checking for task_t in mach/mach_types.h""... $ac_c" 1>&6
|
echo $ac_n "checking for mach/mach_types.h""... $ac_c" 1>&6
|
||||||
echo "configure:6: checking for task_t in mach/mach_types.h" >&5
|
echo "configure:6: checking for mach/mach_types.h" >&5
|
||||||
if eval "test \"`echo '$''{'libc_cv_mach_task_t'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 11 "configure"
|
#line 11 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <mach/mach_types.h>
|
#include <mach/mach_types.h>
|
||||||
|
EOF
|
||||||
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
|
{ (eval echo configure:16: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
|
if test -z "$ac_err"; then
|
||||||
|
rm -rf conftest*
|
||||||
|
eval "ac_cv_header_$ac_safe=yes"
|
||||||
|
else
|
||||||
|
echo "$ac_err" >&5
|
||||||
|
echo "configure: failed program was:" >&5
|
||||||
|
cat conftest.$ac_ext >&5
|
||||||
|
rm -rf conftest*
|
||||||
|
eval "ac_cv_header_$ac_safe=no"
|
||||||
|
fi
|
||||||
|
rm -f conftest*
|
||||||
|
fi
|
||||||
|
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
||||||
|
echo "$ac_t""yes" 1>&6
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo "$ac_t""no" 1>&6
|
||||||
|
{ echo "configure: error: cannot find Mach headers" 1>&2; exit 1; }
|
||||||
|
fi
|
||||||
|
|
||||||
|
ac_safe=`echo "mach/mach_types.defs" | sed 'y%./+-%__p_%'`
|
||||||
|
echo $ac_n "checking for mach/mach_types.defs""... $ac_c" 1>&6
|
||||||
|
echo "configure:40: checking for mach/mach_types.defs" >&5
|
||||||
|
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||||
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
|
else
|
||||||
|
cat > conftest.$ac_ext <<EOF
|
||||||
|
#line 45 "configure"
|
||||||
|
#include "confdefs.h"
|
||||||
|
#include <mach/mach_types.defs>
|
||||||
|
EOF
|
||||||
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
|
{ (eval echo configure:50: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
|
if test -z "$ac_err"; then
|
||||||
|
rm -rf conftest*
|
||||||
|
eval "ac_cv_header_$ac_safe=yes"
|
||||||
|
else
|
||||||
|
echo "$ac_err" >&5
|
||||||
|
echo "configure: failed program was:" >&5
|
||||||
|
cat conftest.$ac_ext >&5
|
||||||
|
rm -rf conftest*
|
||||||
|
eval "ac_cv_header_$ac_safe=no"
|
||||||
|
fi
|
||||||
|
rm -f conftest*
|
||||||
|
fi
|
||||||
|
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
||||||
|
echo "$ac_t""yes" 1>&6
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo "$ac_t""no" 1>&6
|
||||||
|
{ echo "configure: error: cannot find Mach .defs files" 1>&2; exit 1; }
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
echo $ac_n "checking for task_t in mach/mach_types.h""... $ac_c" 1>&6
|
||||||
|
echo "configure:76: checking for task_t in mach/mach_types.h" >&5
|
||||||
|
if eval "test \"`echo '$''{'libc_cv_mach_task_t'+set}'`\" = set"; then
|
||||||
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
|
else
|
||||||
|
cat > conftest.$ac_ext <<EOF
|
||||||
|
#line 81 "configure"
|
||||||
|
#include "confdefs.h"
|
||||||
|
#include <mach/mach_types.h>
|
||||||
int main() {
|
int main() {
|
||||||
extern task_t foo;
|
extern task_t foo;
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:18: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:88: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
libc_cv_mach_task_t=task_t
|
libc_cv_mach_task_t=task_t
|
||||||
else
|
else
|
||||||
|
@ -31,19 +101,19 @@ if test $libc_cv_mach_task_t != task_t; then
|
||||||
DEFINES="$DEFINES -Dtask_t=task_port_t"
|
DEFINES="$DEFINES -Dtask_t=task_port_t"
|
||||||
fi
|
fi
|
||||||
echo $ac_n "checking for thread_t in mach/mach_types.h""... $ac_c" 1>&6
|
echo $ac_n "checking for thread_t in mach/mach_types.h""... $ac_c" 1>&6
|
||||||
echo "configure:35: checking for thread_t in mach/mach_types.h" >&5
|
echo "configure:105: checking for thread_t in mach/mach_types.h" >&5
|
||||||
if eval "test \"`echo '$''{'libc_cv_mach_thread_t'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'libc_cv_mach_thread_t'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 40 "configure"
|
#line 110 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <mach/mach_types.h>
|
#include <mach/mach_types.h>
|
||||||
int main() {
|
int main() {
|
||||||
extern thread_t foo;
|
extern thread_t foo;
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:47: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
libc_cv_mach_thread_t=thread_t
|
libc_cv_mach_thread_t=thread_t
|
||||||
else
|
else
|
||||||
|
@ -61,12 +131,12 @@ if test $libc_cv_mach_thread_t != thread_t; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking for creation_time in task_basic_info""... $ac_c" 1>&6
|
echo $ac_n "checking for creation_time in task_basic_info""... $ac_c" 1>&6
|
||||||
echo "configure:65: checking for creation_time in task_basic_info" >&5
|
echo "configure:135: checking for creation_time in task_basic_info" >&5
|
||||||
if eval "test \"`echo '$''{'libc_cv_mach_task_creation_time'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'libc_cv_mach_task_creation_time'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 70 "configure"
|
#line 140 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <mach/task_info.h>
|
#include <mach/task_info.h>
|
||||||
int main() {
|
int main() {
|
||||||
|
@ -76,7 +146,7 @@ long s = i->creation_time.seconds;
|
||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:80: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
libc_cv_mach_task_creation_time=yes
|
libc_cv_mach_task_creation_time=yes
|
||||||
else
|
else
|
||||||
|
@ -92,3 +162,77 @@ echo "$ac_t""$libc_cv_mach_task_creation_time" 1>&6
|
||||||
if test $libc_cv_mach_task_creation_time = no; then
|
if test $libc_cv_mach_task_creation_time = no; then
|
||||||
DEFINES="$DEFINES -DNO_CREATION_TIME=1"
|
DEFINES="$DEFINES -DNO_CREATION_TIME=1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
mach_interface_list=
|
||||||
|
for ifc in mach mach4 \
|
||||||
|
clock_priv host_priv host_security ledger lock_set \
|
||||||
|
processor processor_set task thread_act vm_map \
|
||||||
|
memory_object memory_object_default default_pager \
|
||||||
|
; do
|
||||||
|
ac_safe=`echo "mach/${ifc}.defs" | sed 'y%./+-%__p_%'`
|
||||||
|
echo $ac_n "checking for mach/${ifc}.defs""... $ac_c" 1>&6
|
||||||
|
echo "configure:175: checking for mach/${ifc}.defs" >&5
|
||||||
|
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||||
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
|
else
|
||||||
|
cat > conftest.$ac_ext <<EOF
|
||||||
|
#line 180 "configure"
|
||||||
|
#include "confdefs.h"
|
||||||
|
#include <mach/${ifc}.defs>
|
||||||
|
EOF
|
||||||
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
|
{ (eval echo configure:185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
|
if test -z "$ac_err"; then
|
||||||
|
rm -rf conftest*
|
||||||
|
eval "ac_cv_header_$ac_safe=yes"
|
||||||
|
else
|
||||||
|
echo "$ac_err" >&5
|
||||||
|
echo "configure: failed program was:" >&5
|
||||||
|
cat conftest.$ac_ext >&5
|
||||||
|
rm -rf conftest*
|
||||||
|
eval "ac_cv_header_$ac_safe=no"
|
||||||
|
fi
|
||||||
|
rm -f conftest*
|
||||||
|
fi
|
||||||
|
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
||||||
|
echo "$ac_t""yes" 1>&6
|
||||||
|
mach_interface_list="$mach_interface_list $ifc"
|
||||||
|
else
|
||||||
|
echo "$ac_t""no" 1>&6
|
||||||
|
fi
|
||||||
|
|
||||||
|
done
|
||||||
|
if test "x$mach_interface_list" = x; then
|
||||||
|
{ echo "configure: error: what manner of Mach is this?" 1>&2; exit 1; }
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo $ac_n "checking for host_page_size in mach_host.defs""... $ac_c" 1>&6
|
||||||
|
echo "configure:212: checking for host_page_size in mach_host.defs" >&5
|
||||||
|
if eval "test \"`echo '$''{'libc_cv_mach_host_page_size'+set}'`\" = set"; then
|
||||||
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
|
else
|
||||||
|
cat > conftest.$ac_ext <<EOF
|
||||||
|
#line 217 "configure"
|
||||||
|
#include "confdefs.h"
|
||||||
|
#include <mach/mach_host.defs>
|
||||||
|
EOF
|
||||||
|
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
||||||
|
egrep "host_page_size" >/dev/null 2>&1; then
|
||||||
|
rm -rf conftest*
|
||||||
|
libc_cv_mach_host_page_size=yes
|
||||||
|
else
|
||||||
|
rm -rf conftest*
|
||||||
|
libc_cv_mach_host_page_size=no
|
||||||
|
fi
|
||||||
|
rm -f conftest*
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "$ac_t""$libc_cv_mach_host_page_size" 1>&6
|
||||||
|
if test $libc_cv_mach_host_page_size = yes; then
|
||||||
|
cat >> confdefs.h <<\EOF
|
||||||
|
#define HAVE_HOST_PAGE_SIZE 1
|
||||||
|
EOF
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Return CPU and real time used by process and its children. Hurd version.
|
/* Return CPU and real time used by process and its children. Hurd version.
|
||||||
Copyright (C) 2001 Free Software Foundation, Inc.
|
Copyright (C) 2001,02 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -70,7 +70,11 @@ __times (struct tms *tms)
|
||||||
if (err)
|
if (err)
|
||||||
return __hurd_fail (err);
|
return __hurd_fail (err);
|
||||||
|
|
||||||
|
#if NO_CREATION_TIME
|
||||||
|
return 0; /* XXX */
|
||||||
|
#else
|
||||||
return (clock_from_time_value (&now)
|
return (clock_from_time_value (&now)
|
||||||
- clock_from_time_value (&bi.creation_time));
|
- clock_from_time_value (&bi.creation_time));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
weak_alias (__times, times)
|
weak_alias (__times, times)
|
||||||
|
|
Loading…
Reference in New Issue