public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* texinfo tidiness
@ 1997-09-02 10:42 Richard Henderson
  1997-09-02 21:28 ` Jeffrey A Law
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Henderson @ 1997-09-02 10:42 UTC (permalink / raw)
  To: egcs

Some minor patches to texinfo as found in egcs.  The makeinfo one is
rather important so as not to crop the high bits from the return of
malloc and friends on Alpha.


r~


Tue Sep  2 10:19:48 1997  Richard Henderson  <rth@cygnus.com>

	* makeinfo/makeinfo.c: Maybe include <stdlib.h> for malloc et al.
	* util/install-info.c: Include <string*.h>.
	(my_strerror): Use strerror if available.

Index: texinfo/makeinfo/makeinfo.c
===================================================================
RCS file: /cvs/cvsfiles/egcs/texinfo/makeinfo/makeinfo.c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 makeinfo.c
--- makeinfo.c	1997/08/21 22:58:07	1.1.1.1
+++ makeinfo.c	1997/09/02 17:15:35
@@ -79,6 +79,10 @@ int minor_version = 67;
 #include <perror.h>
 #endif
 
+#if defined (STDC_HEADERS)
+#include <stdlib.h>
+#endif
+
 #if defined (HAVE_STRING_H)
 #include <string.h>
 #else
Index: texinfo/util/install-info.c
===================================================================
RCS file: /cvs/cvsfiles/egcs/texinfo/util/install-info.c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 install-info.c
--- install-info.c	1997/08/21 22:58:12	1.1.1.1
+++ install-info.c	1997/09/02 17:16:13
@@ -24,6 +24,12 @@ Foundation, Inc., 59 Temple Place - Suit
 #include <getopt.h>
 #include <sys/types.h>
 
+#if defined (HAVE_STRING_H)
+#include <string.h>
+#else
+#include <strings.h>
+#endif /* !HAVE_STRING_H */
+
 /* Get O_RDONLY.  */
 #ifdef HAVE_SYS_FCNTL_H
 #include <sys/fcntl.h>
@@ -342,12 +348,16 @@ char *
 my_strerror (errnum)
      int errnum;
 {
+#ifdef HAVE_STRERROR
+  return strerror(errnum);
+#else
   extern char *sys_errlist[];
   extern int sys_nerr;
 
   if (errnum >= 0 && errnum < sys_nerr)
     return sys_errlist[errnum];
   return (char *) "Unknown error";
+#endif
 }
 \f
 /* This table defines all the long-named options, says whether they

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: texinfo tidiness
  1997-09-02 10:42 texinfo tidiness Richard Henderson
@ 1997-09-02 21:28 ` Jeffrey A Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeffrey A Law @ 1997-09-02 21:28 UTC (permalink / raw)
  To: Richard Henderson; +Cc: egcs

  In message < 199709021724.KAA17702@rtl.cygnus.com >you write:
  > Some minor patches to texinfo as found in egcs.  The makeinfo one is
  > rather important so as not to crop the high bits from the return of
  > malloc and friends on Alpha.
  > 
  > 
  > Tue Sep  2 10:19:48 1997  Richard Henderson  <rth@cygnus.com>
  > 
  > 	* makeinfo/makeinfo.c: Maybe include <stdlib.h> for malloc et al.
  > 	* util/install-info.c: Include <string*.h>.
  > 	(my_strerror): Use strerror if available.
Thanks.  I've installed this patch.  It should also avoid the
sys_errlist redecls that some people are running into inside the
texinfo directory.

jeff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-09-02 21:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-09-02 10:42 texinfo tidiness Richard Henderson
1997-09-02 21:28 ` Jeffrey A Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).