Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Doug Kwan (關振德)" <dougkwan@google.com>
To: "Thiago Jung Bauermann" <bauerman@br.ibm.com>,
	"Michael Snyder" <msnyder@specifix.com>,
	"Doug Kwan (關振德)" <dougkwan@google.com>,
	gdb-patches@sourceware.org
Subject: Re: [PATCH][gdbserver] Check for sys/dir.h and sys.user.h in configuration.
Date: Wed, 23 Jul 2008 17:15:00 -0000	[thread overview]
Message-ID: <498552560807231014q317b59bai907c4cf9f9009f6e@mail.gmail.com> (raw)
In-Reply-To: <20080723143258.GA12421@caradoc.them.org>

[-- Attachment #1: Type: text/plain, Size: 1154 bytes --]

I used the autoconf-2.59.tar.bz2 from ftp.gnu.org. I got fewer spurios
diffs than before but there still seems to be some left.  Here is an
updated patch.

-Doug

2008-07-23  Doug Kwan  <dougkwan@google.com>

        * configure.ac: Check for sys/dir.h and sys.user.h.
        * config.in configure: Regenerate.
        * linux-low.c: Include <sys/dir.h> if HAVE_SYS_DIR_H is defined.
        Include <sys/user.h> if HAVE_SYS_USER_H is defined.
        (linux_write_memory): Remove declaration of errno.



2008/7/23 Daniel Jacobowitz <drow@false.org>:
> On Wed, Jul 23, 2008 at 11:01:51AM -0300, Thiago Jung Bauermann wrote:
>> On Tue, 2008-07-22 at 20:48 -0700, Michael Snyder wrote:
>> > I'm surprised by some of the diffs in the generated configure
>> > script -- wonder if you used a different version of autoconf
>> > or something?
>>
>> When I regenerate configure in my system here I get the same spurious
>> diffs that Doug Kwan got. I'm using Debian, with autoconf package
>> version 2.59a-3.
>
> Yes.  If you want to get a clean diff, use the actual autoconf
> release - not Debian's package of it.
>
> --
> Daniel Jacobowitz
> CodeSourcery
>

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 8675 bytes --]

Index: gdb/gdbserver/config.in
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/config.in,v
retrieving revision 1.21
diff -u -u -p -r1.21 config.in
--- gdb/gdbserver/config.in	5 Jun 2008 22:36:57 -0000	1.21
+++ gdb/gdbserver/config.in	23 Jul 2008 17:07:04 -0000
@@ -102,6 +102,9 @@
 /* Define to 1 if you have the <string.h> header file. */
 #undef HAVE_STRING_H
 
+/* Define to 1 if you have the <sys/dir.h> header file. */
+#undef HAVE_SYS_DIR_H
+
 /* Define to 1 if you have the <sys/file.h> header file. */
 #undef HAVE_SYS_FILE_H
 
@@ -123,6 +126,9 @@
 /* Define to 1 if you have the <sys/types.h> header file. */
 #undef HAVE_SYS_TYPES_H
 
+/* Define to 1 if you have the <sys/user.h> header file. */
+#undef HAVE_SYS_USER_H
+
 /* Define to 1 if you have the <sys/wait.h> header file. */
 #undef HAVE_SYS_WAIT_H
 
Index: gdb/gdbserver/configure
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/configure,v
retrieving revision 1.36
diff -u -u -p -r1.36 configure
--- gdb/gdbserver/configure	5 Jun 2008 22:36:57 -0000	1.36
+++ gdb/gdbserver/configure	23 Jul 2008 17:07:04 -0000
@@ -312,6 +312,7 @@ ac_includes_default="\
 
 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CPP EGREP LIBOBJS PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI RDYNAMIC GDBSERVER_DEPFILES GDBSERVER_LIBS USE_THREAD_DB srv_xmlbuiltin srv_xmlfiles LTLIBOBJS'
 ac_subst_files=''
+ac_pwd=`pwd`
 
 # Initialize some variables set by options.
 ac_init_help=
@@ -1279,6 +1280,8 @@ echo "$as_me:   current value: \`$ac_new
   fi
 done
 if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+echo "$as_me: error: in \`$ac_pwd':" >&2;}
   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
@@ -1310,6 +1313,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+
+
+
           ac_config_headers="$ac_config_headers config.h:config.in"
 
 
