[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[glibc] 01/01: patches/hurd-i386/cvs-PTR_MANGLE.diff: New patch to fix build



This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch glibc-2.24
in repository glibc.

commit 3d0e0d9878396e5ccda888401599c1670743d814
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Wed Jul 6 11:55:13 2016 +0200

    patches/hurd-i386/cvs-PTR_MANGLE.diff: New patch to fix build
---
 debian/changelog                             |   3 +-
 debian/patches/hurd-i386/cvs-PTR_MANGLE.diff | 110 +++++++++++++++++++++++++++
 debian/patches/series                        |   1 +
 3 files changed, 113 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index e1d4984..3f6b941 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 glibc (2.23.90+20160507.87523e9-2) UNRELEASED; urgency=medium
 
-  * 
+  [ Samuel Thibault ]
+  * patches/hurd-i386/cvs-PTR_MANGLE.diff: New patch to fix build.
 
  -- Aurelien Jarno <aurel32@debian.org>  Tue, 05 Jul 2016 20:50:17 +0200
 
diff --git a/debian/patches/hurd-i386/cvs-PTR_MANGLE.diff b/debian/patches/hurd-i386/cvs-PTR_MANGLE.diff
new file mode 100644
index 0000000..5c74d07
--- /dev/null
+++ b/debian/patches/hurd-i386/cvs-PTR_MANGLE.diff
@@ -0,0 +1,110 @@
+commit 92777f34df805c2069d14c28fe976256d31ed0ab
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date:   Wed Jul 6 11:43:54 2016 +0200
+
+    hurd: Fix PTR_{,DE}MANGLE calls
+    
+    	* libio/iofopncook.c (_IO_cookie_read, _IO_cookie_write,
+    	_IO_cookie_seek, _IO_cookie_close, _IO_old_cookie_seek)
+    	[!PTR_DEMANGLE]: Do not call PTR_DEMANGLE.
+    	(set_callbacks) [!PTR_MANGLE]: Do not call PTR_MANGLE.
+    	* libio/vtables.c (_IO_vtable_check)
+    	[!PTR_DEMANGLE]: Do not call PTR_DEMANGLE.
+    	* libio/libioP.h (IO_set_accept_foreign_vtables)
+    	[!PTR_MANGLE]: Do not call PTR_MANGLE.
+
+diff --git a/libio/iofopncook.c b/libio/iofopncook.c
+index ae5df17..0d05fe6 100644
+--- a/libio/iofopncook.c
++++ b/libio/iofopncook.c
+@@ -44,7 +44,9 @@ _IO_cookie_read (_IO_FILE *fp, void *buf, _IO_ssize_t size)
+ {
+   struct _IO_cookie_file *cfile = (struct _IO_cookie_file *) fp;
+   cookie_read_function_t *read_cb = cfile->__io_functions.read;
++#ifdef PTR_DEMANGLE
+   PTR_DEMANGLE (read_cb);
++#endif
+ 
+   if (read_cb == NULL)
+     return -1;
+@@ -57,7 +59,9 @@ _IO_cookie_write (_IO_FILE *fp, const void *buf, _IO_ssize_t size)
+ {
+   struct _IO_cookie_file *cfile = (struct _IO_cookie_file *) fp;
+   cookie_write_function_t *write_cb = cfile->__io_functions.write;
++#ifdef PTR_DEMANGLE
+   PTR_DEMANGLE (write_cb);
++#endif
+ 
+   if (write_cb == NULL)
+     {
+@@ -77,7 +81,9 @@ _IO_cookie_seek (_IO_FILE *fp, _IO_off64_t offset, int dir)
+ {
+   struct _IO_cookie_file *cfile = (struct _IO_cookie_file *) fp;
+   cookie_seek_function_t *seek_cb = cfile->__io_functions.seek;
++#ifdef PTR_DEMANGLE
+   PTR_DEMANGLE (seek_cb);
++#endif
+ 
+   return ((seek_cb == NULL
+ 	   || (seek_cb (cfile->__cookie, &offset, dir)
+@@ -91,7 +97,9 @@ _IO_cookie_close (_IO_FILE *fp)
+ {
+   struct _IO_cookie_file *cfile = (struct _IO_cookie_file *) fp;
+   cookie_close_function_t *close_cb = cfile->__io_functions.close;
++#ifdef PTR_DEMANGLE
+   PTR_DEMANGLE (close_cb);
++#endif
+ 
+   if (close_cb == NULL)
+     return 0;
+@@ -140,10 +148,12 @@ static void
+ set_callbacks (_IO_cookie_io_functions_t *target,
+ 	       _IO_cookie_io_functions_t source)
+ {
++#ifdef PTR_MANGLE
+   PTR_MANGLE (source.read);
+   PTR_MANGLE (source.write);
+   PTR_MANGLE (source.seek);
+   PTR_MANGLE (source.close);
++#endif
+   *target = source;
+ }
+ 
+@@ -228,7 +238,9 @@ _IO_old_cookie_seek (_IO_FILE *fp, _IO_off64_t offset, int dir)
+   struct _IO_cookie_file *cfile = (struct _IO_cookie_file *) fp;
+   int (*seek_cb) (_IO_FILE *, _IO_off_t, int)
+     = (int (*) (_IO_FILE *, _IO_off_t, int)) cfile->__io_functions.seek;;
++#ifdef PTR_DEMANGLE
+   PTR_DEMANGLE (seek_cb);
++#endif
+ 
+   if (seek_cb == NULL)
+     return _IO_pos_BAD;
+diff --git a/libio/libioP.h b/libio/libioP.h
+index 54dc35c..3e12876 100644
+--- a/libio/libioP.h
++++ b/libio/libioP.h
+@@ -906,7 +906,9 @@ extern void (*IO_accept_foreign_vtables) (void) attribute_hidden;
+ static inline void
+ IO_set_accept_foreign_vtables (void (*flag) (void))
+ {
++#ifdef PTR_MANGLE
+   PTR_MANGLE (flag);
++#endif
+   atomic_store_relaxed (&IO_accept_foreign_vtables, flag);
+ }
+ 
+diff --git a/libio/vtables.c b/libio/vtables.c
+index e364ea0..b361f44 100644
+--- a/libio/vtables.c
++++ b/libio/vtables.c
+@@ -41,7 +41,9 @@ _IO_vtable_check (void)
+ #ifdef SHARED
+   /* Honor the compatibility flag.  */
+   void (*flag) (void) = atomic_load_relaxed (&IO_accept_foreign_vtables);
++#ifdef PTR_DEMANGLE
+   PTR_DEMANGLE (flag);
++#endif
+   if (flag == &_IO_vtable_check)
+     return;
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 08402e0..4988862 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -136,6 +136,7 @@ hurd-i386/local-versions.diff
 #hurd-i386/submitted-anon-mmap-shared.diff
 hurd-i386/tg-faccessat.diff
 hurd-i386/tg-eintr.diff
+hurd-i386/cvs-PTR_MANGLE.diff
 
 i386/local-biarch.diff
 i386/local-cmov.diff

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-glibc/glibc.git


Reply to: