CVS: gdbproxy/gdbproxy Makefile.in,1.7,1.8 configure,1.8,1.9 configure.in,1.6,1.7 gdbproxy.h,1.2,1.3 gdbproxy.info,1.2,1.3 install-sh,1.1.1.1,1.2 missing,1.1.1.1,1.2 remote.c,1.5,1.6

Steve Underwood <[email protected]> Sun, 23 Apr 2006 05:19:32 -0700
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.cvs
Message-ID <[email protected]>
Update of /cvsroot/mspgcc/gdbproxy/gdbproxy
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2312/gdbproxy/gdbproxy

Modified Files:
	Makefile.in configure configure.in gdbproxy.h gdbproxy.info 
	install-sh missing remote.c 
Log Message:
Removed some spurious carriage returns, and tidied a couple of minor things


Index: Makefile.in
===================================================================
RCS file: /cvsroot/mspgcc/gdbproxy/gdbproxy/Makefile.in,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -w -d -r1.7 -r1.8
--- Makefile.in	21 Aug 2005 15:49:57 -0000	1.7
+++ Makefile.in	23 Apr 2006 12:19:29 -0000	1.8
@@ -78,7 +78,7 @@
 	$(srcdir)/stamp-vti $(srcdir)/version.texi \
 	$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
 	THANKS TODO config.guess config.sub depcomp getopt.c getopt1.c \
-	install-sh mdate-sh missing mkinstalldirs texinfo.tex
+	install-sh mdate-sh missing texinfo.tex
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/configure.in
@@ -86,7 +86,7 @@
 	$(ACLOCAL_M4)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno configure.status.lineno
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = config.h
 CONFIG_CLEAN_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" \

Index: configure
===================================================================
RCS file: /cvsroot/mspgcc/gdbproxy/gdbproxy/configure,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -w -d -r1.8 -r1.9
--- configure	21 Aug 2005 15:49:57 -0000	1.8
+++ configure	23 Apr 2006 12:19:29 -0000	1.9
@@ -5652,7 +5652,7 @@
 
 if test "$host_os" = "cygwin" ; then
     CFLAGS="$CFLAGS -mno-cygwin"
-    LIBS="$LIBS -lws2_32"
+    LIBS="$LIBS -lws2_32 -lsetupapi"
 fi
 
 echo "$as_me:$LINENO: checking for target_skeleton.c" >&5

Index: configure.in
===================================================================
RCS file: /cvsroot/mspgcc/gdbproxy/gdbproxy/configure.in,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -w -d -r1.6 -r1.7
--- configure.in	21 Aug 2005 15:49:57 -0000	1.6
+++ configure.in	23 Apr 2006 12:19:30 -0000	1.7
@@ -66,7 +66,7 @@
 
 if test "$host_os" = "cygwin" ; then
     CFLAGS="$CFLAGS -mno-cygwin"
-    LIBS="$LIBS -lws2_32"
+    LIBS="$LIBS -lws2_32 -lsetupapi"
 fi
 
 AC_CHECK_FILES([target_skeleton.c])

Index: gdbproxy.h
===================================================================
RCS file: /cvsroot/mspgcc/gdbproxy/gdbproxy/gdbproxy.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -d -r1.2 -r1.3

Index: gdbproxy.info
===================================================================
RCS file: /cvsroot/mspgcc/gdbproxy/gdbproxy/gdbproxy.info,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -d -r1.2 -r1.3
--- gdbproxy.info	18 Nov 2003 13:42:01 -0000	1.2
+++ gdbproxy.info	23 Apr 2006 12:19:30 -0000	1.3
@@ -1,4 +1,4 @@
-This is gdbproxy.info, produced by makeinfo version 4.3 from
+This is gdbproxy.info, produced by makeinfo version 4.8 from
 gdbproxy.texi.
 
 START-INFO-DIR-ENTRY
@@ -27,8 +27,8 @@
 Top
 ***
 
-   This brief manual contains preliminary documentation for the GDB
-Remote Proxy Server or gdbproxy (collectively version 0.7.1):
+This brief manual contains preliminary documentation for the GDB Remote
+Proxy Server or gdbproxy (collectively version 0.7.1):
 
 * Menu:
 
@@ -44,8 +44,8 @@
 
 File: gdbproxy.info,  Node: Introduction,  Next: Invoking gdbproxy,  Prev: Top,  Up: Top
 
