This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GDB 5.1.1 porting patches for POSIX 1003.1-2001 hosts


> The new POSIX standard is now official (IEEE Std 1003.1-2001), and it
> has removed support for some obsolete utility options that the GDB
> build procedure uses in a few places.  Here is a proposed patch,
> relative to GDB 5.1.1, to help ensure that GDB still will build on
> POSIX 1003.1-2001 hosts.  The patch shouldn't break GDB builds on
> older hosts, as it avoids POSIX features that are not available in
> pre-POSIX platforms.
> 
> I've done this patch by code inspection; I don't actually have a fully
> conforming POSIX 1003.1-2001 host yet, though I do have some
> experimental commands that insist on the -2001 behavior if you set the
> right environment variables.

Thanks.  I've committed this.  Is the POSIX spec available online?

Andrew


> 2002-02-19  Paul Eggert  <eggert@twinsun.com>
> 
> * Makefile.in (VER): Change "head -1" to "sed q", since POSIX
> 	1003.1-2001 no longer allows "head -1".
> 	* gdb/Makefile.in (version.c): Likewise.
> 	* gdb/doc/Makefile.in (GDBvn.texi): Likewise.
> 
> 	* gdb/CONTRIBUTE: Change "diff -c3" to "diff -c", which is
> 	equivalent.  POSIX 1003.1-2001 no longer allows "diff -c3".
> 
> ===================================================================
> RCS file: Makefile.in,v
> retrieving revision 5.1.1.0
> retrieving revision 5.1.1.1
> diff -pu -r5.1.1.0 -r5.1.1.1
> --- Makefile.in	2002/01/24 03:52:59	5.1.1.0
> +++ Makefile.in	2002/02/20 04:28:34	5.1.1.1
> @@ -1762,7 +1762,7 @@ VER = `	if grep 'AM_INIT_AUTOMAKE.*BFD_V
>  	elif grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
>  	  sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \
>  	elif test -f $(TOOL)/version.in; then \
> -	  head -1 $(TOOL)/version.in; \
> +	  sed q $(TOOL)/version.in; \
>  	elif grep VERSION $(TOOL)/Makefile.in > /dev/null 2>&1; then \
>  	  sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \
>  	else \
> ===================================================================
> RCS file: gdb/Makefile.in,v
> retrieving revision 5.1.1.0
> retrieving revision 5.1.1.1
> diff -pu -r5.1.1.0 -r5.1.1.1
> --- gdb/Makefile.in	2001/11/18 05:08:36	5.1.1.0
> +++ gdb/Makefile.in	2002/02/20 04:28:34	5.1.1.1
> @@ -1024,7 +1024,7 @@ $(srcdir)/copying.c: @MAINTAINER_MODE_TR
>  version.c: Makefile version.in
>  	rm -f version.c-tmp version.c
>  	echo '#include "version.h"' >> version.c-tmp
> -	echo 'const char version[] = "'"`head -1 ${srcdir}/version.in`"'";' >> version.c-tmp
> +	echo 'const char version[] = "'"`sed q ${srcdir}/version.in`"'";' >> version.c-tmp
>  	echo 'const char host_name[] = "$(host_alias)";' >> version.c-tmp
>  	echo 'const char target_name[] = "$(target_alias)";' >> version.c-tmp
>  	mv version.c-tmp version.c
> ===================================================================
> RCS file: gdb/doc/Makefile.in,v
> retrieving revision 5.1.1.0
> retrieving revision 5.1.1.1
> diff -pu -r5.1.1.0 -r5.1.1.1
> --- gdb/doc/Makefile.in	2002/01/21 03:54:43	5.1.1.0
> +++ gdb/doc/Makefile.in	2002/02/20 04:28:34	5.1.1.1
> @@ -215,7 +215,7 @@ refcard.ps : refcard.dvi
>  
>  # File to record current GDB version number (copied from main dir version.in)
>  GDBvn.texi : ${gdbdir}/version.in
> -	echo "@set GDBVN `head -1 $(srcdir)/../version.in`" > ./GDBvn.new
> +	echo "@set GDBVN `sed q $(srcdir)/../version.in`" > ./GDBvn.new
>  	mv GDBvn.new GDBvn.texi
>  
>  # Updated atomically
> ===================================================================
> RCS file: gdb/CONTRIBUTE,v
> retrieving revision 5.1.1.0
> retrieving revision 5.1.1.1
> diff -pu -r5.1.1.0 -r5.1.1.1
> --- gdb/CONTRIBUTE	2001/09/26 20:53:27	5.1.1.0
> +++ gdb/CONTRIBUTE	2002/02/20 04:28:34	5.1.1.1
> @@ -70,7 +70,7 @@ o	Submitting Patches
>  	documentation (i.e., .texi files).
>  
>  	The patch itself. If you are accessing the CVS repository use
> -	"cvs update; cvs diff -c3p"; else, use "diff -c3p OLD NEW" or
> +	"cvs update; cvs diff -cp"; else, use "diff -cp OLD NEW" or
>  	"diff -up OLD NEW". If your version of diff does not support
>  	these options, then get the latest version of GNU diff.
>  
> 
> 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]