From b428b742cf54d423e5a7a68fcbec9473303eeafa Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 21 Feb 2007 11:15:54 +0000 Subject: Updated to fedora-glibc-20070221T1011 --- sysdeps/unix/closedir.c | 4 +- sysdeps/unix/opendir.c | 5 ++- sysdeps/unix/readdir.c | 7 +++- sysdeps/unix/sysv/linux/sys/acct.h | 72 +++++++++++++++++++++++++---------- sysdeps/unix/sysv/linux/x86_64/send.c | 7 ++-- 5 files changed, 68 insertions(+), 27 deletions(-) (limited to 'sysdeps/unix') diff --git a/sysdeps/unix/closedir.c b/sysdeps/unix/closedir.c index 09deee7e85..3d65e14f61 100644 --- a/sysdeps/unix/closedir.c +++ b/sysdeps/unix/closedir.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,1993,1995,1996,1998,2002,2003 +/* Copyright (C) 1991,1993,1995,1996,1998,2002,2003, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -45,7 +45,9 @@ __closedir (DIR *dirp) fd = dirp->fd; +#ifndef NOT_IN_libc __libc_lock_fini (dirp->lock); +#endif free ((void *) dirp); diff --git a/sysdeps/unix/opendir.c b/sysdeps/unix/opendir.c index 6aa738fb69..59772cda75 100644 --- a/sysdeps/unix/opendir.c +++ b/sysdeps/unix/opendir.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1991-1996,98,2000-2003,2005 Free Software Foundation, Inc. +/* Copyright (C) 1991-1996,98,2000-2003,2005,2007 + 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 @@ -173,7 +174,9 @@ __alloc_dir (int fd, bool close_fd, const struct stat64 *statp) dirp->allocation = allocation; dirp->fd = fd; +#ifndef NOT_IN_libc __libc_lock_init (dirp->lock); +#endif return dirp; } diff --git a/sysdeps/unix/readdir.c b/sysdeps/unix/readdir.c index 4a0f0890e9..13e5e9a021 100644 --- a/sysdeps/unix/readdir.c +++ b/sysdeps/unix/readdir.c @@ -1,5 +1,4 @@ -/* Copyright (C) 1991,92,93,94,95,96,97,99,2000,02 - Free Software Foundation, Inc. +/* Copyright (C) 1991-1997,1999,2000,2002,2007 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 @@ -42,7 +41,9 @@ __READDIR (DIR *dirp) DIRENT_TYPE *dp; int saved_errno = errno; +#ifndef NOT_IN_libc __libc_lock_lock (dirp->lock); +#endif do { @@ -110,7 +111,9 @@ __READDIR (DIR *dirp) /* Skip deleted files. */ } while (dp->d_ino == 0); +#ifndef NOT_IN_libc __libc_lock_unlock (dirp->lock); +#endif return dp; } diff --git a/sysdeps/unix/sysv/linux/sys/acct.h b/sysdeps/unix/sysv/linux/sys/acct.h index 9ee8564f70..47c63ebfb2 100644 --- a/sysdeps/unix/sysv/linux/sys/acct.h +++ b/sysdeps/unix/sysv/linux/sys/acct.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1998, 1999, 2007 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 @@ -21,6 +21,7 @@ #include +#include #define __need_time_t #include #include @@ -38,25 +39,50 @@ __BEGIN_DECLS typedef u_int16_t comp_t; struct acct - { - char ac_flag; /* Accounting flags. */ - u_int16_t ac_uid; /* Accounting user ID. */ - u_int16_t ac_gid; /* Accounting group ID. */ - u_int16_t ac_tty; /* Controlling tty. */ - u_int32_t ac_btime; /* Beginning time. */ - comp_t ac_utime; /* Accounting user time. */ - comp_t ac_stime; /* Accounting system time. */ - comp_t ac_etime; /* Accounting elapsed time. */ - comp_t ac_mem; /* Accounting average memory usage. */ - comp_t ac_io; /* Accounting chars transferred. */ - comp_t ac_rw; /* Accounting blocks read or written. */ - comp_t ac_minflt; /* Accounting minor pagefaults. */ - comp_t ac_majflt; /* Accounting major pagefaults. */ - comp_t ac_swaps; /* Accounting number of swaps. */ - u_int32_t ac_exitcode; /* Accounting process exitcode. */ - char ac_comm[ACCT_COMM+1]; /* Accounting command name. */ - char ac_pad[10]; /* Accounting padding bytes. */ - }; +{ + char ac_flag; /* Flags. */ + u_int16_t ac_uid; /* Real user ID. */ + u_int16_t ac_gid; /* Real group ID. */ + u_int16_t ac_tty; /* Controlling terminal. */ + u_int32_t ac_btime; /* Beginning time. */ + comp_t ac_utime; /* User time. */ + comp_t ac_stime; /* System time. */ + comp_t ac_etime; /* Elapsed time. */ + comp_t ac_mem; /* Average memory usage. */ + comp_t ac_io; /* Chars transferred. */ + comp_t ac_rw; /* Blocks read or written. */ + comp_t ac_minflt; /* Minor pagefaults. */ + comp_t ac_majflt; /* Major pagefaults. */ + comp_t ac_swaps; /* Number of swaps. */ + u_int32_t ac_exitcode; /* Process exitcode. */ + char ac_comm[ACCT_COMM+1]; /* Command name. */ + char ac_pad[10]; /* Padding bytes. */ +}; + + +struct acct_v3 +{ + char ac_flag; /* Flags */ + char ac_version; /* Always set to ACCT_VERSION */ + u_int16_t ac_tty; /* Control Terminal */ + u_int32_t ac_exitcode; /* Exitcode */ + u_int32_t ac_uid; /* Real User ID */ + u_int32_t ac_gid; /* Real Group ID */ + u_int32_t ac_pid; /* Process ID */ + u_int32_t ac_ppid; /* Parent Process ID */ + u_int32_t ac_btime; /* Process Creation Time */ + float ac_etime; /* Elapsed Time */ + comp_t ac_utime; /* User Time */ + comp_t ac_stime; /* System Time */ + comp_t ac_mem; /* Average Memory Usage */ + comp_t ac_io; /* Chars Transferred */ + comp_t ac_rw; /* Blocks Read or Written */ + comp_t ac_minflt; /* Minor Pagefaults */ + comp_t ac_majflt; /* Major Pagefaults */ + comp_t ac_swaps; /* Number of Swaps */ + char ac_comm[ACCT_COMM]; /* Command Name */ +}; + enum { @@ -66,6 +92,12 @@ enum AXSIG = 0x10 /* Killed by a signal. */ }; +#if __BYTE_ORDER == __BIG_ENDIAN +# define ACCT_BYTEORDER 0x80 /* Accounting file is big endian. */ +#else +# define ACCT_BYTEORDER 0x00 /* Accounting file is little endian. */ +#endif + #define AHZ 100 diff --git a/sysdeps/unix/sysv/linux/x86_64/send.c b/sysdeps/unix/sysv/linux/x86_64/send.c index c484ce69fe..fc768311f7 100644 --- a/sysdeps/unix/sysv/linux/x86_64/send.c +++ b/sysdeps/unix/sysv/linux/x86_64/send.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2002, 2007 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 @@ -25,11 +25,12 @@ ssize_t __libc_send (int fd, const void *buf, size_t n, int flags) { if (SINGLE_THREAD_P) - return INLINE_SYSCALL (sendto, 6, fd, buf, n, flags, NULL, NULL); + return INLINE_SYSCALL (sendto, 6, fd, buf, n, flags, NULL, (size_t) 0); int oldtype = LIBC_CANCEL_ASYNC (); - ssize_t result = INLINE_SYSCALL (sendto, 6, fd, buf, n, flags, NULL, NULL); + ssize_t result = INLINE_SYSCALL (sendto, 6, fd, buf, n, flags, NULL, + (size_t) 0); LIBC_CANCEL_RESET (oldtype); -- cgit v1.2.3