-Introduction
-************
+1 Introduction
+**************
 
    The  `gdbproxy' program is a gdbvsever-like application for embedded
 environment. The main purpose of `gdbproxy' is it allow truly remote
@@ -86,8 +86,8 @@
 
 File: gdbproxy.info,  Node: Invoking gdbproxy,  Next: Targets `remote' and `extended-remote',  Prev: Introduction,  Up: Top
 
-Invoking gdbproxy
-*****************
+2 Invoking gdbproxy
+*******************
 
      gdbproxy [--copying] [--daemon] [--debug] [--help] [--port=PORT] [--version]
      [--warranty] [TARGET [TARGET-OPTIONS] [TARGET-ARGUMENTS]]
@@ -131,11 +131,12 @@
 `TARGET-ARGUMENTS'
      Non-option arguments for target.
 
+
 
 File: gdbproxy.info,  Node: Targets `remote' and `extended-remote',  Next: Target `skeleton',  Prev: Invoking gdbproxy,  Up: Top
 
-Targets `remote' and `extended-remote'
-**************************************
+3 Targets `remote' and `extended-remote'
+****************************************
 
      gdbproxy [PROXY-OPTIONS] remote [--debug] [--use-break]
       [--baud=BAUD] [--timeout=TIMEOUT] DEVICE
@@ -168,11 +169,12 @@
      Device to be used, currently only local serial connections are
      supported.
 
+
 
 File: gdbproxy.info,  Node: Target `skeleton',  Next: Index,  Prev: Targets `remote' and `extended-remote',  Up: Top
 
-Target `skeleton'
-*****************
+4 Target `skeleton'
+*******************
 
      gdbproxy [PROXY-OPTIONS] skeleton [--debug] DRIVER
 
@@ -182,21 +184,22 @@
 Index
 *****
 
+
 * Menu:
 
-* gdbproxy:                              Introduction.
-* labslave:                              Introduction.
-* target:                                Introduction.
-* version:                               Top.
+* gdbproxy:                              Introduction.          (line 6)
+* labslave:                              Introduction.          (line 6)
+* target:                                Introduction.          (line 6)
+* version:                               Top.                   (line 6)
 
 
 
 Tag Table:
 Node: Top865
-Node: Introduction1600
-Node: Invoking gdbproxy3588
-Node: Targets `remote' and `extended-remote'4947
-Node: Target `skeleton'6208
-Node: Index6422
+Node: Introduction1597
+Node: Invoking gdbproxy3586
+Node: Targets `remote' and `extended-remote'4950
+Node: Target `skeleton'6216
+Node: Index6434
 
 End Tag Table

Index: install-sh
===================================================================
RCS file: /cvsroot/mspgcc/gdbproxy/gdbproxy/install-sh,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -w -d -r1.1.1.1 -r1.2
--- install-sh	12 Nov 2002 12:39:28 -0000	1.1.1.1
+++ install-sh	23 Apr 2006 12:19:30 -0000	1.2
@@ -1,19 +1,38 @@
 #!/bin/sh
-#
 # install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
+
+scriptversion=2005-02-02.21
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
 #
-# Copyright 1991 by the Massachusetts Institute of Technology
+# Copyright (C) 1994 X Consortium
 #
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission.  M.I.T. makes no representations about the
-# suitability of this software for any purpose.  It is provided "as is"
-# without express or implied warranty.
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
 #
 # Calling this script install-sh is preferred over install.sh, to prevent
 # `make' implicit rules from creating a file called install from it
@@ -23,13 +42,11 @@
 # from scratch.  It can only install one file at a time, a restriction
 # shared with many OS's install programs.
 
-
 # set DOITPROG to echo to test this script
 
 # Don't use :- since 4.3BSD and earlier shells don't like it.
 doit="${DOITPROG-}"
 
-
 # put in absolute paths if you don't have them in your path; or use env. vars.
 
 mvprog="${MVPROG-mv}"
@@ -41,210 +58,266 @@
 rmprog="${RMPROG-rm}"
 mkdirprog="${MKDIRPROG-mkdir}"
 
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
 chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
+chowncmd=
+chgrpcmd=
+stripcmd=
 rmcmd="$rmprog -f"
 mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
+src=
+dst=
+dir_arg=
+dstarg=
+no_target_directory=
 
