make regoff_t and regex_t match C++ ABI
authorRich Felker <dalias@aerifal.cx>
Mon, 22 Jul 2013 18:39:59 +0000 (14:39 -0400)
committerRich Felker <dalias@aerifal.cx>
Mon, 22 Jul 2013 18:39:59 +0000 (14:39 -0400)
for regoff_t, it's impossible to match on 64-bit archs because glibc
defined the type in a non-conforming way. however this change makes
the type match on 32-bit archs.

include/alltypes.h.in
include/regex.h

index 8335899661482ad32676ce6a1a936711c60d2f3e..f3481fc23b0b4f4dc6255b21400da8d21d7d28db 100644 (file)
@@ -3,6 +3,7 @@ TYPEDEF unsigned _Addr uintptr_t;
 TYPEDEF _Addr ptrdiff_t;
 TYPEDEF _Addr ssize_t;
 TYPEDEF _Addr intptr_t;
+TYPEDEF _Addr regoff_t;
 
 TYPEDEF signed char     int8_t;
 TYPEDEF short           int16_t;
index ea9b894bfb8c923eaf95f57d0a868a815a19d46d..dce217718f8c825acec8d7dad38806db2064b4ec 100644 (file)
@@ -7,13 +7,12 @@ extern "C" {
 
 #include <features.h>
 
+#define __NEED_regoff_t
 #define __NEED_size_t
 
 #include <bits/alltypes.h>
 
-typedef long regoff_t;
-
-typedef struct {
+typedef struct re_pattern_buffer {
        size_t re_nsub;
        void *__opaque, *__padding[4];
        size_t __nsub2;