* eglibc-2_14 patch: Add protection on the __caddr_t typedef in usr/include/sys/types.h to avoid problems when caddr_t is defined.
@ 2011-12-21 19:55 Diekema, Jon (GE Aviation, US)
2011-12-21 22:27 ` Mike Frysinger
0 siblings, 1 reply; 4+ messages in thread
From: Diekema, Jon (GE Aviation, US) @ 2011-12-21 19:55 UTC (permalink / raw)
To: crossgcc
When using ct-ng 1.13.0, the following patch for eglibc-2_14 was needed
for a i686-pc-mingw32-i686-pc-linux-gnu build.
diff --git a/patches/eglibc/2_14/100-caddr_t-typedef-from-types.h.patch
b/patches/eglibc/2_14/100-caddr_t-typedef-from-types.h.patch
new file mode 100644
index 0000000..11b5f8b
--- /dev/null
+++ b/patches/eglibc/2_14/100-caddr_t-typedef-from-types.h.patch
@@ -0,0 +1,33 @@
+Add protection on the __caddr_t typedef in usr/include/sys/types.h to
avoid problems when caddr_t is defined.
+
+[ALL ] i686-pc-linux-gnu-cc -march=i686 -mtune=i686 -O2
-march=i686 -mtune=i686 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W
-Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -isystem ./include -I. -I.
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/src/gcc-linaro-4.6-2011.10/gcc
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/src/gcc-linaro-4.6-2011.10/gcc/.
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/src/gcc-linaro-4.6-2011.10/gcc/../include
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/src/gcc-linaro-4.6-2011.10/gcc/../libcpp/include
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/i686-pc-linux-gnu/build/static/include
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/i686-pc-linux-gnu/build/static/include
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/i686-pc-linux-gnu/build/static/include
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/src/gcc-linaro-4.6-2011.10/gcc/../libdecnumber
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/src/gcc-linaro-4.6-2011.10/gcc/../libdecnumber/bid -I../libdecnumber
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/i686-pc-linux-gnu/build/static/include
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/i686-pc-linux-gnu/build/static/include -g0 -finhibit-size-directive
-fno-inline -fno-exceptions -fno-zero-initialized-in-bss
-fno-toplevel-reorder -fno-tree-vectorize -fno-stack-protector -I. -I.
-I../.././gcc
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/src/gcc-linaro-4.6-2011.10/libgcc
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/src/gcc-linaro-4.6-2011.10/libgcc/.
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/src/gcc-linaro-4.6-2011.10/libgcc/../gcc
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/src/gcc-linaro-4.6-2011.10/libgcc/../include
-I/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.buil
d/src/gcc-linaro-4.6-2011.10/libgcc/config/libbid
-DENABLE_DECIMAL_BID_FORMAT -o crtbeginS.o -MT crtbeginS.o -MD -MP -MF
crtbeginS.dep -fno-omit-frame-pointer -fno-asynchronous-unwind-tables
-fPIC -c
/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.build/
src/gcc-linaro-4.6-2011.10/libgcc/../gcc/crtstuff.c -DCRT_BEGIN
-DCRTSTUFFS_O
+[ALL ] In file included from
/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.build/
src/gcc-linaro-4.6-2011.10/libgcc/../gcc/tsystem.h:90:0,
+[ALL ] from
/usr/local/src/crosstool-build/i686-pc-mingw32-i686-pc-linux-gnu/.build/
src/gcc-linaro-4.6-2011.10/libgcc/../gcc/crtstuff.c:61:
+[ERROR]
/opt/ctng/i686-pc-linux-gnu/i686-pc-linux-gnu/sysroot/usr/include/sys/ty
pes.h:117:19: error: two or more data types in declaration specifiers
+[ERROR]
/opt/ctng/i686-pc-linux-gnu/i686-pc-linux-gnu/sysroot/usr/include/sys/ty
pes.h:117:26: error: expected identifier or '(' before ';' token
+
+--- ./posix/sys/types.h 2010-01-26 06:27:38.000000000 -0500
++++ ./posix/sys/types.h 2011-11-17 11:39:03.662925595
-0500
+@@ -113,10 +113,21 @@
+
+ #ifdef __USE_BSD
+ # ifndef __daddr_t_defined
++# ifndef daddr_t
+ typedef __daddr_t daddr_t;
+-typedef __caddr_t caddr_t;
++# else
++# define __daddr_t daddr_t
++# endif
+ # define __daddr_t_defined
+ # endif
++# ifndef __caddr_t_defined
++# ifndef caddr_t
++typedef __caddr_t caddr_t;
++# else
++# define __caddr_t caddr_t
++# endif
++# define __caddr_t_defined
++# endif
+ #endif
+
+ #if (defined __USE_SVID || defined __USE_XOPEN) && !defined
__key_t_defined
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: eglibc-2_14 patch: Add protection on the __caddr_t typedef in usr/include/sys/types.h to avoid problems when caddr_t is defined.
2011-12-21 19:55 eglibc-2_14 patch: Add protection on the __caddr_t typedef in usr/include/sys/types.h to avoid problems when caddr_t is defined Diekema, Jon (GE Aviation, US)
@ 2011-12-21 22:27 ` Mike Frysinger
2011-12-23 23:42 ` Jon Diekema
0 siblings, 1 reply; 4+ messages in thread
From: Mike Frysinger @ 2011-12-21 22:27 UTC (permalink / raw)
To: crossgcc; +Cc: Diekema, Jon (GE Aviation, US)
[-- Attachment #1: Type: Text/Plain, Size: 275 bytes --]
On Wednesday 21 December 2011 14:54:38 Diekema, Jon (GE Aviation, US) wrote:
> When using ct-ng 1.13.0, the following patch for eglibc-2_14 was needed
> for a i686-pc-mingw32-i686-pc-linux-gnu build.
your patch is horribly mangled. please send with `git send-email`.
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: eglibc-2_14 patch: Add protection on the __caddr_t typedef in usr/include/sys/types.h to avoid problems when caddr_t is defined.
2011-12-21 22:27 ` Mike Frysinger
@ 2011-12-23 23:42 ` Jon Diekema
2011-12-31 7:02 ` Mike Frysinger
0 siblings, 1 reply; 4+ messages in thread
From: Jon Diekema @ 2011-12-23 23:42 UTC (permalink / raw)
To: crossgcc
[-- Attachment #1: Type: text/plain, Size: 1378 bytes --]
On 12/21/2011 05:27 PM, Mike Frysinger wrote:
> On Wednesday 21 December 2011 14:54:38 Diekema, Jon (GE Aviation, US) wrote:
>> When using ct-ng 1.13.0, the following patch for eglibc-2_14 was needed
>> for a i686-pc-mingw32-i686-pc-linux-gnu build.
>
> your patch is horribly mangled. please send with `git send-email`.
> -mike
Sorry, let's try this again.
diff --git a/patches/eglibc/2_14/100-caddr_t-typedef-from-types.h.patch
b/patches/eglibc/2_14/100-caddr_t-typedef-from-types.h.patch
new file mode 100644
index 0000000..23d968e
--- /dev/null
+++ b/patches/eglibc/2_14/100-caddr_t-typedef-from-types.h.patch
@@ -0,0 +1,28 @@
+Add protection on the __caddr_t typedef in usr/include/sys/types.h to
+avoid problems when caddr_t is defined.
+
+--- ./posix/sys/types.h 2010-01-26 06:27:38.000000000 -0500
++++ ./posix/sys/types.h 2011-11-17 11:39:03.662925595 -0500
+@@ -113,10 +113,21 @@
+
+ #ifdef __USE_BSD
+ # ifndef __daddr_t_defined
++# ifndef daddr_t
+ typedef __daddr_t daddr_t;
+-typedef __caddr_t caddr_t;
++# else
++# define __daddr_t daddr_t
++# endif
+ # define __daddr_t_defined
+ # endif
++# ifndef __caddr_t_defined
++# ifndef caddr_t
++typedef __caddr_t caddr_t;
++# else
++# define __caddr_t caddr_t
++# endif
++# define __caddr_t_defined
++# endif
+ #endif
+
+ #if (defined __USE_SVID || defined __USE_XOPEN) && !defined
__key_t_defined
[-- Attachment #2: 100-caddr_t-typedef-from-types.h.patch --]
[-- Type: text/x-patch, Size: 1016 bytes --]
diff --git a/patches/eglibc/2_14/100-caddr_t-typedef-from-types.h.patch b/patches/eglibc/2_14/100-caddr_t-typedef-from-types.h.patch
new file mode 100644
index 0000000..23d968e
--- /dev/null
+++ b/patches/eglibc/2_14/100-caddr_t-typedef-from-types.h.patch
@@ -0,0 +1,28 @@
+Add protection on the __caddr_t typedef in usr/include/sys/types.h to
+avoid problems when caddr_t is defined.
+
+--- ./posix/sys/types.h 2010-01-26 06:27:38.000000000 -0500
++++ ./posix/sys/types.h 2011-11-17 11:39:03.662925595 -0500
+@@ -113,10 +113,21 @@
+
+ #ifdef __USE_BSD
+ # ifndef __daddr_t_defined
++# ifndef daddr_t
+ typedef __daddr_t daddr_t;
+-typedef __caddr_t caddr_t;
++# else
++# define __daddr_t daddr_t
++# endif
+ # define __daddr_t_defined
+ # endif
++# ifndef __caddr_t_defined
++# ifndef caddr_t
++typedef __caddr_t caddr_t;
++# else
++# define __caddr_t caddr_t
++# endif
++# define __caddr_t_defined
++# endif
+ #endif
+
+ #if (defined __USE_SVID || defined __USE_XOPEN) && !defined __key_t_defined
[-- Attachment #3: Type: text/plain, Size: 71 bytes --]
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: eglibc-2_14 patch: Add protection on the __caddr_t typedef in usr/include/sys/types.h to avoid problems when caddr_t is defined.
2011-12-23 23:42 ` Jon Diekema
@ 2011-12-31 7:02 ` Mike Frysinger
0 siblings, 0 replies; 4+ messages in thread
From: Mike Frysinger @ 2011-12-31 7:02 UTC (permalink / raw)
To: crossgcc, jon.diekema
[-- Attachment #1: Type: Text/Plain, Size: 713 bytes --]
On Friday 23 December 2011 18:42:28 Jon Diekema wrote:
> On 12/21/2011 05:27 PM, Mike Frysinger wrote:
> > On Wednesday 21 December 2011 14:54:38 Diekema, Jon wrote:
> >> When using ct-ng 1.13.0, the following patch for eglibc-2_14 was needed
> >> for a i686-pc-mingw32-i686-pc-linux-gnu build.
> >
> > your patch is horribly mangled. please send with `git send-email`.
> > -mike
>
> Sorry, let's try this again.
thanks, this one came across fine
now for the question: is this patch correct ? glibc protects itself against
redefinition with "__daddr_t_defined". if you have code that is (wrongly imo)
defining these core types, then you should also do "#define __daddr_t_defined".
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-12-31 7:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-21 19:55 eglibc-2_14 patch: Add protection on the __caddr_t typedef in usr/include/sys/types.h to avoid problems when caddr_t is defined Diekema, Jon (GE Aviation, US)
2011-12-21 22:27 ` Mike Frysinger
2011-12-23 23:42 ` Jon Diekema
2011-12-31 7:02 ` Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).