-while [ x"$1" != x ]; do
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+-c         (ignored)
+-d         create directories instead of installing files.
+-g GROUP   $chgrpprog installed files to GROUP.
+-m MODE    $chmodprog installed files to MODE.
+-o USER    $chownprog installed files to USER.
+-s         $stripprog installed files.
+-t DIRECTORY  install into DIRECTORY.
+-T         report an error if DSTFILE is a directory.
+--help     display this help and exit.
+--version  display version info and exit.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test -n "$1"; do
     case $1 in
-	-c) instcmd="$cpprog"
-	    shift
+    -c) shift
 	    continue;;
 
 	-d) dir_arg=true
 	    shift
 	    continue;;
 
-	-m) chmodcmd="$chmodprog $2"
+    -g) chgrpcmd="$chgrpprog $2"
 	    shift
 	    shift
 	    continue;;
 
-	-o) chowncmd="$chownprog $2"
+    --help) echo "$usage"; exit $?;;
+
+    -m) chmodcmd="$chmodprog $2"
 	    shift
 	    shift
 	    continue;;
 
-	-g) chgrpcmd="$chgrpprog $2"
+    -o) chowncmd="$chownprog $2"
 	    shift
 	    shift
 	    continue;;
 
-	-s) stripcmd="$stripprog"
+    -s) stripcmd=$stripprog
 	    shift
 	    continue;;
 
-	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
+    -t) dstarg=$2
+	shift
 	    shift
 	    continue;;
 
-	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+    -T) no_target_directory=true
 	    shift
 	    continue;;
 
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		# this colon is to work around a 386BSD /bin/sh bug
-		:
-		dst=$1
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    *)  # When -d is used, all remaining arguments are directories to create.
+	# When -t is used, the destination is already specified.
+	test -n "$dir_arg$dstarg" && break
+        # Otherwise, the last argument is the destination.  Remove it from $@.
+	for arg
+	do
+          if test -n "$dstarg"; then
+	    # $@ is not empty: it contains at least $arg.
+	    set fnord "$@" "$dstarg"
+	    shift # fnord
 	    fi
-	    shift
-	    continue;;
+	  shift # arg
+	  dstarg=$arg
+	done
+	break;;
     esac
 done
 
-if [ x"$src" = x ]
-then
-	echo "install:	no input file specified"
+if test -z "$1"; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
 	exit 1
-else
-	true
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
 fi
 
-if [ x"$dir_arg" != x ]; then
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src ;;
+  esac
+
+  if test -n "$dir_arg"; then
 	dst=$src
-	src=""
+    src=
 	
-	if [ -d $dst ]; then
-		instcmd=:
+    if test -d "$dst"; then
+      mkdircmd=:
+      chmodcmd=
 	else
-		instcmd=mkdir
+      mkdircmd=$mkdirprog
 	fi
 else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
 # might cause directories to be created, which would be especially bad 
 # if $src (and thus $dsttmp) contains '*'.
-
-	if [ -f $src -o -d $src ]
-	then
-		true
-	else
-		echo "install:  $src does not exist"
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
 		exit 1
 	fi
 	
-	if [ x"$dst" = x ]
-	then
-		echo "install:	no destination specified"
+    if test -z "$dstarg"; then
+      echo "$0: no destination specified." >&2
 		exit 1
-	else
-		true
 	fi
 
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
+    dst=$dstarg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst ;;
+    esac
 
-	if [ -d $dst ]
-	then
-		dst="$dst"/`basename $src`
-	else
-		true
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+	echo "$0: $dstarg: Is a directory" >&2
+	exit 1
+      fi
+      dst=$dst/`basename "$src"`
 	fi
 fi
 
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+  # This sed command emulates the dirname command.
+  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
 
 # Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
 
 # Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
+  if test ! -d "$dstdir"; then
 defaultIFS='	
 '
-IFS="${IFS-${defaultIFS}}"
+    IFS="${IFS-$defaultIFS}"
 
-oIFS="${IFS}"
+    oIFS=$IFS
 # Some sh's can't handle IFS=/ for some reason.
 IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
+    set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+    shift
+    IFS=$oIFS
 
-pathcomp=''
+    pathcomp=
 
