This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


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

GNU C Library master sources branch master updated. glibc-2.16-ports-merge-517-g3a8db22


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  3a8db22f07e2ab5373d4a366672a7a7b158ada96 (commit)
       via  9fddec1a48b8ddf69c7599be9b3a47bf9e5c066c (commit)
      from  03ac099f6bc9157cdec50db10944e1d99ff07aa1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3a8db22f07e2ab5373d4a366672a7a7b158ada96

commit 3a8db22f07e2ab5373d4a366672a7a7b158ada96
Author: Andreas Jaeger <aj@suse.de>
Date:   Wed Oct 24 08:57:47 2012 +0200

    Always define off_t, mode_t, pid_t
    
    	* io/fcntl.h: Always define mode_t, off_t, pid_t and use these
    	types for creat, creat64, lockf, posix_fadvise, posix_fallocate.
    	[__USE_LARGEFILE64 && !__off64_t_defined]: Define off64_t.
    	[__USE_LARGEFILE64]: Use off64_t in declaration of lock64,
    	posix_fadvise64, posix_fallocate64.

diff --git a/ChangeLog b/ChangeLog
index a87510f..f67a38f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2012-10-24  Andreas Jaeger  <aj@suse.de>
 
+	* io/fcntl.h: Always define mode_t, off_t, pid_t and use these
+	types for creat, creat64, lockf, posix_fadvise, posix_fallocate.
+	[__USE_LARGEFILE64 && !__off64_t_defined]: Define off64_t.
+	[__USE_LARGEFILE64]: Use off64_t in declaration of lock64,
+	posix_fadvise64, posix_fallocate64.
+
 	* sysdeps/unix/sysv/linux/x86/bits/fcntl.h (F_GETLK, F_SETLK)
 	(F_SETLKW) [__x86_64]: Remove, provided by <bits/fcntl-linux.h>.
 	(F_GETLK, F_SETLK, F_SETLKW) [!__USE_FILE_OFFSET64 && !__x86_64__]:
diff --git a/io/fcntl.h b/io/fcntl.h
index 81f34bf..cc978f7 100644
--- a/io/fcntl.h
+++ b/io/fcntl.h
@@ -34,28 +34,32 @@ __BEGIN_DECLS
    numbers and flag bits for `open', `fcntl', et al.  */
 #include <bits/fcntl.h>
 
-#if defined __USE_XOPEN || defined __USE_XOPEN2K
-/* The Single Unix specification says that some more types are
-   available here.  */
-# ifndef __mode_t_defined
+/* POSIX.1-2001 specifies that these types are defined by <fcntl.h>.
+   Earlier POSIX standards permitted any type ending in `_t' to be defined
+   by any POSIX header, so we don't conditionalize the definitions here.  */
+#ifndef __mode_t_defined
 typedef __mode_t mode_t;
-#  define __mode_t_defined
-# endif
+# define __mode_t_defined
+#endif
 
-# ifndef __off_t_defined
-#  ifndef __USE_FILE_OFFSET64
+#ifndef __off_t_defined
+# ifndef __USE_FILE_OFFSET64
 typedef __off_t off_t;
-#  else
+# else
 typedef __off64_t off_t;
-#  endif
-#  define __off_t_defined
 # endif
+# define __off_t_defined
+#endif
+
+#if defined __USE_LARGEFILE64 && !defined __off64_t_defined
+typedef __off64_t off64_t;
+# define __off64_t_defined
+#endif
 
-# ifndef __pid_t_defined
+#ifndef __pid_t_defined
 typedef __pid_t pid_t;
-#  define __pid_t_defined
-# endif
-#endif	/* X/Open */
+# define __pid_t_defined
+#endif
 
 /* For XPG all symbols from <sys/stat.h> should also be available.  */
 #if defined __USE_XOPEN || defined __USE_XOPEN2K8
@@ -202,17 +206,17 @@ extern int openat64 (int __fd, const char *__file, int __oflag, ...)
    This function is a cancellation point and therefore not marked with
    __THROW.  */
 #ifndef __USE_FILE_OFFSET64
-extern int creat (const char *__file, __mode_t __mode) __nonnull ((1));
+extern int creat (const char *__file, mode_t __mode) __nonnull ((1));
 #else
 # ifdef __REDIRECT
-extern int __REDIRECT (creat, (const char *__file, __mode_t __mode),
+extern int __REDIRECT (creat, (const char *__file, mode_t __mode),
 		       creat64) __nonnull ((1));
 # else
 #  define creat creat64
 # endif
 #endif
 #ifdef __USE_LARGEFILE64
-extern int creat64 (const char *__file, __mode_t __mode) __nonnull ((1));
+extern int creat64 (const char *__file, mode_t __mode) __nonnull ((1));
 #endif
 
 #if !defined F_LOCK && (defined __USE_MISC || (defined __USE_XOPEN_EXTENDED \
@@ -231,7 +235,7 @@ extern int creat64 (const char *__file, __mode_t __mode) __nonnull ((1));
 # define F_TEST  3	/* Test a region for other processes locks.  */
 
 # ifndef __USE_FILE_OFFSET64
-extern int lockf (int __fd, int __cmd, __off_t __len);
+extern int lockf (int __fd, int __cmd, off_t __len);
 # else
 #  ifdef __REDIRECT
 extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len), lockf64);
