about summary refs log tree commit diff
path: root/libio/iofopncook.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-07-06 11:43:54 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-07-06 11:48:56 +0200
commit92777f34df805c2069d14c28fe976256d31ed0ab (patch)
tree73003379a3b6c00e36264b0ed7c558ade9071085 /libio/iofopncook.c
parent8321286846970af562a2ff6b7272f1cd0860d6c1 (diff)
downloadglibc-92777f34df805c2069d14c28fe976256d31ed0ab.tar.gz
glibc-92777f34df805c2069d14c28fe976256d31ed0ab.tar.xz
glibc-92777f34df805c2069d14c28fe976256d31ed0ab.zip
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.
Diffstat (limited to 'libio/iofopncook.c')
-rw-r--r--libio/iofopncook.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libio/iofopncook.c b/libio/iofopncook.c
index ae5df1707a..0d05fe6cfc 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;