This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Further <bits/shm.h> fixes


Hi!

1) #ifdef __USE_MISC starts after the added __BEGIN_DECLS, so __END_DECLS
   must be after the corresponding #endif, otherwise __END_DECLS will be
   missing if __USE_MISC is not defined
2) there is a lot of other bits/shm.h headers which need the same treatment

2004-08-12  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/bits/shm.h: Move __END_DECLS after
	__USE_MISC #endif.
	* sysdeps/generic/bits/shm.h: Add __BEGIN_DECLS for __getpagesize
	declaration.
	* sysdeps/gnu/bits/shm.h: Likewise.
	* sysdeps/unix/sysv/linux/alpha/bits/shm.h: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/bits/shm.h: Likewise.
	* sysdeps/unix/sysv/linux/s390/bits/shm.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/shm.h: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/bits/shm.h: Likewise.

--- libc/sysdeps/unix/sysv/linux/bits/shm.h.jj	2004-08-12 08:54:13.000000000 +0200
+++ libc/sysdeps/unix/sysv/linux/bits/shm.h	2004-08-12 09:23:20.946568975 +0200
@@ -97,6 +97,6 @@ struct shm_info
     unsigned long int swap_successes;
   };
 
-__END_DECLS
-
 #endif /* __USE_MISC */
+
+__END_DECLS
--- libc/sysdeps/unix/sysv/linux/alpha/bits/shm.h.jj	2002-12-20 11:31:07.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/alpha/bits/shm.h	2004-08-12 09:23:37.646660198 +0200
@@ -1,4 +1,5 @@
-/* Copyright (C) 1995, 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 2000, 2002, 2004
+   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
@@ -35,6 +36,8 @@
 #define SHM_LOCK	11		/* lock segment (root only) */
 #define SHM_UNLOCK	12		/* unlock segment (root only) */
 
+__BEGIN_DECLS
+
 /* Segment low boundary address multiple.  */
 #define SHMLBA		(__getpagesize ())
 extern int __getpagesize (void) __THROW __attribute__ ((__const__));
@@ -93,3 +96,5 @@ struct shm_info
   };
 
 #endif /* __USE_MISC */
+
+__END_DECLS
--- libc/sysdeps/unix/sysv/linux/s390/bits/shm.h.jj	2002-12-20 11:31:10.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/s390/bits/shm.h	2004-08-12 09:24:13.389434715 +0200
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2002, 2004 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
@@ -36,6 +36,8 @@
 #define SHM_LOCK	11		/* lock segment (root only) */
 #define SHM_UNLOCK	12		/* unlock segment (root only) */
 
+__BEGIN_DECLS
+
 /* Segment low boundary address multiple.  */
 #define SHMLBA		(__getpagesize ())
 extern int __getpagesize (void) __THROW __attribute__ ((__const__));
@@ -103,3 +105,5 @@ struct shm_info
   };
 
 #endif /* __USE_MISC */
+
+__END_DECLS
--- libc/sysdeps/unix/sysv/linux/powerpc/bits/shm.h.jj	2002-12-20 11:31:10.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/powerpc/bits/shm.h	2004-08-12 09:23:59.595837193 +0200
@@ -1,4 +1,5 @@
-/* Copyright (C) 1995, 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 2000, 2002, 2004
+   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
@@ -35,6 +36,8 @@
 #define SHM_LOCK       11              /* lock segment (root only) */
 #define SHM_UNLOCK     12              /* unlock segment (root only) */
 
+__BEGIN_DECLS
+
 /* Segment low boundary address multiple.  */
 #define SHMLBA		(__getpagesize ())
 extern int __getpagesize (void) __THROW __attribute__ ((__const__));
@@ -105,3 +108,5 @@ struct shm_info
   };
 
 #endif /* __USE_MISC */
+
+__END_DECLS
--- libc/sysdeps/unix/sysv/linux/sparc/bits/shm.h.jj	2002-12-20 11:31:11.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/sparc/bits/shm.h	2004-08-12 09:24:26.747108181 +0200
@@ -1,4 +1,5 @@
-/* Copyright (C) 1995, 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 2000, 2002, 2004
+   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
@@ -36,6 +37,8 @@
 #define SHM_LOCK	11		/* lock segment (root only) */
 #define SHM_UNLOCK	12		/* unlock segment (root only) */
 
+__BEGIN_DECLS
+
 /* Segment low boundary address multiple.  */
 #define SHMLBA		(__getpagesize ())
 extern int __getpagesize (void) __THROW __attribute__ ((__const__));
@@ -103,3 +106,5 @@ struct shm_info
   };
 
 #endif /* __USE_MISC */
+
+__END_DECLS
--- libc/sysdeps/unix/sysv/linux/x86_64/bits/shm.h.jj	2002-12-20 11:31:11.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/x86_64/bits/shm.h	2004-08-12 09:22:51.792647001 +0200
@@ -1,4 +1,5 @@
-/* Copyright (C) 1995, 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 2000, 2002, 2004
+   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
@@ -35,6 +36,8 @@
 #define SHM_LOCK	11		/* lock segment (root only) */
 #define SHM_UNLOCK	12		/* unlock segment (root only) */
 
+__BEGIN_DECLS
+
 /* Segment low boundary address multiple.  */
 #define SHMLBA		(__getpagesize ())
 extern int __getpagesize (void) __THROW __attribute__ ((__const__));
@@ -102,3 +105,5 @@ struct shm_info
   };
 
 #endif /* __USE_MISC */
+
+__END_DECLS
--- libc/sysdeps/gnu/bits/shm.h.jj	2002-10-24 01:49:02.000000000 +0200
+++ libc/sysdeps/gnu/bits/shm.h	2004-08-12 09:31:33.476793150 +0200
@@ -1,4 +1,5 @@
-/* Copyright (C) 1995, 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 2000, 2002, 2004
+   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
@@ -36,6 +37,8 @@
 #define SHM_LOCK	11		/* lock segment (root only) */
 #define SHM_UNLOCK	12		/* unlock segment (root only) */
 
+__BEGIN_DECLS
+
 /* Segment low boundary address multiple.  */
 #define SHMLBA		(__getpagesize ())
 extern int __getpagesize (void) __THROW __attribute__ ((__const__));
@@ -90,3 +93,5 @@ struct shm_info
   };
 
 #endif /* __USE_MISC */
+
+__END_DECLS
--- libc/sysdeps/generic/bits/shm.h.jj	2002-08-24 00:26:24.000000000 +0200
+++ libc/sysdeps/generic/bits/shm.h	2004-08-12 09:39:06.893849091 +0200
@@ -1,4 +1,5 @@
-/* Copyright (C) 1995, 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 2000, 2002, 2004
+   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
@@ -31,6 +32,8 @@
 #define SHM_LOCK	11		/* lock segment (root only) */
 #define SHM_UNLOCK	12		/* unlock segment (root only) */
 
+__BEGIN_DECLS
+
 /* Segment low boundary address multiple.  */
 #define SHMLBA		(__getpagesize ())
 extern int __getpagesize (void) __THROW __attribute__ ((__const__));
@@ -51,3 +54,5 @@ struct shmid_ds
     __pid_t shm_lpid;			/* pid of last shmop */
     shmatt_t shm_nattch;		/* number of current attaches */
   };
+
+__END_DECLS

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]