texinfo tidiness
Richard Henderson
rth@cygnus.com
Tue Sep 2 10:42:00 GMT 1997
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
}
/* This table defines all the long-named options, says whether they
More information about the Gcc
mailing list