Re: configure warning on SunOS 4.1.4

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



On 05.02.16 03:38, Darren Tucker wrote:
On Mon, Feb 01, 2016 at 12:52:35AM +0100, Klaus Ziegler - owner of sunfreeware.de wrote:
[...]
"/usr/include/sys/audit.h", line 189: syntax error before or at: blabel_t
"/usr/include/sys/audit.h", line 189: cannot recover from previous errors
Does sys/types.h pull in the required headers?  The configure tests do
this kind of thing:

| #ifdef HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif

however right now the AC_CHECK_FUNCS are in alphabetical order so things
like sys/types.h don't get checked until quite late.  If we check these
things first it's probably a bit more likely to avoid this class of
problems across the board.

Does this patch help?  You will need to run "autoreconf" to rebuild
configure after applying.

In general, as long as a) someone is willing to do the work and b) it does not compromise support of modern platforms I'm happy to accept patches to support retrocomputing systems :-)
Hi Darren,

cool, this realy sounds like you are my man. Thanks a lot for the patch - I implemented it directly in configure, so no need to build all the autoconf tools on that platform, unfortunately your patch does not help, I still need to include <sys/label.h> in sys/audit.h to pass the test. For the time being I can live with that. More important are these - the first error where the build bails out is this:

acc -Xa -D__SYS5__ -D__EXTENSIONS__ -xCC -cg92 -fast -nolibmil -xO4 -I. -I.. -I. -I./.. -DSUNOS4 -DHAVE_CONFIG_H -c bsd-statvfs.c
"bsd-statvfs.c", line 31: warning: dubious tag declaration: struct statfs
"bsd-statvfs.c", line 33: improper member use: f_bsize
"bsd-statvfs.c", line 34: improper member use: f_bsize
"bsd-statvfs.c", line 35: improper member use: f_blocks
"bsd-statvfs.c", line 36: improper member use: f_bfree
"bsd-statvfs.c", line 37: improper member use: f_bavail
"bsd-statvfs.c", line 38: improper member use: f_files
"bsd-statvfs.c", line 39: improper member use: f_ffree
"bsd-statvfs.c", line 40: improper member use: f_ffree
"bsd-statvfs.c", line 42: undefined struct/union member: f_flags
"bsd-statvfs.c", line 43: undefined symbol: MNAMELEN
"bsd-statvfs.c", line 50: incomplete struct/union/enum statfs: fs
"bsd-statvfs.c", line 55: warning: argument #2 is incompatible with prototype:
        prototype: pointer to struct buf {} : "bsd-statvfs.c", line 31
        argument : pointer to struct statfs {}
"bsd-statvfs.c", line 68: incomplete struct/union/enum statfs: fs
"bsd-statvfs.c", line 73: warning: argument #2 is incompatible with prototype:
        prototype: pointer to struct buf {} : "bsd-statvfs.c", line 31
        argument : pointer to struct statfs {}
gmake[1]: *** [bsd-statvfs.o] Error 2

this is happens, because SunOS4 does not have <sys/statfs.h> nor <sys/fstatfs.h>, but it has <sys/vfs.h> in which "struct statfs" can be found - but not completely as required by bsd-statvfs.c, it misses struct/union member: f_flags.
 The following patches fix this:
--- openbsd-compat/bsd-statvfs.c.orig   2016-01-14 02:10:45.000000000 +0100
+++ openbsd-compat/bsd-statvfs.c        2016-02-05 14:26:52.000000000 +0100
@@ -20,6 +20,11 @@

 #if !defined(HAVE_STATVFS) || !defined(HAVE_FSTATVFS)

+#ifdef SUNOS4
+#include <sys/vfs.h>
+#define MNAMELEN       90
+#endif
+
 #include <sys/param.h>
 #ifdef HAVE_SYS_MOUNT_H
 # include <sys/mount.h>
--- /usr/include/sys/vfs.h.orig 1994-10-14 20:29:59.000000000 +0100
+++ /usr/include/sys/vfs.h      2016-02-05 14:50:15.000000000 +0100
@@ -92,7 +92,7 @@
long f_files; /* total file nodes in file system */
        long f_ffree;                   /* free file nodes in fs */
        fsid_t f_fsid;                  /* file system id */
-       long f_spare[7];                /* spare for later */
+       long f_flags;                   /* spare for later */
 };


question is for what is f_flags for? - or more important in sys/vfs.h: "long f_spare[7]; /* spare for later */". I could not find f_flags in any newer Solaris releases (checked 2.4/2.6 8 and 10). Hey, I don't mind building autoconf tools - just tell me which releases you use.

Thanks much in advance
Best Reagrds
Klaus

--

                                               Tel: (++49 6105) 968846
Klaus Ziegler                                  Mobil: (++49 172) 3064445
Zeppelinstrasse 3                              mailto: klausz@xxxxxxxxxxxxxx
D-64546 Walldorf-Moerfelden                    http://www.haus-gisela.de/~klausz

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux