public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Ulrich Drepper <drepper@redhat.com>
Cc: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: [PATCH] Some #include <kernel-features.h> additions
Date: Mon, 13 Aug 2007 13:39:00 -0000	[thread overview]
Message-ID: <20070813134002.GL4603@sunsite.mff.cuni.cz> (raw)

Hi!

The following sources use __ASSUME_* macros but don't include
kernel-features.h.  Although some of them might get that header
indirectly, some don't and IMHO it is better to be able to check for this
easily.  Most .c/.h files that use __ASSUME_* include kernel-features.h
explicitly.

2007-08-13  Jakub Jelinek  <jakub@redhat.com>

	* nscd/servicescache.c: Include kernel-features.h.
	* nscd/gai.c: Likewise.
	* sysdeps/unix/sysv/linux/statfs64.c: Likewise.
	* sysdeps/unix/sysv/linux/fstatfs64.c: Likewise.
	* sysdeps/unix/sysv/linux/fxstatat.c: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/mmap.S: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S: Likewise.
	* sysdeps/unix/sysv/linux/xstatconv.c: Likewise.
	* sysdeps/unix/sysv/linux/if_index.c: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/xstat.c: Likewise.
	* sysdeps/unix/sysv/linux/ifaddrs.c: Likewise.
nptl/
	* allocatestack.c: Include kernel-features.h.
	* pthread_create.c: Likewise.
	* pthread_mutex_init.c: Likewise.
	* init.c: Likewise.
	* pthread_cond_timedwait.c: Likewise.
	* sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
	* sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
	Likewise.
	* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
	Likewise.
	* sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
	* sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.

--- libc/nscd/servicescache.c.jj	2007-07-16 09:58:46.000000000 +0200
+++ libc/nscd/servicescache.c	2007-08-13 08:52:56.000000000 +0200
@@ -24,6 +24,7 @@
 #include <netdb.h>
 #include <unistd.h>
 #include <sys/mman.h>
+#include <kernel-features.h>
 
 #include "nscd.h"
 #include "dbg_log.h"
--- libc/nscd/gai.c.jj	2007-07-16 09:58:46.000000000 +0200
+++ libc/nscd/gai.c	2007-08-13 08:53:17.000000000 +0200
@@ -17,6 +17,7 @@
    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include <alloca.h>
+#include <kernel-features.h>
 /* This file uses the getaddrinfo code but it compiles it without NSCD
    support.  We just need a few symbol renames.  */
 #define __inet_aton inet_aton
--- libc/nptl/allocatestack.c.jj	2007-08-01 10:50:19.000000000 +0200
+++ libc/nptl/allocatestack.c	2007-08-13 08:54:16.000000000 +0200
@@ -28,6 +28,7 @@
 #include <dl-sysdep.h>
 #include <tls.h>
 #include <lowlevellock.h>
+#include <kernel-features.h>
 
 
 #ifndef NEED_SEPARATE_REGISTER_STACK
--- libc/nptl/pthread_create.c.jj	2007-08-01 10:50:19.000000000 +0200
+++ libc/nptl/pthread_create.c	2007-08-13 08:53:57.000000000 +0200
@@ -27,6 +27,7 @@
 #include <atomic.h>
 #include <libc-internal.h>
 #include <resolv.h>
+#include <kernel-features.h>
 
 #include <shlib-compat.h>
 
--- libc/nptl/pthread_mutex_init.c.jj	2007-08-13 08:35:02.000000000 +0200
+++ libc/nptl/pthread_mutex_init.c	2007-08-13 08:53:45.000000000 +0200
@@ -21,6 +21,7 @@
 #include <assert.h>
 #include <errno.h>
 #include <string.h>
+#include <kernel-features.h>
 #include "pthreadP.h"
 
 static const struct pthread_mutexattr default_attr =
--- libc/nptl/init.c.jj	2007-07-29 11:45:14.000000000 +0200
+++ libc/nptl/init.c	2007-08-13 08:54:07.000000000 +0200
@@ -33,6 +33,7 @@
 #include <shlib-compat.h>
 #include <smp.h>
 #include <lowlevellock.h>
+#include <kernel-features.h>
 
 
 /* Size and alignment of static TLS block.  */
--- libc/nptl/pthread_cond_timedwait.c.jj	2007-08-13 08:35:02.000000000 +0200
+++ libc/nptl/pthread_cond_timedwait.c	2007-08-13 08:53:36.000000000 +0200
@@ -23,6 +23,7 @@
 #include <lowlevellock.h>
 #include <pthread.h>
 #include <pthreadP.h>
+#include <kernel-features.h>
 
 #include <shlib-compat.h>
 
--- libc/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h.jj	2007-08-13 08:35:02.000000000 +0200
+++ libc/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h	2007-08-13 08:54:24.000000000 +0200
@@ -24,6 +24,7 @@
 #include <bits/pthreadtypes.h>
 #include <atomic.h>
 #include <sysdep.h>
+#include <kernel-features.h>
 
 
 #define __NR_futex		394
--- libc/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h.jj	2007-08-13 08:35:02.000000000 +0200
+++ libc/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h	2007-08-13 08:54:32.000000000 +0200
@@ -25,6 +25,7 @@
 #include <bits/pthreadtypes.h>
 #include <ia64intrin.h>
 #include <atomic.h>
+#include <kernel-features.h>
 
 #define __NR_futex		1230
 #define FUTEX_WAIT		0
--- libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S.jj	2007-08-01 10:50:19.000000000 +0200
+++ libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S	2007-08-13 08:55:03.000000000 +0200
@@ -21,6 +21,7 @@
 #include <lowlevellock.h>
 #include <lowlevelrwlock.h>
 #include <pthread-errnos.h>
+#include <kernel-features.h>
 
 
 	.text
--- libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S.jj	2007-08-01 10:50:19.000000000 +0200
+++ libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S	2007-08-13 08:55:18.000000000 +0200
@@ -21,6 +21,7 @@
 #include <lowlevellock.h>
 #include <lowlevelrwlock.h>
 #include <pthread-errnos.h>
+#include <kernel-features.h>
 
 
 	.text
--- libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S.jj	2007-08-01 10:50:19.000000000 +0200
+++ libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S	2007-08-13 08:54:48.000000000 +0200
@@ -21,6 +21,7 @@
 #include <lowlevellock.h>
 #include <lowlevelrwlock.h>
 #include <pthread-errnos.h>
+#include <kernel-features.h>
 
 
 	.text
--- libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S.jj	2007-08-01 10:50:19.000000000 +0200
+++ libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S	2007-08-13 08:54:40.000000000 +0200
@@ -20,6 +20,7 @@
 #include <sysdep.h>
 #include <lowlevellock.h>
 #include <lowlevelrwlock.h>
+#include <kernel-features.h>
 
 
 	.text
--- libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S.jj	2007-08-01 10:50:19.000000000 +0200
+++ libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S	2007-08-13 08:54:56.000000000 +0200
@@ -22,6 +22,7 @@
 #include <lowlevellock.h>
 #include <lowlevelcond.h>
 #include <pthread-errnos.h>
+#include <kernel-features.h>
 
 
 	.text
--- libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S.jj	2007-08-01 10:50:19.000000000 +0200
+++ libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S	2007-08-13 08:55:11.000000000 +0200
@@ -21,6 +21,7 @@
 #include <lowlevellock.h>
 #include <lowlevelrwlock.h>
 #include <pthread-errnos.h>
+#include <kernel-features.h>
 
 
 	.text
--- libc/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h.jj	2007-08-13 08:35:02.000000000 +0200
+++ libc/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h	2007-08-13 08:55:26.000000000 +0200
@@ -24,6 +24,7 @@
 #include <sys/param.h>
 #include <bits/pthreadtypes.h>
 #include <atomic.h>
+#include <kernel-features.h>
 
 #define SYS_futex		238
 #define FUTEX_WAIT		0
--- libc/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h.jj	2007-08-13 08:35:02.000000000 +0200
+++ libc/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h	2007-08-13 08:55:34.000000000 +0200
@@ -24,6 +24,7 @@
 #include <sys/param.h>
 #include <bits/pthreadtypes.h>
 #include <atomic.h>
+#include <kernel-features.h>
 
 #ifndef __NR_futex
 # define __NR_futex		221
--- libc/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h.jj	2007-08-13 08:35:02.000000000 +0200
+++ libc/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h	2007-08-13 08:55:42.000000000 +0200
@@ -24,6 +24,7 @@
 #include <sys/param.h>
 #include <bits/pthreadtypes.h>
 #include <atomic.h>
+#include <kernel-features.h>
 
 
 #define FUTEX_WAIT		0
--- libc/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S.jj	2007-08-04 21:42:29.000000000 +0200
+++ libc/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S	2007-08-13 08:55:50.000000000 +0200
@@ -22,6 +22,7 @@
 #include <lowlevelcond.h>
 #include <pthread-errnos.h>
 #include "lowlevel-atomic.h"
+#include <kernel-features.h>
 
 	.text
 
