From: Mircea Gherzan <mircea.gherzan@intel.com>
To: tromey@redhat.com, palves@redhat.com, jan.kratochvil@redhat.com
Cc: gdb-patches@sourceware.org, Mircea Gherzan <mircea.gherzan@intel.com>
Subject: [PATCH 4/7] gdbserver: conditionally include sys/param.h and sys/time.h
Date: Thu, 27 Jun 2013 08:44:00 -0000 [thread overview]
Message-ID: <1372322622-3216-5-git-send-email-mircea.gherzan@intel.com> (raw)
In-Reply-To: <1372322622-3216-1-git-send-email-mircea.gherzan@intel.com>
2013-06-25 Mircea Gherzan <mircea.gherzan@intel.com>
gdbserver/
* configure.ac (AC_CHECK_HEADERS): Append sys/param.h and
sys/time.h.
* configure: Rebuild.
* config.in: Rebuild.
* event-loop.c: Use HAVE_SYS_TIME_H.
* tracepoint.c: Use HAVE_SYS_TIME_H.
* remote-utils.c: Use HAVE_SYS_TIME_H.
* win32-low.c: Use HAVE_SYS_PARAM_H.
Signed-off-by: Mircea Gherzan <mircea.gherzan@intel.com>
---
gdb/gdbserver/config.in | 6 ++++++
gdb/gdbserver/configure | 2 +-
gdb/gdbserver/configure.ac | 2 +-
gdb/gdbserver/event-loop.c | 2 ++
gdb/gdbserver/remote-utils.c | 2 ++
gdb/gdbserver/tracepoint.c | 2 ++
gdb/gdbserver/win32-low.c | 2 ++
7 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/gdb/gdbserver/config.in b/gdb/gdbserver/config.in
index dada2fb..4a5a51d 100644
--- a/gdb/gdbserver/config.in
+++ b/gdb/gdbserver/config.in
@@ -184,6 +184,9 @@
*/
#undef HAVE_SYS_NDIR_H
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
/* Define to 1 if you have the <sys/procfs.h> header file. */
#undef HAVE_SYS_PROCFS_H
@@ -196,6 +199,9 @@
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index b87fedb..5df8fe3 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -4781,7 +4781,7 @@ $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cach
cd "$ac_popdir"
-for ac_header in sgtty.h termio.h termios.h sys/reg.h string.h proc_service.h sys/procfs.h thread_db.h linux/elf.h stdlib.h unistd.h errno.h fcntl.h signal.h sys/file.h malloc.h sys/ioctl.h netinet/in.h sys/socket.h netdb.h netinet/tcp.h arpa/inet.h sys/wait.h wait.h sys/un.h linux/perf_event.h
+for ac_header in sgtty.h termio.h termios.h sys/reg.h string.h proc_service.h sys/procfs.h thread_db.h linux/elf.h stdlib.h unistd.h errno.h fcntl.h signal.h sys/file.h malloc.h sys/ioctl.h netinet/in.h sys/socket.h netdb.h netinet/tcp.h arpa/inet.h sys/wait.h wait.h sys/un.h linux/perf_event.h sys/time.h sys/param.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac
index b9928d7..8142e91 100644
--- a/gdb/gdbserver/configure.ac
+++ b/gdb/gdbserver/configure.ac
@@ -69,7 +69,7 @@ AC_CHECK_HEADERS(sgtty.h termio.h termios.h sys/reg.h string.h dnl
errno.h fcntl.h signal.h sys/file.h malloc.h dnl
sys/ioctl.h netinet/in.h sys/socket.h netdb.h dnl
netinet/tcp.h arpa/inet.h sys/wait.h wait.h sys/un.h dnl
- linux/perf_event.h)
+ linux/perf_event.h sys/time.h sys/param.h)
AC_CHECK_FUNCS(pread pwrite pread64 readlink fdwalk pipe2)
AC_REPLACE_FUNCS(vasprintf vsnprintf)
diff --git a/gdb/gdbserver/event-loop.c b/gdb/gdbserver/event-loop.c
index 9e172a9..579f256 100644
--- a/gdb/gdbserver/event-loop.c
+++ b/gdb/gdbserver/event-loop.c
@@ -23,7 +23,9 @@
#include <sys/types.h>
#include <string.h>
+#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
+#endif
#ifdef USE_WIN32API
#include <windows.h>
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c
index 3f055cf..51de426 100644
--- a/gdb/gdbserver/remote-utils.c
+++ b/gdb/gdbserver/remote-utils.c
@@ -50,7 +50,9 @@
#if HAVE_FCNTL_H
#include <fcntl.h>
#endif
+#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
+#endif
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c
index 392f84b..fbb9451 100644
--- a/gdb/gdbserver/tracepoint.c
+++ b/gdb/gdbserver/tracepoint.c
@@ -25,7 +25,9 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
+#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
+#endif
#include <stddef.h>
#include <inttypes.h>
#include <stdint.h>
diff --git a/gdb/gdbserver/win32-low.c b/gdb/gdbserver/win32-low.c
index d1caa73..1365efe 100644
--- a/gdb/gdbserver/win32-low.c
+++ b/gdb/gdbserver/win32-low.c
@@ -32,7 +32,9 @@
#include <imagehlp.h>
#include <tlhelp32.h>
#include <psapi.h>
+#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
+#endif
#include <process.h>
#ifndef USE_WIN32API
--
1.7.12.4
next prev parent reply other threads:[~2013-06-27 8:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-27 8:44 [PATCH 0/7] increase the portability of the gdbserver code Mircea Gherzan
2013-06-27 8:44 ` [PATCH 6/7] common: add an alternative implementation for xstrvprintf Mircea Gherzan
2013-07-29 19:16 ` Tom Tromey
2013-06-27 8:44 ` Mircea Gherzan [this message]
2013-06-28 16:34 ` [PATCH 4/7] gdbserver: conditionally include sys/param.h and sys/time.h Tom Tromey
2013-07-02 14:46 ` Mircea Gherzan
2013-06-27 8:44 ` [PATCH 2/7] gdbserver, common: convert some variadic macros to C99 Mircea Gherzan
2013-06-28 16:02 ` Tom Tromey
2013-06-27 8:44 ` [PATCH 1/7] gdbserver, common: conditionally include the unistd.h Mircea Gherzan
2013-06-27 13:29 ` Pedro Alves
2013-06-27 19:19 ` Pedro Alves
2013-06-28 15:16 ` Mircea Gherzan
2013-06-28 18:26 ` Pedro Alves
2013-07-01 11:32 ` Pedro Alves
2013-06-27 8:44 ` [PATCH 3/7] gdbserver: avoid empty structs when not using GCC Mircea Gherzan
2013-06-28 16:04 ` Tom Tromey
2013-06-27 8:45 ` [PATCH 7/7] gdbserver: add fallback implementation for memmem Mircea Gherzan
2013-06-27 19:27 ` Pedro Alves
2013-06-28 15:18 ` Mircea Gherzan
2013-06-27 11:32 ` [PATCH 5/7] gdbserver, win32: fix some function typedefs Mircea Gherzan
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=1372322622-3216-5-git-send-email-mircea.gherzan@intel.com \
--to=mircea.gherzan@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=palves@redhat.com \
--cc=tromey@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