bug-global
[Top][All Lists]
Advanced

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

Re: global-4.8.23] build problem in Solaris 2.6


From: Shigio Yamaguchi
Subject: Re: global-4.8.23] build problem in Solaris 2.6
Date: Sun, 27 Feb 2005 10:49:18 +0900

Hello,
> Attempt to build global 4.8.3 on soliaris 2.6 failed:
> 
> if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../libutil -I../libdb
>    -I../libglibc -I../libutil -g -O2 -MT sort.o -MD -MP
>    -MF ".deps/sort.Tpo" -c -o sort.o sort.c; \
> then mv -f ".deps/sort.Tpo" ".deps/sort.Po"; else rm -f
> ".deps/sort.Tpo"; exit 1
> ; fi
> sort.c: In function `xtmpfopen':
> sort.c:342: error: `O_WRONLY' undeclared (first use in this function)
> sort.c:342: error: (Each undeclared identifier is reported only once
> sort.c:342: error: for each function it appears in.)
> sort.c:342: error: `O_CREAT' undeclared (first use in this function)
> sort.c:342: error: `O_TRUNC' undeclared (first use in this function)
> sort.c:342: error: `O_EXCL' undeclared (first use in this function)
> make[2]: *** [sort.o] Error 1

I'll fix this problem like follows in the next release.

        [configure.ac]
        dnl Checks for header files.
        AC_CHECK_HEADERS(limits.h string.h unistd.h stdarg.h sys/time.h)
                |
                v
        AC_CHECK_HEADERS(limits.h string.h unistd.h stdarg.h sys/time.h fcntl.h)

But this solution requires autotools(autoconf, automake, etc).
Instead, you can define HAVE_FCNTL_H directly in config.h or at the head
of gnusort/system.h.

        [config.h or gnusort/system.h]
        #define HAVE_FCNTL_H 1

Or, more directly to the target,

        [system.h]
        #ifdef HAVE_FCNTL_H
        # include <fcntl.h>
        #else
        # include <sys/file.h>
        #endif
                |
                v
        # include <fcntl.h>

Thank you for your report!
--
Shigio YAMAGUCHI <address@hidden> - Tama Communications Corporation
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]