--- libc/sysdeps/unix/sysv/linux/statfs64.c.jj	2004-04-03 09:47:05.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/statfs64.c	2007-08-13 08:58:19.000000000 +0200
@@ -1,5 +1,5 @@
 /* Return information about the filesystem on which FILE resides.
-   Copyright (C) 1996-2000,2003,2004 Free Software Foundation, Inc.
+   Copyright (C) 1996-2000,2003,2004,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
@@ -22,6 +22,7 @@
 #include <sys/statfs.h>
 #include <stddef.h>
 #include <sysdep.h>
+#include <kernel-features.h>
 
 
 # if __ASSUME_STATFS64 == 0
--- libc/sysdeps/unix/sysv/linux/fstatfs64.c.jj	2003-06-24 20:58:15.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/fstatfs64.c	2007-08-13 08:58:47.000000000 +0200
@@ -1,5 +1,6 @@
 /* Return information about the filesystem on which FD resides.
-   Copyright (C) 1996,1997,1998,1999,2000,2003 Free Software Foundation, Inc.
+   Copyright (C) 1996,1997,1998,1999,2000,2003,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
@@ -22,6 +23,7 @@
 #include <sys/statfs.h>
 #include <stddef.h>
 #include <sysdep.h>
+#include <kernel-features.h>
 
 /* Defined in statfs64.c.  */
 extern int __no_statfs64 attribute_hidden;
--- libc/sysdeps/unix/sysv/linux/fxstatat.c.jj	2006-02-12 22:32:08.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/fxstatat.c	2007-08-13 08:58:12.000000000 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006, 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
@@ -30,6 +30,7 @@
 #include <sysdep.h>
 #include <sys/syscall.h>
 #include <bp-checks.h>
+#include <kernel-features.h>
 
 #include <xstatconv.h>
 
--- libc/sysdeps/unix/sysv/linux/s390/s390-32/mmap.S.jj	2003-12-06 01:18:40.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-32/mmap.S	2007-08-13 08:58:24.000000000 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2001, 2007 Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
    This file is part of the GNU C Library.
 
@@ -18,6 +18,7 @@
    02111-1307 USA.  */
 
 #include <sysdep.h>
+#include <kernel-features.h>
 
 #define EINVAL	22
 
--- libc/sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S.jj	2003-12-06 01:18:40.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S	2007-08-13 08:58:29.000000000 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2001, 2007 Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
    This file is part of the GNU C Library.
 
@@ -18,6 +18,7 @@
    02111-1307 USA.  */
 
 #include <sysdep.h>
+#include <kernel-features.h>
 
 #define EINVAL	22
 #define ENOSYS	38
--- libc/sysdeps/unix/sysv/linux/xstatconv.c.jj	2003-06-16 19:02:55.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/xstatconv.c	2007-08-13 08:58:06.000000000 +0200
@@ -1,5 +1,6 @@
 /* Convert between the kernel's `struct stat' format, and libc's.
-   Copyright (C) 1991,1995-1997,2000,2002,2003 Free Software Foundation, Inc.
+   Copyright (C) 1991,1995-1997,2000,2002,2003,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
@@ -20,6 +21,7 @@
 #include <errno.h>
 #include <sys/stat.h>
 #include <kernel_stat.h>
+#include <kernel-features.h>
 
 #ifdef STAT_IS_KERNEL_STAT
 
--- libc/sysdeps/unix/sysv/linux/if_index.c.jj	2005-06-14 01:55:23.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/if_index.c	2007-08-13 08:58:32.000000000 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005
+/* Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2007
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -28,6 +28,7 @@
 #include <sys/ioctl.h>
 #include <bits/libc-lock.h>
 #include <not-cancel.h>
+#include <kernel-features.h>
 
 #include "netlinkaccess.h"
 
--- libc/sysdeps/unix/sysv/linux/sparc/sparc64/xstat.c.jj	2006-01-09 20:44:10.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/xstat.c	2007-08-13 08:57:14.000000000 +0200
@@ -1,3 +1,5 @@
+#include <kernel-features.h>
+
 #include "../../i386/xstat.c"
 
 #ifdef __NR_stat64
--- libc/sysdeps/unix/sysv/linux/ifaddrs.c.jj	2007-03-16 11:33:57.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/ifaddrs.c	2007-08-13 08:57:34.000000000 +0200
@@ -33,6 +33,7 @@
 #include <sysdep.h>
 #include <time.h>
 #include <unistd.h>
+#include <kernel-features.h>
 
 #include "netlinkaccess.h"
 

	Jakub

             reply	other threads:[~2007-08-13 13:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-13 13:39 Jakub Jelinek [this message]
2007-08-13 18:34 ` Ulrich Drepper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070813134002.GL4603@sunsite.mff.cuni.cz \
    --to=jakub@redhat.com \
    --cc=drepper@redhat.com \
    --cc=libc-hacker@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).