>
> Thanks for the report.
> I noticed that at least a few of your changes are already
> part of the latest test release. Would you please try that
> and send any diffs relative to it?
>
> ftp://alpha.gnu.org/gnu/fetish/sh-utils-2.0g.tar.gz
The following are the diffs relative to sh-utils-2.0g to correct a) errors
resulting from not including sys/types.h prior to sy/stat.h, and b)
warnings resulting from missing declarations for strdup and getutent
under ultrix 4.3.
--
J. David Anglin [EMAIL PROTECTED]
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
--- sh-utils-2.0g/lib/canon-host.c.orig Wed Mar 10 10:05:34 1999
+++ sh-utils-2.0g/lib/canon-host.c Tue Apr 4 17:51:58 2000
@@ -43,6 +43,10 @@
# include <arpa/inet.h>
#endif
+#ifndef HAVE_STRDUP
+char * strdup();
+#endif
+
void free ();
/* Returns the canonical hostname associated with HOST (allocated in a static
--- sh-utils-2.0g/lib/readutmp.c.orig Mon Jan 31 05:22:35 2000
+++ sh-utils-2.0g/lib/readutmp.c Mon Apr 3 17:12:06 2000
@@ -21,6 +21,8 @@
#include <stdio.h>
+#include <sys/types.h>
+
#include <sys/stat.h>
#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
# include <string.h>
--- sh-utils-2.0g/lib/readutmp.h.orig Tue Feb 1 11:23:07 2000
+++ sh-utils-2.0g/lib/readutmp.h Mon Apr 3 17:47:28 2000
@@ -42,6 +42,9 @@
# endif
# else
# include <utmp.h>
+# ifndef HAVE_DECL_GETUTENT
+ struct utmp *getutent();
+# endif
# define UTMP_STRUCT_NAME utmp
# define UT_TIME_MEMBER(UT_PTR) ((UT_PTR)->ut_time)
# define SET_UTMP_ENT setutent
--- sh-utils-2.0g/lib/path-concat.c.orig Sun Sep 26 14:52:51 1999
+++ sh-utils-2.0g/lib/path-concat.c Tue Apr 4 18:23:32 2000
@@ -31,6 +31,10 @@
#endif
#include <sys/types.h>
+#ifndef HAVE_STRDUP
+char *strdup();
+#endif
+
char *malloc ();
#ifndef DIRECTORY_SEPARATOR
--- sh-utils-2.0g/m4/check-decl.m4.orig Thu Mar 2 03:23:17 2000
+++ sh-utils-2.0g/m4/check-decl.m4 Mon Apr 3 17:44:03 2000
@@ -37,6 +37,9 @@
# include <time.h>
# endif
#endif
+#ifndef HAVE_UTMPX_H
+# include <utmp.h>
+#endif
'
AC_CHECK_DECLS((
@@ -44,6 +47,7 @@
getenv,
geteuid,
getlogin,
+ getutent,
lseek,
malloc,
memchr,
@@ -61,5 +65,5 @@
AC_DEFUN(_jm_DECL_HEADERS,
[
AC_REQUIRE([AC_HEADER_STDC])
- AC_CHECK_HEADERS(memory.h string.h strings.h stdlib.h unistd.h sys/time.h)
+ AC_CHECK_HEADERS(memory.h string.h strings.h stdlib.h unistd.h sys/time.h utmpx.h)
])