@@ -1623,11 +1629,13 @@ fi
 fi
 
 
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+test -z "$CC" && { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
 See \`config.log' for more details." >&5
 echo "$as_me: error: no acceptable C compiler found in \$PATH
 See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+   { (exit 1); exit 1; }; }; }
 
 # Provide some information about the compiler.
 echo "$as_me:$LINENO:" \
@@ -1713,11 +1721,13 @@ else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+echo "$as_me: error: in \`$ac_pwd':" >&2;}
 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
 See \`config.log' for more details." >&5
 echo "$as_me: error: C compiler cannot create executables
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
+   { (exit 77); exit 77; }; }; }
 fi
 
 ac_exeext=$ac_cv_exeext
@@ -1742,13 +1752,15 @@ if test "$cross_compiling" != yes; then
     if test "$cross_compiling" = maybe; then
 	cross_compiling=yes
     else
-	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+	{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
 If you meant to cross compile, use \`--host'.
 See \`config.log' for more details." >&5
 echo "$as_me: error: cannot run C compiled programs.
 If you meant to cross compile, use \`--host'.
 See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+   { (exit 1); exit 1; }; }; }
     fi
   fi
 fi
@@ -1786,11 +1798,13 @@ for ac_file in conftest.exe conftest con
   esac
 done
 else
-  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+  { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
 See \`config.log' for more details." >&5
 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
 See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+   { (exit 1); exit 1; }; }; }
 fi
 
 rm -f conftest$ac_cv_exeext
@@ -1837,11 +1851,13 @@ else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+{ { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+echo "$as_me: error: in \`$ac_pwd':" >&2;}
 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
 See \`config.log' for more details." >&5
 echo "$as_me: error: cannot compute suffix of object files: cannot compile
 See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+   { (exit 1); exit 1; }; }; }
 fi
 
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
@@ -2675,11 +2691,13 @@ rm -f conftest.err conftest.$ac_ext
 if $ac_preproc_ok; then
   :
 else
-  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+  { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
 See \`config.log' for more details." >&5
 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
 See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+   { (exit 1); exit 1; }; }; }
 fi
 
 ac_ext=c
@@ -2966,7 +2984,9 @@ done
 
 
 
-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
+
+
+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 sys/dir.h sys/user.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if eval "test \"\${$as_ac_Header+set}\" = set"; then
Index: gdb/gdbserver/configure.ac
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/configure.ac,v
retrieving revision 1.23
diff -u -u -p -r1.23 configure.ac
--- gdb/gdbserver/configure.ac	5 Jun 2008 22:36:57 -0000	1.23
+++ gdb/gdbserver/configure.ac	23 Jul 2008 17:07:04 -0000
@@ -41,7 +41,7 @@ AC_CHECK_HEADERS(sgtty.h termio.h termio
 		 stdlib.h unistd.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)
+		 netinet/tcp.h arpa/inet.h sys/wait.h sys/dir.h sys/user.h)
 AC_CHECK_FUNCS(pread pwrite pread64)
 AC_REPLACE_FUNCS(memmem)
 
Index: gdb/gdbserver/linux-low.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/linux-low.c,v
retrieving revision 1.78
diff -u -u -p -r1.78 linux-low.c
--- gdb/gdbserver/linux-low.c	12 Jul 2008 22:22:42 -0000	1.78
+++ gdb/gdbserver/linux-low.c	23 Jul 2008 17:07:05 -0000
@@ -23,9 +23,13 @@
 #include <sys/wait.h>
 #include <stdio.h>
 #include <sys/param.h>
+#ifdef HAVE_SYS_DIR_H
 #include <sys/dir.h>
+#endif
 #include <sys/ptrace.h>
+#ifdef HAVE_SYS_USER_H
 #include <sys/user.h>
+#endif
 #include <signal.h>
 #include <sys/ioctl.h>
 #include <fcntl.h>
@@ -1704,7 +1708,6 @@ linux_write_memory (CORE_ADDR memaddr, c
   = (((memaddr + len) - addr) + sizeof (PTRACE_XFER_TYPE) - 1) / sizeof (PTRACE_XFER_TYPE);
   /* Allocate buffer of that many longwords.  */
   register PTRACE_XFER_TYPE *buffer = (PTRACE_XFER_TYPE *) alloca (count * sizeof (PTRACE_XFER_TYPE));
-  extern int errno;
 
   if (debug_threads)
     {

  reply	other threads:[~2008-07-23 17:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-23  1:00 Doug Kwan (關振德)
2008-07-23  3:49 ` Michael Snyder
2008-07-23  8:29   ` Doug Kwan (關振德)
2008-07-23 14:15   ` Thiago Jung Bauermann
2008-07-23 14:33     ` Daniel Jacobowitz
2008-07-23 17:15       ` Doug Kwan (關振德) [this message]
2008-07-25 21:42         ` Daniel Jacobowitz
2008-07-25 22:54           ` Doug Kwan (關振德)
2008-07-25 23:02             ` Doug Kwan (關振德)
2008-07-25 21:35       ` Doug Kwan (關振德)
2008-07-23  7:57 ` Andreas Schwab
2008-07-23  8:33   ` Doug Kwan (關振德)

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=498552560807231014q317b59bai907c4cf9f9009f6e@mail.gmail.com \
    --to=dougkwan@google.com \
    --cc=bauerman@br.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=msnyder@specifix.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