[Glibc-bsd-commits] r4862 - in trunk/freebsd-glue: debian include include/sys

Robert Millan rmh at alioth.debian.org
Sun Aug 4 16:24:16 UTC 2013


Author: rmh
Date: 2013-08-04 16:24:16 +0000 (Sun, 04 Aug 2013)
New Revision: 4862

Added:
   trunk/freebsd-glue/include/__want_lseek.h
Modified:
   trunk/freebsd-glue/debian/changelog
   trunk/freebsd-glue/debian/copyright
   trunk/freebsd-glue/include/stdio.h
   trunk/freebsd-glue/include/sys/types.h
Log:
FreeBSD <stdio.h> and <sys/types.h> have a kludge to declare lseek(). Duplicate the Glibc declaration here.

Modified: trunk/freebsd-glue/debian/changelog
===================================================================
--- trunk/freebsd-glue/debian/changelog	2013-08-04 16:21:28 UTC (rev 4861)
+++ trunk/freebsd-glue/debian/changelog	2013-08-04 16:24:16 UTC (rev 4862)
@@ -2,6 +2,8 @@
 
   * Put includes of <sys/kern/*.h> OUTSIDE the header protection (which
     they intentionally duplicate).
+  * FreeBSD <stdio.h> and <sys/types.h> have a kludge to declare
+    lseek(). Duplicate the Glibc declaration here.
 
  -- Robert Millan <rmh at debian.org>  Sun, 04 Aug 2013 18:20:40 +0200
 

Modified: trunk/freebsd-glue/debian/copyright
===================================================================
--- trunk/freebsd-glue/debian/copyright	2013-08-04 16:21:28 UTC (rev 4861)
+++ trunk/freebsd-glue/debian/copyright	2013-08-04 16:24:16 UTC (rev 4862)
@@ -122,6 +122,9 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
 
+Files:		include/__want_lseek.h
+Copyright:	1991-2009, 2010 Free Software Foundation, Inc.
+License:	LGPL-2.1
 
 License: LGPL-3+
  On Debian systems the full text of the GNU Lesser General Public

Added: trunk/freebsd-glue/include/__want_lseek.h
===================================================================
--- trunk/freebsd-glue/include/__want_lseek.h	                        (rev 0)
+++ trunk/freebsd-glue/include/__want_lseek.h	2013-08-04 16:24:16 UTC (rev 4862)
@@ -0,0 +1,51 @@
+#ifndef _LSEEK_DECLARED
+#define _LSEEK_DECLARED
+/* Copyright (C) 1991-2009, 2010 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+/*
+ *	POSIX Standard: 2.10 Symbolic Constants		<unistd.h>
+ */
+
+#include <features.h>
+
+__BEGIN_DECLS
+
+/* Move FD's file position to OFFSET bytes from the
+   beginning of the file (if WHENCE is SEEK_SET),
+   the current position (if WHENCE is SEEK_CUR),
+   or the end of the file (if WHENCE is SEEK_END).
+   Return the new file position.  */
+#ifndef __USE_FILE_OFFSET64
+extern __off_t lseek (int __fd, __off_t __offset, int __whence) __THROW;
+#else
+# ifdef __REDIRECT_NTH
+extern __off64_t __REDIRECT_NTH (lseek,
+				 (int __fd, __off64_t __offset, int __whence),
+				 lseek64);
+# else
+#  define lseek lseek64
+# endif
+#endif
+#ifdef __USE_LARGEFILE64
+extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)
+     __THROW;
+#endif
+
+__END_DECLS
+#endif /* _LSEEK_DECLARED */

Modified: trunk/freebsd-glue/include/stdio.h
===================================================================
--- trunk/freebsd-glue/include/stdio.h	2013-08-04 16:21:28 UTC (rev 4861)
+++ trunk/freebsd-glue/include/stdio.h	2013-08-04 16:24:16 UTC (rev 4862)
@@ -5,4 +5,9 @@
 
 #include_next <bsd/stdio.h>
 
+/* FreeBSD <stdio.h> has a few ugly kludges to declare a copy of
+   functions which actually belong to <unistd.h>. We do the same
+   here.  */
+#include <__want_lseek.h>
+
 #endif

Modified: trunk/freebsd-glue/include/sys/types.h
===================================================================
--- trunk/freebsd-glue/include/sys/types.h	2013-08-04 16:21:28 UTC (rev 4861)
+++ trunk/freebsd-glue/include/sys/types.h	2013-08-04 16:24:16 UTC (rev 4862)
@@ -12,6 +12,11 @@
 #  include <machine/endian.h>
 #  include <sys/select.h>
 
+/* FreeBSD <sys/types.h> has a few ugly kludges to declare a copy of
+   functions which actually belong to <unistd.h>. We do the same
+   here.  */
+#  include <__want_lseek.h>
+
 #endif /* _SYS_TYPES_H_ */
 
 #endif /* __FreeBSD_kernel__ */




More information about the Glibc-bsd-commits mailing list