From 9004bc202e5ea7b8eabca183f4e6c6abe573f802 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 2 Jun 1996 19:47:36 +0000 Subject: [PATCH] Sun Jun 2 14:56:49 1996 Roland McGrath * login/pututline_r.c: Fix typo in sizeof for DATA_TMP alloca. * sysdeps/generic/gnu/types.h (__clock_t): New type. * sysdeps/unix/sysv/linux/gnu/types.h (__clock_t, __fsid_t): Define using kernel types. * time/time.h (clock_t): Include and define using __clock_t. --- ChangeLog | 11 ++++++++++ FAQ | 4 ++-- configure | 32 ++++++++++++++--------------- login/pututline_r.c | 2 +- sysdeps/generic/gnu/types.h | 3 ++- sysdeps/unix/sysv/linux/gnu/types.h | 10 +++------ time/time.h | 4 +++- 7 files changed, 37 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index ff74cae635..e660675dc0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ +Sun Jun 2 14:56:49 1996 Roland McGrath + + * login/pututline_r.c: Fix typo in sizeof for DATA_TMP alloca. + + * sysdeps/generic/gnu/types.h (__clock_t): New type. + Wed May 29 00:57:37 1996 David Mosberger-Tang + * sysdeps/unix/sysv/linux/gnu/types.h (__clock_t, __fsid_t): Define + using kernel types. + * time/time.h (clock_t): Include and define using + __clock_t. + * time/Makefile (tests): Add test-tz. * time/test-tz.c: New test. diff --git a/FAQ b/FAQ index cc26946b24..87df40e61f 100644 --- a/FAQ +++ b/FAQ @@ -207,12 +207,12 @@ incompatibilities: syscall name: wrapper name: declaring header file: ------------- ------------- ---------------------- - bdflush bdflush ??? + bdflush bdflush create_module create_module delete_module delete_module get_kernel_syms get_kernel_syms init_module init_module - syslog ksyslog_ctl ??? + syslog ksyslog_ctl ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ diff --git a/configure b/configure index 1758d037b0..6976018cdc 100755 --- a/configure +++ b/configure @@ -716,13 +716,10 @@ esac case "$host_os" in gnu* | linux* | sysv4* | solaris2*) # These systems always use the ELF format. - elf=yes ;; -esac - -# Linux/Alpha does not use ELF yet. -case "$host_cpu-$host_os" in -alpha*-linux*) - gnu_ld=no elf=no ;; + if test "$host_cpu" != alpha; then # Linux/Alpha is not fully ELF yet + elf=yes + fi + ;; esac machine=$config_machine @@ -1104,13 +1101,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1119,13 +1116,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1267,7 +1264,7 @@ if eval "test \"`echo '$''{'libc_cv_friendly_stddef'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libc_cv_friendly_stddef=yes else @@ -1390,16 +1387,17 @@ if eval "test \"`echo '$''{'libc_cv_have_initfini'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libc_cv_have_initfini=yes else @@ -1427,7 +1425,7 @@ if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* libc_cv_asm_underscores=yes else diff --git a/login/pututline_r.c b/login/pututline_r.c index 824cf3a391..62fc83bd58 100644 --- a/login/pututline_r.c +++ b/login/pututline_r.c @@ -63,7 +63,7 @@ pututline_r (const struct utmp *id, struct utmp_data *utmp_data) if (utmp_data->ubuf.ut_type != id->ut_type) { /* We must not overwrite the data in UTMP_DATA. */ - struct utmp_data *data_tmp = alloca (sizeof (utmp_data)); + struct utmp_data *data_tmp = alloca (sizeof (*data_tmp)); struct utmp *dummy; *data_tmp = *utmp_data; diff --git a/sysdeps/generic/gnu/types.h b/sysdeps/generic/gnu/types.h index 2a40702c51..3f0c806f19 100644 --- a/sysdeps/generic/gnu/types.h +++ b/sysdeps/generic/gnu/types.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 94, 95, 96 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 @@ -50,6 +50,7 @@ typedef long int __off_t; /* Type of file sizes and offsets. */ typedef int __pid_t; /* Type of process identifications. */ typedef int __ssize_t; /* Type of a byte count, or error. */ typedef __u_quad_t __fsid_t; /* Type of file system IDs. */ +typedef long int __clock_t; /* Type of CPU usage counts. */ /* Everythin' else. */ typedef long int __daddr_t; /* The type of a disk address. */ diff --git a/sysdeps/unix/sysv/linux/gnu/types.h b/sysdeps/unix/sysv/linux/gnu/types.h index 4f1b0961ee..939d205bda 100644 --- a/sysdeps/unix/sysv/linux/gnu/types.h +++ b/sysdeps/unix/sysv/linux/gnu/types.h @@ -43,6 +43,7 @@ typedef struct __u_long val[2]; } __u_quad_t; #endif + typedef __kernel_dev_t __dev_t; /* Type of device numbers. */ typedef __kernel_uid_t __uid_t; /* Type of user identifications. */ typedef __kernel_gid_t __gid_t; /* Type of group identifications. */ @@ -52,13 +53,7 @@ typedef __kernel_nlink_t __nlink_t; /* Type of file link counts. */ typedef __kernel_off_t __off_t; /* Type of file sizes and offsets. */ typedef __kernel_pid_t __pid_t; /* Type of process identifications. */ typedef __kernel_ssize_t __ssize_t; /* Type of a byte count, or error. */ -#ifdef __GNUC__ -typedef long long int __fsid_t; /* Type of file system IDs. */ -#else -typedef struct { /* Type of file system IDs. */ - long val[2]; -} __fsid_t; -#endif +typedef __kernel_fsid_t __fsid_t; /* Type of file system IDs. */ /* Everythin' else. */ typedef __kernel_daddr_t __daddr_t; /* The type of a disk address. */ @@ -68,5 +63,6 @@ typedef long int __swblk_t; /* Type of a swap block maybe? */ /* fd_set for select. */ typedef __kernel_fd_set __fd_set; +typedef __kernel_clock_t __clock_t; #endif /* gnu/types.h */ diff --git a/time/time.h b/time/time.h index 12c3ce43e8..5926d80c8e 100644 --- a/time/time.h +++ b/time/time.h @@ -57,8 +57,10 @@ __BEGIN_DECLS (defined(_TIME_H) || defined(__need_clock_t)) #define __clock_t_defined 1 +#include + /* Returned by `clock'. */ -typedef long int clock_t; +typedef __clock_t clock_t; #endif /* clock_t not defined and or need clock_t. */ #undef __need_clock_t