This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[COMMITTED PATCH] Fix -Wundef warnings for _IO_JUMPS_OFFSET.
- From: Roland McGrath <roland at hack dot frob dot com>
- To: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Thu, 1 May 2014 13:35:18 -0700 (PDT)
- Subject: [COMMITTED PATCH] Fix -Wundef warnings for _IO_JUMPS_OFFSET.
- Authentication-results: sourceware.org; auth=none
This does as the subject says. I briefly held hope that there was really
only one setting we were using and I would be able to remove a lot of dead
code all over libio. But it turns out _IO_JUMPS_OFFSET is set or not
differently for different configurations (ones that support the GLIBC_2.0
version set and ones that don't).
Thanks,
Roland
* libio/libioP.h [!_IO_USE_OLD_IO_FILE && !_G_IO_NO_BACKWARD_COMPAT]
(_IO_JUMPS_OFFSET): Define to 0.
--- a/libio/libioP.h
+++ b/libio/libioP.h
@@ -100,6 +100,8 @@ extern "C" {
#if (!defined _IO_USE_OLD_IO_FILE \
&& (!defined _G_IO_NO_BACKWARD_COMPAT || _G_IO_NO_BACKWARD_COMPAT == 0))
# define _IO_JUMPS_OFFSET 1
+#else
+# define _IO_JUMPS_OFFSET 0
#endif
#define _IO_JUMPS(THIS) (THIS)->vtable