-while [ $# -ne 0 ] ; do
-	pathcomp="${pathcomp}${1}"
+    while test $# -ne 0 ; do
+      pathcomp=$pathcomp$1
 	shift
-
-	if [ ! -d "${pathcomp}" ] ;
-        then
-		$mkdirprog "${pathcomp}"
-	else
-		true
+      if test ! -d "$pathcomp"; then
+        $mkdirprog "$pathcomp"
+	# mkdir can fail with a `File exist' error in case several
+	# install-sh are creating the directory concurrently.  This
+	# is OK.
+	test -d "$pathcomp" || exit
 	fi
-
-	pathcomp="${pathcomp}/"
+      pathcomp=$pathcomp/
 done
 fi
 
-if [ x"$dir_arg" != x ]
-then
-	$doit $instcmd $dst &&
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
-	if [ x"$transformarg" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		dstfile=`basename $dst $transformbasename | 
-			sed $transformarg`$transformbasename
-	fi
-
-# don't allow the sed command to completely eliminate the filename
+  if test -n "$dir_arg"; then
+    $doit $mkdircmd "$dst" \
+      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
 
-	if [ x"$dstfile" = x ] 
-	then
-		dstfile=`basename $dst`
 	else
-		true
-	fi
-
-# Make a temp file name in the proper directory.
-
-	dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
+    dstfile=`basename "$dst"`
 
-	$doit $instcmd $src $dsttmp &&
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
 
-	trap "rm -f ${dsttmp}" 0 &&
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+    trap '(exit $?); exit' 1 2 13 15
 
-# and set any options; do chmod last to preserve setuid bits
+    # Copy the file name to the temp name.
+    $doit $cpprog "$src" "$dsttmp" &&
 
+    # and set any options; do chmod last to preserve setuid bits.
+    #
 # If any of these fail, we abort the whole thing.  If we want to
 # ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
 
 # Now rename the file to the real destination.
+    { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
+      || {
+	   # The rename failed, perhaps because mv can't rename something else
+	   # to itself, or perhaps because mv is so ancient that it does not
+	   # support -f.
 
-	$doit $rmcmd -f $dstdir/$dstfile &&
-	$doit $mvcmd $dsttmp $dstdir/$dstfile 
+	   # Now remove or move aside any old file at destination location.
+	   # We try this two ways since rm can't unlink itself on some
+	   # systems and the destination file might be busy for other
+	   # reasons.  In this case, the final cleanup might fail but the new
+	   # file should still install successfully.
+	   {
+	     if test -f "$dstdir/$dstfile"; then
+	       $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
+	       || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+	       || {
+		 echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+		 (exit 1); exit 1
+	       }
+	     else
+	       :
+	     fi
+	   } &&
 
-fi &&
+	   # Now rename the file to the real destination.
+	   $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+	 }
+    }
+  fi || { (exit 1); exit 1; }
+done
 
+# The final little trick to "correctly" pass the exit status to the exit trap.
+{
+  (exit 0); exit 0
+}
 
-exit 0
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:

Index: missing
===================================================================
RCS file: /cvsroot/mspgcc/gdbproxy/gdbproxy/missing,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -w -d -r1.1.1.1 -r1.2
--- missing	12 Nov 2002 12:39:28 -0000	1.1.1.1
+++ missing	23 Apr 2006 12:19:30 -0000	1.2
@@ -1,7 +1,11 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
-# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
-# Franc,ois Pinard <[email protected]>, 1996.
+
+scriptversion=2005-02-08.22
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
+#   Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <[email protected]>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,12 +22,44 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 # 02111-1307, USA.
 
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
 if test $# -eq 0; then
   echo 1>&2 "Try \`$0 --help' for more information"
   exit 1
 fi
 
+run=:
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
 case "$1" in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
+  ;;
 
   -h|--h|--he|--hel|--help)
     echo "\
@@ -35,6 +71,7 @@
 Options:
   -h, --help      display this help and exit
   -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
 
 Supported PROGRAM values:
   aclocal      touch file \`aclocal.m4'
@@ -43,13 +80,19 @@
   automake     touch all \`Makefile.in' files
   bison        create \`y.tab.[ch]', if possible, from existing .[ch]
   flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
   lex          create \`lex.yy.c', if possible, from existing .c
   makeinfo     touch the output file
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <[email protected]>."
+    exit $?
     ;;
 
   -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
-    echo "missing - GNU libit 0.0"
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
     ;;
 
   -*)
@@ -58,10 +101,45 @@
     exit 1
     ;;
 
-  aclocal)
+esac
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case "$1" in
+  lex|yacc)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
+
+  *)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
+    fi
+    ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+  aclocal*)
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified \`acinclude.m4' or \`configure.in'.  You might want
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
          to install the \`Automake' and \`Perl' packages.  Grab them from
          any GNU archive site."
     touch aclocal.m4
@@ -69,8 +147,8 @@
 
   autoconf)
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified \`configure.in'.  You might want to install the
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
          \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
          archive site."
     touch configure
@@ -78,35 +156,60 @@
 
   autoheader)
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified \`acconfig.h' or \`configure.in'.  You might want
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
          to install the \`Autoconf' and \`GNU m4' packages.  Grab them
          from any GNU archive site."
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER([^):]*:\([^)]*\)).*/\1/p' configure.in`
-    if test -z "$files"; then
-      files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^):]*\)).*/\1/p' configure.in`
-      test -z "$files" || files="$files.in"
-    else
-      files=`echo "$files" | sed -e 's/:/ /g'`
-    fi
-    test -z "$files" && files="config.h.in"
-    touch $files
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case "$f" in
+      *:*) touch_files="$touch_files "`echo "$f" |
+				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
     ;;
 
-  automake)
+  automake*)
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
-         you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
          You might want to install the \`Automake' and \`Perl' packages.
          Grab them from any GNU archive site."
-    find . -type f -name Makefile.am -print \
-      | sed 's/^\(.*\).am$/touch \1.in/' \
-      | sh
+    find . -type f -name Makefile.am -print |
+	   sed 's/\.am$/.in/' |
+	   while read f; do touch "$f"; done
+    ;;
+
+  autom4te)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+    if test -f "$file"; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo "#! /bin/sh"
+	echo "# Created by GNU Automake missing as a replacement of"
+	echo "#  $ $@"
+	echo "exit 0"
+	chmod +x $file
+	exit 1
+    fi
     ;;
 
   bison|yacc)
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' $msg.  You should only need it if
          you modified a \`.y' file.  You may need the \`Bison' package
          in order for those modifications to take effect.  You can get
          \`Bison' from any GNU archive site."
@@ -136,7 +239,7 @@
 
   lex|flex)
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.l' file.  You may need the \`Flex' package
          in order for those modifications to take effect.  You can get
          \`Flex' from any GNU archive site."
@@ -157,28 +260,87 @@
     fi
     ;;
 
+  help2man)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+	 you modified a dependency of a manual page.  You may need the
+	 \`Help2man' package in order for those modifications to take
+	 effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+    fi
+    if [ -f "$file" ]; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo ".ab help2man is required to generate this page"
+	exit 1
+    fi
+    ;;
+
   makeinfo)
     echo 1>&2 "\
-WARNING: \`$1' is missing on your system.  You should only need it if
+WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.texi' or \`.texinfo' file, or any other file
          indirectly affecting the aspect of the manual.  The spurious
          call might also be the consequence of using a buggy \`make' (AIX,
          DU, IRIX).  You might want to install the \`Texinfo' package or
          the \`GNU make' package.  Grab either from any GNU archive site."
+    # The file to touch is that specified with -o ...
     file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
     if test -z "$file"; then
-      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+      # ... or it is derived from the source name (dir/f.texi becomes f.info)
+      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
     fi
     touch $file
     ;;
 
+  tar)
+    shift
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+	case "$firstarg" in
+	*o*)
+	    firstarg=`echo "$firstarg" | sed s/o//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+	case "$firstarg" in
+	*h*)
+	    firstarg=`echo "$firstarg" | sed s/h//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
   *)
     echo 1>&2 "\
-WARNING: \`$1' is needed, and you do not seem to have it handy on your
-         system.  You might have modified some files without having the
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
          proper tools for further handling them.  Check the \`README' file,
-         it often tells you about the needed prerequirements for installing
+         it often tells you about the needed prerequisites for installing
          this package.  You may also peek at any GNU archive site, in case
          some other package would contain this missing \`$1' program."
     exit 1
@@ -186,3 +348,10 @@
 esac
 
 exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:

Index: remote.c
===================================================================
RCS file: /cvsroot/mspgcc/gdbproxy/gdbproxy/remote.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -d -r1.5 -r1.6
--- remote.c	21 Aug 2005 06:51:56 -0000	1.5
+++ remote.c	23 Apr 2006 12:19:30 -0000	1.6
@@ -89,7 +89,7 @@
  */
 static void  remote_help(const char *prog_name);
 static void  extended_remote_help(const char *prog_name);
-static int   remote_open(int agrc,
+static int   remote_open(int argc,
                          char * const argv[],
                          const char *prog_name,
                          log_func log_fn);



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642