@@ -240,7 +244,7 @@ extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len), lockf64);
 #  endif
 # endif
 # ifdef __USE_LARGEFILE64
-extern int lockf64 (int __fd, int __cmd, __off64_t __len);
+extern int lockf64 (int __fd, int __cmd, off64_t __len);
 # endif
 #endif
 
@@ -248,7 +252,7 @@ extern int lockf64 (int __fd, int __cmd, __off64_t __len);
 /* Advice the system about the expected behaviour of the application with
    respect to the file associated with FD.  */
 # ifndef __USE_FILE_OFFSET64
-extern int posix_fadvise (int __fd, __off_t __offset, __off_t __len,
+extern int posix_fadvise (int __fd, off_t __offset, off_t __len,
 			  int __advise) __THROW;
 # else
  # ifdef __REDIRECT_NTH
@@ -260,7 +264,7 @@ extern int __REDIRECT_NTH (posix_fadvise, (int __fd, __off64_t __offset,
 #  endif
 # endif
 # ifdef __USE_LARGEFILE64
-extern int posix_fadvise64 (int __fd, __off64_t __offset, __off64_t __len,
+extern int posix_fadvise64 (int __fd, off64_t __offset, off64_t __len,
 			    int __advise) __THROW;
 # endif
 
@@ -270,7 +274,7 @@ extern int posix_fadvise64 (int __fd, __off64_t __offset, __off64_t __len,
    This function is a possible cancellation point and therefore not
    marked with __THROW.  */
 # ifndef __USE_FILE_OFFSET64
-extern int posix_fallocate (int __fd, __off_t __offset, __off_t __len);
+extern int posix_fallocate (int __fd, off_t __offset, off_t __len);
 # else
  # ifdef __REDIRECT
 extern int __REDIRECT (posix_fallocate, (int __fd, __off64_t __offset,
@@ -281,7 +285,7 @@ extern int __REDIRECT (posix_fallocate, (int __fd, __off64_t __offset,
 #  endif
 # endif
 # ifdef __USE_LARGEFILE64
-extern int posix_fallocate64 (int __fd, __off64_t __offset, __off64_t __len);
+extern int posix_fallocate64 (int __fd, off64_t __offset, off64_t __len);
 # endif
 #endif
 

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=9fddec1a48b8ddf69c7599be9b3a47bf9e5c066c

commit 9fddec1a48b8ddf69c7599be9b3a47bf9e5c066c
Author: Andreas Jaeger <aj@suse.de>
Date:   Wed Oct 24 08:54:46 2012 +0200

    F_GETLK cleanup for <bits/fcntl.h>

diff --git a/ChangeLog b/ChangeLog
index 1484c2f..a87510f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2012-10-24  Andreas Jaeger  <aj@suse.de>
+
+	* sysdeps/unix/sysv/linux/x86/bits/fcntl.h (F_GETLK, F_SETLK)
+	(F_SETLKW) [__x86_64]: Remove, provided by <bits/fcntl-linux.h>.
+	(F_GETLK, F_SETLK, F_SETLKW) [!__USE_FILE_OFFSET64 && !__x86_64__]:
+	Likewise.
+	(F_GETLK, F_SETLK, F_SETLKW) [__USE_FILE_OFFSET64 && ! __x86_64__]:
+	Likewise.
+	(F_GETLK64, F_SETLK64, F_SETLKW64) [!__x86_64__]: Likewise.
+
+	* sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (F_GETLK, F_SETLK)
+	(F_SETLKW) [__USE_FILE_OFFSET64]: Remove, provided by
+	<bits/fcntl-linux.h>.
+	(F_GETLK64, F_SETLK64, F_SETLKW64) [__WORDSIZE == 64]: Likewise.
+
+	* sysdeps/unix/sysv/linux/s390/bits/fcntl.h (F_DUPFD, F_GETFD)
+	(F_SETFD, F_GETFL, F_SETFL): Remove, provided by <bits/fcntl-linux.h>.
+	(F_GETLK, F_SETLK, F_SETLKW) [__WORDSIZE == 64]: Likewise.
+	(F_GETLK, F_SETLK, F_SETLKW, F_GETLK64, F_SETLK64, F_SETLKW64)
+	[__WORDSIZE != 64]: Likewise.
+
 2012-10-23  Joseph Myers  <joseph@codesourcery.com>
 
 	* Makeconfig (run-built-tests): New variable.
diff --git a/sysdeps/unix/sysv/linux/s390/bits/fcntl.h b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
index ecf1baf..43eee7a 100644
--- a/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
@@ -29,33 +29,11 @@
 # define __O_LARGEFILE	0100000
 #endif
 
-/* Values for the second argument to `fcntl'.  */
-#define F_DUPFD		0	/* Duplicate file descriptor.  */
-#define F_GETFD		1	/* Get file descriptor flags.  */
-#define F_SETFD		2	/* Set file descriptor flags.  */
-#define F_GETFL		3	/* Get file status flags.  */
-#define F_SETFL		4	/* Set file status flags.  */
 #if __WORDSIZE == 64
-# define F_GETLK	5	/* Get record locking info.  */
-# define F_SETLK	6	/* Set record locking info (non-blocking).  */
-# define F_SETLKW	7	/* Set record locking info (blocking).	*/
 /* Not necessary, we always have 64-bit offsets.  */
 # define F_GETLK64	5	/* Get record locking info.  */
 # define F_SETLK64	6	/* Set record locking info (non-blocking).  */
 # define F_SETLKW64	7	/* Set record locking info (blocking).	*/
-#else
-# ifndef __USE_FILE_OFFSET64
-#  define F_GETLK	5	/* Get record locking info.  */
-#  define F_SETLK	6	/* Set record locking info (non-blocking).  */
-#  define F_SETLKW	7	/* Set record locking info (blocking).	*/
-# else
-#  define F_GETLK	F_GETLK64  /* Get record locking info.	*/
-#  define F_SETLK	F_SETLK64  /* Set record locking info (non-blocking).*/
-#  define F_SETLKW	F_SETLKW64 /* Set record locking info (blocking).  */
-# endif
-# define F_GETLK64	12	/* Get record locking info.  */
-# define F_SETLK64	13	/* Set record locking info (non-blocking).  */
-# define F_SETLKW64	14	/* Set record locking info (blocking).	*/
 #endif
 
 struct flock
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
index 0f4bf76..22e71fc 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
@@ -56,20 +56,12 @@
 # define F_GETLK	7	/* Get record locking info.  */
 # define F_SETLK	8	/* Set record locking info (non-blocking).  */
 # define F_SETLKW	9	/* Set record locking info (blocking).  */
-#else
-# define F_GETLK	F_GETLK64  /* Get record locking info.  */
-# define F_SETLK	F_SETLK64  /* Set record locking info (non-blocking).*/
-# define F_SETLKW	F_SETLKW64 /* Set record locking info (blocking).  */
 #endif
 
 #if __WORDSIZE == 64
 # define F_GETLK64	7	/* Get record locking info.  */
 # define F_SETLK64	8	/* Set record locking info (non-blocking).  */
 # define F_SETLKW64	9	/* Set record locking info (blocking).  */
-#else
-# define F_GETLK64	12	/* Get record locking info.  */
-# define F_SETLK64	13	/* Set record locking info (non-blocking).  */
-# define F_SETLKW64	14	/* Set record locking info (blocking).  */
 #endif
 
 /* For posix fcntl() and `l_type' field of a `struct flock' for lockf().  */
diff --git a/sysdeps/unix/sysv/linux/x86/bits/fcntl.h b/sysdeps/unix/sysv/linux/x86/bits/fcntl.h
index dcf4fc0..9251e75 100644
--- a/sysdeps/unix/sysv/linux/x86/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/x86/bits/fcntl.h
@@ -27,26 +27,10 @@
 #endif
 
 #ifdef __x86_64__
-# define F_GETLK	5	/* Get record locking info.  */
-# define F_SETLK	6	/* Set record locking info (non-blocking).  */
-# define F_SETLKW	7	/* Set record locking info (blocking).	*/
 /* Not necessary, we always have 64-bit offsets.  */
 # define F_GETLK64	5	/* Get record locking info.  */
 # define F_SETLK64	6	/* Set record locking info (non-blocking).  */
 # define F_SETLKW64	7	/* Set record locking info (blocking).	*/
-#else
-# ifndef __USE_FILE_OFFSET64
-#  define F_GETLK	5	/* Get record locking info.  */
-#  define F_SETLK	6	/* Set record locking info (non-blocking).  */
-#  define F_SETLKW	7	/* Set record locking info (blocking).	*/
-# else
-#  define F_GETLK	F_GETLK64  /* Get record locking info.	*/
-#  define F_SETLK	F_SETLK64  /* Set record locking info (non-blocking).*/
-#  define F_SETLKW	F_SETLKW64 /* Set record locking info (blocking).  */
-# endif
-# define F_GETLK64	12	/* Get record locking info.  */
-# define F_SETLK64	13	/* Set record locking info (non-blocking).  */
-# define F_SETLKW64	14	/* Set record locking info (blocking).	*/
 #endif
 
 

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                  |   27 ++++++++++++++
 io/fcntl.h                                 |   52 +++++++++++++++-------------
 sysdeps/unix/sysv/linux/s390/bits/fcntl.h  |   22 ------------
 sysdeps/unix/sysv/linux/sparc/bits/fcntl.h |    8 ----
 sysdeps/unix/sysv/linux/x86/bits/fcntl.h   |   16 --------
 5 files changed, 55 insertions(+), 70 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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