about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-06-27 06:21:51 +0000
committerRoland McGrath <roland@gnu.org>2003-06-27 06:21:51 +0000
commit768a8fcdedbd58048fb85e41535b5fc9e4866a7a (patch)
tree02ff8e8dca4414de253f0714a80e7c3496590262 /sysdeps
parent72541de928619746d4a4b909302807f449fa9309 (diff)
downloadglibc-768a8fcdedbd58048fb85e41535b5fc9e4866a7a.tar.gz
glibc-768a8fcdedbd58048fb85e41535b5fc9e4866a7a.tar.xz
glibc-768a8fcdedbd58048fb85e41535b5fc9e4866a7a.zip
* sysdeps/mach/configure.in: Barf rather than define NO_CREATION_TIME.
	* sysdeps/mach/configure: Regenerated.
	* sysdeps/mach/hurd/times.c (times_init): Function removed.
	(__times): Assume `creation_time' field is available.
	* sysdeps/mach/hurd/Makefile [$(subdir) = csu] (sysdep_routines):
	Don't append set-init.
	* sysdeps/mach/hurd/set-init.c: File removed.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/mach/configure94
-rw-r--r--sysdeps/mach/configure.in2
-rw-r--r--sysdeps/mach/hurd/Makefile1
-rw-r--r--sysdeps/mach/hurd/set-init.c23
-rw-r--r--sysdeps/mach/hurd/times.c20
5 files changed, 77 insertions, 63 deletions
diff --git a/sysdeps/mach/configure b/sysdeps/mach/configure
index 597a0a5b1b..76cea3165c 100644
--- a/sysdeps/mach/configure
+++ b/sysdeps/mach/configure
@@ -96,7 +96,11 @@ if test "${ac_cv_header_mach_mach_types_h+set}" = set; then
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <mach/mach_types.h>
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
@@ -119,7 +123,8 @@ if test -z "$ac_cpp_err"; then
   ac_cv_header_mach_mach_types_h=yes
 else
   echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
   ac_cv_header_mach_mach_types_h=no
 fi
 rm -f conftest.err conftest.$ac_ext
@@ -142,7 +147,11 @@ if test "${ac_cv_header_mach_mach_types_defs+set}" = set; then
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <mach/mach_types.defs>
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
@@ -165,7 +174,8 @@ if test -z "$ac_cpp_err"; then
   ac_cv_header_mach_mach_types_defs=yes
 else
   echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
   ac_cv_header_mach_mach_types_defs=no
 fi
 rm -f conftest.err conftest.$ac_ext
@@ -191,7 +201,11 @@ if test "${libc_cv_mach_task_t+set}" = set; then
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <mach/mach_types.h>
 int
 main ()
@@ -216,7 +230,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   libc_cv_mach_task_t=task_t
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 libc_cv_mach_task_t=task_port_t
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
@@ -233,7 +248,11 @@ if test "${libc_cv_mach_thread_t+set}" = set; then
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <mach/mach_types.h>
 int
 main ()
@@ -258,7 +277,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   libc_cv_mach_thread_t=thread_t
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 libc_cv_mach_thread_t=thread_port_t
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
@@ -276,7 +296,11 @@ if test "${libc_cv_mach_task_creation_time+set}" = set; then
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <mach/task_info.h>
 int
 main ()
@@ -304,7 +328,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   libc_cv_mach_task_creation_time=yes
 else
   echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 libc_cv_mach_task_creation_time=no
 fi
 rm -f conftest.$ac_objext conftest.$ac_ext
@@ -312,7 +337,9 @@ fi
 echo "$as_me:$LINENO: result: $libc_cv_mach_task_creation_time" >&5
 echo "${ECHO_T}$libc_cv_mach_task_creation_time" >&6
 if test $libc_cv_mach_task_creation_time = no; then
-  DEFINES="$DEFINES -DNO_CREATION_TIME=1"
+  { { echo "$as_me:$LINENO: error: you need Mach headers supporting task_info.creation_time" >&5
+echo "$as_me: error: you need Mach headers supporting task_info.creation_time" >&2;}
+   { (exit 1); exit 1; }; }
 fi
 
 mach_interface_list=
@@ -330,7 +357,11 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <mach/${ifc}.defs>
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
@@ -353,7 +384,8 @@ if test -z "$ac_cpp_err"; then
   eval "$as_ac_Header=yes"
 else
   echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
   eval "$as_ac_Header=no"
 fi
 rm -f conftest.err conftest.$ac_ext
@@ -394,7 +426,11 @@ if test "${libc_cv_mach_host_page_size+set}" = set; then
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <mach/mach_host.defs>
 
 _ACEOF
@@ -423,7 +459,11 @@ if test "${ac_cv_header_mach_machine_ndr_def_h+set}" = set; then
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <mach/machine/ndr_def.h>
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
@@ -446,7 +486,8 @@ if test -z "$ac_cpp_err"; then
   ac_cv_header_mach_machine_ndr_def_h=yes
 else
   echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
   ac_cv_header_mach_machine_ndr_def_h=no
 fi
 rm -f conftest.err conftest.$ac_ext
@@ -463,7 +504,11 @@ if test "${ac_cv_header_machine_ndr_def_h+set}" = set; then
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <machine/ndr_def.h>
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
@@ -486,7 +531,8 @@ if test -z "$ac_cpp_err"; then
   ac_cv_header_machine_ndr_def_h=yes
 else
   echo "$as_me: failed program was:" >&5
-  cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
   ac_cv_header_machine_ndr_def_h=no
 fi
 rm -f conftest.err conftest.$ac_ext
@@ -509,7 +555,11 @@ if test "${libc_cv_mach_i386_ioports+set}" = set; then
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <mach/i386/mach_i386.defs>
 
 _ACEOF
@@ -538,7 +588,11 @@ if test "${libc_cv_mach_i386_gdt+set}" = set; then
 else
   cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 #include <mach/i386/mach_i386.defs>
 
 _ACEOF
diff --git a/sysdeps/mach/configure.in b/sysdeps/mach/configure.in
index 8d9e06682d..d998889248 100644
--- a/sysdeps/mach/configure.in
+++ b/sysdeps/mach/configure.in
@@ -41,7 +41,7 @@ extern struct task_basic_info *i;
 long s = i->creation_time.seconds;
 ], libc_cv_mach_task_creation_time=yes, libc_cv_mach_task_creation_time=no)])
 if test $libc_cv_mach_task_creation_time = no; then
-  DEFINES="$DEFINES -DNO_CREATION_TIME=1"
+  AC_MSG_ERROR([you need Mach headers supporting task_info.creation_time])
 fi
 
 dnl
diff --git a/sysdeps/mach/hurd/Makefile b/sysdeps/mach/hurd/Makefile
index c86e220c2f..5f3da04b47 100644
--- a/sysdeps/mach/hurd/Makefile
+++ b/sysdeps/mach/hurd/Makefile
@@ -190,7 +190,6 @@ endif
 
 ifeq ($(subdir),csu)
 
-sysdep_routines += set-init
 extra-objs += static-start.o
 
 # We need special startup code for statically linked binaries.
diff --git a/sysdeps/mach/hurd/set-init.c b/sysdeps/mach/hurd/set-init.c
deleted file mode 100644
index f89a4697ac..0000000000
--- a/sysdeps/mach/hurd/set-init.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Copyright (C) 1991, 1992, 1994, 1995, 1997 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#include <stdlib.h>
-#include <set-hooks.h>
-
-DEFINE_HOOK_RUNNER (__libc_subinit, __libc_init,
-		    (int argc, char **argv, char **envp), (argc, argv, envp))
diff --git a/sysdeps/mach/hurd/times.c b/sysdeps/mach/hurd/times.c
index 4d537cad68..542f23dc76 100644
--- a/sysdeps/mach/hurd/times.c
+++ b/sysdeps/mach/hurd/times.c
@@ -1,5 +1,5 @@
 /* Return CPU and real time used by process and its children.  Hurd version.
-   Copyright (C) 2001,02 Free Software Foundation, Inc.
+   Copyright (C) 2001,2002,2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -33,17 +33,6 @@ clock_from_time_value (const time_value_t *t)
   return t->seconds * 1000000 + t->microseconds;
 }
 
-#if NO_CREATION_TIME
-static time_value_t startup_time;
-static void times_init (void) __attribute__ ((unused));
-static void
-times_init (void)
-{
-  __gettimeofday ((struct timeval *) &startup_time, NULL);
-}
-text_set_element (__libc_subinit, times_init);
-#endif
-
 /* Store the CPU time used by this process and all its
    dead children (and their dead children) in BUFFER.
    Return the elapsed real time, or (clock_t) -1 for errors.
@@ -80,12 +69,7 @@ __times (struct tms *tms)
   if (__gettimeofday ((struct timeval *) &now, NULL) < 0)
     return -1;
 
-#if NO_CREATION_TIME
-# define our_creation_time	startup_time
-#else
-# define our_creation_time	bi.creation_time
-#endif
   return (clock_from_time_value (&now)
-	  - clock_from_time_value (&our_creation_time));
+	  - clock_from_time_value (&bi.creation_time));
 }
 weak_alias (__times, times)