From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: gdb-patches@sources.redhat.com
Subject: [COMMIT/RFC] Always include <sys/types.h> from defs.h
Date: Mon, 09 May 2005 19:44:00 -0000 [thread overview]
Message-ID: <200505091725.j49HPtK4022805@elgar.sibelius.xs4all.nl> (raw)
Including <sys/types.h> is a prerequisite to including many of the
other <sys/...> header files on BSD-derived systems. Since it isn't
the case on Linux, evry now and then the build is broken when someone
developing on Linux adds <sys/whetever.h>. This patch prevents this
from happening ever again.
Committed as obvious, since this is what bfd/sysdep.h and
opcodes/sysdep.h already do. Makes GDB build on vax-dec-ultrix4.0
again ;-).
Raises the question whether we should move towards eliminating
<sys/types.h> from all other GDB source files. What do folks think
about that?
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* defs.h: Unconditionally include <sys/types.h>.
Index: defs.h
===================================================================
RCS file: /cvs/src/src/gdb/defs.h,v
retrieving revision 1.184
diff -u -p -r1.184 defs.h
--- defs.h 8 May 2005 14:57:41 -0000 1.184
+++ defs.h 9 May 2005 17:19:26 -0000
@@ -26,14 +26,13 @@
#include "config.h" /* Generated by configure. */
+#include <sys/types.h>
#include <stdio.h>
#include <errno.h> /* System call error return status. */
#include <limits.h>
#ifdef HAVE_STDDEF_H
#include <stddef.h>
-#else
-#include <sys/types.h> /* For size_t. */
#endif
#ifdef HAVE_UNISTD_H
next reply other threads:[~2005-05-09 17:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-09 19:44 Mark Kettenis [this message]
2005-05-09 21:22 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200505091725.j49HPtK4022805@elgar.sibelius.xs4all.nl \
--to=mark.kettenis@xs4all.nl \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox