On 04/06/2010 10:28 PM, Nelson H. F. Beebe wrote:
On SGI IRIX 6.5, compilation fails because of type confusion from
gcc-3.4.6's<stdint.h>:

        CC       uniwidth/width.o
        In file included from ./stdint.h:59,
                         from ./unitypes.h:23,
                         from ./uniwidth.h:23,
                         from uniwidth/width.c:23:
        /usr/local/ashare/gcc-3.4.6/include/stdint.h:10: error: syntax error before 
"int64_t"
        /usr/local/ashare/gcc-3.4.6/include/stdint.h:15: error: syntax error before 
"uint64_t"
        /usr/local/ashare/gcc-3.4.6/include/stdint.h:20: error: syntax error before 
"int_fast64_t"
        /usr/local/ashare/gcc-3.4.6/include/stdint.h:25: error: syntax error before 
"uint_fast64_t"
        /usr/local/ashare/gcc-3.4.6/include/stdint.h:27: error: syntax error before 
"uintmax_t"
        /usr/local/ashare/gcc-3.4.6/include/stdint.h:28: error: syntax error before 
"intmax_t"

The last version of GNU grep to build successfully on that system is
2.5.4, so we may just have to consider it unsupported in current grep
releases.

Can you try a newer GCC? That may actually be fixed by newer versions since GCC doesn't provide a stdint.h but simply tries to fix known problems with the system's stdint.h.

On Solaris 7 SPARC (another rather old system), compilation fails like
this:

        CC       isdir.o
        In file included from sys/stat.h:48,
        isdir.c:23:
        sys/stat.h:861: warning: `struct stat' declared inside parameter list
        sys/stat.h:861: warning: its scope is only this definition or 
declaration, which is probably not what you want.
        isdir.c: In function `isdir':
        isdir.c:30: storage size of `stats' isn't known

The last successful grep build on that system was 2.5.1 (November
2004), so it too may be left behind.

Here what's the GCC version?  Or, can you try this patch:

diff --git a/lib/isdir.c b/lib/isdir.c
index c1430cc..0d35280 100644
--- a/lib/isdir.c
+++ b/lib/isdir.c
@@ -20,6 +20,7 @@
 #include "isdir.h"

 #include <sys/types.h>
+#include <unistd.h>
 #include <sys/stat.h>

 /* If PATH is an existing directory or symbolic link to a directory,

or provide us with the output of "grep -rw struct.*stat /usr/include"?

Thanks,

Paolo


Reply via email to