Author: ps-guest Date: 2013-05-09 19:23:10 +0000 (Thu, 09 May 2013) New Revision: 5572
Added: glibc-package/trunk/debian/patches/kfreebsd/local-freopen.diff Modified: glibc-package/trunk/debian/changelog glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff glibc-package/trunk/debian/patches/series Log: patches/kfreebsd/local-freopen.diff: support architecture without dup3() freebsd/local-sysdeps.diff: update to revision 4423 (from glibc-bsd). Modified: glibc-package/trunk/debian/changelog =================================================================== --- glibc-package/trunk/debian/changelog 2013-05-09 12:13:07 UTC (rev 5571) +++ glibc-package/trunk/debian/changelog 2013-05-09 19:23:10 UTC (rev 5572) @@ -30,7 +30,8 @@ sendfile syscall * patches/kfreebsd/local-linuxthreads-stackguard.diff: handle elf subdir removal - * kfreebsd/local-sysdeps.diff: update to revision 4422 (from glibc-bsd). + * patches/kfreebsd/local-freopen.diff: support architecture without dup3() + * kfreebsd/local-sysdeps.diff: update to revision 4423 (from glibc-bsd). -- Adam Conrad <adcon...@0c3.net> Tue, 07 May 2013 13:58:05 -0600 Added: glibc-package/trunk/debian/patches/kfreebsd/local-freopen.diff =================================================================== --- glibc-package/trunk/debian/patches/kfreebsd/local-freopen.diff (rev 0) +++ glibc-package/trunk/debian/patches/kfreebsd/local-freopen.diff 2013-05-09 19:23:10 UTC (rev 5572) @@ -0,0 +1,46 @@ +Index: eglibc-2.17/libio/freopen.c +=================================================================== +--- eglibc-2.17.orig/libio/freopen.c ++++ eglibc-2.17/libio/freopen.c +@@ -93,15 +93,16 @@ + (result->_flags2 & _IO_FLAGS2_CLOEXEC) != 0 + ? O_CLOEXEC : 0); + #else +-# define newfd 1 ++# define newfd -1 + #endif + + #ifndef __ASSUME_DUP3 + if (newfd < 0) + { ++# ifdef O_CLOEXEC + if (errno == ENOSYS) + __have_dup3 = -1; +- ++# endif + __dup2 (_IO_fileno (result), fd); + if ((result->_flags2 & _IO_FLAGS2_CLOEXEC) != 0) + __fcntl (fd, F_SETFD, FD_CLOEXEC); +Index: eglibc-2.17/libio/freopen64.c +=================================================================== +--- eglibc-2.17.orig/libio/freopen64.c ++++ eglibc-2.17/libio/freopen64.c +@@ -76,15 +76,16 @@ + (result->_flags2 & _IO_FLAGS2_CLOEXEC) != 0 + ? O_CLOEXEC : 0); + #else +-# define newfd 1 ++# define newfd -1 + #endif + + #ifndef __ASSUME_DUP3 + if (newfd < 0) + { ++# ifdef O_CLOEXEC + if (errno == ENOSYS) + __have_dup3 = -1; +- ++# endif + __dup2 (_IO_fileno (result), fd); + if ((result->_flags2 & _IO_FLAGS2_CLOEXEC) != 0) + __fcntl (fd, F_SETFD, FD_CLOEXEC); Modified: glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff =================================================================== --- glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff 2013-05-09 12:13:07 UTC (rev 5571) +++ glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff 2013-05-09 19:23:10 UTC (rev 5572) @@ -716,7 +716,7 @@ +weak_alias (__bind, bind) --- /dev/null +++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/dirent.h -@@ -0,0 +1,52 @@ +@@ -0,0 +1,55 @@ +/* Directory entry structure `struct dirent'. FreeBSD version. + Copyright (C) 1996-1998,2001-2002 Free Software Foundation, Inc. + This file is part of the GNU C Library. @@ -769,6 +769,9 @@ +#define _DIRENT_HAVE_D_RECLEN 1 +#define _DIRENT_HAVE_D_NAMLEN 1 +#define _DIRENT_HAVE_D_TYPE 1 ++ ++/* Inform libc code that these two types are effectively identical. */ ++# define _DIRENT_MATCHES_DIRENT64 1 --- /dev/null +++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/elf.h @@ -0,0 +1,37 @@ @@ -4685,9 +4688,9 @@ +#endif /* need timeval */ --- /dev/null +++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/typesizes.h -@@ -0,0 +1,95 @@ +@@ -0,0 +1,91 @@ +/* bits/typesizes.h -- underlying types for *_t. kFreeBSD version. -+ Copyright (C) 2002, 2003, 2010, 2012 Free Software Foundation, Inc. ++ Copyright (C) 2002, 2003, 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 @@ -4734,17 +4737,9 @@ +#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE +#define __FSFILCNT64_T_TYPE __UQUAD_TYPE +#define __ID_T_TYPE __U32_TYPE ++#define __CLOCK_T_TYPE __S32_TYPE +#define __FSWORD_T_TYPE __SWORD_TYPE + -+#if defined(__arm__) || defined(__powerpc__) -+#define __CLOCK_T_TYPE __U32_TYPE -+#elif defined(__i386__) -+/* clock_t is unsigned in FreeBSD/i386, but it's too late to fix that now... */ -+#define __CLOCK_T_TYPE __S32_TYPE -+#else -+#define __CLOCK_T_TYPE __S32_TYPE -+#endif -+ +/* + * This one is a bit tricky. It needs to match the size + * in the sys/${arch}/include/_types.h typedefs. @@ -4755,13 +4750,12 @@ + * necessary to implement function overload), so it must stay + * with __SLONGWORD_TYPE. + */ -+#if defined(__i386__) || defined(__amd64__) ++#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__) +#define __TIME_T_TYPE __SLONGWORD_TYPE -+#elif defined(__powerpc__) && !defined(__LP64__) -+#define __TIME_T_TYPE __S32_TYPE +#else +#define __TIME_T_TYPE __S64_TYPE +#endif ++ +#define __USECONDS_T_TYPE __U32_TYPE +#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE +#define __DADDR_T_TYPE __SQUAD_TYPE @@ -4776,6 +4770,11 @@ +#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE +#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE + ++/* Tell the libc code that off_t and off64_t are actually the same type ++ for all ABI purposes, even if possibly expressed as different base types ++ for C type-checking purposes. */ ++#define __OFF_T_MATCHES_OFF64_T 1 ++ +/* Number of descriptors that can fit in an `fd_set'. */ +#define __FD_SETSIZE 1024 + @@ -14016,7 +14015,7 @@ +#endif /* bits/sigthread.h */ --- /dev/null +++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/linuxthreads/bits/typesizes.h -@@ -0,0 +1,86 @@ +@@ -0,0 +1,91 @@ +/* bits/typesizes.h -- underlying types for *_t. kFreeBSD version. + Copyright (C) 2002, 2003, 2010 Free Software Foundation, Inc. + This file is part of the GNU C Library. @@ -14098,6 +14097,11 @@ +#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE +#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE + ++/* Tell the libc code that off_t and off64_t are actually the same type ++ for all ABI purposes, even if possibly expressed as different base types ++ for C type-checking purposes. */ ++#define __OFF_T_MATCHES_OFF64_T 1 ++ +/* Number of descriptors that can fit in an `fd_set'. */ +#define __FD_SETSIZE 1024 + Modified: glibc-package/trunk/debian/patches/series =================================================================== --- glibc-package/trunk/debian/patches/series 2013-05-09 12:13:07 UTC (rev 5571) +++ glibc-package/trunk/debian/patches/series 2013-05-09 19:23:10 UTC (rev 5572) @@ -141,6 +141,7 @@ kfreebsd/local-sysdeps.diff kfreebsd/local-scripts.diff kfreebsd/local-getaddrinfo-freebsd-kernel.diff +kfreebsd/local-freopen.diff m68k/local-dwarf2-buildfix.diff m68k/local-fpic.diff -- To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1uawqp-0000wd...@vasks.debian.org