* [RFA] include sys/types.h before sys/prctl.h (for mips-irix).
@ 2010-11-23 18:40 Joel Brobecker
2010-12-15 7:55 ` [RFA/PING] " Joel Brobecker
0 siblings, 1 reply; 5+ messages in thread
From: Joel Brobecker @ 2010-11-23 18:40 UTC (permalink / raw)
To: gcc-patches; +Cc: Joel Brobecker
On mips-irix, sys/prctl.h depends on various types such as ptid_t being
declared. Otherwise, the build fails as follow:
/usr/include/sys/prctl.h:45:9: error: expected specifier-qualifier-list before 'pid_t'
/usr/include/sys/prctl.h:91:17: error: expected specifier-qualifier-list before 'uint32_t'
[...]
libiberty/ChangeLog:
* setproctitle.c: If <sys/types.h> exists, include it before including
<sys/prctl.h>.
Tested on x86_64-linux, where both HAVE_SYS_PRCTL_H and HAVE_SYS_TYPES_H
are defined (I used the gdb-testsuite). OK to commit?
Thanks,
--
Joel
---
libiberty/setproctitle.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/libiberty/setproctitle.c b/libiberty/setproctitle.c
index ceb0a38..dfcf000 100644
--- a/libiberty/setproctitle.c
+++ b/libiberty/setproctitle.c
@@ -21,6 +21,9 @@ Boston, MA 02110-1301, USA. */
#include "config.h"
#endif
#ifdef HAVE_SYS_PRCTL_H
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
#include <sys/prctl.h>
#endif
#include "ansidecl.h"
--
1.7.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [RFA/PING] include sys/types.h before sys/prctl.h (for mips-irix).
2010-11-23 18:40 [RFA] include sys/types.h before sys/prctl.h (for mips-irix) Joel Brobecker
@ 2010-12-15 7:55 ` Joel Brobecker
2010-12-15 9:37 ` Ralf Wildenhues
0 siblings, 1 reply; 5+ messages in thread
From: Joel Brobecker @ 2010-12-15 7:55 UTC (permalink / raw)
To: gcc-patches
A friendly request for a small patch posted about 3 weeks ago...
Thank you!
On Tue, Nov 23, 2010 at 08:54:18AM -0800, Joel Brobecker wrote:
> On mips-irix, sys/prctl.h depends on various types such as ptid_t being
> declared. Otherwise, the build fails as follow:
>
> /usr/include/sys/prctl.h:45:9: error: expected specifier-qualifier-list before 'pid_t'
> /usr/include/sys/prctl.h:91:17: error: expected specifier-qualifier-list before 'uint32_t'
> [...]
libiberty/ChangeLog:
* setproctitle.c: If <sys/types.h> exists, include it before including
<sys/prctl.h>.
Tested on x86_64-linux, where both HAVE_SYS_PRCTL_H and HAVE_SYS_TYPES_H
are defined (I used the gdb-testsuite). OK to commit?
Thanks,
--
Joel
---
libiberty/setproctitle.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/libiberty/setproctitle.c b/libiberty/setproctitle.c
index ceb0a38..dfcf000 100644
--- a/libiberty/setproctitle.c
+++ b/libiberty/setproctitle.c
@@ -21,6 +21,9 @@ Boston, MA 02110-1301, USA. */
#include "config.h"
#endif
#ifdef HAVE_SYS_PRCTL_H
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
#include <sys/prctl.h>
#endif
#include "ansidecl.h"
--
Joel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFA/PING] include sys/types.h before sys/prctl.h (for mips-irix).
2010-12-15 7:55 ` [RFA/PING] " Joel Brobecker
@ 2010-12-15 9:37 ` Ralf Wildenhues
2010-12-15 9:52 ` Joel Brobecker
0 siblings, 1 reply; 5+ messages in thread
From: Ralf Wildenhues @ 2010-12-15 9:37 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gcc-patches
Hello Joel,
* Joel Brobecker wrote on Wed, Dec 15, 2010 at 07:07:27AM CET:
> A friendly request for a small patch posted about 3 weeks ago...
> Thank you!
I think your patch has already been obsoleted by this one in trunk:
2010-11-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* setproctitle.c [HAVE_SYS_PRCTL_H]: Include <sys/types.h>.
> On Tue, Nov 23, 2010 at 08:54:18AM -0800, Joel Brobecker wrote:
> libiberty/ChangeLog:
>
> * setproctitle.c: If <sys/types.h> exists, include it before including
> <sys/prctl.h>.
Cheers,
Ralf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFA/PING] include sys/types.h before sys/prctl.h (for mips-irix).
2010-12-15 9:37 ` Ralf Wildenhues
@ 2010-12-15 9:52 ` Joel Brobecker
2010-12-15 12:11 ` Rainer Orth
0 siblings, 1 reply; 5+ messages in thread
From: Joel Brobecker @ 2010-12-15 9:52 UTC (permalink / raw)
To: Ralf Wildenhues, gcc-patches
> I think your patch has already been obsoleted by this one in trunk:
>
> 2010-11-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
>
> * setproctitle.c [HAVE_SYS_PRCTL_H]: Include <sys/types.h>.
Indeed! I was a little surprised to see that it's included
unconditionally, but I suppose that <sys/types.h> is expected to
always be present on platforms that have <sys/prctl.h>.
Thank you!
--
Joel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFA/PING] include sys/types.h before sys/prctl.h (for mips-irix).
2010-12-15 9:52 ` Joel Brobecker
@ 2010-12-15 12:11 ` Rainer Orth
0 siblings, 0 replies; 5+ messages in thread
From: Rainer Orth @ 2010-12-15 12:11 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Ralf Wildenhues, gcc-patches
Joel Brobecker <brobecker@adacore.com> writes:
>> I think your patch has already been obsoleted by this one in trunk:
>>
>> 2010-11-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
>>
>> * setproctitle.c [HAVE_SYS_PRCTL_H]: Include <sys/types.h>.
>
> Indeed! I was a little surprised to see that it's included
> unconditionally, but I suppose that <sys/types.h> is expected to
> always be present on platforms that have <sys/prctl.h>.
Not only that, it's included in all libiberty sources unconditionally,
so I concluded there's no problem doing so here :-)
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-12-15 11:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-23 18:40 [RFA] include sys/types.h before sys/prctl.h (for mips-irix) Joel Brobecker
2010-12-15 7:55 ` [RFA/PING] " Joel Brobecker
2010-12-15 9:37 ` Ralf Wildenhues
2010-12-15 9:52 ` Joel Brobecker
2010-12-15 12:11 ` Rainer Orth
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).